Giter VIP home page Giter VIP logo

Comments (25)

wsobel avatar wsobel commented on August 27, 2024 1

I'll look into why the tests fail on 20. I'll see if it can be fixed in the next release.

from cppagent.

wsobel avatar wsobel commented on August 27, 2024

Looks like a compiler (gcc) issue. Sometimes the LTE versions rev the version of the compiler.

I need to check the build. Was this intel or arm arch?

from cppagent.

shaurabhsingh avatar shaurabhsingh commented on August 27, 2024

Its intel x86_64

from cppagent.

wsobel avatar wsobel commented on August 27, 2024

from cppagent.

wsobel avatar wsobel commented on August 27, 2024

What version of ubuntu?

from cppagent.

wsobel avatar wsobel commented on August 27, 2024

I tested and it built. Can you tell me what version of GCC you were using?

just did:

conan build ../cppagent -of . -pr ../cppagent/conan/profiles/gcc --build=missing -s build_type=Release

from cppagent.

wsobel avatar wsobel commented on August 27, 2024

Built fine. What version of GCC?

from cppagent.

wsobel avatar wsobel commented on August 27, 2024

Cannot reproduce. Tried with gcc 11 and 12, compiles fine. gcc 12 has a few warnings in the date lib. nothing functional.

All tests past for both. Started clean each time–complete builds of all dependencies.

from cppagent.

wsobel avatar wsobel commented on August 27, 2024

I have built on ARM 22.04 using GCC 9.5, 11, and 12 with no problems. All tests past.

I will close this unless we can understand. Earlier versions of 9 did not have full C++ 17 support. 9.5 should be available on all platforms. We may need to add documentation for building on rPis.

from cppagent.

skibum1869 avatar skibum1869 commented on August 27, 2024

To my knowledge, Ubuntu 20.04 does not have the correct version of the GCC compiler. If I remember correctly, the refactor back in version 2.2.0.6 required a 22.04+ Ubuntu version as it would not be compatible with the earlier version of the compiler in 20.04.

from cppagent.

wsobel avatar wsobel commented on August 27, 2024

The docker image and the CI/CD build use 22.04. The necessary line is as follows:

sudo apt install -y build-essential cmake gcc-11 g++-11 python3 autoconf automake

This from the .github/workflows/build.yml. As you can see, we install g++ 11 explicitly. This should work on any 22.04 instance. Make sure you do an apt update as well to get the lastest build info.

from cppagent.

johnathan-arsenault avatar johnathan-arsenault commented on August 27, 2024

How could I get this building to support ubuntu 20.04? Since it's LTE, the latest version of gcc/g++ at least provided by the official focal repositories is 10. If I can't build or run the latest version on 20.04, which tag would build successfully for 20.04?

from cppagent.

wsobel avatar wsobel commented on August 27, 2024

The issue is the version of g++. Ubuntu LTE has many versions of g++ available, you just need to apt get the right version.

Did you see the line above? Install version 11 and it should work. This should also be the default since it is what builds in the docker image.

Did you try doing the apt get?

from cppagent.

johnathan-arsenault avatar johnathan-arsenault commented on August 27, 2024

Ubuntu 20.04 official focal repositories only go up to gcc and g++ 10.5.0. If I build a local copy of gcc and g++ 11, will the build process package those dependent libraries?

from cppagent.

wsobel avatar wsobel commented on August 27, 2024

Conan will pull in all the dependencies.

from cppagent.

johnathan-arsenault avatar johnathan-arsenault commented on August 27, 2024

Theoretically, I could build on 22.04 and then run on 20.04? if so, it looks like the proper libc6 shared libraries are not being copied over when packaging with cpack

from cppagent.

wsobel avatar wsobel commented on August 27, 2024

It is surprising this is an issue. In Docker I have never had this problem when running in a clean instance.

See the docker file. In release all it does is apt-get update

There are no dependencies.

I need more information to understand how to reproduce this issue. When I did a build according to the instructions it worked fine.

