Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 805266

Summary: sci-libs/gdal-3.3.1 and sci-libs/gdal-3.4.1: emake failed - error adding symbols: file in wrong format
Product: Gentoo Linux Reporter: vince.ice <dev>
Component: Current packagesAssignee: Sci-geo Project <sci-geosciences>
Status: RESOLVED OBSOLETE    
Severity: normal CC: sam
Priority: Normal    
Version: unspecified   
Hardware: AMD64   
OS: Linux   
See Also: https://bugs.gentoo.org/show_bug.cgi?id=887735
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Build log
emerge --info '=sci-libs/gdal-3.3.1::gentoo'
emerge -pqv '=sci-libs/gdal-3.3.1::gentoo'
Ebuild environment
Workaround - config.status

Description vince.ice 2021-07-30 16:31:29 UTC
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
Comment 1 vince.ice 2021-07-30 16:33:46 UTC
Created attachment 728367 [details]
Build log
Comment 2 vince.ice 2021-07-30 16:34:33 UTC
Created attachment 728370 [details]
emerge --info '=sci-libs/gdal-3.3.1::gentoo'
Comment 3 vince.ice 2021-07-30 16:34:57 UTC
Created attachment 728373 [details]
emerge -pqv '=sci-libs/gdal-3.3.1::gentoo'
Comment 4 vince.ice 2021-07-30 16:35:30 UTC
Created attachment 728376 [details]
Ebuild environment
Comment 5 vince.ice 2021-08-06 12:40:04 UTC
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.
Comment 6 vince.ice 2021-08-06 12:40:50 UTC
Created attachment 730822 [details, diff]
Workaround - config.status
Comment 7 vince.ice 2022-03-14 08:21:06 UTC
Problem persists in version 3.4.1
Workaround still works
Comment 8 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-03-14 09:12:46 UTC
Need new build.log as lots has changed since.
Comment 9 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-03-14 11:53:00 UTC
(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.
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-07-09 05:20:02 UTC
Obsolete given move to CMake in stable now.