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

Bug 680526

Summary: dev-libs/libgpg-error fails to cross-compile for armv7a-unknown-linux-gnueabihf with: src/syscfg/lock-obj-pub.linux-gnueabihf.h': No such file or directory
Product: Gentoo Linux Reporter: tt_1 <herrtimson>
Component: Current packagesAssignee: Crypto team [DISABLED] <crypto+disabled>
Status: RESOLVED DUPLICATE    
Severity: normal CC: alonbl
Priority: Normal Keywords: PATCH
Version: unspecified   
Hardware: All   
OS: Linux   
See Also: https://dev.gnupg.org/T4409
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build log
patch to add correct header file
upstream fix from, released with libgpg-error-1.36

Description tt_1 2019-03-15 23:28:04 UTC
Created attachment 569232 [details]
build log

not a duplicate of #584052, that one was for softfloat, this one is hardfloat.

Why does this happen? libgpg-error doesn't use pkg-config, instead it uses headers which have to be auto-generated with gen-posix-lock-obj, a binary whichs sources are included into the libgpg-error source tree. 

This is especially painfull when porting to a new arch, and one doesn't have a device bootable yet, but luckily I have a device with armv7a-unknown-linux-gnueabihf for native compilation of gen-posix-lock-obj and to generate the header file with it.
Comment 1 tt_1 2019-03-15 23:30:41 UTC
Created attachment 569234 [details, diff]
patch to add correct header file

I'm going to send it to upstream soon. 

Can you please add the patch to the tree in the meantime? its meant for 1.32, but should apply to any version available, since it's not yet merged :)
Comment 2 tt_1 2019-03-15 23:32:57 UTC
how to compile it (native compile): 

untar libgpg-error-source.tar.gz

cd src/

armv7a-unknown-linux-gnueabihf-gcc -DHAVE_CONFIG_H -I. -I../../src -I.. -Wdate-time -D_FORTIFY_SOURCE=2 -c -o gen-posix-lock-obj.o gen-posix-lock-obj.c

/bin/bash ../libtool --tag=CC --mode=link armv7a-unknown-linux-gnueabihf -O2 -Wl,-z,relro -Wl,-z,now -o gen-posix-lock-obj gen-posix-lock-obj.o

./gen-posix-lock-obj
Comment 3 Alon Bar-Lev (RETIRED) gentoo-dev 2019-03-16 11:14:25 UTC
Please see bug#584052, we need upstream to fix this properly, please help us push a fix into upstream.

*** This bug has been marked as a duplicate of bug 584052 ***
Comment 4 tt_1 2019-03-16 11:18:19 UTC
This is the correct fix, #584052 is for softfloat. My confirmation for upstreams bugzilla account is pending, I expect this to be merged within a few days.
Comment 5 Alon Bar-Lev (RETIRED) gentoo-dev 2019-03-16 11:27:30 UTC
(In reply to tt_1 from comment #4)
> This is the correct fix, #584052 is for softfloat. My confirmation for
> upstreams bugzilla account is pending, I expect this to be merged within a
> few days.

As explained, any change in the tuple cause breakage, *any* change in tuple, including subarch or system name.

When/if your fix will be merged into upstream it will be available in gentoo at next release.

As this is not affect a width audience and is not mainline issue, please use your patch locally until the upstream releases a new version and then remove your local patch.

Using local patches in gentoo is easy[1].

[1] https://wiki.gentoo.org/wiki//etc/portage/patches

*** This bug has been marked as a duplicate of bug 584052 ***
Comment 6 tt_1 2019-03-19 11:26:25 UTC
Created attachment 569756 [details, diff]
upstream fix from, released with libgpg-error-1.36

The header was in fact identical with armv7-unknown-linux-gnueabihf, hence upstream addad an alias instead.