Skip to contentSkip to conversation

cross compiling util-linux

DISCUSSION Christer Solskogen 2 participants 3 messages Sep 6, 2012 – Sep 16, 2012 Util-Linux package

lore
Share & tools
lore
#0 lore raw

Hi!

I'm having a bit trouble cross compiling util-linux. Due to where is thinks it finds libpam.la. For all I know that might be a problem that Linux-PAM has, but if anyone could point me in the right direction I would be very happy :-)

[solskogen@cheer util-linux.x86_64-centix-linux-gnu]$ make
make all-recursive
make[1]: Entering directory `/storage/home/solskogen/obj/_build/util-linux.x86_64-centix-linux-gnu' Making all in po
make[2]: Entering directory /storage/home/solskogen/obj/_build/util-linux.x86_64-centix-linux-gnu/po' make[2]: Nothing to be done for all'.
make[2]: Leaving directory /storage/home/solskogen/obj/_build/util-linux.x86_64-centix-linux-gnu/po' make[2]: Entering directory /storage/home/solskogen/obj/_build/util-linux.x86_64-centix-linux-gnu'
CCLD libblkid.la
copying selected object files to avoid basename conflicts...
CCLD libmount.la
CCLD login
libtool: link: cannot find the library /lib64/libpam.la' or unhandled argument /lib64/libpam.la' make[2]: *** [login] Error 1
make[2]: Leaving directory `/storage/home/solskogen/obj/_build/util-linux.x86_64-centix-linux-gnu' make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/storage/home/solskogen/obj/_build/util-linux.x86_64-centix-linux-gnu'
make: *** [all] Error 2

configure was run like this: -prefix=/usr --build=x86_64-unknown-linux-gnu --host=x86_64-centix-linux-gnu --with-sysroot=/home/solskogen/obj/root.x86_64-centix-linux-gnu

I have succesfully compiled the linux kernel, binutils, gcc, glibc etc. with the cross compiler so I'm pretty sure that nothing is wrong with my toolchain.

Signature · 1 line
chs
#1 lore raw
Quoted 2 lines · On Thursday 06 September 2012 13:30:36 Christer Solskogen wrote:

libtool: link: cannot find the library /lib64/libpam.la' or unhandled argument /lib64/libpam.la'

not a bug in util-linux. libtool linker scripts do not play well with cross- compiling. you can remove them, hack them, or hack up the local libtool.

Quoted 3 lines

configure was run like this: -prefix=/usr --build=x86_64-unknown-linux-gnu --host=x86_64-centix-linux-gnu --with-sysroot=/home/solskogen/obj/root.x86_64-centix-linux-gnu

the --with-sysroot isn't necessary
-mike

#2 lore raw
Quoted 7 lines · Mike Frysinger
Quoted 2 lines · On Thursday 06 September 2012 13:30:36 Christer Solskogen wrote:

libtool: link: cannot find the library /lib64/libpam.la' or unhandled argument /lib64/libpam.la'

not a bug in util-linux. libtool linker scripts do not play well with cross- compiling. you can remove them, hack them, or hack up the local libtool.

I disagree. GMP, MPFR, MPC, ISL and CLooG also deal with that kind of problems with libtool. But --with-sysroot solves it.
CLooG did had a problem, but when I recreated the configure script with a new versions of libtool, automake and autoconf the problem was solved.

Signature · 1 line
chs,