GCC generating corrupted dependency files - gcc

I've got a weird issue with compiling GCC that I can't seem to figure out.
What I'm trying to compile: gcc v12.2.0 (via make bootstrap)
What I'm compiling with: gcc v11.2.0
Configure command: ../configure --prefix=/usr --libdir=/usr/lib64 --mandir=/usr/man --infodir=/usr/info --enable-shared --enable-bootstrap --enable-languages=ada,c,c++,d,fortran,go,lto,objc,obj-c++ --enable-threads=posix --enable-checking=release --enable-objc-gc --with-system-zlib --enable-libstdcxx-dual-abi --with-default-libstdcxx-abi=new --disable-libstdcxx-pch --disable-libunwind-exceptions --enable-__cxa_atexit --disable-libssp --enable-gnu-unique-object --enable-plugin --enable-lto --disable-install-libiberty --disable-werror --with-gnu-ld --with-isl --verbose --with-arch-directory=amd64 --disable-gtktest --enable-clocale=gnu --disable-multilib --target=x86_64-slackware-linux --build=x86_64-slackware-linux --host=x86_64-slackware-linux
Build environment: Docker image (Slackware x86_64 v15.0)
Host environment: I've managed to reproduce this on two different hosts: one is running Ubuntu (x86_64, v20.04.5); the other is running Windows 10.
The issue: Sometimes (about half the time), the build fails with something similar to the following:
make[4]: Entering directory '/tmp/gcc-12.2.0/gcc.build.lnx/prev-gcc'
rm -f stamp-gnatlib2-rts stamp-tools
d/.deps/opover.Po:1: *** target pattern contains no '%'. Stop.
make[4]: Leaving directory '/tmp/gcc-12.2.0/gcc.build.lnx/prev-gcc'
make[3]: *** [Makefile:3279: stmp-fixinc] Error 2
make[3]: *** Waiting for unfinished jobs....
rm gcc.pod gfortran.pod gccgo.pod gdc.pod
make[3]: Leaving directory '/tmp/gcc-12.2.0/gcc.build.lnx/gcc'
make[2]: *** [Makefile:5005: all-stage2-gcc] Error 2
make[2]: Leaving directory '/tmp/gcc-12.2.0/gcc.build.lnx'
make[1]: *** [Makefile:30918: stage2-bubble] Error 2
make[1]: Leaving directory '/tmp/gcc-12.2.0/gcc.build.lnx'
make: *** [Makefile:31130: bootstrap] Error 2
The offending file will be different each time, although it's always under d/.deps/. Additionally, sometimes the error message is *** target pattern contains no '%'. Stop.; sometimes it's *** missing separator. Stop..
If I go and inspect the offending file, I can see that the filename has been corrupted (notice the errant f2 3a fd 7f after opover.o and before the :):
00000000 64 2f 6f 70 6f 76 65 72 2e 6f f2 3a fd 7f 3a 20 |d/opover.o.:..: |
00000010 2e 2e 2f 2e 2e 2f 67 63 63 2f 64 2f 64 6d 64 2f |../../gcc/d/dmd/|
00000020 6f 70 6f 76 65 72 2e 64 20 5c 0a 20 2f 74 6d 70 |opover.d \. /tmp|
00000030 2f 67 63 63 2d 31 32 2e 32 2e 30 2f 67 63 63 2f |/gcc-12.2.0/gcc/|
00000040 64 2f 64 6d 64 2f 63 6c 6f 6e 65 2e 64 20 2f 74 |d/dmd/clone.d /t|
I don't see these extraneous characters in the output being spit out by make -- so I don't know where they're coming from.
I'm almost ready to call this a bug in GCC. But before I do, what else would cause this to happen?

Related

latexindent: trouble installing File::HomeDir, Mac::SystemDirectory since macOS 11 Big Sur

