Closed smanders closed 6 years ago
serialization... ATT should be using boost/optional.hpp
not boost/serialization/optional.hpp
(in two places)
update boost use script
set(Boost_LIBS # dependency order
log_setup # ldd:log,regex
log # ldd/cmake:filesystem,thread cmake:log_setup,regex
######
thread # ldd/cmake:system cmake:atomic,chrono,date_time
timer # ldd/cmake:chrono
######
chrono # ldd/cmake:system
filesystem # ldd/cmake:system
graph # ldd:regex
iostreams # cmake:regex
random # ldd/cmake:system
######
atomic
container
date_time
exception
prg_exec_monitor program_options
regex
signals
system
test_exec_monitor unit_test_framework
)
# NOTE: determined boost library dependency order by building boost on linux
# with link=shared and runtime-link=shared and using ldd
# cmake dependencies by examining cmake's Modules/FindBoost.cmake
cmake FindBoost.cmake https://github.com/Kitware/CMake/blob/v3.12.0/Modules/FindBoost.cmake#L828-L844
created a boost.dot
digraph GG {
node [fontsize=12];
atomic [shape=diamond];
chrono [shape=diamond];
container [shape=diamond];
date_time [shape=diamond];
exception [shape=diamond];
filesystem [shape=diamond];
grph [label="graph" shape=diamond];
iostreams [shape=diamond];
log [shape=diamond];
log_setup [shape=diamond];
prg_exec_monitor [shape=diamond];
program_options [shape=diamond];
random [shape=diamond];
regex [shape=diamond];
signals [shape=diamond];
system [shape=diamond];
test_exec_monitor [shape=diamond];
thread [shape=diamond];
timer [shape=diamond];
unit_test_framework [shape=diamond];
chrono -> system;
filesystem -> system;
grph -> regex;
iostreams -> regex;
random -> system;
thread -> atomic;
thread -> chrono;
thread -> date_time;
timer -> chrono;
log -> filesystem;
log -> thread;
log_setup -> log;
log_setup -> regex;
}
dot -Tpng -oboost.png boost.dot
removing libraries without dependencies
completed with commits to dev branch referenced above
with a pre-release version of externpro 18.08.1 and with the changes made to the boost use script I'm seeing link errors on every executable that links boost libraries
/opt/extern/externpro-18.08.1-gcc640-64-Linux/lib/libboost_prg_exec_monitor-gcc64-mt-s-1_63.a(cpp_main.o): In function `main':
cpp_main.cpp:(.text.startup+0x8): undefined reference to `cpp_main(int, char**)'
collect2: error: ld returned 1 exit status
since prg_exec_monitor
was excluded from Boost_LIBS
prior to these changes (see usexp-boost-config.cmake https://github.com/smanders/externpro/commit/41e103efae7d535156e020f4672046bf5ebce74f), I'm opting to remove it again
it appears the "program execution monitor" is a boost test library (I was only able to find reference to it in old boost docs https://www.boost.org/doc/libs/1_57_0/libs/test/doc/html/prg-exec-monitor.html)
a project (Vantage) that uses externpro (and boost) builds and links fine on linux with gcc, but fails on Windows with MSVC: LNK1104: cannot open file 'libboost_serialization-vc140-mt-s-1_63.lib'
of course boost serialization was one of the libraries excluded because it didn't appear that Vantage used it (outside of a couple of errant includes in Autotest code) -- this failure is quite early in the build (executables that link Sdimage and it's dependencies - MosaicIntegrationTest and SdimageTest)
searching the boost includes (grep -r "include <boost/serialization"
) it appears that there are other boost libraries (some header-only) included by Vantage that include serialization headers: graph, bimap, units, geometry, numeric
I'm not how to exactly determine which boost library (or something else?) is causing the linker to require boost serialization, but the way boost uses pragma comment lib to specify library dependencies (usually in a boost serialization header, which would make the library required if anything includes a boost serialization header) it's going to be easier to just include boost serialization in the externpro build of boost again...
boost libraries https://www.boost.org/doc/libs/
recommend removing from the default build: