Hello,
Tried posting this message to the list-server a few days ago but forgot to "confirm" my subscription. I apologize if this posting somehow made it to the listserve without me. I've missed a few days of postings if that is the case.
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). The configure script complains about "cross compiling" and then stops. 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 executing 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 a brief snippet from a lengthy shell script trace. I can post the entire trace if that would help. I noticed two problems with the previous build, Tcl-8.4.7:
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. The strstr.c source looks like it 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 commented out the line in the configure script that appends fixstrtod.o to the list of object modules to be linked together as follows:
#JBM LIBOBJS="$LIBOBJS fixstrtod.o" commented out this line...
No error messages building TCL after these changes. I know that hacking up the configure script is totally uncool, but I am not sure how I should properly deal with this and this was a simple thing to try.
I suspect that my problems with these modules are a sign of a deeper problem with the build that I am unable to resolve given my limited unix knowledge. As a final check, I backed up a few pages in the book and verified that all was well with the linker as recommended:
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