Before I begin, I should note that I never had this problem on macOS 10.15 Catalina, and the responses in this similar thread did not solve the problem, unfortunately.
I'm experimenting with latexindent on a fresh install of macOS 11 Big Sur and I'm having issues with File:HomeDir: running latexindent returns a whole list of errors, beginning with Can't locate File/HomeDir.pm in #INC. I've tried using cpan to install that module, but I end up with following:
Reading '/Users/myname/.cpan/Metadata'
Database was generated on Thu, 24 Dec 2020 05:41:03 GMT
Running install for module 'File::HomeDir'
Checksum for /Users/myname/.cpan/sources/authors/id/R/RE/REHSACK/File-HomeDir-1.006.tar.gz ok
Scanning cache /Users/myname/.cpan/build for sizes
............................................................................DONE
'YAML' not installed, will not store persistent state
Configuring R/RE/REHSACK/File-HomeDir-1.006.tar.gz with Makefile.PL
Checking if your kit is complete...
Looks good
Warning: prerequisite Mac::SystemDirectory 0.04 not found.
Generating a Unix-style Makefile
Writing Makefile for File::HomeDir
Writing MYMETA.yml and MYMETA.json
REHSACK/File-HomeDir-1.006.tar.gz
/usr/bin/perl Makefile.PL -- OK
Running make for R/RE/REHSACK/File-HomeDir-1.006.tar.gz
---- Unsatisfied dependencies detected during ----
---- REHSACK/File-HomeDir-1.006.tar.gz ----
Mac::SystemDirectory [requires]
Running install for module 'Mac::SystemDirectory'
Checksum for /Users/myname/.cpan/sources/authors/id/E/ET/ETHER/Mac-SystemDirectory-0.13.tar.gz ok
Configuring E/ET/ETHER/Mac-SystemDirectory-0.13.tar.gz with Makefile.PL
HASCOMPILERjIOx/TESTn6oE.c:2:10: fatal error: 'EXTERN.h' file not found
#include "EXTERN.h"
^~~~~~~~~~
1 error generated.
Couldn't execute cc -g -pipe -fno-strict-aliasing -fstack-protector-strong -DPERL_USE_SAFE_PUTENV -Os "-I/System/Library/Perl/5.28/darwin-thread-multi-2level/CORE" -c HASCOMPILERjIOx/TESTn6oE.c -o HASCOMPILERjIOx/TESTn6oE.o: Inappropriate ioctl for device at Makefile.PL line 14.
Requires a compiler
Warning: No success on command[/usr/bin/perl Makefile.PL]
ETHER/Mac-SystemDirectory-0.13.tar.gz
/usr/bin/perl Makefile.PL -- NOT OK
REHSACK/File-HomeDir-1.006.tar.gz
Has already been unwrapped into directory /Users/myname/.cpan/build/File-HomeDir-1.006-2
REHSACK/File-HomeDir-1.006.tar.gz
Has already been prepared
Running make for R/RE/REHSACK/File-HomeDir-1.006.tar.gz
Warning: Prerequisite 'Mac::SystemDirectory => 0.04' for 'REHSACK/File-HomeDir-1.006.tar.gz' failed when processing 'ETHER/Mac-SystemDirectory-0.13.tar.gz' with 'writemakefile => NO '/usr/bin/perl Makefile.PL' returned status 6400'. Continuing, but chances to succeed are limited.
cp lib/File/HomeDir/Driver.pm blib/lib/File/HomeDir/Driver.pm
cp lib/File/HomeDir/MacOS9.pm blib/lib/File/HomeDir/MacOS9.pm
cp lib/File/HomeDir/Darwin/Carbon.pm blib/lib/File/HomeDir/Darwin/Carbon.pm
cp lib/File/HomeDir/Darwin/Cocoa.pm blib/lib/File/HomeDir/Darwin/Cocoa.pm
cp lib/File/HomeDir/Windows.pm blib/lib/File/HomeDir/Windows.pm
cp lib/File/HomeDir/FreeDesktop.pm blib/lib/File/HomeDir/FreeDesktop.pm
cp lib/File/HomeDir.pm blib/lib/File/HomeDir.pm
cp lib/File/HomeDir/Test.pm blib/lib/File/HomeDir/Test.pm
cp lib/File/HomeDir/Darwin.pm blib/lib/File/HomeDir/Darwin.pm
cp lib/File/HomeDir/Unix.pm blib/lib/File/HomeDir/Unix.pm
Manifying 10 pod documents
REHSACK/File-HomeDir-1.006.tar.gz
/usr/bin/make -- OK
Running make test
PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t xt/*.t
t/01_compile.t ........ 1/11 # Implemented by: File::HomeDir::Darwin
t/01_compile.t ........ ok
t/02_main.t ........... # $<: 501 -- $(: 20 20 12 61 79 80 81 98 701 33 100 204 250 395 398 399 400
t/02_main.t ........... ok
t/10_test.t ........... ok
t/11_darwin.t ......... ok
t/12_darwin_carbon.t .. skipped: Not running on 32-bit Darwin
t/13_darwin_cocoa.t ... skipped: Not running on Darwin with Cocoa API using Mac::SystemDirectory
t/20_empty_home.t ..... ok
All tests successful.
Files=7, Tests=90, 1 wallclock secs ( 0.04 usr 0.01 sys + 0.48 cusr 0.13 csys = 0.66 CPU)
Result: PASS
REHSACK/File-HomeDir-1.006.tar.gz
Tests succeeded but one dependency not OK (Mac::SystemDirectory)
REHSACK/File-HomeDir-1.006.tar.gz
[dependencies] -- NA
Failed during this command:
ETHER/Mac-SystemDirectory-0.13.tar.gz : writemakefile NO '/usr/bin/perl Makefile.PL' returned status 6400
REHSACK/File-HomeDir-1.006.tar.gz : make_test NO one dependency not OK (Mac::SystemDirectory)
I really don't know much about perl, but it seems to me that Mac::SystemDirectory is missing, When I try to install that, however, I get
Reading '/Users/myname/.cpan/Metadata'
Database was generated on Thu, 24 Dec 2020 05:41:03 GMT
Running install for module 'Mac::SystemDirectory'
Checksum for /Users/myname/.cpan/sources/authors/id/E/ET/ETHER/Mac-SystemDirectory-0.13.tar.gz ok
Scanning cache /Users/myname/.cpan/build for sizes
............................................................................DONE
'YAML' not installed, will not store persistent state
Configuring E/ET/ETHER/Mac-SystemDirectory-0.13.tar.gz with Makefile.PL
HASCOMPILER5Emh/TESTS3W7.c:2:10: fatal error: 'EXTERN.h' file not found
#include "EXTERN.h"
^~~~~~~~~~
1 error generated.
Couldn't execute cc -g -pipe -fno-strict-aliasing -fstack-protector-strong -DPERL_USE_SAFE_PUTENV -Os "-I/System/Library/Perl/5.28/darwin-thread-multi-2level/CORE" -c HASCOMPILER5Emh/TESTS3W7.c -o HASCOMPILER5Emh/TESTS3W7.o: Inappropriate ioctl for device at Makefile.PL line 14.
Requires a compiler
Warning: No success on command[/usr/bin/perl Makefile.PL]
ETHER/Mac-SystemDirectory-0.13.tar.gz
/usr/bin/perl Makefile.PL -- NOT OK
Failed during this command:
ETHER/Mac-SystemDirectory-0.13.tar.gz : writemakefile NO '/usr/bin/perl Makefile.PL' returned status 6400
From this it seems that a header file EXTERN.h is missing, but I'm not sure where to go from here. Does anyone have any thoughts or suggestions? My apologies for the huge blocks of code - I figured it would be better to include all possible details. Thanks a lot!
Note: I posted this same question in the LaTeX Stack Exchange, but figured I would also ask here since it seems to be a broader perl issue.
To summarize the solution that worked for me: the issue is the header file EXTERN.h isn't on the CPATH by default in macOS 11 Big Sur. To fix this, add the directory containing EXTERN.h to CPATH:
export CPATH=/Library/Developer/CommandLineTools/SDKs/MacOSX11.1.sdk/System/Library/Perl/5.28/darwin-thread-multi-2level/CORE:$CPATH
Then open the cpan shell (just type cpan then enter into the command line) and type install Mac::SystemDirectory. After this process finished I was able to install File:HomeDir as well, and some other modules, to get latexindent working.
Note: I had to set up cpan before I did this; just opening the shell and following the instructions was sufficient.
Thanks a lot to Håkon Hægland for the solution!

Resolving dynamic library locations on Mac OS Catalina

I'm trying to understand the process by which Mac OS Catalina determines the locations of dynamic libraries and resolves name conflicts at runtime. The information on this website:
https://developer.apple.com/library/archive/documentation/DeveloperTools/Conceptual/DynamicLibraries/100-Articles/DynamicLibraryUsageGuidelines.html#//apple_ref/doc/uid/TP40001928-SW12
implies that there is a search hierarchy that starts with the contents of LD_LIBRARY_PATH and moves through a number of other environment variables; that one of these, DYLD_FALLBACK_LIBRARY_PATH, has default values if not explicitly set that include locations like /usr/lib .
Then I see that if I look at a library's dependencies with ldd -d, it shows the dependencies for each library with path information:
nasmac3465:libs ptenenba$ ldd -d libtess-mod.dylib
libtess-mod.dylib:
Contents of (__DATA,__data) section
000000000001cb80 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000000000001cb90 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
000000000001cba0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
/Users/ptenenba/git/tess/spoc/code/dist/libs/libtess-mod.dylib (compatibility version 0.0.0, current version 0.0.0)
/opt/local/lib/libgcc/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.28.0)
/Users/ptenenba/git/tess/spoc/code/dist/libs/libtess-common.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)
/opt/local/lib/libgcc/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
nasmac3465:libs ptenenba$
My question: why do I need to specify any library search paths using LD_LIBRARY_PATH or DYLD_LIBRARY_PATH when each library has both the name and the path of its dependencies?
Normally it is unnecessary and undesirable to use the environment variables with dyld the dynamic library loader. The paths should instead be set during the link phase, or modified later with install_name_tool.

fatal error: TXMLNode.h: No such file or directory

I want install package ROOT on my computer, It should be done with command ./configure && make && make install, at the step of make, I met an error:
In file included from /home/wm/root-6.10.02/hist/unfold/src/TUnfoldBinningXML.cxx:123:0:
include/TUnfoldBinningXML.h:47:22: fatal error: TXMLNode.h: No such file or directory
compilation terminated.
Makefile:723: recipe for target 'hist/unfold/src/TUnfoldBinningXML.o' failed
make: *** [hist/unfold/src/TUnfoldBinningXML.o] Error 1
my OS is Ubuntu 16.04 LTS
Then I check for config.log
98 Checking for libXpm ...
99 libraries to check for: libXpm.so libXpm.sl libXpm.tbd libXpm.dylib libXpm.dll.a libXpm.a libXpm.lib libXpm
100 Checking in directories /usr/local/lib64 /usr/local/lib/x86_64-linux-gnu /usr/local/lib64 /usr/local/lib for libXpm.so libXpm.sl libXpm.tbd libXpm. dylib libXpm.dll.a libXpm.a libXpm.lib libXpm
101 Checking for library libXpm.so in directory /usr/local/lib
102 Checking /usr/local/lib/libXpm.so
103 libXpm.so not found in /usr/local/lib
104 Checking for library libXpm.sl in directory /usr/local/lib
105 Checking /usr/local/lib/libXpm.sl
106 libXpm.sl not found in /usr/local/lib
107 Checking for library libXpm.tbd in directory /usr/local/lib
108 Checking /usr/local/lib/libXpm.tbd
109 libXpm.tbd not found in /usr/local/lib
110 Checking for library libXpm.dylib in directory /usr/local/lib
111 Checking /usr/local/lib/libXpm.dylib
112 libXpm.dylib not found in /usr/local/lib
113 Checking for library libXpm.dll.a in directory /usr/local/lib
114 Checking /usr/local/lib/libXpm.dll.a
115 libXpm.dll.a not found in /usr/local/lib
116 Checking for library libXpm.a in directory /usr/local/lib
117 Checking /usr/local/lib/libXpm.a
118 libXpm.a not found in /usr/local/lib
119 Checking for library libXpm.lib in directory /usr/local/lib
120 Checking /usr/local/lib/libXpm.lib
121 libXpm.lib not found in /usr/local/lib
122 Checking for library libXpm in directory /usr/local/lib
123 Checking /usr/local/lib/libXpm
124 libXpm not found in /usr/local/lib
125 Checking in directories /usr/lib64 /usr/lib/x86_64-linux-gnu /usr/lib64 /usr/lib for libXpm.so libXpm.sl libXpm.tbd libXpm.dylib libXpm.dll.a libX pm.a libXpm.lib libXpm
126 Checking for library libXpm.so in directory /usr/lib/x86_64-linux-gnu
127 Checking /usr/lib/x86_64-linux-gnu/libXpm.so
128 Found file /usr/lib/x86_64-linux-gnu/libXpm.so
129 Checking if /usr/lib/x86_64-linux-gnu/libXpm.so is a 64-bit library
130 file -L /usr/lib/x86_64-linux-gnu/libXpm.so | grep '64-bit'
131 result: 1
132 is a 64bit library
and several mistakes like this. I think that I have installed for example libxpm-dev
$ sudo apt-get install libxpm-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
libxpm-dev is already the newest version (1:3.5.11-1ubuntu0.16.04.1).
0 upgraded, 0 newly installed, 0 to remove and 321 not upgraded.
but there is no output of ldconfig -p | grep libxpm-dev,
the output of locate libxpm-dev is
/usr/share/doc/libxpm-dev
/usr/share/doc/libxpm-dev/changelog.Debian.gz
/usr/share/doc/libxpm-dev/copyright
/usr/share/doc/libxpm-dev/xpm.PS.gz
/usr/share/lintian/overrides/libxpm-dev
/var/cache/apt/archives/libxpm-dev_1%3a3.5.11-1ubuntu0.16.04.1_amd64.deb
/var/lib/dpkg/info/libxpm-dev:amd64.list
/var/lib/dpkg/info/libxpm-dev:amd64.md5sums
Then I try :
$ export PATH=$PATH:/usr/share/doc
$ ~/root-6.10.02$ export PATH=$PATH:/var/cache/apt/archives
$ ~/root-6.10.02$ export PATH=$PATH:/var/lib/dpkg/info
still doesn't work.
so what to do now?

GCC installed but command not found

I'm new to linux and I'm having a hard time trying to get this work.
I uninstalled and installed gcc a few times. Now when I run gcc --version, it still says zsh: command not found.
When I go to /usr/local/bin and run ls -l I find multiple versions of gcc
lrwxr-xr-x 1 ps032791 admin 33 Jul 2 2014 c++-4.6 -> ../Cellar/gcc46/4.6.4/bin/c++-4.6
lrwxr-xr-x 1 ps032791 admin 33 Apr 6 11:58 c++-4.7 -> ../Cellar/gcc47/4.7.3/bin/c++-4.7
lrwxr-xr-x 1 ps032791 admin 33 Apr 6 15:27 c++-4.8 -> ../Cellar/gcc/4.8.3_1/bin/c++-4.8
lrwxr-xr-x 1 ps032791 admin 32 Apr 6 15:19 cloog -> ../Cellar/cloog/0.18.1/bin/cloog
lrwxr-xr-x 1 ps032791 admin 33 Jul 2 2014 cpp-4.6 -> ../Cellar/gcc46/4.6.4/bin/cpp-4.6
lrwxr-xr-x 1 ps032791 admin 33 Apr 6 11:58 cpp-4.7 -> ../Cellar/gcc47/4.7.3/bin/cpp-4.7
lrwxr-xr-x 1 ps032791 admin 33 Apr 6 15:27 cpp-4.8 -> ../Cellar/gcc/4.8.3_1/bin/cpp-4.8
lrwxr-xr-x 1 ps032791 admin 28 May 29 2014 erb -> ../Cellar/ruby/2.1.2/bin/erb
lrwxr-xr-x 1 ps032791 admin 33 Jul 2 2014 g++-4.6 -> ../Cellar/gcc46/4.6.4/bin/g++-4.6
lrwxr-xr-x 1 ps032791 admin 33 Apr 6 11:58 g++-4.7 -> ../Cellar/gcc47/4.7.3/bin/g++-4.7
lrwxr-xr-x 1 ps032791 admin 33 Apr 6 15:27 g++-4.8 -> ../Cellar/gcc/4.8.3_1/bin/g++-4.8
-rw-r--r-- 1 ps032791 admin 0 Apr 6 13:23 gcc-4.2
lrwxr-xr-x 1 ps032791 admin 33 Jul 2 2014 gcc-4.6 -> ../Cellar/gcc46/4.6.4/bin/gcc-4.6
lrwxr-xr-x 1 ps032791 admin 33 Apr 6 11:58 gcc-4.7 -> ../Cellar/gcc47/4.7.3/bin/gcc-4.7
lrwxr-xr-x 1 ps032791 admin 33 Apr 6 15:27 gcc-4.8 -> ../Cellar/gcc/4.8.3_1/bin/gcc-4.8
lrwxr-xr-x 1 ps032791 admin 36 Apr 6 11:58 gcc-ar-4.7 -> ../Cellar/gcc47/4.7.3/bin/gcc-ar-4.7
lrwxr-xr-x 1 ps032791 admin 36 Apr 6 15:27 gcc-ar-4.8 -> ../Cellar/gcc/4.8.3_1/bin/gcc-ar-4.8
lrwxr-xr-x 1 ps032791 admin 36 Apr 6 11:58 gcc-nm-4.7 -> ../Cellar/gcc47/4.7.3/bin/gcc-nm-4.7
lrwxr-xr-x 1 ps032791 admin 36 Apr 6 15:27 gcc-nm-4.8 -> ../Cellar/gcc/4.8.3_1/bin/gcc-nm-4.8
lrwxr-xr-x 1 ps032791 admin 40 Apr 6 11:58 gcc-ranlib-4.7 -> ../Cellar/gcc47/4.7.3/bin/gcc-ranlib-4.7
lrwxr-xr-x 1 ps032791 admin 40 Apr 6 15:27 gcc-ranlib-4.8 -> ../Cellar/gcc/4.8.3_1/bin/gcc-ranlib-4.8
I ran 'brew doctor', and I get the following output,
Warning: You have MacPorts or Fink installed:
/opt/local/bin/port
This can cause trouble. You don't have to uninstall them, but you may want to
temporarily move them out of the way, e.g.
sudo mv /opt/local ~/macports
Warning: Your Homebrew is outdated.
You haven't updated for at least 24 hours, this is a long time in brewland!
To update Homebrew, run `brew update`.
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
gcc48
Warning: You have uncommitted modifications to Homebrew
If this a surprise to you, then you should stash these modifications.
Stashing returns Homebrew to a pristine state but can be undone
should you later need to do so for some reason.
cd /usr/local/Library && git stash && git clean -d -f
Warning: /usr/bin occurs before /usr/local/bin
This means that system-provided programs will be used instead of those
provided by Homebrew. The following tools exist at both paths:
erb
gem
git
git-cvsserver
git-receive-pack
git-shell
git-upload-archive
git-upload-pack
irb
rake
rdoc
ri
ruby
testrb
Consider setting your PATH so that /usr/local/bin
occurs before /usr/bin. Here is a one-liner:
echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile
I tried running echo export PATH='/usr/local/bin:$PATH' >> ~/.bash_profile, restarted the terminal and again ran brew doctor, it still complains the same thing. I'm totally lost here. Can someone guide me with this? What am I doing wrong? Thanks in advance.
You are not configuring the correct config file. Check this out:
https://wiki.archlinux.org/index.php/Zsh#Configuring_.24PATH
Check that gcc is installed correctly:
brew install gcc
brew link gcc48
Create an alias to whatever link brew created and put it in your .zshrc
cd /usr/local/bin
ls cpp*
ls c++*
alias gcc=/usr/local/bin/<whatever_link_you_found>

Building rpm for gcc 4.8.2 rpath ERROR 0020:

When building rpm's for centos I continue to get this error
ERROR 0020: file '/usr/local/probe/lib64/libasan.so.0.0.0' contains an rpath referencing '..'
According to the docs I should be able to ignore this by calling:
QA_RPATHS=$[ 0x0020 ] rpmbuild -v -bb --target=x86_64 ~/rpmbuild/SPECS/$PACKAGE.spec
But it still gives me the same error.
the QA_RPATHS did solve the problem but our spec file was exporting a different QA_RPATH in the script. Once I removed that it was resolved.

Resources