[Aboriginal] GCC - messed up search dirs

Paul Onyschuk blink at bojary.koba.pl
Sat Jan 21 12:28:02 PST 2012


First a bit of the background (apologies for my poor english writing).
I'm trying to bootstrap pkgsrc under chrooted Aboriginal Linux.  That
should be pretty easy, beside chroot image pkgsrc needed also zlib,
ncurses and groff (I used mdocml instead).  Small fix in bootstrap
script was also needed: busybox awk fails at some point, so pkgsrc
should build own version (nawk).

Problems starts here, C preprocessor fails on conftest.c in one of the
packages (bmake):

>
> cpp: error trying to exec 'cc1': execvp: No such file or directory
>


As it turns out GCC cannot point to proper cc1 location:

>
> $ gcc -print-search-dirs
> install: /usr/bin/../
> programs: /usr/bin:/usr/bin/../tools/bin:/usr/kerberos/sbin: \
>   /usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin
> libraries: /usr/bin/../cc/lib/:/usr/bin/../lib/:/usr/bin/../cc/
>
> $ gcc -print-prog-name=cc1
> cc1
>


This can be fixed by setting:

>
> $ export GCC_EXEC_PREFIX=/usr/i586-unknown-linux/bin/
>


In the end, others problems are showing up (still regarding C
preprocessor) like missing limits.h header.  I don't like idea of
adding another few environment variables just to point GCC to own files.

I'm using root-filesystem-i586 image [1] and the questions are:

(A) Am I doing something wrong (chroot setup and so on)?
(B) Are additional setps needed before using GCC under Aboriginal?
(C) Is there something wrong with GCC under Aboriginal?

I'm not sure if this is needed, but here is "gcc -v" output just in
case:

>
> Invoked as gcc
> Reference path: /usr/bin/..
> arg[ 0] = rawcc
> arg[ 1] = -U__nptl__
> arg[ 2] = -v
> Using built-in specs.
> Target: i586-unknown-linux
> Configured
> with: /home/landley/work/ab3/build/temp-i586/gcc-core/configure
> --target=i586-unknown-linux
> --prefix=/home/landley/work/ab3/build/native-compiler-i586
> --disable-multilib --disable-nls --enable-c99 --enable-long-long
> --enable-__cxa_atexit --enable-languages=c,c++ --disable-libstdcxx-pch
> --program-prefix= --enable-threads=posix --enable-shared
> --build=x86_64-walrus-linux --host=i586-unknown-linux Thread model:
> posix gcc version 4.2.1
>


[1] http://landley.net/aboriginal/downloads/binaries/ \
  root-filesystem/root-filesystem-i586.tar.bz2



More information about the Aboriginal mailing list