Comments (25)
I'll look into why the tests fail on 20. I'll see if it can be fixed in the next release.
from cppagent.
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.
Its intel x86_64
from cppagent.
from cppagent.
What version of ubuntu?
from cppagent.
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.
Built fine. What version of GCC?
from cppagent.
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.
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.
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.
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.
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.
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.
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.
Conan will pull in all the dependencies.
from cppagent.
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.
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.
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.
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.
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.
If I can put together an example for 20.04 in docker, would that be helpful?
from cppagent.
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:
See if you can build using this file.
from cppagent.
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.
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.
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)
- Unclear logging at startup when using Docker HOT 1
- * uuid command handling in agent not as expected HOT 19
- AgentConfiguration::monitorThread message reports wrong number of seconds
- Crash when editing device dataitem in DeviceModel HOT 4
- XML Schema validation with lxml HOT 1
- Simple WebSockets for subscriptions HOT 3
- Add validation transform to support 2.5 quality attribute for observations.
- MQTT INGRESS connection not working on V2.3.0.4 HOT 5
- How to set initial dataitem value in the stream HOT 2
- Agent Reconnecting to Broker repeatedly HOT 21
- Condition ID format and example not matching on Agent version 2.3? HOT 25
- DELETEing an already deleted asset responds with old asset value; expected MTConnectError HOT 14
- Check why asset counts are not being reported in agent HOT 3
- json schema for agent cfg HOT 13
- Add pretty handling to assets
- Query Regarding FlatMode Configuration in MTConnect CPP Agent HOT 9
- Add header to Asset documents in 2.5
- Agent is suddenly closing itself HOT 23
- Cannot start service when cfg file has different name than default HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cppagent.