vsomeip icon indicating copy to clipboard operation
vsomeip copied to clipboard

Attempt to allow -fPIC work on GNU compilers for Fedora

Open smooge opened this issue 9 months ago • 2 comments

The CMakelists has logic to properly set things for fPIC but then undoes it later in the Make statements. This attempts to move the logic of using -fPIC or -fPIE higher up and removing the area where it overrode itself and caused problems with gcc.

smooge avatar Apr 02 '25 14:04 smooge

@smooge we have a PR :https://github.com/COVESA/vsomeip/pull/734 that will deal with those flags. I have tested to run your build, as you described, without the flags patch, but instead using the modern_cmake branch, and i was able to build vsomeip. Can you confirm that this is the case? Thanks!

duartenfonseca avatar May 20 '25 14:05 duartenfonseca

@smooge can you confirm that this would work?

duartenfonseca avatar Jun 18 '25 17:06 duartenfonseca

closed due to inactivity

duartenfonseca avatar Aug 06 '25 17:08 duartenfonseca

My apologies, this was completely on me for failing to come back on this.

I am still getting an error on 3.5.7 for compiling on RHEL/Fedora systems, but this looks definitely with an external environment variable Fedora/RHEL defines when building RPMs. I am trying to see if there is a general fix and would make a new fix for it

smooge avatar Aug 26 '25 15:08 smooge

The patches do fix the problem and my newer problem is due to the build system setting LTO flags of -flto=auto -ffat-lto-objects Those flags seem to trigger a similar looking problem of gcc saying that things need to be compiled with -fPIC even though they are all compiled that way.

Again my apologies for the delay in answering you and thankyou and others for the software.

smooge avatar Aug 26 '25 16:08 smooge