Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 680526 - 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
Summary: dev-libs/libgpg-error fails to cross-compile for armv7a-unknown-linux-gnueabi...
Status: RESOLVED DUPLICATE of bug 584052
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Crypto team [DISABLED]
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2019-03-15 23:28 UTC by tt_1
Modified: 2019-03-19 11:26 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
build log (libgpg-error.log,18.99 KB, text/plain)
2019-03-15 23:28 UTC, tt_1
Details
patch to add correct header file (libgpg-error-1.32-cross.patch,806 bytes, patch)
2019-03-15 23:30 UTC, tt_1
Details | Diff
upstream fix from, released with libgpg-error-1.36 (upstream.patch,805 bytes, patch)
2019-03-19 11:26 UTC, tt_1
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.