Open OPNA2608 opened 2 years ago
Do the build scripts work for you?
In any case, the build works fine on both RedHat/Fedora and Ubuntu distros so it is likely something specific to your distro.
Still errors when using the build scripts.
Here's the build log when using the build scripts.
You'll need to add "-ldl" to the linker flags, glide.o has code to load a *.so shared object at runtime.
This should happen automatically. Without additional intervention.
Dosbox-x requires dlclose.
hardware/libhardware.a(glide.o): undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
His build is unusual. Since it builds without alsa
. Though I don't know if it's intentional?
-ldl
is added by the way, "thanks" to alsa
.
edit: It's no good mixing SDL_net with SDL2. SDL2_net must be used for SDL2.
Adding ALSA indeed "fixes" it like @grapeli said. Truth be told I didn't know it was needed? I have nothing to test audio with rn but it still seems to connect to Pulseaudio so I didn't think much of it. If it's not supported/intended, then the configure script should prolly error out if it's missing.
Regardless of that, the configure script should really add the libraries needed for the ALSA-independent codebase.
I can't comment on the SDL*_net stuff.
@OPNA2608 ALSA is not required. It is useful (even indispensable) when you want to use an external MIDI source - fluidsynth, timidity, mt32 or ALSA midi itself. I emphasize that this does not apply to the fluidsynth and mt32 libraries linked to dosbox-x.
SDL2 can use pulse, jack, pipewire (probably from 2.0.16), oss and of course alsa. 99% of the distribution is built anyway by pulseaudio, pipewire, jack with possible alsa usage. So every distribution includes libasound.so anyway (with no header files installed by default at most).
Code of Conduct & Contributing Guidelines
Have you checked that no other similar bug report(s) already exists?
What operating system(s) this bug have occurred on?
Linux (NixOS 21.11) x86_64
What version(s) of DOSBox-X have this bug?
0.83.21, confirmed as far back as 0.83.9
Describe the bug
Linking against the system-installed SDL2 errors out with missing symbol errors.
Build log line that causes the error is the final linking step:
Missing
-ldl
fordlclose
:After forcing
-ldl
into linker flags, also missing-lpthread
forpthread_create
:None such errors occur when building against the vendored SDL1.x.
Expected behavior
All libraries required for the used functions should be detected & have their required linker flags added by the configure tool.
Steps to reproduce the behaviour
Used configuration
No response
Emulator log
Additional context
I'm not using your build scripts but manually calling all the autotool & make stuff as part of a staged packaging script. I don't think it ends up being too different from the way your scripts are working though?
https://github.com/OPNA2608/nixpkgs/blob/init/dosbox-x/pkgs/misc/emulators/dosbox-x/default.nix
You can see here that my workaround is to hack
-ldl -lpthread
into the compiler wrapper'sLDFLAGS
.