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

Bug 748120

Summary: app-portage/portage-utils-0.90 fails cross compile due to linking host libssl.so
Product: Gentoo Linux Reporter: Kent Fredric (IRC: kent\n) (RETIRED) <kentnl>
Component: Current packagesAssignee: Fabian Groffen <grobian>
Status: RESOLVED NEEDINFO    
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: build.log.gz

Description Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2020-10-12 22:02:20 UTC
Created attachment 664924 [details]
build.log.gz

/bin/sh ./libtool  --tag=CC   --mode=link m68k-unknown-linux-gnu-gcc  -O2 -pipe -fomit-frame-pointer -Wall -Wunused -Wimplicit -Wshadow -Wformat=2 -Wmissing-declarations -Wwrite-strings -Wbad-function-cast -Wnested-externs -Wcomment -Winline -Wchar-subscripts -Wcast-align -Wsequence-point -Wold-style-definition -Wextra -Wno-format-nonliteral -Wno-expansion-to-defined  -Wl,-O1 -Wl,--as-needed -o q q-main.o q-q.o q-qatom.o q-qcheck.o q-qdepends.o q-qfile.o q-qgrep.o q-qkeyword.o q-qlist.o q-qlop.o q-qmerge.o q-qpkg.o q-qsearch.o q-qsize.o q-qtbz2.o q-quse.o q-qxpak.o q-qmanifest.o q-qtegrity.o ./libq/libq.la ./autotools/gnulib/libgnu.a -fopenmp -lssl -lcrypto -lb2 -lz -L/usr/lib64 -lgpgme -lassuan -lgpg-error    
libtool: link: m68k-unknown-linux-gnu-gcc -O2 -pipe -fomit-frame-pointer -Wall -Wunused -Wimplicit -Wshadow -Wformat=2 -Wmissing-declarations -Wwrite-strings -Wbad-function-cast -Wnested-externs -Wcomment -Winline -Wchar-subscripts -Wcast-align -Wsequence-point -Wold-style-definition -Wextra -Wno-format-nonliteral -Wno-expansion-to-defined -Wl,-O1 -Wl,--as-needed -o q q-main.o q-q.o q-qatom.o q-qcheck.o q-qdepends.o q-qfile.o q-qgrep.o q-qkeyword.o q-qlist.o q-qlop.o q-qmerge.o q-qpkg.o q-qsearch.o q-qsize.o q-qtbz2.o q-quse.o q-qxpak.o q-qmanifest.o q-qtegrity.o -fopenmp  ./libq/.libs/libq.a ./autotools/gnulib/libgnu.a -lssl -lcrypto -lb2 -lz -L/usr/lib64 -lgpgme -lassuan -lgpg-error -fopenmp
/usr/lib64/libssl.so: file not recognized: file format not recognized
collect2: error: ld returned 1 exit status
Comment 1 Fabian Groffen gentoo-dev 2020-10-20 07:53:07 UTC
it looks like it is gpgme that unnecessarily adds -L/usr/lib64 to the searchpath, but I'm not sure I entirely understand that cross setup.
Comment 2 Fabian Groffen gentoo-dev 2020-10-20 07:57:01 UTC
do you have gpgme-config in the target root, what does it's --libs config say?
Comment 3 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2020-10-20 08:07:39 UTC
Its hard to say now, I've rebuilt the whole chroot under qemu-m68k since then, so I suspect based on what you've said, attempts at cross-dev *may* work now.

I'll attempt a non-install re-cross sometime soon and see what it delivers.
Comment 4 Christian Krimmer 2022-03-23 14:00:47 UTC
I ran into the same problem - build host x86_64, target armv7a-hardfloat-linux-gnueabi.

gpgme-config in the target environment reports
  -lgpgme -lassuan -lgpg-error

but the gpgme-config in the main (x86_64) host system adds the -L/usr/lib64.