How to avoid annobin errors using locally-built gcc on Rocky 9

66 Views Asked by At

I am setting up a new server, running Rocky 9. For various reasons not relevant here, we have various software / dev packges built from source to give us our build environment for the custom software we build and run; so we have gcc-13, and specific Python, cmake etc. versions which we built from source.

However, when I try to compile some specific third-party software in this environment, I am getting errors related to annobin which break compilation. Initially this error was that the annobin.so file doesn't exist in my gcc-13/plugins directory (true, it doesn't). So, I set the -fplugin-arg-annobin-disable in CXXFLAGS to avoid using annobin, and instead I am getting the error: plugin annobin should be specified before ‘-fplugin-arg-annobin-disable’ in the command line.

As far as I can see, annobin is some RedHat-specific addition; so I don't know why my source-built gcc-13 is even trying to use it, and frankly, I'd quite like to simply disable it and build my binaries with extra annotation; but my real goal is just to get the codes to compile.

Can anyone give me any pointers? Can I (should I?) disable annobin? Or how can I get my source-build of gcc to use it properly?

(NB, I'm having this issue on an automake project, i.e. ./configure / make / make install)

1

There are 1 best solutions below

0
On

Answering my own question now, as I have eventually cracked it, and in case it affects other people.

Essentially, the problem was simply that the software I was building was still trying to link against some of the OS-provided libraries (in this case, Perl). So the solution was to do a local build of perl using my local build of gcc, with no annobin.

Kind of obvious with hindsight...