Giter Club home page Giter Club logo

orion-ld_build's People

Contributors

dncampo avatar

Watchers

 avatar

orion-ld_build's Issues

OrionLD linking problem

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.

Ownership problem with host-mounted folder

After executing the script src/orionld-dev.sh in host machine to clone the OrionLD repository, we can find the following situation in the container (after mounting this folder as volume):

builder@linuxkit-525400123456:~/git$ ll
total 48
drwxr-xr-x  1 builder builder 4096 Nov  1 20:38 ./
drwxr-xr-x  1 builder builder 4096 Nov  1 20:35 ../
drwxr-xr-x 15 root    root    4096 Nov  2 07:44 context.Orion-LD/
drwxr-xr-x  4 builder builder 4096 Nov  1 20:34 kalloc/
drwxr-xr-x  7 builder builder 4096 Nov  1 20:34 kbase/
drwxr-xr-x  4 builder builder 4096 Nov  1 20:34 khash/
drwxr-xr-x  6 builder builder 4096 Nov  1 20:34 kjson/
drwxr-xr-x  5 builder builder 4096 Nov  1 20:34 klog/
drwxr-xr-x  1 builder builder 4096 Nov  1 20:35 paho.mqtt.c/
drwxr-xr-x 12 builder builder 4096 Nov  1 20:35 prometheus-client-c/

As can be seen, the context.Orion-LD folder as root ownership. To overcome this, we can enter to the container as root with the following command:

docker run -it -v $HOME/code/fiware/orion-ld_build/src/context.Orion-LD:/home/builder/git/context.Orion-LD --net=host --ipc=host --user=root orionld-dev

and change the ownership to builder user:

chown -R builder:builder /home/builder/git/context.Orion-LD/

This is a workaround to overcome this problem. However, the ideal situation would be the folder already having the ownership of the user.

Already tried in Dockerfile to set the ownership in build time, but it doesn't work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.