comms/svxlink runtime errors

Asking here before submitting something on bugzilla.

https://www.freshports.org/comms/svxlink/

svxlink gives the following errors when run.

----
Code:
SvxLink v1.7.0 Copyright (C) 2003-2019 Tobias Blomberg / SM0SVX

SvxLink comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it in accordance with the terms and conditions in the
GNU GPL (General Public License) version 2 or later.

Using configuration file: /usr/local/etc/svxlink/svxlink.conf
--- Using sample rate 48000Hz

Starting logic: SimplexLogic
Loading RX: Rx1
SNDCTL_DSP_SETDUPLEX ioctl failed: Bad file descriptor
SNDCTL_DSP_GETCAPS ioctl failed: Bad file descriptor
Loading TX: Tx1
Loading module "ModuleHelp" into logic "SimplexLogic"
*** ERROR: Failed to load module ModuleHelp into logic SimplexLogic: /usr/local/lib/ModuleHelp.so: Undefined symbol "_ZN6Module10initializeEv"
Loading module "ModuleParrot" into logic "SimplexLogic"
*** ERROR: Failed to load module ModuleParrot into logic SimplexLogic: /usr/local/lib/ModuleParrot.so: Undefined symbol "_ZTI6Module"
Loading module "ModuleEchoLink" into logic "SimplexLogic"
*** ERROR: Failed to load module ModuleEchoLink into logic SimplexLogic: /usr/local/lib/ModuleEchoLink.so: Undefined symbol "_ZN12LocationInfo9_instanceE"Loading module "ModuleTclVoiceMail" into logic "SimplexLogic"
*** ERROR: Failed to load module ModuleTclVoiceMail into logic SimplexLogic: /usr/local/lib/ModuleTcl.so: Undefined symbol "_ZN6Module10initializeEv"
SimplexLogic: Event handler script successfully loaded.


SIGINT received. Shutting down application...
Here is what I tried ...

0. pkg install comms/svxlink
1. uncomment MODULE_PATH in svxlink.conf
2. set LD_LIBRARY_PATH before running.
3. pkg unstall comms/svxlink
4. cd /usr/ports/comms/svxlink & make & make install
5. ditto but with static libs.

I also tried copying the module.so files from /usr/local/lib/svxlink/ to /usr/local/lib/

I can't think of anything else to try and could not find those symbols using strings in /usr/local/lib/*
 
those symbols should be in the main executable but they are not because the linker does not set them as dynamic and get stripped later in the build
you need to add -Xlinker -E to the c++ command that links the main binary
i can't help you on how to patch the CMakeFiles (i did it manualy)
Code:
make build
rm work/.build/bin/svx/svxlink
cd work/.build/svxlink/svxlink
/usr/bin/c++ -O2 -pipe -Xlinker -E -fstack-protector-strong -fno-strict-aliasing --std=c++11 -O2 -pipe -fstack-protector-strong -fno-strict-aliasing   -DNDEBUG  -fstack-protector-strong CMakeFiles/svxlink.dir/MsgHandler.cpp.o CMakeFiles/svxlink.dir/Module.cpp.o CMakeFiles/svxlink.dir/Logic.cpp.o CMakeFiles/svxlink.dir/SimplexLogic.cpp.o CMakeFiles/svxlink.dir/RepeaterLogic.cpp.o CMakeFiles/svxlink.dir/EventHandler.cpp.o CMakeFiles/svxlink.dir/LinkManager.cpp.o CMakeFiles/svxlink.dir/CmdParser.cpp.o CMakeFiles/svxlink.dir/QsoRecorder.cpp.o CMakeFiles/svxlink.dir/svxlink.cpp.o CMakeFiles/svxlink.dir/DtmfDigitHandler.cpp.o CMakeFiles/svxlink.dir/ReflectorLogic.cpp.o -o ../../bin/svxlink  -Wl,-rpath,/usr/ports/comms/svxlink/work/.build/lib:/usr/local/lib: /usr/local/lib/libsigc-2.0.so /usr/local/lib/libpopt.so /usr/local/lib/libgsm.so /usr/local/lib/libtcl86.so /usr/local/lib/libgcrypt.so /usr/local/lib/libcurl.so ../trx/libtrx.a ../../locationinfo/liblocationinfo.a ../../lib/libasynccpp.so.1.6.0 ../../lib/libasyncaudio.so.1.6.0 ../../lib/libasynccore.so.1.6.0 ../../misc/libsvxmisc.a /usr/local/lib/libgcrypt.so ../digital/libdigital.a -lrt -lpthread /usr/local/lib/libspeex.so /usr/local/lib/libopus.so /usr/local/lib/libgsm.so /usr/local/lib/libasound.so /usr/local/lib/libsigc-2.0.so
make install


[root@hpbsd /usr/ports/comms/svxlink]# svxlink
SvxLink v1.7.0 Copyright (C) 2003-2019 Tobias Blomberg / SM0SVX

SvxLink comes with ABSOLUTELY NO WARRANTY. This is free software, and you are
welcome to redistribute it in accordance with the terms and conditions in the
GNU GPL (General Public License) version 2 or later.

Using configuration file: /usr/local/etc/svxlink/svxlink.conf
--- Using sample rate 48000Hz

Starting logic: SimplexLogic
Loading RX: Rx1
SNDCTL_DSP_SETDUPLEX ioctl failed: Bad file descriptor
SNDCTL_DSP_GETCAPS ioctl failed: Bad file descriptor
Loading TX: Tx1
Loading module "ModuleHelp" into logic "SimplexLogic"
    Found /usr/local/lib/svxlink/ModuleHelp.so
    Module Help v1.0.0 starting...
Loading module "ModuleParrot" into logic "SimplexLogic"
    Found /usr/local/lib/svxlink/ModuleParrot.so
    Module Parrot v1.1.1 starting...
Loading module "ModuleEchoLink" into logic "SimplexLogic"
    Found /usr/local/lib/svxlink/ModuleEchoLink.so
    Module EchoLink v1.5.0 starting...
*** ERROR: Please set the EchoLink callsign (ModuleEchoLink/CALLSIGN) to a real callsign
*** ERROR: Initialization failed for module ModuleEchoLink in logic SimplexLogic
Loading module "ModuleTclVoiceMail" into logic "SimplexLogic"
    Found /usr/local/lib/svxlink/ModuleTcl.so
    Module Tcl v1.0.1 starting...
SimplexLogic: Event handler script successfully loaded.
 
Code:
[root@hpbsd /usr/ports/comms/svxlink]# cat /tmp/patch-src_svxlink_svxlink_CMakeLists.txt
--- src/svxlink/svxlink/CMakeLists.txt.orig    2019-09-01 23:12:38.000000000 +0300
+++ src/svxlink/svxlink/CMakeLists.txt    2023-12-11 10:36:20.414165000 +0200
@@ -62,6 +62,7 @@
   DtmfDigitHandler.cpp ReflectorLogic.cpp
   ${VERSION_DEPENDS}
 )
+target_link_options(svxlink PRIVATE LINKER:-E)
 target_link_libraries(svxlink ${LIBS})
 set_target_properties(svxlink PROPERTIES
   RUNTIME_OUTPUT_DIRECTORY ${RUNTIME_OUTPUT_DIRECTORY}
put this patch into files/ after make extract
then you can make install
it will deal with the unresolved symbols stuff
 
Back
Top