Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 168393 - app-shells/zsh - cross compiling with i386-pc-linux-uclibc fails from amd64 multilib setup
Summary: app-shells/zsh - cross compiling with i386-pc-linux-uclibc fails from amd64 m...
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Embedded Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-25 23:03 UTC by impulze
Modified: 2007-02-27 14:34 UTC (History)
0 users

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


Attachments
./configure (foobar,14.75 KB, text/plain)
2007-02-25 23:04 UTC, impulze
Details
emerge --info (foobar,9.51 KB, text/plain)
2007-02-25 23:05 UTC, impulze
Details
make error (foobar,1.30 KB, text/plain)
2007-02-25 23:07 UTC, impulze
Details

Note You need to log in before you can comment on or make changes to this bug.
Description impulze 2007-02-25 23:03:01 UTC
I'm trying to cross compile zsh with my i386-pc-linux-uclibc toolchain, so far ncurses and coreutils have been built just right. When it comes to zsh it fails with a lot of undefined references to tgetent,tgetstr,tgetflag,tgetnum,tputs and tgoto which are declared in <term.h> and defined in libcurses.so(.5.5).
When adding LIBS=-lcurses and LDFLAGS=-L/mnt/temp/lib to the Makefile of the zsh source it compiles fine after invoking make in the source directory.
I'm not sure if this is zsh or ebuild related. Probably i'm just screwing things up. :) Thanks for the help in advance.

Here the steps i tried:

emerge crossdev
USE="-*" crossdev -t i386-pc-linux-uclibc
export SYSROOT=/usr/i386-pc-linux-uclibc
mkdir -p $SYSROOT/etc/portage/profile
cp /etc/make.globals $SYSROOT/etc
ln -sn /usr/portage/profiles/uclibc/x86 $SYSROOT/etc/make.profile

cat > $SYSROOT/etc/make.conf << EOF
ARCH="i386"
CHOST="i386-pc-linux-uclibc"
ACCEPT_KEYWORDS="x86"
CFLAGS="-Os"
CXXFLAGS="${CFLAGS}"
EOF

cat > /usr/local/bin/i386-pc-linux-uclibc-emerge << EOF
#!/bin/sh
CBUILD=$(portageq envvar CHOST)
PORTAGE_CONFIGROOT="$SYSROOT"
if [[ "$1" == "--root" ]] ; then
    ROOT="$2"
    shift 2
else
    ROOT="$SYSROOT"
fi
export CBUILD PORTAGE_CONFIGROOT ROOT

emerge $*
EOF

USE="-pcre" /usr/local/bin/i386-pc-linux-uclibc-emerge --root /mnt/temp zsh

I'm attaching the configure output and the Make error and emerge --info. Thanks again.
Comment 1 impulze 2007-02-25 23:04:47 UTC
Created attachment 111239 [details]
./configure
Comment 2 impulze 2007-02-25 23:05:20 UTC
Created attachment 111241 [details]
emerge --info
Comment 3 impulze 2007-02-25 23:07:50 UTC
Created attachment 111242 [details]
make error
Comment 4 impulze 2007-02-25 23:16:49 UTC
Using
LDFLAGS=-L/my/root/lib USE="-pcre" /usr/local/bin/i386-pc-linux-uclibc-emerge --root /mnt/temp zsh
works too but isn't that a feature ROOT should be capable of? Since it does the very same with the CPPFLAGS as shown in the configure attachment
[...]
preprocessor flags        : -I/mnt/temp/usr/include
[...]
Comment 5 SpanKY gentoo-dev 2007-02-27 14:34:46 UTC
what you're experiencing is the cross-compiler unable to locate the appropriate libraries that it needs

the zsh ebuild should not be changed

in the meantime, you can add a hack by using -I/-L paths in your CFLAGS/LDFLAGS to point to your ROOT