Brian Cheeseman wrote:
> All,
> Has anyone managed to compile the Perl utils in chapter 5? I keep
> getting errors compiling toke.c. Searches on the internet show the same
> error, but no solutions.
>
> The build output I keep seeing is below.
>
> hlfs:/mnt/hlfs/sources/perl-5.8.8$ make perl utilities
> `sh cflags "optimize='-O2'" perlmain.o` perlmain.c
> CCCMD = cc -DPERL_CORE -c -fno-strict-aliasing -pipe
> -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> -O2 -Wall
> `sh cflags "optimize='-O2'" perl.o` perl.c
> CCCMD = cc -DPERL_CORE -c -fno-strict-aliasing -pipe
> -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> -O2 -Wall
> perl.c: In function 'perl_parse':
> perl.c:1586: warning: passing argument 1 of 'time' from incompatible
> pointer type
> `sh cflags "optimize='-O2'" gv.o` gv.c
> CCCMD = cc -DPERL_CORE -c -fno-strict-aliasing -pipe
> -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> -O2 -Wall
> `sh cflags "optimize='-O2'" toke.o` toke.c
> CCCMD = cc -DPERL_CORE -c -fno-strict-aliasing -pipe
> -Wdeclaration-after-statement -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
> -O2 -Wall
> toke.c: In function 'S_scan_formline':
> toke.c:10542: error: invalid operands to binary +
> toke.c:10542: error: invalid lvalue in unary '&'
> toke.c:10542: error: invalid lvalue in unary '&'
> make: *** [toke.o] Error 1
>
>
> I have also tested this build under Glibc and it compiles correctly. Any
> and all help appreciated.
>
> Regards,
> Brian.
>
Hi All,
I have found the cause of the issue relating to this problem. It would
appear that the patch we apply at the beginning of Ch 5.25 is for glibc
and not uClibc. I have attached a corrected patch for uClibc builds.
Regards,
Brian.
Submitted By: Anderson Lizardo <andersonlizardo(at)yahoo(dot)com(dot)br>
Date: 2006-02-15
Initial Package Version: 5.8.8
Origin: based on current LFS-BOOK patch (perl-5.8.0-libc-2.patch)
Description: this patch adapts some hard-wired paths to the C library.
It uses the $prefix variable to locate the correct libc.
diff -Naur perl-5.8.8.orig/hints/linux.sh perl-5.8.8/hints/linux.sh
--- perl-5.8.8.orig/hints/linux.sh 2005-11-18 01:18:45.000000000 +0000
+++ perl-5.8.8/hints/linux.sh 2006-02-12 12:20:32.000000000 +0000
@@ -52,9 +52,9 @@
# We don't use __GLIBC__ and __GLIBC_MINOR__ because they
# are insufficiently precise to distinguish things like
# libc-2.0.6 and libc-2.0.7.
-if test -L /lib/libc.so.6; then
- libc=`ls -l /lib/libc.so.6 | awk '{print $NF}'`
- libc=/lib/$libc
+if test -L ${prefix}/lib/libc.so.0; then
+ libc=`ls -l ${prefix}/lib/libc.so.0 | awk '{print $NF}'`
+ libc=${prefix}/lib/$libc
fi
# Configure may fail to find lstat() since it's a static/inline
@@ -330,3 +330,8 @@
libswanted="$*"
;;
esac
+
+locincpth=""
+loclibpth=""
+glibpth="${prefix}/lib"
+usrinc="${prefix}/include"
--
http://linuxfromscratch.org/mailman/listinfo/hlfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page