Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 726520 - dev-libs/libgpg-error-1.38: fails to cross-compile
Summary: dev-libs/libgpg-error-1.38: fails to cross-compile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Lars Wendler (Polynomial-C) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-01 00:52 UTC by David Michael
Modified: 2020-08-24 13:15 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Michael 2020-06-01 00:52:50 UTC
The release archive did not include a new script that it attempts to execute, and it also tries to redirect its output to a nonexistent directory since multilib builds have builddir != srcdir.

Reproducible: Always

Steps to Reproduce:
1. emerge -v =dev-libs/libgpg-error-1.38  # with a cross-compiling profile

Actual Results:  
First it fails because there is no src directory, then it fails because there is no script.

Expected Results:  
It should build and install.

I sent this patch upstream earlier today to fix it, but it never showed up in their mailing list archives, so I don't know if it was received or will be applied.  The EXTRA_DIST change would need to be replaced by actually copying the script file from Git to use this in the ebuild.

--- a/configure.ac
+++ b/configure.ac
@@ -598,6 +598,7 @@ if test x$cross_compiling = xyes; then
   case $host in
     *-*-linux*)
     lock_obj_h_generated=yes
+    mkdir src
     LOCK_ABI_VERSION=1 host=$host host_alias=$host_alias \
         CC=$CC OBJDUMP=$host_alias-objdump \
         ac_ext=$ac_ext ac_objext=$ac_objext \
diff --git a/src/Makefile.am b/src/Makefile.am
index 7e36d69..b2bffd2 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -102,7 +102,7 @@ EXTRA_DIST = mkstrtable.awk err-sources.h.in err-codes.h.in \
 	gpg-error.vers gpg-error.def.in \
         versioninfo.rc.in gpg-error.w32-manifest.in \
 	gpg-error-config-test.sh gpg-error.pc.in \
-	$(lock_obj_pub)
+	gen-lock-obj.sh $(lock_obj_pub)
 
 BUILT_SOURCES = $(srcdir)/err-sources.h $(srcdir)/err-codes.h \
 	code-to-errno.h code-from-errno.h \
Comment 2 Larry the Git Cow gentoo-dev 2020-06-15 07:42:27 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=264325d51d8a22582fd422019d476ff3e5074a24

commit 264325d51d8a22582fd422019d476ff3e5074a24
Author:     Lars Wendler <polynomial-c@gentoo.org>
AuthorDate: 2020-06-15 07:42:19 +0000
Commit:     Lars Wendler <polynomial-c@gentoo.org>
CommitDate: 2020-06-15 07:42:19 +0000

    dev-libs/libgpg-error: Fixed build with cross-compile toolchain
    
    Closes: https://bugs.gentoo.org/726520
    Package-Manager: Portage-2.3.101, Repoman-2.3.22
    Signed-off-by: Lars Wendler <polynomial-c@gentoo.org>

 .../files/libgpg-error-1.38-cross_compile.patch    | 40 ++++++++++++++++++++++
 dev-libs/libgpg-error/libgpg-error-1.38.ebuild     |  5 ++-
 2 files changed, 44 insertions(+), 1 deletion(-)
Comment 3 Mike Gilbert gentoo-dev 2020-06-15 12:07:55 UTC
I think this would require an autoreconf. Also, there is a script missing from the tarball.
Comment 4 Larry the Git Cow gentoo-dev 2020-06-15 14:22:19 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=aea12a8da48d3cd156001e17e5dce25e1ab76ccf

commit aea12a8da48d3cd156001e17e5dce25e1ab76ccf
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2020-06-15 14:21:51 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2020-06-15 14:21:51 +0000

    dev-libs/libgpg-error: fetch missing script for 1.38
    
    Closes: https://bugs.gentoo.org/726520
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 dev-libs/libgpg-error/Manifest                 |  1 +
 dev-libs/libgpg-error/libgpg-error-1.38.ebuild | 10 +++++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)
Comment 5 David Michael 2020-08-24 13:15:28 UTC
Just confirming that this is fixed in the 1.39 release, so the changes can be dropped from the next ebuild.