Build problems on Debian 10

Hi, I am able to build Audacity (git and v2.3.2) on Debian 10 but they will not launch successfully; they will always segfault on launch.

Build config is as follow:

WX_CONFIG=/home/etna/Runtime/Applications/WxWidgetsGTK3NoInstall/wxWidgets-3.1.1/buildGTK3/wx-config LIBRARY_PATH=/home/etna/Runtime/lib:/home/etna/Runtime/lib64:$LIBRARY_PATH C_INCLUDE_PATH=/home/etna/Runtime/include:$C_INCLUDE_PATH CPLUS_INCLUDE_PATH=/home/etna/Runtime/include:$CPLUS_INCLUDE_PATH LD_LIBRARY_PATH=/home/etna/Runtime/lib:/home/etna/Runtime/lib64:$LD_LIBRARY_PATH PATH=/home/etna/Runtime/bin:/home/etna/Runtime/libexec:$PATH PKG_CONFIG_PATH=/home/etna/Runtime/lib/pkgconfig:/home/etna/Runtime/lib64/pkgconfig:$PKG_CONFIG_PATH LDFLAGS='-L/home/etna/Runtime/lib -L/home/etna/Runtime/lib64' CPPFLAGS='-I/home/etna/Runtime/include' CC=/home/etna/Runtime/bin/clang CXX=/home/etna/Runtime/bin/clang++ cc=/home/etna/Runtime/bin/clang cxx=/home/etna/Runtime/bin/clang++ CFLAGS='-Wl,-rpath -Wl,/home/etna/Runtime/lib -Wl,-rpath -Wl,/home/etna/Runtime/lib64 -fPIC' CXXFLAGS='-L/home/etna/Runtime/lib -L/home/etna/Runtime/lib64 -I/home/etna/Runtime/include -Wl,-rpath -Wl,/home/etna/Runtime/lib -Wl,-rpath -Wl,/home/etna/Runtime/lib64 -fPIC' ../configure --prefix=/home/etna/Runtime/Applications/Audacity/Build25Aug2019 --enable-shared --disable-static --with-lame --with-libflac --with-libmad --with-libvorbis --without-lv2 --enable-debug

Application log when running as follow:

LD_LIBRARY_PATH=/home/etna/Runtime/opt/wxGTK2-3.1.2/lib:/home/etna/Runtime/lib:/home/etna/Runtime/lib64:$LD_LIBRARY_PATH PATH=/home/etna/Runtime/opt/wxGTK2-3.1.2/bin:/home/etna/Runtime/bin:/home/etna/Runtime/libexec:$PATH ./audacity
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
Expression 'alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &alsaBufferFrames )' failed in '../../../lib-src/portaudio-v19/src/hostapi/alsa/pa_linux_alsa.c', line: 923
Expression 'alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &alsaBufferFrames )' failed in '../../../lib-src/portaudio-v19/src/hostapi/alsa/pa_linux_alsa.c', line: 923
Expression 'alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &alsaBufferFrames )' failed in '../../../lib-src/portaudio-v19/src/hostapi/alsa/pa_linux_alsa.c', line: 923
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_a52.c:823:(_snd_pcm_a52_open) a52 is only for playback
Segmentation fault

Performing a backtrace reveals the following:

