Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Addressed failing builds #207

Merged
merged 7 commits into from
Sep 26, 2023
Merged

Addressed failing builds #207

merged 7 commits into from
Sep 26, 2023

Conversation

davidhjp01
Copy link
Contributor

@davidhjp01 davidhjp01 commented Jun 19, 2023

  • Addressed issues related to the failing builds
  • Updated README.md for installing MinGW via chocolatey
  • Using libcosimc/0.10.2@osp/stable

@davidhjp01 davidhjp01 requested review from eidekrist and restenb June 19, 2023 12:09
@davidhjp01 davidhjp01 self-assigned this Jun 19, 2023
@incebellipipo
Copy link

incebellipipo commented Jun 19, 2023

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

@davidhjp01 davidhjp01 added the bug Something isn't working label Jun 19, 2023
@davidhjp01 davidhjp01 marked this pull request as draft June 19, 2023 18:45
@davidhjp01 davidhjp01 marked this pull request as ready for review June 19, 2023 18:46
@davidhjp01
Copy link
Contributor Author

davidhjp01 commented Jun 19, 2023

@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 open-simulation-platform/libcosim#736, when libcosim needs to rebuild boost. I think this needs to be addressed in proxyfmu.

@davidhjp01
Copy link
Contributor Author

@incebellipipo Also check if your compiler.libcxx in conan profile setting is

compiler.libcxx=libstdc++11

I suspect you are using libstdc++

@incebellipipo
Copy link

incebellipipo commented Jun 20, 2023

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 . output
$ conan install .
Configuration:
[settings]
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.libcxx=libstdc++11
compiler.version=9
os=Linux
os_build=Linux
[options]
[build_requires]
[env]

WARN: boost/1.71.0: requirement zlib/1.2.13 overridden by libcosim/0.10.2@osp/stable to zlib/1.2.12
WARN: libzip/1.7.3: requirement zlib/1.2.13 overridden by libcosim/0.10.2@osp/stable to zlib/1.2.12
WARN: libzip/1.7.3: requirement xz_utils/5.4.2 overridden by libcosim/0.10.2@osp/stable to xz_utils/5.2.5
WARN: libzip/1.7.3: requirement openssl/[>=1.1 <4] overridden by libcosim/0.10.2@osp/stable to openssl/1.1.1k
WARN: thrift/0.13.0: requirement boost/1.81.0 overridden by proxyfmu/0.3.1@osp/stable to boost/1.71.0
WARN: thrift/0.13.0: requirement openssl/[>=1.1 <4] overridden by proxyfmu/0.3.1@osp/stable to openssl/1.1.1k
WARN: thrift/0.13.0: requirement zlib/1.2.13 overridden by proxyfmu/0.3.1@osp/stable to zlib/1.2.12
WARN: libevent/2.1.12: requirement openssl/[>=1.1 <4] overridden by thrift/0.13.0 to openssl/1.1.1k
conanfile.txt: Installing package
Requirements
    boost/1.71.0 from 'conancenter' - Cache
    bzip2/1.0.8 from 'conancenter' - Cache
    cli11/2.3.1 from 'conancenter' - Cache
    fmilibrary/2.3 from 'osp' - Cache
    libbacktrace/cci.20210118 from 'conancenter' - Cache
    libcosim/0.10.2@osp/stable from 'osp' - Cache
    libcosimc/0.10.2@osp/stable from 'osp' - Cache
    libevent/2.1.12 from 'conancenter' - Cache
    libzip/1.7.3 from 'conancenter' - Cache
    ms-gsl/2.1.0 from 'conancenter' - Cache
    openssl/1.1.1k from 'conancenter' - Cache
    proxyfmu/0.3.1@osp/stable from 'osp' - Cache
    thrift/0.13.0 from 'conancenter' - Cache
    xerces-c/3.2.2 from 'conancenter' - Cache
    xz_utils/5.2.5 from 'conancenter' - Cache
    yaml-cpp/0.7.0 from 'conancenter' - Cache
    zlib/1.2.12 from 'conancenter' - Cache
Packages
    boost/1.71.0:15e881cf4fa352877c6f626d88a3b9471860ac90 - Cache
    bzip2/1.0.8:da606cf731e334010b0bf6e85a2a6f891b9f36b0 - Cache
    cli11/2.3.1:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
    fmilibrary/2.3:97172bab7554b947975f35cab343b2a755de9955 - Cache
    libbacktrace/cci.20210118:6af9cc7cb931c5ad942174fd7838eb655717c709 - Cache
    libcosim/0.10.2@osp/stable:e52c44148331fd418a4a832710fd2e42ac99653d - Cache
    libcosimc/0.10.2@osp/stable:40d0fba4cfbbdf11258c6b2bff0344de12d7f771 - Cache
    libevent/2.1.12:6b0981c427aa0eb8bea05add2094df29ed639799 - Cache
    libzip/1.7.3:ac1c93e5e30585cd363eb83c77f9c21580de1cc2 - Cache
    ms-gsl/2.1.0:5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 - Cache
    openssl/1.1.1k:6af9cc7cb931c5ad942174fd7838eb655717c709 - Cache
    proxyfmu/0.3.1@osp/stable:9fdef87d259c966bd26babf89e1507d5d48d2381 - Cache
    thrift/0.13.0:1ab9c1fb952c655d23a9e5f21374fbeebd083e21 - Cache
    xerces-c/3.2.2:e0208a9a45ef0ac340fbcf8fe6243b3fb9643aba - Cache
    xz_utils/5.2.5:6af9cc7cb931c5ad942174fd7838eb655717c709 - Cache
    yaml-cpp/0.7.0:97172bab7554b947975f35cab343b2a755de9955 - Cache
    zlib/1.2.12:6af9cc7cb931c5ad942174fd7838eb655717c709 - Cache