from cppagent.

wsobel avatar wsobel commented on August 27, 2024

This is the build environment for 22.04:

RUN  apt-get update \
  && apt-get install -y \
       autoconf \
       automake \
       build-essential \
       cmake \
       git \
       python3 \
       python3-pip \
       rake \
       ruby \
  && rm -rf /var/lib/apt/lists/* \
  && pip install conan

We do not specify the version of g++ or gcc so it must be the default in build-essential. I assume it was updated because we first do the apt-get update.

from cppagent.

johnathan-arsenault avatar johnathan-arsenault commented on August 27, 2024

If I build in 22.04, can I then run the package in 20.04? The issue is the majority of our machines are on 20.04, with the newer ones being 22.04. I've tried going back in the older releases, but am hitting other roadblocks there with just building on 20.04.

from cppagent.

johnathan-arsenault avatar johnathan-arsenault commented on August 27, 2024

This is the error I get when attempting to run a 22.04 built binary on 20.04

agent/bin/agent: /lib/x86_64-linux-gnu/libm.so.6: version `GLIBC_2.35' not found (required by /home/edge/agent3/bin/../lib/libagent_lib.so) agent/bin/agent: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /home/edge/agent3/bin/../lib/libagent_lib.so) agent/bin/agent: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/edge/agent3/bin/../lib/libagent_lib.so) agent/bin/agent: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/edge/agent3/bin/../lib/libagent_lib.so) agent/bin/agent: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /home/edge/agent3/bin/../lib/libagent_lib.so) agent/bin/agent: /lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.13' not found (required by /home/edge/agent3/bin/../lib/libagent_lib.so) agent/bin/agent: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /home/edge/agent3/bin/../lib/libboost_log.so.1.82.0) agent/bin/agent: /lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.13' not found (required by /home/edge/agent3/bin/../lib/libboost_log.so.1.82.0) agent/bin/agent: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/edge/agent3/bin/../lib/libboost_log.so.1.82.0) agent/bin/agent: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.32' not found (required by /home/edge/agent3/bin/../lib/libboost_log.so.1.82.0) agent/bin/agent: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /home/edge/agent3/bin/../lib/libboost_log.so.1.82.0) agent/bin/agent: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by /home/edge/agent3/bin/../lib/libboost_iostreams.so.1.82.0) agent/bin/agent: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.34' not found (required by /home/edge/agent3/bin/../lib/libboost_thread.so.1.82.0) agent/bin/agent: /lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /home/edge/agent3/bin/../lib/libboost_program_options.so.1.82.0)

from cppagent.

wsobel avatar wsobel commented on August 27, 2024

If I can put together an example for 20.04 in docker, would that be helpful?

from cppagent.

wsobel avatar wsobel commented on August 27, 2024

I built using docker and 20.04:

agent@64b38cf0a8f3:~$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=20.04
DISTRIB_CODENAME=focal
DISTRIB_DESCRIPTION="Ubuntu 20.04.6 LTS"

Using the following dockerfile:

Dockerfile20.txt

See if you can build using this file.

from cppagent.

johnathan-arsenault avatar johnathan-arsenault commented on August 27, 2024

I can reproduce the error with the following docker build command docker build -t mtc-agent:latest --build-arg WITH_TESTS=true --build-arg WITH_TESTS_ARG= .

How much value do the tests provide? is this something that can be safely skipped?

from cppagent.

wsobel avatar wsobel commented on August 27, 2024

They can be skipped for a production build. The CI/CD runs tests on all three platforms. For the docker builds we usually skip just because of the time it takes on dual platform.

from cppagent.

johnathan-arsenault avatar johnathan-arsenault commented on August 27, 2024

Skipping the tests, it does build on 20.04, and I can confirm that it works. Is this something that should be investigated on why the tests are not able to be built on 20.04? I understand if not, as 20.04 will be EOL next year, but it is peculiar.

from cppagent.

Related Issues (20)

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.