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

Build failed on Raspberry Pi with Raspbian Buster and GCC 8.3 #12

Closed
mgdelta opened this issue Jul 17, 2019 · 4 comments
Closed

Build failed on Raspberry Pi with Raspbian Buster and GCC 8.3 #12

mgdelta opened this issue Jul 17, 2019 · 4 comments

Comments

@mgdelta
Copy link

mgdelta commented Jul 17, 2019

Hi eCAL team,

trying to build your system on a Raspberry Pi 3B+ fails. Build stops first time when building the executable ecal_topic. The linker complains about undefined reference to
__atomic_load_8
__atomic_store_8
__atomic_fetch_add_8

It looks like a problem linking to -latomic which is necessary on armhf systems.

I'm using an actual raspbian (Buster) with GCC 8.3
During build there are a lot of warnings due to some changes after GCC 7.4.
Maybe the -latomic thing is a problem of using GCC 8 or cmake is doing something ugly.

Can you confirm my problem or is it an issue on my side/system?

Thanks!!

@mgdelta mgdelta changed the title Support Raspberry Pi with Raspbian Buster and GCC 8.3 Build failed on Raspberry Pi with Raspbian Buster and GCC 8.3 Jul 17, 2019
@Blutkoete
Copy link
Contributor

Blutkoete commented Jul 18, 2019

I'm not associated with the eCAL team in any way, but I wanted to add that this may not be related to Raspberry Pi 3 or armhf per se, as both the old and the current release build fine with gcc 8.3.0 on my Raspberry Pi 3's running ArchLinuxARM. One main difference is probably that I'm building against the ArchLinuxARM's own versions of protobuf, tclap, asio and simpleini, not the bundled ones.

This is not solving your issue, I know, but maybe it helps someone pinpointing the problem.

@Kerstin-Keller
Copy link
Contributor

So it seems that so far we haven't been building for platforms which do require the special -latomic linker flag in order to use the std::atomic objects.

I suspect the appropriate target_link_libraries command is missing for the eCAL core library
https://github.com/continental/ecal/blob/04a1093bfbb6659763320d9791a40c5c180a3135/ecal/core/src/CMakeLists.txt#L378-L397
and maybe some of the samples.

However, it is not quite clear to me, under which compilation conditions (compiler, platform, e.g. ) the extra linker arguments are necessary.

Amongst others I found this example and this example from llvm where they are trying to detect if the linker argument is necessary.

I am just a bit astonished, as this is / should be(?) part of the standard library, that this is not somehow handled by CMake and the generic flags it sets for one platform (e.g. when enabling the C++11 standard).

@rex-schilasky
Copy link
Contributor

@mgdelta did you succeed with the build ?

@rex-schilasky
Copy link
Contributor

No more feedback here .. just close it.

wep21 pushed a commit to wep21/ecal that referenced this issue Sep 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants