OK I narrowed the problem down to linker flags.
I chose the connectivity_tool binary for demonstration. Linker flags are in file /boolberry/build/release/src/CMakeFiles/connectivity_tool.dir/link.txt:
/usr/bin/c++ -std=c++11 -D_GNU_SOURCE -Wall -Wextra -Wpointer-arith -Wundef -Wvla -Wwrite-strings -Werror -Wno-error=extra -Wno-error=deprecated-declarations -Wno-error=sign-compare -Wno-error=strict-aliasing -Wno-error=type-limits -Wno-unused-parameter -Wno-error=unused-variable -Wlogical-op -Wno-error=maybe-uninitialized -Wno-reorder -Wno-missing-field-initializers -march=native -O3 -DNDEBUG -Ofast -DNDEBUG -Wno-unused-variable -flto CMakeFiles/connectivity_tool.dir/connectivity_tool/conn_tool.cpp.o -o connectivity_tool -rdynamic libcurrency_core.a libcrypto.a libcommon.a -Wl,-Bstatic -lboost_system -lboost_filesystem -lboost_thread -Wl,-Bdynamic -lpthread -Wl,-Bstatic -lboost_date_time -lboost_chrono -lboost_regex -lboost_serialization -lboost_atomic -lboost_program_options -Wl,-Bdynamic -lrt
If I execute just this linker command, it gives me same errors as posted in my earlier posts.
Now I modify the command like this (took some flags from the monero build files):
/usr/bin/c++ -std=c++11 -D_GNU_SOURCE -Wall -Wextra -Wpointer-arith -Wundef -Wvla -Wwrite-strings -Werror -Wno-error=extra -Wno-error=deprecated-declarations -Wno-error=sign-compare -Wno-error=strict-aliasing -Wno-error=type-limits -Wno-unused-parameter -Wno-error=unused-variable -Wno-error=undef -Wno-error=uninitialized -Wlogical-op -Wno-error=maybe-uninitialized -Wno-reorder -Wno-missing-field-initializers -march=native -O3 -DNDEBUG -Ofast -DNDEBUG -Wno-unused-variable -flto CMakeFiles/connectivity_tool.dir/connectivity_tool/conn_tool.cpp.o -o connectivity_tool -rdynamic libcurrency_core.a libcrypto.a libcommon.a -lboost_system -lboost_filesystem -lboost_thread -lboost_date_time -lboost_chrono -lboost_regex -lboost_serialization -lboost_atomic -lboost_program_options -lrt
With this command, the linker succeeds and the binary is generated correctly! So there is just something messed up with linker flags, that's all.
Any idea?
(I disabled the static linking mode in order to do the comparison with monero, it is giving same errors anyway).
Edited:
http://www.diffchecker.com/p8dr5qxbStripping the red flags at the left fixes the process. I don't know how to change cmakelists to get rid of those flags. For now, I will just hack link.txt files manually.