cmake issue causing undefined symbol because of libraries not linked
Status: Beta
Brought to you by:
xebd
I have found this issue also:
loader: failed to load 'pppoe': /usr/lib64/accel-ppp/libpppoe.so: undefined symbol: rad_packet_add_int
After I manually set "-DRADIUS=FALSE" to build, I got this problem:
loader: failed to load 'pppoe': /usr/lib64/accel-ppp/libpppoe.so: undefined symbol: connlimit_check.
After debugging, I found the issue is caused by libpppoe.so is not linked with libconnlimit.so.
Found a solution: add one line to accel-pppd/ctrl/pppoe/CMakeLists.txt,this line: TARGET_LINK_LIBRARIES(pppoe connlimit), it will be fine.
So I think it is a cmake issue.
To make it more clear, I use arch linux, and tried to install this AUR
https://aur.archlinux.org/packages/accel-ppp-git/ .
The cmake command is
cmake \
-DCMAKE_SYSTEM_NAME=Linux \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_BUILD_TYPE=Debug \
-DMEMDEBUG=TRUE \
-DLOG_FILE=TRUE \
-DLOG_PGSQL=FALSE \
-DSHAPER=FALSE \
-DRADIUS=FALSE \
-DNETSNMP=FALSE \
-DLUA=5.3 \
-DLUA_INCLUDE_DIR="/usr/include" \
"$srcdir/${pkgname%-git}"