I recently purchased the LFS 6.0 book, and am in the process of building my own version of linux. I've run into a problem building Expect 5.42.1 (Chapter 5) in which it complains about "cross compiling" and then stops the build. I have not been able to find any answers on this site or elsewhere to this problem. I'm hoping that you can help.
The message I receive when doing the ./configure is literally (after enabling shell script tracing):
+ eval echo configure:4827: '"${CC-cc}' -o 'conftest${ac_exeext}' '$CFLAGS' '$CPPFLAGS' '$LDFLAGS' 'conftest.$ac_ext' '$LIBS' '1>&5"'
++ echo configure:4827: 'gcc -pipe -o conftest conftest.c -lm -lutil 1>&5'
+ test -s conftest
+ rm -rf conftest conftest.c
+ echo yes
+ cat
+ rm -f 'conftest*'
+ echo -n 'checking if WNOHANG requires _POSIX_SOURCE... '
+ echo 'configure:4849: checking if WNOHANG requires _POSIX_SOURCE'
+ test yes = yes
+ echo 'configure: error: Expect can'\''t be cross compiled'
configure: error: Expect can't be cross compiled
+ exit 1
This, of course, is the brief version of the shell script trace. I can post the entire trace if that is necessary.
I think problems started with the previous build, Tcl-8.4.7. Two things occurred:
1) compat/strstr.c failed to compile because NULL was not defined. I revised the source code
to include:
#ifndef NULL #define NULL 0 #endif
and that addressed that problem. I don't think this has anything to do with my Expect build but I wanted to notify somebody that the strstr.c source looks like has a problem.
2) The second thing was that the loader complained about fixstrtod.o as follows:
fixstrtod.o(.text+0x0): In function `fixstrtod':
: multiple definition of `fixstrtod'
strtod.o(.text+0x0): first defined here
/mnt/lfs/tools/bin/../lib/gcc/i686-pc-linux-gnu/3.4.1/../../../../i686-pc-linux-gnu/bin/ld: Warning: size of symbol `fixstrtod' changed from 669 in strtod.o to 77 in fixstrtod.o
collect2: ld returned 1 exit status
make: *** [libtcl8.4.so] Error 1
so I hacked up the configure script so that fixstrtod.o is not included in the linking and all appeared to go well:
#JBM LIBOBJS="$LIBOBJS fixstrtod.o"
I understand that this sort of thing is totally uncool, but I had to try it.
I suspect that my problems are a sign of a deeper problem that I am unable to find given my limited unix knowledge.
I backed up a few pages in the book and verified that all was well with the linker as follows:
lfs:/mnt/lfs/sources/binutils-build$ echo 'main(){}' > dummy.c
lfs:/mnt/lfs/sources/binutils-build$ cc dummy.c
lfs:/mnt/lfs/sources/binutils-build$ readelf -l a.out | grep ': /tools'
[Requesting program interpreter: /tools/lib/ld-linux-so.2]
lfs:/mnt/lfs/sources/binutils-build$This looks kosher. So, now I am uncertain as to how to proceed and hope to get some ideas from you.
Thanks for your help.
-James
-- http://linuxfromscratch.org/mailman/listinfo/lfs-support FAQ: http://www.linuxfromscratch.org/lfs/faq.html Unsubscribe: See the above information page