LD_LIBRARY_PATH=/home/etna/Runtime/opt/wxGTK2-3.1.2/lib:/home/etna/Runtime/lib:/home/etna/Runtime/lib64:$LD_LIBRARY_PATH PATH=/home/etna/Runtime/opt/wxGTK2-3.1.2/bin:/home/etna/Runtime/bin:/home/etna/Runtime/libexec:$PATH gdb ./audacity 
GNU gdb (Debian 8.2.1-2) 8.2.1
Copyright (C) 2018 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./audacity...done.
(gdb) run
Starting program: /home/etna/Tmpbuilddir/audacity/audacity/build/audacity 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[New Thread 0x7ffff3299700 (LWP 121614)]
[New Thread 0x7ffff2a98700 (LWP 121615)]
[New Thread 0x7ffff2265700 (LWP 121616)]
[New Thread 0x7ffff1a64700 (LWP 121617)]
[New Thread 0x7ffff1033700 (LWP 121618)]
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.rear
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.center_lfe
ALSA lib pcm.c:2565:(snd_pcm_open_noupdate) Unknown PCM cards.pcm.side
ALSA lib pcm_route.c:869:(find_matching_chmap) Found no matching channel map
Expression 'alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &alsaBufferFrames )' failed in '../../../lib-src/portaudio-v19/src/hostapi/alsa/pa_linux_alsa.c', line: 923
Expression 'alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &alsaBufferFrames )' failed in '../../../lib-src/portaudio-v19/src/hostapi/alsa/pa_linux_alsa.c', line: 923
Expression 'alsa_snd_pcm_hw_params_set_buffer_size_near( pcm, hwParams, &alsaBufferFrames )' failed in '../../../lib-src/portaudio-v19/src/hostapi/alsa/pa_linux_alsa.c', line: 923
[New Thread 0x7fffd99c2700 (LWP 121619)]
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
[Thread 0x7fffd99c2700 (LWP 121619) exited]
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
[New Thread 0x7fffd99c2700 (LWP 121620)]
Cannot connect to server socket err = No such file or directory
Cannot connect to server request channel
jack server is not running or cannot be started
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
JackShmReadWritePtr::~JackShmReadWritePtr - Init not done for -1, skipping unlock
[Thread 0x7fffd99c2700 (LWP 121620) exited]
[Thread 0x7ffff1033700 (LWP 121618) exited]
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
ALSA lib pcm_oss.c:377:(_snd_pcm_oss_open) Unknown field port
[New Thread 0x7ffff1033700 (LWP 121621)]
[Thread 0x7ffff1033700 (LWP 121621) exited]
[New Thread 0x7ffff1033700 (LWP 121622)]
[Thread 0x7ffff1033700 (LWP 121622) exited]
ALSA lib pcm_a52.c:823:(_snd_pcm_a52_open) a52 is only for playback

Thread 1 "audacity" received signal SIGSEGV, Segmentation fault.
0x0000000000000000 in ?? ()
(gdb) bt
#0  0x0000000000000000 in ?? ()
#1  0x0000000000fa81bd in avcodec_register_all () at ../../src/FFmpeg.h:592
#2  0x00007fffd9fa8958 in _snd_pcm_a52_open () from /usr/lib/x86_64-linux-gnu/alsa-lib/libasound_module_pcm_a52.so
#3  0x00007ffff60523f4 in ?? () from /lib/x86_64-linux-gnu/libasound.so.2
#4  0x00007ffff6052a88 in ?? () from /lib/x86_64-linux-gnu/libasound.so.2
#5  0x00007ffff6055467 in snd_pcm_open () from /lib/x86_64-linux-gnu/libasound.so.2
#6  0x000000000169b91b in OpenPcm ()
#7  0x000000000169b6c9 in FillInDevInfo ()
#8  0x0000000001699366 in BuildDeviceList ()
#9  0x00000000016979f6 in PaAlsa_Initialize ()
#10 0x0000000001695895 in InitializeHostApis ()
#11 0x00000000016957a2 in Pa_Initialize ()
#12 0x0000000000ef7d35 in AudioIO::AudioIO (this=0x1f3ad40) at ../../src/AudioIO.cpp:986
#13 0x0000000000ef74a1 in AudioIO::Init () at ../../src/AudioIO.cpp:893
#14 0x0000000000ee654a in AudacityApp::OnInit (this=0x1a80860) at ../../src/AudacityApp.cpp:1495
#15 0x0000000000eef39c in wxAppConsoleBase::CallOnInit (this=0x1a80860) at /home/etna/Runtime/Applications/WxWidgetsGTK3NoInstall/wxWidgets-3.1.1/include/wx/app.h:93
#16 0x00007ffff72f4950 in wxEntry(int&, wchar_t**) () from /home/etna/Runtime/Applications/WxWidgetsGTK3NoInstall/wxWidgets-3.1.1/buildGTK3/lib/libwx_baseu-3.1.so.1
#17 0x0000000000ee3b43 in main (argc=1, argv=0x7fffffffe258) at ../../src/AudacityApp.cpp:801

Can anyone help? I have successfully built older versions of Audacity with wxGTK3 on older distributions using the same settings.

Thank you.

Are you using some oddball sound card drivers?

Not at all. Heck, there’s nothing exotic here; it’s just the typical onboard sound chip on my x399 motherboard.

But out of impulse, I tried rebuilding with the ‘–without-ffmpeg’ option and it launched properly. :astonished:

And it worked when I copied the build out to a laptop which is also running Debian 10.

It’s even more boggling that there were no references to ffmpeg in the backtrace.

Try building with the option:

--disable-dynamic-loading

By default, Audacity loads LAME and FFmpeg dynamically, but many Linux distros have versions of FFmpeg that are too recent for this to work. However, if you are able to build against a more recent system version of FFmpeg and disable dynamic loading, then Audacity links to FFmpeg in the normal way.