dncampo / orion-ld_build

MIT License
0 stars 0 forks source link

OrionLD linking problem #2

Open dncampo opened 12 months ago

dncampo commented 12 months ago

It starts well:

builder@linuxkit-525400123456:~/git/context.Orion-LD$ make install
./scripts/build/branchFileCreate.sh
./scripts/build/compileInfo.sh --release
26,28c26,28
< #define GIT_HASH         "4aaf82b864d8cb40dd86559bc0b28d0a2260d704"
< #define COMPILE_TIME     "Thu Nov 2 08:30:02 UTC 2023"
< #define COMPILED_BY      "builder"
---
> #define GIT_HASH         "nogitversion"
> #define COMPILE_TIME     "Thu Nov 2 08:24:49 UTC 2023"
> #define COMPILED_BY      "root"
30c30
< #define RELEASE_DATE     "Thu Nov 2 08:30:02 UTC 2023"
---
> #define RELEASE_DATE     "Thu Nov 2 08:24:49 UTC 2023"
mkdir -p  BUILD_RELEASE || true
cd BUILD_RELEASE && cmake .. -DCMAKE_BUILD_TYPE=RELEASE -DBUILD_ARCH=x86_64 -DCMAKE_INSTALL_PREFIX=/usr
CMAKE_BUILD_TYPE set to RELEASE
Compiling in system Linux-6.4.16-linuxkit
CMAKE_BUILD_TYPE: 'RELEASE'
cmake: RELEASE compilation
Building for x86_64
cmake: OK
orionld distro: 'Ubuntu_18.04.6_LTS'
orionld: INSTALL Ubuntu DISTRO: 'Ubuntu_18.04.6_LTS'
-- Configuring done
-- Generating done
-- Build files have been written to: /home/builder/git/context.Orion-LD/BUILD_RELEASE
cd BUILD_RELEASE && make -j16

But, at linking time (output truncated for preview purposes):

[100%] Building CXX object src/app/orionld/CMakeFiles/orionld.dir/orionld.cpp.o
[100%] Linking CXX executable orionld
CMakeFiles/orionld.dir/orionRestServices.cpp.o:(.bss+0x0): multiple definition of `boost::system::throws'
CMakeFiles/orionld.dir/orionld.cpp.o:(.bss+0x1b70): first defined here
../../lib/common/libcommon.a(globals.cpp.o):(.bss+0x10): multiple definition of `boost::system::throws'
CMakeFiles/orionld.dir/orionld.cpp.o:(.bss+0x1b70): first defined here
../../lib/common/libcommon.a(Timer.cpp.o):(.bss+0x0): multiple definition of `boost::system::throws'
CMakeFiles/orionld.dir/orionld.cpp.o:(.bss+0x1b70): first defined here
../../lib/rest/librest.a(rest.cpp.o):(.bss+0x1b0): multiple definition of `boost::system::throws'
CMakeFiles/orionld.dir/orionld.cpp.o:(.bss+0x1b70): first defined here
../../lib/rest/librest.a(restReply.cpp.o):(.bss+0x0): multiple definition of `boost::system::throws'
CMakeFiles/orionld.dir/orionld.cpp.o:(.bss+0x1b70): first defined here
../../lib/rest/librest.a(RestService.cpp.o):(.bss+0x10): multiple definition of `boost::system::throws'
CMakeFiles/orionld.dir/orionld.cpp.o:(.bss+0x1b70): first defined here
../../lib/rest/librest.a(httpRequestSend.cpp.o):(.bss+0x0): multiple definition of `boost::system::throws'
CMakeFiles/orionld.dir/orionld.cpp.o:(.bss+0x1b70): first defined here
../../lib/rest/librest.a(ConnectionInfo.cpp.o):(.bss+0x0): multiple definition of `boost::system::throws'
CMakeFiles/orionld.dir/orionld.cpp.o:(.bss+0x1b70): first defined here
../../lib/rest/librest.a(StringFilter.cpp.o):(.bss+0x0): multiple definition of `boost::system::throws'
CMakeFiles/orionld.dir/orionld.cpp.o:(.bss+0x1b70): first defined here
../../lib/rest/librest.a(restServiceLookup.cpp.o):(.bss+0x0): multiple definition of `boost::system::throws'
CMakeFiles/orionld.dir/orionld.cpp.o:(.bss+0x1b70): first defined here
../../lib/orionld/rest/liborionld_rest.a(orionldMhdConnectionInit.cpp.o):(.bss+0x0): multiple definition of `boost::system::throws'
CMakeFiles/orionld.dir/orionld.cpp.o:(.bss+0x1b70): first defined here
../../lib/orionld/rest/liborionld_rest.a(orionldMhdConnectionPayloadRead.cpp.o):(.bss+0x0): multiple definition of `boost::system::throws'
CMakeFiles/orionld.dir/orionld.cpp.o:(.bss+0x1b70): first defined here
../../lib/orionld/rest/liborionld_rest.a(orionldMhdConnectionTreat.cpp.o):(.bss+0x0): multiple definition of `boost::system::throws'
CMakeFiles/orionld.dir/orionld.cpp.o:(.bss+0x1b70): first defined here
../../lib/orionld/rest/liborionld_rest.a(orionldServiceInit.cpp.o):(.bss+0x90): multiple definition of `boost::system::throws'
CMakeFiles/orionld.dir/orionld.cpp.o:(.bss+0x1b70): first defined here
../../lib/orionld/rest/liborionld_rest.a(orionldServiceLookup.cpp.o):(.bss+0x0): multiple definition of `boost::system::throws'
CMakeFiles/orionld.dir/orionld.cpp.o:(.bss+0x1b70): first defined here
../../lib/orionld/serviceRoutines/liborionld_serviceRoutines.a(orionldPostEntities.cpp.o):(.bss+0x0): multiple definition of `boost::system::throws'