Installing (downloading, building) binaries...
bzip2/1.0.8: Already installed!
cli11/2.3.1: Already installed!
fmilibrary/2.3: Already installed!
libbacktrace/cci.20210118: Already installed!
ms-gsl/2.1.0: Already installed!
openssl/1.1.1k: Already installed!
xerces-c/3.2.2: Already installed!
xz_utils/5.2.5: Already installed!
yaml-cpp/0.7.0: Already installed!
zlib/1.2.12: Already installed!
boost/1.71.0: Already installed!
libevent/2.1.12: Already installed!
libzip/1.7.3: Already installed!
thrift/0.13.0: Already installed!
thrift/0.13.0: Appending PATH env var with : /home/cem/.conan/data/thrift/0.13.0/_/_/package/1ab9c1fb952c655d23a9e5f21374fbeebd083e21/bin
proxyfmu/0.3.1@osp/stable: Already installed!
libcosim/0.10.2@osp/stable: Already installed!
libcosimc/0.10.2@osp/stable: Already installed!
conanfile.txt: Generator txt created conanbuildinfo.txt
conanfile.txt: Aggregating env generators
conanfile.txt: Generated conaninfo.txt
conanfile.txt: Generated graphinfo
conanfile.txt imports(): Copied 16 files
conanfile.txt imports(): Copied 8 '.1' files
conanfile.txt imports(): Copied 9 '.so' files
conanfile.txt imports(): Copied 1 '.txt' file: LICENSE_1_0.txt
conanfile.txt imports(): Copied 1 '.h' file: cosim.h
conanfile.txt imports(): Copied 1 '.3' file: libzip.so.5.3
conanfile.txt imports(): Copied 8 '.71' files
conanfile.txt imports(): Copied 9 '.0' files
conanfile.txt imports(): Copied 1 '.7' file: libyaml-cpp.so.0.7
conanfile.txt imports(): Copied 1 '.5' file: libzip.so.5
go build output
$ go build
# cosim-demo-app
/usr/local/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: warning: libcosim.so, needed by /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_fiber.so.1.71.0, needed by /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_log.so.1.71.0, needed by /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libboost_thread.so.1.71.0, needed by /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so, not found (try using -rpath or -rpath-link)
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::fibers::context::wait_until(std::chrono::time_point<std::chrono::_V2::steady_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > const&, std::unique_lock<boost::fibers::detail::spinlock_ttas>&)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::aux::attach_attribute_name_info(boost::exception&, boost::log::v2_mt_posix::attribute_name const&)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::aux::this_thread::get_id()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::fmi::importer::create(std::shared_ptr<cosim::file_cache>)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `vtable for cosim::override_manipulator'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::execution::execution(std::chrono::time_point<cosim::detail::clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::shared_ptr<cosim::algorithm>)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::execution::add_observer(std::shared_ptr<cosim::observer>)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::execution::set_real_initial_value(int, unsigned int, double)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::attribute_name::get_id_from_string(char const*)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::override_manipulator::reset_variable(int, cosim::variable_type, unsigned int)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::detail::get_tss_data(void const*)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::aux::this_process::get_id()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::fibers::mutex::lock()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::make_error_condition(cosim::errc)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::aux::default_attribute_names::message()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::last_value_observer::last_value_observer()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::aux::default_attribute_names::thread_id()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::file_observer::file_observer(std::filesystem::__cxx11::path const&, std::optional<cosim::file_observer_config>)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::sinks::basic_text_ostream_backend<char>::~basic_text_ostream_backend()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::temporary_file_cache::temporary_file_cache()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::time_series_observer::time_series_observer()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::default_model_uri_resolver(std::shared_ptr<cosim::file_cache>)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::aux::once_block_sentry::commit()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::attribute::impl::operator new(unsigned long)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::ssp_loader::ssp_loader()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::execution::add_slave(std::shared_ptr<cosim::slave>, std::basic_string_view<char, std::char_traits<char> >, std::chrono::duration<long, std::ratio<1l, 1000000000l> >)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::execution::add_manipulator(std::shared_ptr<cosim::manipulator>)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::core::add_global_attribute(boost::log::v2_mt_posix::attribute_name const&, boost::log::v2_mt_posix::attribute const&)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::fibers::condition_variable_any::notify_all()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::aux::once_block_sentry::rollback()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::sinks::basic_text_ostream_backend<char>::consume(boost::log::v2_mt_posix::record_view const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::execution::simulate_until(std::optional<std::chrono::time_point<cosim::detail::clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > > >)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::fixed_step_algorithm::fixed_step_algorithm(std::chrono::duration<long, std::ratio<1l, 1000000000l> >, std::optional<unsigned int>)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::ssp_loader::load(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::fibers::context::suspend(std::unique_lock<boost::fibers::detail::spinlock_ttas>&)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::library_version()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::execution::is_running() const'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::aux::code_convert_impl(wchar_t const*, unsigned long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, unsigned long, std::locale const&)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `void boost::log::v2_mt_posix::aux::put_integer<char>(boost::log::v2_mt_posix::aux::basic_ostringstreambuf<char, std::char_traits<char>, std::allocator<char> >&, unsigned int, unsigned int, char)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::execution::set_integer_initial_value(int, unsigned int, int)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::sinks::basic_text_ostream_backend<char>::add_stream(boost::shared_ptr<std::ostream> const&)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::execution::stop_simulation()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::inject_system_structure(cosim::execution&, cosim::system_structure const&, std::unordered_map<cosim::full_variable_name, std::variant<double, int, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::hash<cosim::full_variable_name>, std::equal_to<cosim::full_variable_name>, std::allocator<std::pair<cosim::full_variable_name const, std::variant<double, int, bool, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > > > const&)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::time_series_observer::start_observing(cosim::variable_id)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::detail::set_tss_data(void const*, void (*)(void (*)(void*), void*), void (*)(void*), void*, bool)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::execution::set_string_initial_value(int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::attribute_value_set::find(boost::log::v2_mt_posix::attribute_name) const'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `typeinfo for cosim::override_manipulator'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::core::get()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::time_series_observer::stop_observing(cosim::variable_id)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::sinks::basic_text_ostream_backend<char>::flush()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::aux::default_attribute_names::process_id()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `char const* boost::log::v2_mt_posix::trivial::to_string<char>(boost::log::v2_mt_posix::trivial::severity_level)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `void boost::log::v2_mt_posix::aux::parse_date_time_format<char>(char const*, char const*, boost::log::v2_mt_posix::aux::date_time_format_parser_callback<char>&)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::core::add_sink(boost::shared_ptr<boost::log::v2_mt_posix::sinks::sink> const&)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::execution::~execution()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::execution::get_model_description(int) const'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::execution::get_real_time_config() const'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::execution::current_time() const'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::execution::step()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::override_manipulator::override_string_variable(int, unsigned int, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::attribute_value_set::end() const'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::execution::connect_variables(cosim::variable_id, cosim::variable_id)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `typeinfo for cosim::time_series_observer'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::fibers::future_category()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::scenario_manager::scenario_manager()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::execution::get_modified_variables() const'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::fibers::context::active()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::load_osp_config(std::filesystem::__cxx11::path const&, cosim::model_uri_resolver&)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::execution::set_boolean_initial_value(int, unsigned int, bool)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::core::set_filter(boost::log::v2_mt_posix::filter const&)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::fmi::importer::import(std::filesystem::__cxx11::path const&)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `typeinfo for cosim::scenario_manager'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::override_manipulator::override_boolean_variable(int, unsigned int, bool)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::file_observer::file_observer(std::filesystem::__cxx11::path const&, std::filesystem::__cxx11::path const&)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::sinks::basic_text_ostream_backend<char>::construct(boost::log::v2_mt_posix::sinks::auto_newline_mode, bool)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::aux::once_block_sentry::enter_once_block() const'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::execution::get_real_time_metrics() const'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::override_manipulator::override_integer_variable(int, unsigned int, int)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::aux::default_attribute_names::line_id()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::scenario_manager::load_scenario(std::filesystem::__cxx11::path const&, std::chrono::time_point<cosim::detail::clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::override_manipulator::override_real_variable(int, unsigned int, double)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::time_series_observer::time_series_observer(unsigned long)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::scenario_manager::abort_scenario()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::attribute::impl::operator delete(void*, unsigned long)'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::log::v2_mt_posix::aux::default_attribute_names::timestamp()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `boost::fibers::mutex::unlock()'
/usr/bin/ld: /home/cem/NTNU.local/Sandbox/osp/cosim-demo-app/libcosim/../dist/lib/libcosimc.so: undefined reference to `cosim::scenario_manager::is_scenario_running()'
collect2: error: ld returned 1 exit status

@davidhjp01
Copy link
Contributor Author

Probably 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.

@incebellipipo
Copy link

I rm -rfed 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?

@davidhjp01
Copy link
Contributor Author

Thanks for the update @incebellipipo. This PR includes the updated README for sourcing the activation script :)

Copy link
Member

@kyllingstad kyllingstad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved in OSP committee meeting

@kyllingstad kyllingstad merged commit c341f86 into master Sep 26, 2023
@kyllingstad kyllingstad deleted the build-fix branch September 26, 2023 08:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants