Server startup error

Hi,

I’m new to CasparCG and I can’t make it start either in ubuntu 22.04 nor 20.04 (current test env).
Here’s the output:

# casparcg caspercg.config 
Type "q" to close application.
Failed to set log level [ddebug]
Logging [info] or higher severity to log/

[2023-04-03 11:56:01.147] [info]    ############################################################################
[2023-04-03 11:56:01.147] [info]    CasparCG Server is distributed by the Swedish Broadcasting Corporation (SVT)
[2023-04-03 11:56:01.147] [info]    under the GNU General Public License GPLv3 or higher.
[2023-04-03 11:56:01.147] [info]    Please see LICENSE.TXT for details.
[2023-04-03 11:56:01.147] [info]    ############################################################################
[2023-04-03 11:56:01.147] [info]    Starting CasparCG Video and Graphics Playout Server 2.2.0 N/A Stable
[2023-04-03 11:56:01.148] [info]    Initialized ffmpeg module.
[2023-04-03 11:56:01.148] [info]    Initialized oal module.
[2023-04-03 11:56:01.148] [info]    Initialized decklink module.
[2023-04-03 11:56:01.148] [info]    Initialized screen module.
[2023-04-03 11:56:01.148] [info]    Initialized image module.
[2023-04-03 11:56:01.148] [info]    "/home/ubuntu/Documents/caspercg.config":
[2023-04-03 11:56:01.148] [info]    -----------------------------------------
[2023-04-03 11:56:01.148] [info]    <?xml version="1.0" encoding="utf-8"?>
[2023-04-03 11:56:01.148] [info]    <configuration>
[2023-04-03 11:56:01.148] [info]       <paths>
[2023-04-03 11:56:01.148] [info]          <media-path>media/</media-path>
[2023-04-03 11:56:01.148] [info]          <log-path>log/</log-path>
[2023-04-03 11:56:01.148] [info]          <data-path>data/</data-path>
[2023-04-03 11:56:01.148] [info]          <template-path>template/</template-path>
[2023-04-03 11:56:01.148] [info]       </paths>
[2023-04-03 11:56:01.148] [info]       <lock-clear-phrase>secret</lock-clear-phrase>
[2023-04-03 11:56:01.148] [info]       <controllers>
[2023-04-03 11:56:01.148] [info]          <tcp>
[2023-04-03 11:56:01.148] [info]             <port>5250</port>
[2023-04-03 11:56:01.148] [info]             <protocol>AMCP</protocol>
[2023-04-03 11:56:01.148] [info]          </tcp>
[2023-04-03 11:56:01.148] [info]       </controllers>
[2023-04-03 11:56:01.148] [info]       <amcp>
[2023-04-03 11:56:01.148] [info]          <media-server>
[2023-04-03 11:56:01.148] [info]             <host>localhost</host>
[2023-04-03 11:56:01.148] [info]             <port>8000</port>
[2023-04-03 11:56:01.148] [info]          </media-server>
[2023-04-03 11:56:01.148] [info]       </amcp>
[2023-04-03 11:56:01.148] [info]       <log-level>ddebug</log-level>
[2023-04-03 11:56:01.148] [info]       <ndi>
[2023-04-03 11:56:01.148] [info]          <auto-load>false</auto-load>
[2023-04-03 11:56:01.148] [info]       </ndi>
[2023-04-03 11:56:01.148] [info]       <channels>
[2023-04-03 11:56:01.148] [info]          <channel>
[2023-04-03 11:56:01.148] [info]             <consumers>
[2023-04-03 11:56:01.148] [info]                <system-audio>
[2023-04-03 11:56:01.148] [info]                   <channel-layout>stereo</channel-layout>
[2023-04-03 11:56:01.148] [info]                   <latency>200</latency>
[2023-04-03 11:56:01.148] [info]                </system-audio>
[2023-04-03 11:56:01.148] [info]                <screen>
[2023-04-03 11:56:01.148] [info]                   <device>1</device>
[2023-04-03 11:56:01.148] [info]                   <video-mode>1080p5000</video-mode>
[2023-04-03 11:56:01.148] [info]                   <windowed>true</windowed>
[2023-04-03 11:56:01.148] [info]                   <key-only>false</key-only>
[2023-04-03 11:56:01.148] [info]                </screen>
[2023-04-03 11:56:01.148] [info]                <ndi>
[2023-04-03 11:56:01.148] [info]                   <name>TestCasperCG</name>
[2023-04-03 11:56:01.148] [info]                   <allow-fields>false</allow-fields>
[2023-04-03 11:56:01.148] [info]                </ndi>
[2023-04-03 11:56:01.148] [info]             </consumers>
[2023-04-03 11:56:01.148] [info]          </channel>
[2023-04-03 11:56:01.148] [info]       </channels>
[2023-04-03 11:56:01.148] [info]       <osc>
[2023-04-03 11:56:01.148] [info]          <default-port>6250</default-port>
[2023-04-03 11:56:01.148] [info]          <disable-send-to-amcp-clients>false</disable-send-to-amcp-clients>
[2023-04-03 11:56:01.148] [info]          <predefined-clients>
[2023-04-03 11:56:01.148] [info]             <predefined-client>
[2023-04-03 11:56:01.148] [info]                <address>127.0.0.1</address>
[2023-04-03 11:56:01.148] [info]                <port>5253</port>
[2023-04-03 11:56:01.148] [info]             </predefined-client>
[2023-04-03 11:56:01.148] [info]          </predefined-clients>
[2023-04-03 11:56:01.148] [info]       </osc>
[2023-04-03 11:56:01.148] [info]    </configuration>
[2023-04-03 11:56:01.148] [info]    -----------------------------------------
[2023-04-03 11:56:01.246] [info]    Initializing OpenGL Device.
[2023-04-03 11:56:01.248] [info]    Initialized OpenGL 4.6 (Core Profile) Mesa 21.2.6 AMD
[2023-04-03 11:56:01.267] [info]    [asio] Shutting down global io_service.
[2023-04-03 11:56:01.267] [info]    [asio] Global io_service uninitialized.
[2023-04-03 11:56:01.272] [error]   Exception: /build/casparcg-server-ESSf4r/casparcg-server-2.2.0+dfsg/src/accelerator/ogl/util/shader.cpp(74): Throw in function caspar::accelerator::ogl::shader::impl::impl(const string&, const string&)
[2023-04-03 11:56:01.272] [error]   Dynamic exception type: boost::wrapexcept<caspar\::caspar_exception>
[2023-04-03 11:56:01.272] [error]   [caspar::tag_msg_info*] = Failed to compile fragment shader:
[2023-04-03 11:56:01.272] [error]   0:471(9): error: no function with name 'texture2D'
[2023-04-03 11:56:01.272] [error]   0:471(2): error: could not implicitly convert return value to vec4, in function `get_sample'
[2023-04-03 11:56:01.272] [error]   
[2023-04-03 11:56:01.272] [error]   
[2023-04-03 11:56:01.272] [error]   [caspar::tag_stacktrace_info*] =  0# caspar::stacktrace_info() in casparcg
[2023-04-03 11:56:01.272] [error]    1# caspar::accelerator::ogl::shader::impl::impl(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in casparcg
[2023-04-03 11:56:01.272] [error]    2# caspar::accelerator::ogl::shader::shader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) in casparcg
[2023-04-03 11:56:01.272] [error]    3# caspar::accelerator::ogl::get_image_shader(caspar::spl::shared_ptr\<caspar::accelerator::ogl::device> const&) in casparcg
[2023-04-03 11:56:01.272] [error]    4# std::_Function_handler<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> (), std::__future_base::_Task_setter<std::unique_ptr<std::__future_base::_Result<std::shared_ptr\<caspar::accelerator::ogl::shader> >, std::__future_base::_Result_base::_Deleter>, std::__future_base::_Task_state<caspar::accelerator::ogl::image_kernel::impl::impl(caspar::spl::shared_ptr\<caspar::accelerator::ogl::device> const&)::{lambda()#1}, std::allocator<int>, std::shared_ptr\<caspar::accelerator::ogl::shader> ()>::_M_run()::{lambda()#1}, std::shared_ptr\<caspar::accelerator::ogl::shader> > >::_M_invoke(std::_Any_data const&) in casparcg
[2023-04-03 11:56:01.272] [error]    5# std::__future_base::_State_baseV2::_M_do_set(std::function<std::unique_ptr<std::__future_base::_Result_base, std::__future_base::_Result_base::_Deleter> ()>*, bool*) in casparcg
[2023-04-03 11:56:01.272] [error]    6# 0x00007F81CB6D74DF in /lib/x86_64-linux-gnu/libpthread.so.0
[2023-04-03 11:56:01.272] [error]    7# std::_Function_handler<void (), caspar::accelerator::ogl::device::dispatch_async<caspar::accelerator::ogl::image_kernel::impl::impl(caspar::spl::shared_ptr\<caspar::accelerator::ogl::device> const&)::{lambda()#1}>(caspar::accelerator::ogl::image_kernel::impl::impl(caspar::spl::shared_ptr\<caspar::accelerator::ogl::device> const&)::{lambda()#1}&&)::{lambda()#1}>::_M_invoke(std::_Any_data const&) in casparcg
[2023-04-03 11:56:01.272] [error]    8# void boost::asio::system_executor::dispatch<std::function<void ()>, std::allocator<void> >(std::function<void ()>&&, std::allocator<void> const&) const in casparcg
[2023-04-03 11:56:01.272] [error]    9# boost::asio::detail::executor_op<boost::asio::detail::work_dispatcher<std::function<void ()> >, std::allocator<void>, boost::asio::detail::scheduler_operation>::do_complete(void*, boost::asio::detail::scheduler_operation*, boost::system::error_code const&, unsigned long) in casparcg
[2023-04-03 11:56:01.272] [error]   10# boost::asio::detail::scheduler::run(boost::system::error_code&) in casparcg
[2023-04-03 11:56:01.272] [error]   11# std::thread::_State_impl<std::thread::_Invoker<std::tuple\<caspar::accelerator::ogl::device::impl::impl()::{lambda()#3}> > >::_M_run() in casparcg
[2023-04-03 11:56:01.272] [error]   12# 0x00007F81CB416DE4 in /lib/x86_64-linux-gnu/libstdc++.so.6
[2023-04-03 11:56:01.272] [error]   13# 0x00007F81CB6CE609 in /lib/x86_64-linux-gnu/libpthread.so.0
[2023-04-03 11:56:01.272] [error]   14# clone in /lib/x86_64-linux-gnu/libc.so.6
[2023-04-03 11:56:01.272] [error]   
[2023-04-03 11:56:01.272] [error]   
[2023-04-03 11:56:01.272] [error]    0# caspar::log::get_stack_trace\[abi:cxx11]() in casparcg
[2023-04-03 11:56:01.272] [error]    1# 0x000055EA29A9D30F in casparcg
[2023-04-03 11:56:01.272] [error]    2# __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
[2023-04-03 11:56:01.272] [error]    3# _start in casparcg
[2023-04-03 11:56:01.272] [error]   
[2023-04-03 11:56:01.277] [fatal]   Unhandled exception in main thread. Please report this error on the 


CasparCG will automatically shutdown. See the log file located at the configured log-file folder for more information.

Being a Windows guy, I don’t know much about Ubuntu Linux. But from your log I see, that you have an AMD GPU. If I remember right we had problems with these in the past. Can you try wit an nVidia GPU?

This is a known issue with some older versions. Latest master fixes this, I don’t think the fix has made it to a stable release yet.

Sorry, I don’t have nvidia laptops to install in… only AMD

Ok, I will try to compile the app and try again. I’m using ubuntu version. I will post here the results.
Thanks

If you’re compiling a version, it should be enough to apply fix: Replace deprecated texture2D GLSL function (#1420) · CasparCG/server@09c6553 · GitHub on top of any version you wish to use.

But master should be usable and stable at this point, so I would recommend giving that a try unless you have a reason not to

It worked, now it’s running.
Thanks.