OpenWrt Forum Archive

Topic: Ubuntu build problems

The content of this topic has been archived on 30 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Sorry to post a newbie question, especially a long one, but I've already lost a couple days and several sanity points on this.

I'm trying to build Kamikaze 7.09 on an Ubuntu 8.04 system with all the current patches. Half an hour into the build process, it fails building the cross-compiler. The relevant lines of 'make V=99' are as follows:

make[5]: Entering directory `/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6-initial/gcc'
make \
      CFLAGS="-g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  " \
      CONFIG_H="tconfig.h /home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/../include/ansidecl.h" TM_H="tm.h      /home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/config/dbxelf.h /home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/config/elfos.h /home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/config/svr4.h /home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/config/linux.h /home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/config/mips/mips.h /home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/config/mips/linux.h /home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/defaults.h insn-constants.h insn-flags.h" \
      INCLUDES="-I. -I. -I/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc -I/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/. -I/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/../include " \
      MAKEOVERRIDES= \
      -f libgcc.mk all
make[6]: Entering directory `/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6-initial/gcc'
for d in libgcc; do \
      if [ -d $d ]; then true; else /bin/sh /home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/mkinstalldirs $d; fi; \
    done
if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6-initial/gcc/xgcc -B/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6-initial/gcc/ -B/home/pselkirk/openwrt/kamikaze_7.09/staging_dir_mipsel/mipsel-linux-uclibc/bin/ -B/home/pselkirk/openwrt/kamikaze_7.09/staging_dir_mipsel/mipsel-linux-uclibc/lib/ -isystem /home/pselkirk/openwrt/kamikaze_7.09/staging_dir_mipsel/mipsel-linux-uclibc/include -isystem /home/pselkirk/openwrt/kamikaze_7.09/staging_dir_mipsel/mipsel-linux-uclibc/sys-include -O2  -DIN_GCC -DCROSS_COMPILE  -DUSE_UCLIBC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc -I/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/. -I/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/../include  -fexceptions -c /home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o
/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/unwind-dw2.c: In function `uw_frame_state_for':
/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/unwind-dw2.c:1031: error: structure has no member named `sc_regs'
/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/unwind-dw2.c:1031: error: structure has no member named `sc_pc'
make[6]: *** [libgcc/./unwind-dw2.o] Error 1
make[6]: Leaving directory `/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6-initial/gcc'
make[5]: *** [libgcc.a] Error 2
make[5]: Leaving directory `/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6-initial/gcc'
make[4]: *** [all-gcc] Error 2make[5]: Entering directory `/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6-initial/gcc'
make \
      CFLAGS="-g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -pedantic -Wno-long-long  " \
      CONFIG_H="tconfig.h /home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/../include/ansidecl.h" TM_H="tm.h      /home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/config/dbxelf.h /home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/config/elfos.h /home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/config/svr4.h /home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/config/linux.h /home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/config/mips/mips.h /home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/config/mips/linux.h /home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/defaults.h insn-constants.h insn-flags.h" \
      INCLUDES="-I. -I. -I/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc -I/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/. -I/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/../include " \
      MAKEOVERRIDES= \
      -f libgcc.mk all
make[6]: Entering directory `/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6-initial/gcc'
for d in libgcc; do \
      if [ -d $d ]; then true; else /bin/sh /home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/mkinstalldirs $d; fi; \
    done
if [ -f stmp-dirs ]; then true; else touch stmp-dirs; fi
/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6-initial/gcc/xgcc -B/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6-initial/gcc/ -B/home/pselkirk/openwrt/kamikaze_7.09/staging_dir_mipsel/mipsel-linux-uclibc/bin/ -B/home/pselkirk/openwrt/kamikaze_7.09/staging_dir_mipsel/mipsel-linux-uclibc/lib/ -isystem /home/pselkirk/openwrt/kamikaze_7.09/staging_dir_mipsel/mipsel-linux-uclibc/include -isystem /home/pselkirk/openwrt/kamikaze_7.09/staging_dir_mipsel/mipsel-linux-uclibc/sys-include -O2  -DIN_GCC -DCROSS_COMPILE  -DUSE_UCLIBC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem ./include  -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc -I/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/. -I/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/../include  -fexceptions -c /home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/unwind-dw2.c -o libgcc/./unwind-dw2.o
/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/unwind-dw2.c: In function `uw_frame_state_for':
/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/unwind-dw2.c:1031: error: structure has no member named `sc_regs'
/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6/gcc/unwind-dw2.c:1031: error: structure has no member named `sc_pc'
make[6]: *** [libgcc/./unwind-dw2.o] Error 1
make[6]: Leaving directory `/home/pselkirk/openwrt/kamikaze_7.09/toolchain_build_mipsel/gcc-3.4.6-initial/gcc'

Looking at the preprocessor output of the offending file, I see the following chain of includes:
    toolchain_build_mipsel/gcc-3.4.6/gcc/config/mips/linux.h
      /usr/include/signal.h
        /usr/include/bits/sigcontext.h

Lo, the struct sigcontext in /usr/include/bits/sigcontext.h does not have sc_regs or sc_pc fields.

Clearly, the intended include chain was:
    toolchain_build_mipsel/gcc-3.4.6/gcc/config/mips/linux.h
      toolchain_build_mipsel/linux-2.4.34/include/signal.h
        toolchain_build_mipsel/linux-2.4.34/include/asm-mips/sigcontext.h

But looking at the build output, I don't see toolchain_build_mipsel/linux/include or toolchain_build_mipsel/linux-2.4.34/include anywhere in the includes.

Trying it on trunk code fails in the same place, in the same way.

Building the same code on an Acer Aspire One laptop (Linpus Lite 1.0.3.E) runs to completion with no errors. However, the build consumes 1.5GB of my precious 8GB solid state drive, so I'd prefer to build on my Ubuntu desktop if possible.

I am afraid I can't offer in assistance to your problem, but I can report that I have successfully built both kamikaze 7.09 and trunk on an Ubuntu 8.04 system - so I don't think its anything related to Ubuntu itself.

The discussion might have continued from here.