x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libsqlite3.so when searching for -lsqlite3 x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libpcre.so when searching for -lpcre x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libOpenCL.so when searching for -lOpenCL x86_64-pc-linux-gnu/bin/ld: skipping incompatible /usr/lib/libxml2.so when searching for -lxml2 x86_64-pc-linux-gnu/bin/ld: //usr/lib/../lib/libstdc++.so: error adding symbols: file in wrong format collect2: error: ld returned 1 exit status make[1]: *** [GNUmakefile:75: libgdal.la] Error 1 make[1]: Leaving directory '/home/vince/temp/portage/sci-libs/gdal-3.3.1/work/gdal-3.3.1' make: *** [GNUmakefile:88: check-lib] Error 2 make: Leaving directory '/home/vince/temp/portage/sci-libs/gdal-3.3.1/work/gdal-3.3.1' ERROR: sci-libs/gdal-3.3.1::gentoo failed (compile phase): emake failed
Created attachment 728367 [details] Build log
Created attachment 728370 [details] emerge --info '=sci-libs/gdal-3.3.1::gentoo'
Created attachment 728373 [details] emerge -pqv '=sci-libs/gdal-3.3.1::gentoo'
Created attachment 728376 [details] Ebuild environment
I manually modified config.status as to change: -L/usr/lib to -L/usr/lib64 (see diff attached) Then compiled again with: ebuild /usr/portage/sci-libs/gdal/gdal-3.3.1.ebuild compile and it worked.
Created attachment 730822 [details, diff] Workaround - config.status
Problem persists in version 3.4.1 Workaround still works
Need new build.log as lots has changed since.
(In reply to Sam James from comment #8) > Need new build.log as lots has changed since. FWIW, I did actually start a lot of work on this, but got bogged down in autotools hell with the huge amount of macros which needed fixing and doing the logic properly. Upstream were very nice so no issue there, I just ended up moving on to something else. They're moving to CMake now too so this will resolve itself. There is still a (huge) patch being applied though (gdal-3.3.0-libdir.patch) for the time being.
Obsolete given move to CMake in stable now.