Architecture Problems on Sun Ultra-5 Installing LFS-5.1.1

Mike Liford michael.liford at lmco.com
Wed Feb 23 06:28:09 PST 2005


I've tried installing LFS-6.0 from Gentoo Linux and Aurora-1.92. I ran 
into architecture problems and errors which I believe involved the new 
dynamic devices feature in Linux-2.6. I also had trouble updating Gentoo 
and Aurora to Linux-2.6 as required by LFS-6.0. My company firewall will 
not let me use update software like "yum" and Gentoo Portage.

Aurora-1.0 was the only distribution I could find for Sun Sparc which 
would just install and work. For this reason, I chose to install 
LFS-5.1.1 which does not require Linux-2.6.

In Chapter 5, I could not get Binutils to compile and link. The 
configure script defaulted to "sparc64-unknown-linux-gnu" as the host. 
Errors told me that libc.a and libc.so in Aurora 1.0 were incompatible. 
Binutils compiled and linked when I passed 
"--host=sparc-unknown-linux-gnu" to the configure script. I continued to 
specify "sparc-unknown-linux-gnu" as the host and installed the Sparc 
Linux-2.4 headers in /tools/include. I thought I could try to switch to 
Sparc64 in Chapter 6.

In Chapter 6, I installed the Sparc64 Linux-2.4 headers in /usr/include. 
I tried to compile Glibc and got architecture errors. I tried passing 
CFLAGS="-mcpu=v9" to the compiler. However, the linking command does not 
appear to pick up the flag settings.

Here is the end result of attempting to compile with CFLAGS and CXXFLAGS 
unset, using the Sparc64 kernel headers, and running configure as shown 
in Chapter 6 for Glibc. The configure script is choosing the host and 
build system as "sparc64-unknown-linux-gnu".

gcc ../sysdeps/generic/check_fds.c -c -std=gnu99 -O2 -Wall -Winline 
-Wstrict-prototypes -Wwrite-strings -g -fcall-used-g6     -I../include 
-I. -I/sources/glibc-build/csu -I.. -I../libio  -I/sources/glibc-build 
-I../sysdeps/sparc/sparc64/elf 
-I../linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64 
-I../linuxthreads/sysdeps/unix/sysv/linux/sparc 
-I../linuxthreads/sysdeps/unix/sysv/linux 
-I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread 
-I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix 
-I../linuxthreads/sysdeps/sparc/sparc64 -I../linuxthreads/sysdeps/sparc 
-I../sysdeps/unix/sysv/linux/sparc/sparc64 
-I../sysdeps/unix/sysv/linux/sparc -I../sysdeps/unix/sysv/linux 
-I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman 
-I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/sparc 
-I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/sparc/sparc64/fpu 
-I../sysdeps/sparc/sparc64 -I../sysdeps/wordsize-64 
-I../sysdeps/ieee754/ldbl-128 -I../sysdeps/ieee754/dbl-64 
-I../sysdeps/ieee754/flt-32 -I../sysdeps/sparc/sparc64/soft-fp 
-I../sysdeps/sparc/fpu -I../sysdeps/sparc -I../sysdeps/ieee754 
-I../sysdeps/generic/elf -I../sysdeps/generic -nostdinc -isystem 
/tools/lib/gcc-lib/sparc-unknown-linux-gnu/3.3.3/include -isystem 
/usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h       
-DHAVE_INITFINI -o /sources/glibc-build/csu/check_fds.o -MD -MP -MF 
/sources/glibc-build/csu/check_fds.o.dt
/tmp/ccVgYUv8.s: Assembler messages:
/tmp/ccVgYUv8.s:62: Error: Architecture mismatch on "bcc,pt %xcc,1f".
/tmp/ccVgYUv8.s:62:  (Requires v9|v9a|v9b; requested architecture is 
sparclite.)make[2]: *** [/sources/glibc-build/csu/check_fds.o] Error 1
make[2]: Leaving directory `/sources/glibc-2.3.3-lfs-5.1/csu'
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory `/sources/glibc-2.3.3-lfs-5.1'
make: *** [all] Error 2
root:/sources/glibc-build#

So I clean out the glibc-build directory and try to specify the 
architecture with CFLAGS="-mcpu=v9" and the Chapter 6 configure command:

if test -r /sources/glibc-build/csu/abi-tag.h.new; then mv -f 
/sources/glibc-build/csu/abi-tag.h.new /sources/glibc-build/csu/abi-tag.h; \
else echo >&2 'This configuration not matched in ../abi-tags'; exit 1; fi
gawk -f ../scripts/gen-as-const.awk 
../linuxthreads/sysdeps/sparc/tcb-offsets.sym \
| gcc -S -o /sources/glibc-build/tcb-offsets.hT3 -std=gnu99 -Wall 
-Winline -Wstrict-prototypes -Wwrite-strings -mcpu=v9 -fcall-used-g6     
-I../include -I. -I/sources/glibc-build/csu -I.. -I../libio  
-I/sources/glibc-build -I../sysdeps/sparc/sparc64/elf 
-I../linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64 
-I../linuxthreads/sysdeps/unix/sysv/linux/sparc 
-I../linuxthreads/sysdeps/unix/sysv/linux 
-I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread 
-I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix 
-I../linuxthreads/sysdeps/sparc/sparc64 -I../linuxthreads/sysdeps/sparc 
-I../sysdeps/unix/sysv/linux/sparc/sparc64 
-I../sysdeps/unix/sysv/linux/sparc -I../sysdeps/unix/sysv/linux 
-I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman 
-I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/sparc 
-I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/sparc/sparc64/fpu 
-I../sysdeps/sparc/sparc64 -I../sysdeps/wordsize-64 
-I../sysdeps/ieee754/ldbl-128 -I../sysdeps/ieee754/dbl-64 
-I../sysdeps/ieee754/flt-32 -I../sysdeps/sparc/sparc64/soft-fp 
-I../sysdeps/sparc/fpu -I../sysdeps/sparc -I../sysdeps/ieee754 
-I../sysdeps/generic/elf -I../sysdeps/generic -nostdinc -isystem 
/tools/lib/gcc-lib/sparc-unknown-linux-gnu/3.3.3/include -isystem 
/usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h       
-DHAVE_INITFINI -x c - \
    -MD -MP -MF /sources/glibc-build/tcb-offsets.h.dT -MT 