...

../../lib/orionTypes/liborionTypes.a(EntityTypeVectorResponse.cpp.o):(.bss+0x0): multiple definition of `boost::system::throws'
CMakeFiles/orionld.dir/orionld.cpp.o:(.bss+0x1b70): first defined here
../../lib/orionTypes/liborionTypes.a(EntityTypeResponse.cpp.o):(.bss+0x0): multiple definition of `boost::system::throws'
CMakeFiles/orionld.dir/orionld.cpp.o:(.bss+0x1b70): first defined here
../../lib/orionTypes/liborionTypes.a(QueryContextRequestVector.cpp.o):(.bss+0x0): multiple definition of `boost::system::throws'
CMakeFiles/orionld.dir/orionld.cpp.o:(.bss+0x1b70): first defined here
../../lib/orionTypes/liborionTypes.a(QueryContextResponseVector.cpp.o):(.bss+0x0): multiple definition of `boost::system::throws'
CMakeFiles/orionld.dir/orionld.cpp.o:(.bss+0x1b70): first defined here
../../lib/orionTypes/liborionTypes.a(UpdateContextRequestVector.cpp.o):(.bss+0x0): multiple definition of `boost::system::throws'
CMakeFiles/orionld.dir/orionld.cpp.o:(.bss+0x1b70): first defined here
../../lib/common/libcommon.a(macroSubstitute.cpp.o):(.bss+0x0): multiple definition of `boost::system::throws'
CMakeFiles/orionld.dir/orionld.cpp.o:(.bss+0x1b70): first defined here
../../lib/metricsMgr/libmetricsMgr.a(MetricsManager.cpp.o):(.bss+0x0): multiple definition of `boost::system::throws'
CMakeFiles/orionld.dir/orionld.cpp.o:(.bss+0x1b70): first defined here
/usr/bin/ld: warning: libssl.so.1.0.0, needed by /usr/local/lib/libmongoc-1.0.so, may conflict with libssl.so.1.1
/usr/bin/ld: /usr/local/lib/libmongoclient.a(ssl_manager.o): undefined reference to symbol 'SSL_load_error_strings@@OPENSSL_1.0.0'
//usr/lib/x86_64-linux-gnu/libssl.so.1.0.0: error adding symbols: DSO missing from command line

and finishes with:

collect2: error: ld returned 1 exit status
src/app/orionld/CMakeFiles/orionld.dir/build.make:176: recipe for target 'src/app/orionld/orionld' failed
make[3]: *** [src/app/orionld/orionld] Error 1
make[3]: Leaving directory '/home/builder/git/context.Orion-LD/BUILD_RELEASE'
CMakeFiles/Makefile2:2609: recipe for target 'src/app/orionld/CMakeFiles/orionld.dir/all' failed
make[2]: *** [src/app/orionld/CMakeFiles/orionld.dir/all] Error 2
make[2]: Leaving directory '/home/builder/git/context.Orion-LD/BUILD_RELEASE'
Makefile:129: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/builder/git/context.Orion-LD/BUILD_RELEASE'
makefile:111: recipe for target 'release' failed
make: *** [release] Error 2
builder@linuxkit-525400123456:~/git/context.Orion-LD$ 

I presume there are libraries that are wrongly isntalled or I just forgot to.

kzangeli commented 12 months ago

You probably need another version of BOOST. I use the version 1.67.

Wait, it complains about "multiple definitions" ... Need to take a look at the libs in the CMakeLists.txt (toplevel and inside src/app/orionld). My guess is you have two different versions of boost libs in the linkage, but, not a clue really ... Play a little with the libs and see what happens