open-simulation-platform / cosim-cli

Command-line interface for libcosim
https://open-simulation-platform.github.io/cosim
Mozilla Public License 2.0
10 stars 4 forks source link

Rename option proxyfmu and build with Docker #93

Closed ljamt closed 3 years ago

ljamt commented 3 years ago

libcosim option fmuproxy is renamed to proxyfmu

Getting an error when linking in the gcc9-proxyfmu=True-build that I appreciate help on solving:

... /0.8.0/osp/testing/package/3123ab7ca3fc5a20c4e01288f8e98c00a155d3bd/lib/libcosim.so: undefined reference to `exp2@GLIBC_2.29'
... /0.8.0/osp/testing/package/3123ab7ca3fc5a20c4e01288f8e98c00a155d3bd/lib/libcosim.so: undefined reference to `log2@GLIBC_2.29'
markaren commented 3 years ago

https://github.com/open-simulation-platform/proxy-fmu/blob/54e161a5e3c2421d23aa3e16739958a432d4cf53/src/CMakeLists.txt#L72

Would it help if dl was not private? On deep water here.

kyllingstad commented 3 years ago

Getting an error when linking in the gcc9-proxyfmu=True-build that I appreciate help on solving:

... /0.8.0/osp/testing/package/3123ab7ca3fc5a20c4e01288f8e98c00a155d3bd/lib/libcosim.so: undefined reference to `exp2@GLIBC_2.29'
... /0.8.0/osp/testing/package/3123ab7ca3fc5a20c4e01288f8e98c00a155d3bd/lib/libcosim.so: undefined reference to `log2@GLIBC_2.29'

A quick guess is that this is caused by my changes to the CI build environment for libcosim. Probably, the glibc (C runtime library) version inside the Docker container is newer than the one on the base GitHub runners. A fix would be to change to a Docker-based solution for libcosimc too.

kyllingstad commented 3 years ago

To be a bit more explicit:

I haven't verified this, but we've had the same problem with GitHub's runners before. And the runner we're using here is ubuntu-18.04 which is itself a rather old OS by now.

kyllingstad commented 3 years ago

A fix would be to change to a Docker-based solution for libcosimc too.

Sorry, I meant cosim-cli, not libcosimc. But probably libcosimc too, come to think of it, though that's not the issue here.

ljamt commented 3 years ago

A fix would be to change to a Docker-based solution for libcosimc too.

Sorry, I meant cosim-cli, not libcosimc. But probably libcosimc too, come to think of it, though that's not the issue here.

Seems to be an issue for libcosimc as well: https://github.com/open-simulation-platform/libcosimc/actions/runs/1147215089

ljamt commented 3 years ago

Trying a docker-based build approach here as well. Works for gcc8 and gcc9, but having issues with gcc7. @kyllingstad and @markaren, can you spot the problem? https://github.com/open-simulation-platform/cosim-cli/runs/3411263696?check_suite_focus=true

markaren commented 3 years ago

Seems it uses a old gcc7 version (7.2)? Default on Ubuntu 18.04 is gcc 7.5 (?)

kyllingstad commented 3 years ago

I'm not sure we need to build with all that many compiler versions, though, since cosim-cli is an executable and not a library. We're even bundling dependencies in the distributed packages, so we're not depending much on the user's environment.

ljamt commented 3 years ago

Seems it uses a old gcc7 version (7.2)? Default on Ubuntu 18.04 is gcc 7.5 (?)

Currently using the conanio/gcc7 image, but I have tested with conanio/gcc72 with the same result. There's no other conanio image with gcc7 available.

ljamt commented 3 years ago

I'm not sure we need to build with all that many compiler versions, though, since cosim-cli is an executable and not a library. We're even bundling dependencies in the distributed packages, so we're not depending much on the user's environment.

Removed the gcc7 build now