/bin/sh ../libtool --tag=CC --mode=link armv4tl-softfloat-linux-gnueabi-gcc -march=armv4t -mtune=arm920t -Os -pipe -fvisibility=hidden -Wall -Wl,--version-script=./libgcrypt.vers -version-info 16:2:5 -Wl,-O1 -o libgcrypt.la -rpath /usr/lib libgcrypt_la-visibility.lo libgcrypt_la-misc.lo libgcrypt_la-global.lo libgcrypt_la-sexp.lo libgcrypt_la-hwfeatures.lo libgcrypt_la-stdmem.lo libgcrypt_la-secmem.lo libgcrypt_la-missing-string.lo libgcrypt_la-module.lo libgcrypt_la-fips.lo libgcrypt_la-hmac256.lo libgcrypt_la-ath.lo ../cipher/libcipher.la ../random/librandom.la ../mpi/libmpi.la -L/usr/lib64 -lgpg-error armv4tl-softfloat-linux-gnueabi-gcc -shared .libs/libgcrypt_la-visibility.o .libs/libgcrypt_la-misc.o .libs/libgcrypt_la-global.o .libs/libgcrypt_la-sexp.o .libs/libgcrypt_la-hwfeatures.o .libs/libgcrypt_la-stdmem.o .libs/libgcrypt_la-secmem.o .libs/libgcrypt_la-missing-string.o .libs/libgcrypt_la-module.o .libs/libgcrypt_la-fips.o .libs/libgcrypt_la-hmac256.o .libs/libgcrypt_la-ath.o -Wl,--whole-archive ../cipher/.libs/libcipher.a ../random/.libs/librandom.a ../mpi/.libs/libmpi.a -Wl,--no-whole-archive -L/usr/lib64 /usr/lib64/libgpg-error.so -march=armv4t -mtune=arm920t -Wl,--version-script=./libgcrypt.vers -Wl,-O1 -Wl,-soname -Wl,libgcrypt.so.11 -o .libs/libgcrypt.so.11.5.2 /usr/lib64/libgpg-error.so: file not recognized: File format not recognized collect2: ld returned 1 exit status make[2]: *** [libgcrypt.la] Error 1 make[2]: Leaving directory `/var/tmp/portage/dev-libs/libgcrypt-1.4.4/work/libgcrypt-1.4.4/src' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/var/tmp/portage/dev-libs/libgcrypt-1.4.4/work/libgcrypt-1.4.4' make: *** [all] Error 2 * * ERROR: dev-libs/libgcrypt-1.4.4 failed. During configure it shows this message: checking for gpg-error-config... /usr/bin/gpg-error-config Reproducible: Always Steps to Reproduce:
Created attachment 189428 [details] build log Full build log
Created attachment 189430 [details, diff] libgcrypt-1.4.4.ebuild.patch Patch that fixes this. NOTE: in order for the patch to work the following post-install hook must be used (as I understood from googling about this this is a known problem with libtool) # cat /usr/armv4tl-softfloat-linux-gnueabi/etc/portage/bashrc # This script is inspired from the one posted by Mike Frysinge here http://www.nabble.com/Cross-compile-and-libtool-td13912879.html post_src_install() { for i in $D/usr/lib*/*.la; do if [ -f $i ]; then einfo "post_src_install hook: Fixing .la file $i" sed -i -e "/^libdir=/s:=:='$SYSROOT':" $i else einfo "post_src_install hook: No .la files were installed, nothing to fix" fi done }
Comment on attachment 189430 [details, diff] libgcrypt-1.4.4.ebuild.patch ROOT variable cannot be used in src_* functions.
Created attachment 189461 [details, diff] Updated patch to use SYSROOT instead of ROOT
*** Bug 334431 has been marked as a duplicate of this bug. ***
configure is using gpg-error-config --libs and gpg-error-config --cflags to get information. I believe that the problem is stemming from the fact that the parent systems gpg-error-config is the one used if it's present. Mike, what is the best way to handle this? Is the solution posted the generally accepted way? Or perhaps something like + if tc-is-cross-compiler; then + export LIBGCRYPT_CONFIG="${SYSROOT}/usr/bin/libgcrypt-config" + fi from bug 267503
Comment on attachment 189461 [details, diff] Updated patch to use SYSROOT instead of ROOT SYSROOT should not show up in any ebuild
the actual bug here is that libgcrypt wrongly uses AC_PATH_PATH in its code. it should be using AC_PATH_TOOL. i reported this upstream a while ago.
(In reply to comment #8) > the actual bug here is that libgcrypt wrongly uses AC_PATH_PATH in its code. > it should be using AC_PATH_TOOL. i reported this upstream a while ago. > From within the working source directory: find . | xargs grep AC_PATH_PATH returns nothing. find . | xargs grep AC_PATH_TOOL however has results: ./autom4te.cache/requests: 'AC_PATH_TOOL_PREFIX' => 1, ./autom4te.cache/requests: 'AC_PATH_TOOL_PREFIX' => 1, ./autom4te.cache/traces.2:m4trace:m4/libtool.m4:2810: -1- AU_DEFUN([AC_PATH_TOOL_PREFIX], [m4_if($#, 0, [_LT_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX($@)])]) ./autom4te.cache/traces.2:m4trace:m4/libtool.m4:2810: -1- AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_DIAGNOSE([obsolete], [The macro `AC_PATH_TOOL_PREFIX' is obsolete. ./autom4te.cache/traces.1:m4trace:m4/libtool.m4:1889: -1- AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl ./autom4te.cache/traces.1:m4trace:m4/libtool.m4:1952: -1- AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) ./autom4te.cache/traces.1: AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) ./autom4te.cache/traces.1:m4trace:configure.ac:136: -1- AC_PATH_TOOL_PREFIX([${ac_tool_prefix}file], [/usr/bin$PATH_SEPARATOR$PATH]) ./autom4te.cache/traces.1:m4trace:configure.ac:136: -1- AC_PATH_TOOL_PREFIX([file], [/usr/bin$PATH_SEPARATOR$PATH]) ./m4/libtool.m4:AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) ./m4/libtool.m4:dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) So it looks like upstream may have fixed it (incorrectly)?
i meant AC_PATH_PROG autom4te.cache isnt relevant as that is all cache state. none of it comes from upstream.
I read what vapier said here: https://bugs.g10code.com/gnupg/issue1261 However, I don't think it is quite as simple as using AC_PATH_TOOL instead of AC_PATH_PROG. This searches for ${host}-gpg-error-config in $PATH. But, at least on my system, gpg-error-config's name isn't prefixed, but we want to search for it in ${SYSROOT}/usr/bin. Hence, the patches by Andrei work... is there a better way of doing this without using ${SYSROOT} or ${ROOT} in the ebuild itself?
and that's the point of cross-fix-root that is already part of crossdev
The issue seems to persist in dev-libs/libgcrypt-1.5.0-r2. I fixed it using a set of patches that can be found in the ambro-cross overlay at [1] and [2]. (Also attached here and submitted upstream.) [1] http://code.google.com/p/ambro-cross-overlay/source/browse/#svn%2Ftrunk%2Fdev-libs%2Flibgpg-error%2Ffiles [2] http://code.google.com/p/ambro-cross-overlay/source/browse/#svn%2Ftrunk%2Fdev-libs%2Flibgcrypt%2Ffiles
Created attachment 324126 [details, diff] libgpg-error-1.10-0001-Generate-and-install-a-pkg-config-file.patch
Created attachment 324128 [details, diff] libgcrypt-1.5.0-0001-Generate-and-install-a-pkg-config-file.patch
Created attachment 324130 [details, diff] libgcrypt-1.5.0-0002-Use-pkg-config-to-find-gpg-error.patch
unfortunately, upstream is stupid and isn't interested in supporting .pc files. and our downstream isn't interested in adding them either.
(In reply to comment #17) > unfortunately, upstream is stupid and isn't interested in supporting .pc > files. and our downstream isn't interested in adding them either. Let us hope they changed their opinion. I submitted the patches anyway: http://lists.gnupg.org/pipermail/gnupg-devel/2012-September/026908.html http://lists.gnupg.org/pipermail/gcrypt-devel/2012-September/001985.html
(In reply to comment #17) > unfortunately, upstream is stupid and isn't interested in supporting .pc > files. and our downstream isn't interested in adding them either. So I assume that I have the permission to add it?
(In reply to comment #19) Diego said no last i heard to cleaning up gpg related packages