Closed davidhjp01 closed 1 year ago
Hi!
A passer-by here. Ever since this morning, I was trying to get this package compiled properly. So, I was so happy when I see this pull request. On my end, it is still having some problems.
From the build
directiory:
conan install . -u -s build_type=Release -g virtualrunenv --build=missing
If I don't have
--build=missing
it cannot find some packages.ERROR: Missing binary: libcosim/0.10.2@osp/stable:b795e3a830b842a027c9ab875d6d3523acfcd023 ERROR: Missing binary: libcosimc/0.10.2@osp/stable:e8df60d5de8b9be3c6786af503c4c522bb917950 ERROR: Missing binary: proxyfmu/0.3.1@osp/stable:fc559b0779fe2dd65e4f0e58761afa92220ca972 ... ... ERROR: Missing prebuilt package for 'libcosim/0.10.2@osp/stable', 'libcosimc/0.10.2@osp/stable', 'proxyfmu/0.3.1@osp/stable' Use 'conan search proxyfmu/0.3.1@osp/stable --table=table.html -r=remote' and open the table.html file to see available packages Or try to build locally from sources with '--build=libcosim --build=libcosimc --build=proxyfmu' More Info at 'https://docs.conan.io/en/latest/faq/troubleshooting.html#error-missing-prebuilt-package'
I have OSP as remote for conan
$ conan remote add osp https://osp.jfrog.io/artifactory/api/conan/conan-local ERROR: Remote 'osp' already exists in remotes (use update to modify)
Results in
[100%] Linking CXX shared library ../lib/libproxyfmu-client.so
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libboost_filesystem.a(directory.o): warning: relocation against `_ZSt7nothrow@@GLIBCXX_3.4' in read-only section `.text'
/usr/bin/ld: /usr/lib/x86_64-linux-gnu/libboost_filesystem.a(operations.o): relocation R_X86_64_PC32 against symbol `_ZSt7nothrow@@GLIBCXX_3.4' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: bad value
collect2: error: ld returned 1 exit status
gmake[2]: *** [src/CMakeFiles/proxyfmu-client.dir/build.make:138: lib/libproxyfmu-client.so] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:163: src/CMakeFiles/proxyfmu-client.dir/all] Error 2
gmake: *** [Makefile:136: all] Error 2
proxyfmu/0.3.1@osp/stable:
proxyfmu/0.3.1@osp/stable: ERROR: Package 'fc559b0779fe2dd65e4f0e58761afa92220ca972' build failed
proxyfmu/0.3.1@osp/stable: WARN: Build folder /home/cem/.conan/data/proxyfmu/0.3.1/osp/stable/build/fc559b0779fe2dd65e4f0e58761afa92220ca972
ERROR: proxyfmu/0.3.1@osp/stable: Error in build() method, line 38
cmake.build()
ConanException: Error 2 while executing cmake --build '/home/cem/.conan/data/proxyfmu/0.3.1/osp/stable/build/fc559b0779fe2dd65e4f0e58761afa92220ca972' '--' '-j20'
A nice table for diagnosis
Tool | version |
---|---|
Conan | 1.60.1 |
C Compiler | GCC-9 |
CXX Compiler | G++-9 |
Platform | Ubuntu 22.04 |
Architecture | x86_64 |
CMake | 3.22.1 |
But it is clearly a build problem for proxyfmu
package. Can it be related with this? https://github.com/open-simulation-platform/proxy-fmu
@incebellipipo Hi.
It seems boost installed on your local machine is non-fpic binary, so does not link with libproxyfmu-client.so
. libcosim
chooses the locally installed boost if exists.
Removing locally installed boost
will force to install it via conan. But seems there is still an issue according to https://github.com/open-simulation-platform/libcosim/issues/736, when libcosim needs to rebuild boost
. I think this needs to be addressed in proxyfmu.
@incebellipipo Also check if your compiler.libcxx
in conan profile setting is
compiler.libcxx=libstdc++11
I suspect you are using libstdc++
About boost dependency Removing boost is not an option. I am actually exploring libcosim to see if I can come up with a ROS ready simulator for ships, does not have to be real time.
You are right about not setting stdc++11
I used conan profile detect
to create the default profile. And I read through the issues and I saw that GCC-9 works but not GCC-11. So, I only changed compiler version in the default profile. Now, conan install .
works.
But go build
doesn't work.
In the meantime, what about conan2 support? Is there a need to specify conan==1.60
requirement in the readme?
conan install .
outputgo build
outputProbably try source actvate_run.sh
then go build
.
libcosim
and other related binaries are not yet migrated to v2 in jfrog artifactory so we need to use conan v1.xx to install dependencies for now.
I rm -rf
ed the local repository and started over. Below code compiles both master
and build-fix
branches.
conan install . -u -s build_type=Release -g virtualrunenv --build=missing
source activate_run.sh
go build
Maybe update the readme to have source activate_run.sh
?
Thanks for the update @incebellipipo. This PR includes the updated README for sourcing the activation script :)
libcosimc/0.10.2@osp/stable