Compilation failure: undefined reference to boost function
Closed this issue · 1 comments
5721309 commented
Hello! I'm following the tutorial to compile a VM. I'm running debian 12 so I used make boost
to obtain latest boost version for compilation. After that I ran make setup
which successfully detected local installation of boost. But for some reason make mascot-party.x
can't be finished successfully. Here is the entire output:
clang++ -o mascot-party.x -I./local/include -march=native -g -Wextra -Wall -O3 -I. -I./deps -pthread -DUSE_GF2N_LONG '-DPREP_DIR="Player-Data/"' '-DSSL_DIR="Player-Data/"' -std=c++17 -Werror -std=c++17 -fPIC Machines/mascot-party.o libSPDZ.so Machines/SPDZ.o Machines/Tinier.o OT/BaseOT.o OT/BitDiagonal.o OT/MascotParams.o OT/OTExtension.o OT/OTExtensionWithMatrix.o OT/OTTripleSetup.o deps/SimplestOT_C/ref10/libSimplestOT.a deps/SimpleOT/libsimpleot.a local/lib/liblibOTe.a local/lib/libcryptoTools.a -lgmpxx -lgmp -lsodium -Wl,-rpath -Wl,/MP-SPDZ/local/lib -L/MP-SPDZ/local/lib -lboost_system -lssl -lcrypto -lboost_filesystem -lboost_iostreams -lrt -Wl,-rpath -Wl,/MP-SPDZ libSPDZ.so
/usr/bin/ld: warning: ge25519_p1p1_to_p3.o: missing .note.GNU-stack section implies executable stack
/usr/bin/ld: NOTE: This behaviour is deprecated and will be removed in a future version of the linker
/usr/bin/ld: libSPDZ.so: undefined reference to `boost::filesystem::path::operator/=(boost::filesystem::path const&)'
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:214: mascot-party.x] Error 1
Is it correct behaviour? What should I do to make that reference available for the linker?
5721309 commented
Well, it looks like build system successfully finds local installation of boost but only uses header files. One can manually adjust MY_LDLIBS
variable in CONFIG.mine file like so:
MY_LDLIBS += -Wl,-rpath -Wl,./local/lib -L./local/lib