[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#637218: /usr/include/gnu/stubs.h:7:27: fatal error: gnu/stubs-32.h: No such file or directory



Sedat Dilek wrote:

> Can you explain why you use CFLAGS_FOR_TARGET as configure-option only
> and BOOT_CFLAGS as make-option?

From gcc/doc/install.texi:

	If you wish to use non-default GCC flags when compiling the stage2
	and stage3 compilers, set @code{BOOT_CFLAGS} on the command line when
	doing @samp{make}.

BOOT_CFLAGS isn't wired into the configure script for some reason.

> Is this export not enough?
>
> $ export CFLAGS_FOR_TARGET="-g -O2 -B/usr/lib/$DEB_HOST_MULTIARCH"

No, it's not enough.  CFLAGS_FOR_TARGET is for when building
libraries, if I remember correctly.

> On Tue, Aug 9, 2011 at 9:48 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:

>> Seems to be working well so far; I'm cautiously optimistic.  gcc is
>> 4.6.1-6, libc 2.13-16.

I spoke too soon.  The problem when running libtool appeared again after
all.

| $ cd x86_64-unknown-linux-gnu/libgomp
| $ make -n BOOT_CFLAGS="-g -O2 -B/usr/lib/x86_64-linux-gnu" libgomp.la
[...]
| /bin/sh ./libtool --tag CC   --mode=link /home/jrn/src/gcc/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/jrn/src/gcc/host-x86_64-unknown-linux-gnu/gcc/ -B/home/jrn/opt/gcc/x86_64-unknown-linux-gnu/bin/ -B/home/jrn/opt/gcc/x86_64-unknown-linux-gnu/lib/ -isystem /home/jrn/opt/gcc/x86_64-unknown-linux-gnu/include -isystem /home/jrn/opt/gcc/x86_64-unknown-linux-gnu/sys-include    -Wall -Werror -ftls-model=initial-exec -Wc,-pthread -g -O2 -B/usr/lib/x86_64-linux-gnu -pthread   -Wl,-O1   -o libgomp.la -version-info 1:0:0 -Wl,--version-script,../.././libgomp/libgomp.map  -rpath /home/jrn/opt/gcc/lib/../lib64 alloc.lo barrier.lo critical.lo env.lo error.lo iter.lo iter_ull.lo loop.lo loop_ull.lo ordered.lo parallel.lo sections.lo single.lo task.lo team.lo work.lo lock.lo mutex.lo proc.lo sem.lo bar.lo ptrlock.lo time.lo fortran.lo affinity.lo  -lrt 
| $ /bin/sh ./libtool -n --tag CC   --mode=link /home/jrn/src/gcc/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/jrn/src/gcc/host-x86_64-unknown-linux-gnu/gcc/ -B/home/jrn/opt/gcc/x86_64-unknown-linux-gnu/bin/ -B/home/jrn/opt/gcc/x86_64-unknown-linux-gnu/lib/ -isystem /home/jrn/opt/gcc/x86_64-unknown-linux-gnu/include -isystem /home/jrn/opt/gcc/x86_64-unknown-linux-gnu/sys-include    -Wall -Werror -ftls-model=initial-exec -Wc,-pthread -g -O2 -B/usr/lib/x86_64-linux-gnu -pthread   -Wl,-O1   -o libgomp.la -version-info 1:0:0 -Wl,--version-script,../.././libgomp/libgomp.map  -rpath /home/jrn/opt/gcc/lib/../lib64 alloc.lo barrier.lo critical.lo env.lo error.lo iter.lo iter_ull.lo loop.lo loop_ull.lo ordered.lo parallel.lo sections.lo single.lo task.lo team.lo work.lo lock.lo mutex.lo proc.lo sem.lo bar.lo ptrlock.lo time.lo fortran.lo affinity.lo  -lrt 
| libtool: link: /home/jrn/src/gcc/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/jrn/src/gcc/host-x86_64-unknown-linux-gnu/gcc/ -B/home/jrn/opt/gcc/x86_64-unknown-linux-gnu/bin/ -B/home/jrn/opt/gcc/x86_64-unknown-linux-gnu/lib/ -isystem /home/jrn/opt/gcc/x86_64-unknown-linux-gnu/include -isystem /home/jrn/opt/gcc/x86_64-unknown-linux-gnu/sys-include    -shared  .libs/alloc.o .libs/barrier.o .libs/critical.o .libs/env.o .libs/error.o .libs/iter.o .libs/iter_ull.o .libs/loop.o .libs/loop_ull.o .libs/ordered.o .libs/parallel.o .libs/sections.o .libs/single.o .libs/task.o .libs/team.o .libs/work.o .libs/lock.o .libs/mutex.o .libs/proc.o .libs/sem.o .libs/bar.o .libs/ptrlock.o .libs/time.o .libs/fortran.o .libs/affinity.o   -lrt  -pthread -pthread -Wl,-O1 -Wl,--version-script -Wl,../.././libgomp/libgomp.map   -pthread -Wl,-soname -Wl,libgomp.so.1 -o .libs/libgomp.so.1.0.0
[...]

Notice that the "link: " command line leaves out -B/usr/lib/x86_64-linux-gnu.
Last time I tried this, I worked around it by setting "LIBTOOL = libtool".
Which does the following:

| $ libtool -n --tag CC   --mode=link /home/jrn/src/gcc/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/jrn/src/gcc/host-x86_64-unknown-linux-gnu/gcc/ -B/home/jrn/opt/gcc/x86_64-unknown-linux-gnu/bin/ -B/home/jrn/opt/gcc/x86_64-unknown-linux-gnu/lib/ -isystem /home/jrn/opt/gcc/x86_64-unknown-linux-gnu/include -isystem /home/jrn/opt/gcc/x86_64-unknown-linux-gnu/sys-include    -Wall -Werror -ftls-model=initial-exec -Wc,-pthread -g -O2 -B/usr/lib/x86_64-linux-gnu -pthread   -Wl,-O1   -o libgomp.la -version-info 1:0:0 -Wl,--version-script,../.././libgomp/libgomp.map  -rpath /home/jrn/opt/gcc/lib/../lib64 alloc.lo barrier.lo critical.lo env.lo error.lo iter.lo iter_ull.lo loop.lo loop_ull.lo ordered.lo parallel.lo sections.lo single.lo task.lo team.lo work.lo lock.lo mutex.lo proc.lo sem.lo bar.lo ptrlock.lo time.lo fortran.lo affinity.lo  -lrt 
| libtool: link: gcc -shared  -fPIC -DPIC  .libs/alloc.o .libs/barrier.o .libs/critical.o .libs/env.o .libs/error.o .libs/iter.o .libs/iter_ull.o .libs/loop.o .libs/loop_ull.o .libs/ordered.o .libs/parallel.o .libs/sections.o .libs/single.o .libs/task.o .libs/team.o .libs/work.o .libs/lock.o .libs/mutex.o .libs/proc.o .libs/sem.o .libs/bar.o .libs/ptrlock.o .libs/time.o .libs/fortran.o .libs/affinity.o   -lrt  -pthread -O2 -pthread -Wl,-O1 -Wl,--version-script -Wl,../.././libgomp/libgomp.map   -pthread -Wl,-soname -Wl,libgomp.so.1 -o .libs/libgomp.so.1.0.0
[...]

That's much worse.  (It uses the system gcc, defeating the point of a
bootstrap.)  Of course, after such a change, the problem would _look_
solved.

In the source of ./libtool, I see

| LTCC="/home/jrn/src/gcc/host-x86_64-unknown-linux-gnu/gcc/xgcc -B/home/jrn/src/gcc/host-x86_64-unknown-linux-gnu/gcc/ -B/home/jrn/opt/gcc/x86_64-unknown-linux-gnu/bin/ -B/home/jrn/opt/gcc/x86_64-unknown-linux-gnu/lib/ -isystem /home/jrn/opt/gcc/x86_64-unknown-linux-gnu/include -isystem /home/jrn/opt/gcc/x86_64-unknown-linux-gnu/sys-include   "

I had blamed libtool too soon.  The problem is that neither
CFLAGS_FOR_TARGET nor BOOT_CFLAGS is being passed to libtool at
configure time.  It would be nice if CFLAGS_FOR_TARGET were
incorporated into LTCFLAGS via CFLAGS, but it isn't.



Reply to: