I get the following errors
Code: Select all
/home/lance/tomatoware/opt/lib/libcrypto.a(dso_dlfcn.o): In function `dlfcn_globallookup':
dso_dlfcn.c:(.text.dlfcn_globallookup+0x10): undefined reference to `dlopen'
dso_dlfcn.c:(.text.dlfcn_globallookup+0x48): undefined reference to `dlsym'
dso_dlfcn.c:(.text.dlfcn_globallookup+0x60): undefined reference to `dlclose'
dso_dlfcn.c:(.text.dlfcn_globallookup+0x30): undefined reference to `dlopen'
dso_dlfcn.c:(.text.dlfcn_globallookup+0x50): undefined reference to `dlsym'
dso_dlfcn.c:(.text.dlfcn_globallookup+0x64): undefined reference to `dlclose'
I've tried seemingly everything, what else can I try?
Here's my attempt, there is more here than needed (LIBS, for example I believe), but it works to compile with dynamic libdl, and static everything else.
Code: Select all
BASE=`pwd`
SRC=$BASE/src
WGET="wget --prefer-family=IPv4"
PATCHES=$BASE/patches
RPATH=/opt/lib
DEST=$BASE/opt
LDFLAGS="-L$DEST/lib -s -Wl,--dynamic-linker=/opt/lib/ld-uClibc.so.0 -Wl,-rpath,$RPATH -Wl,-rpath-link,$DEST/lib"
CPPFLAGS="-I$DEST/include -I$DEST/include/ncurses"
CFLAGS="-mtune=mips32 -mips32"
CONFIGURE="./configure --prefix=/opt --host=mipsel-linux"
MAKE="make -j`nproc`"
LIBEVENT_CFLAGS="-I$DEST/include -I$DEST/include/ncurses" \
LIBEVENT_LIBS=$DEST/lib/libevent.la \
LDFLAGS="-static -static-libgcc $LDFLAGS -L/opt/entware-toolchain/lib -lrt -lssl -lcrypto -ldl -pthread -lc -levent -lcurl -lz -lm -Wl,-zmuldefs" \
CPPFLAGS="-static -static-libgcc $CPPFLAGS -I/opt/entware-toolchain/include" \
CFLAGS="-static -static-libgcc $CFLAGS" \
$CONFIGURE \
--enable-lightweight \
--disable-shared --enable-cli --enable-daemon --enable-static
$MAKE \
CXX="mipsel-linux-g++ -static" \
LIBS="-static -lrt -lssl -lcrypto -ldl -pthread -lc -levent -lcurl -lz -lm" \
LDFLAGS="-static -static-libgcc $LDFLAGS -L/opt/entware-toolchain/lib -lrt -lssl -lcrypto -ldl -pthread -lc -levent -lcurl -lz -lm -Wl,-zmuldefs"