perl fails to cross-build

Bug #873013 reported by Wookey
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
perl (Ubuntu)
New
Undecided
Unassigned

Bug Description

perl fails to cross-build with a lot of undefined references to pthread*

cc -fstack-protector -L/usr/local/lib -o miniperl \
       gv.o toke.o perly.o pad.o regcomp.o dump.o util.o mg.o reentr.o mro.o hv.o av.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o xsutils.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o \
     miniperlmain.o opmini.o perlmini.o
util.o: In function `Perl_safesysmalloc':
/home/wookey/testing/build/build/xdeb/perl/util.c:78: undefined reference to `pthread_getspecific'
util.o: In function `Perl_safesysrealloc':
/home/wookey/testing/build/build/xdeb/perl/util.c:134: undefined reference to `pthread_getspecific'
util.o: In function `Perl_croak_nocontext':
/home/wookey/testing/build/build/xdeb/perl/util.c:1444: undefined reference to `pthread_getspecific'
util.o: In function `Perl_safesyscalloc':
/home/wookey/testing/build/build/xdeb/perl/util.c:271: undefined reference to `pthread_getspecific'
util.o: In function `Perl_die_nocontext':
/home/wookey/testing/build/build/xdeb/perl/util.c:1397: undefined reference to `pthread_getspecific'

Background:
The build command is:
xdeb --only-explicit -a armel --prefer-apt --apt-source --debug --force-rebuild perl

The actual build command xdeb issues is:
debuild --no-lintian -eUSER -eCONFIG_SITE=/etc/dpkg-cross/cross-config.armel -eDEB_BUILD_OPTIONS=nocheck -eGTEST_INCLUDEDIR=/usr/arm-linux-gnueabi/include -eGTEST_LIBDIR=/usr/arm-linux-gnueabi/lib -ePKG_CONFIG_LIBDIR=/usr/arm-linux-gnueabi/lib/pkgconfig:/usr/arm-linux-gnueabi/share/pkgconfig:/usr/share/pkgconfig -eDH_VERBOSE=1 -aarmel -b -uc -us -tc

To easily reproduce the build environment in which this bug was discovered follow the HOWTO here:
https://wiki.linaro.org/Platform/DevPlatform/CrossCompile/CrossBuildNano

Tags: cross natty
Revision history for this message
Wookey (wookey) wrote :
Wookey (wookey)
description: updated
Wookey (wookey)
description: updated
Revision history for this message
Wookey (wookey) wrote :

With a large cross building patch applied it gets much further, and instead dies trying to link wrong-arch libbz2:

arm-linux-gnueabi-gcc -shared -O2 -g -fstack-protector Bzip2.o -o /home/wookey/testing/build/build/xdeb/perl-5.10.1/lib/arm-linux-gnueabi/auto/Compress/Raw/Bzip2/Bzip2.so \
    -L/usr/lib -lbz2 \

/usr/lib/libbz2.so: file not recognized: File format not recognized

Patched version of perl is in https://launchpad.net/~linaro-foundations/+archive/cross-alip

Build-log attached.

Revision history for this message
Wookey (wookey) wrote :

Some info on the perl cross patches is provided here: https://wiki.linaro.org/Platform/DevPlatform/CrossCompile/CrossBuildingPerl

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.