'/sources/glibc-build/tcb-offsets.h.d /sources/glibc-build/tcb-offsets.h'
In file included from ../include/libc-symbols.h:56,
                 from <command line>:24:
/sources/glibc-build/config.h:3:3: #error "glibc cannot be compiled 
without optimization"
make[2]: *** [/sources/glibc-build/tcb-offsets.h] Error 1
make[2]: Leaving directory `/sources/glibc-2.3.3-lfs-5.1/csu'
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory `/sources/glibc-2.3.3-lfs-5.1'
make: *** [all] Error 2
root:/sources/glibc-build#

So I add optimization with CFLAGS="-O2 -mcpu=v9", clean out glibc-build, 
and try it again with the Chapter 6 configure command:

mv -f /sources/glibc-build/csu/stamp.oST /sources/glibc-build/csu/stamp.oS
gcc ../sysdeps/sparc/sparc64/elf/start.S -c  -I../include -I. 
-I/sources/glibc-build/csu -I.. -I../libio  -I/sources/glibc-build 
-I../sysdeps/sparc/sparc64/elf 
-I../linuxthreads/sysdeps/unix/sysv/linux/sparc/sparc64 
-I../linuxthreads/sysdeps/unix/sysv/linux/sparc 
-I../linuxthreads/sysdeps/unix/sysv/linux 
-I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread 
-I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix 
-I../linuxthreads/sysdeps/sparc/sparc64 -I../linuxthreads/sysdeps/sparc 
-I../sysdeps/unix/sysv/linux/sparc/sparc64 
-I../sysdeps/unix/sysv/linux/sparc -I../sysdeps/unix/sysv/linux 
-I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman 
-I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/sparc 
-I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/sparc/sparc64/fpu 
-I../sysdeps/sparc/sparc64 -I../sysdeps/wordsize-64 
-I../sysdeps/ieee754/ldbl-128 -I../sysdeps/ieee754/dbl-64 
-I../sysdeps/ieee754/flt-32 -I../sysdeps/sparc/sparc64/soft-fp 
-I../sysdeps/sparc/fpu -I../sysdeps/sparc -I../sysdeps/ieee754 
-I../sysdeps/generic/elf -I../sysdeps/generic -nostdinc -isystem 
/tools/lib/gcc-lib/sparc-unknown-linux-gnu/3.3.3/include -isystem 
/usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h       
-DHAVE_INITFINI -DASSEMBLER  -I/sources/glibc-build/csu/.    -o 
/sources/glibc-build/csu/start.o -MD -MP -MF 
/sources/glibc-build/csu/start.o.dt
../sysdeps/sparc/sparc64/elf/start.S: Assembler messages:
../sysdeps/sparc/sparc64/elf/start.S:38: Error: Architecture mismatch on 
"ldx".
../sysdeps/sparc/sparc64/elf/start.S:38:  (Requires v9|v9a|v9b; 
requested architecture is sparclite.)
../sysdeps/sparc/sparc64/elf/start.S:60: Error: Architecture mismatch on 
"illtrap".
../sysdeps/sparc/sparc64/elf/start.S:60:  (Requires v9|v9a|v9b; 
requested architecture is sparclite.)
make[2]: *** [/sources/glibc-build/csu/start.o] Error 1
make[2]: Leaving directory `/sources/glibc-2.3.3-lfs-5.1/csu'
make[1]: *** [csu/subdir_lib] Error 2
make[1]: Leaving directory `/sources/glibc-2.3.3-lfs-5.1'
make: *** [all] Error 2
root:/sources/glibc-build#

I specified "-mcpu=v9" with CFLAGS! I don't know why it thinks the 
requested architecture is sparclite. I notice that the -mcpu option is 
not present in the gcc statement.

As a last resort, I try specifying Sparc again like in Chapter 5. I add 
the "--host=sparc-unknown-linux-gnu" flag to the Chapter 6 configure 
command and copy the Sparc kernel headers to /usr/include. Cleaning out 
glibc-build I try again. This appears it might work. The above attempts 
died after a few minutes, but this try is still compiling after 30 
minutes. But I will have a Sparc installation on an UltraSparc.

If anybody knows how I can end up with UltraSparc/Sparc64/v9 software, 
I'd like to know how.

Mike




More information about the lfs-support mailing list