public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/42280]  New: libiberty configure script fails checking pid_t when without-headers
@ 2009-12-04 19:06 viriketo at gmail dot com
  2009-12-04 22:41 ` [Bug other/42280] " rearnsha at gcc dot gnu dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: viriketo at gmail dot com @ 2009-12-04 19:06 UTC (permalink / raw)
  To: gcc-bugs

Trying to build a gcc 4.4.2 for 'baremetal' targets, in my case for later libc
building, I find that the libiberty configure script at some stage checks for
some libc headers to be available.

I'm calling the gcc main configure with "--without-headers". The total flags
are:
--prefix=/nix/store/bqyab4kls4czwyzazmrjbf2y62xiil48-gcc-4.4.2-armv5tel-unknown-linux-uclibceabi-stage-static
--with-ppl=/nix/store/kdsz815whid3giyi9ll3bshxdmp3jyyj-ppl-0.10.2
--with-cloog=/nix/store/zidphypb94508svrm4b2dxj9bhwpp2fr-cloog-ppl-0.15.4
--with-gmp=/nix/store/sli4r6plz8bkbizia8mr8p0rhxvrk06v-gmp-4.3.1
--with-mpfr=/nix/store/q5x2ajrskdj5bv2md78k5yqapdiy0sqg-mpfr-2.4.1
--disable-libstdcxx-pch
--without-included-gettext
--with-system-zlib
--enable-languages=c
--target=armv5tel-unknown-linux-uclibceabi
--disable-libssp
--disable-nls
--without-headers
--disable-threads
--disable-libmudflap
--disable-libgomp
--disable-shared

I could build gcc 4.3.4 perfectly with the options I was using.

The concerning contents at the directory
build/armv5tel-unknown-linux-uclibceabi/libiberty/config.log give:
configure:5359:
/tmp/nix-build-12l4vcfky0013w4gx5fpky81s4gb90gd-gcc-4.4.2-armv5tel-unknown-linux-uclibceabi-stage-static.drv-0/build/./gcc/xgcc
-B/tmp/nix-build-12l4vcfky0013w4gx5fpky81s4gb90gd-gcc-4.4.2-armv5tel-unknown-linux-uclibceabi-stage-static.drv-0/build/./gcc/
-B/nix/store/bqyab4kls4czwyzazmrjbf2y62xiil48-gcc-4.4.2-armv5tel-unknown-linux-uclibceabi-stage-static/armv5tel-unknown-linux-uclibceabi/bin/
-B/nix/store/bqyab4kls4czwyzazmrjbf2y62xiil48-gcc-4.4.2-armv5tel-unknown-linux-uclibceabi-stage-static/armv5tel-unknown-linux-uclibceabi/lib/
-isystem
/nix/store/bqyab4kls4czwyzazmrjbf2y62xiil48-gcc-4.4.2-armv5tel-unknown-linux-uclibceabi-stage-static/armv5tel-unknown-linux-uclibceabi/include
-isystem
/nix/store/bqyab4kls4czwyzazmrjbf2y62xiil48-gcc-4.4.2-armv5tel-unknown-linux-uclibceabi-stage-static/armv5tel-unknown-linux-uclibceabi/sys-include
-c -B/lib -idirafter /include  -Wl,-L/lib    conftest.c >&5
conftest.c:41:19: error: stdio.h: No such file or directory
conftest.c:43:24: error: sys/types.h: No such file or directory
conftest.c:46:23: error: sys/stat.h: No such file or directory
conftest.c:53:22: error: stdlib.h: No such file or directory
conftest.c:58:22: error: memory.h: No such file or directory
conftest.c:60:21: error: string.h: No such file or directory
conftest.c:63:22: error: strings.h: No such file or directory
conftest.c:66:23: error: inttypes.h: No such file or directory
conftest.c:73:21: error: unistd.h: No such file or directory
conftest.c: In function 'main':
conftest.c:78: error: 'pid_t' undeclared (first use in this function)
conftest.c:78: error: (Each undeclared identifier is reported only once
conftest.c:78: error: for each function it appears in.)
conftest.c:78: error: expected expression before ')' token
configure:5365: $? = 1


-- 
           Summary: libiberty configure script fails checking pid_t when
                    without-headers
           Product: gcc
           Version: 4.4.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: viriketo at gmail dot com
 GCC build triplet: x86_64-linux
  GCC host triplet: x86_64-linux
GCC target triplet: armv5tel-unknown-linux-uclibceabi


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42280


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug other/42280] libiberty configure script fails checking pid_t when without-headers
  2009-12-04 19:06 [Bug other/42280] New: libiberty configure script fails checking pid_t when without-headers viriketo at gmail dot com
@ 2009-12-04 22:41 ` rearnsha at gcc dot gnu dot org
  2009-12-04 23:14 ` viriketo at gmail dot com
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2009-12-04 22:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from rearnsha at gcc dot gnu dot org  2009-12-04 22:41 -------
> I'm calling the gcc main configure with "--without-headers"

So how do you expect it to know where to look for the standard headers?


-- 

rearnsha at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |WAITING


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42280


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug other/42280] libiberty configure script fails checking pid_t when without-headers
  2009-12-04 19:06 [Bug other/42280] New: libiberty configure script fails checking pid_t when without-headers viriketo at gmail dot com
  2009-12-04 22:41 ` [Bug other/42280] " rearnsha at gcc dot gnu dot org
@ 2009-12-04 23:14 ` viriketo at gmail dot com
  2009-12-04 23:16 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: viriketo at gmail dot com @ 2009-12-04 23:14 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from viriketo at gmail dot com  2009-12-04 23:14 -------
It should not use any standard headers. I don't expect this cross-gcc to build
any executable. Only to compile code.

Isn't this a usual stage bootstrapping? Then, when having a libc, with the help
of 'ld' and libc objects, the gcc will be able to build executables.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42280


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug other/42280] libiberty configure script fails checking pid_t when without-headers
  2009-12-04 19:06 [Bug other/42280] New: libiberty configure script fails checking pid_t when without-headers viriketo at gmail dot com
  2009-12-04 22:41 ` [Bug other/42280] " rearnsha at gcc dot gnu dot org
  2009-12-04 23:14 ` viriketo at gmail dot com
@ 2009-12-04 23:16 ` pinskia at gcc dot gnu dot org
  2009-12-04 23:20 ` viriketo at gmail dot com
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2009-12-04 23:16 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from pinskia at gcc dot gnu dot org  2009-12-04 23:15 -------
(In reply to comment #2)
> It should not use any standard headers. I don't expect this cross-gcc to build
> any executable. Only to compile code.

libiberty is a library ....


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42280


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug other/42280] libiberty configure script fails checking pid_t when without-headers
  2009-12-04 19:06 [Bug other/42280] New: libiberty configure script fails checking pid_t when without-headers viriketo at gmail dot com
                   ` (2 preceding siblings ...)
  2009-12-04 23:16 ` pinskia at gcc dot gnu dot org
@ 2009-12-04 23:20 ` viriketo at gmail dot com
  2009-12-05 12:34 ` viriketo at gmail dot com
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: viriketo at gmail dot com @ 2009-12-04 23:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from viriketo at gmail dot com  2009-12-04 23:20 -------
I think I understand that libiberty must be compiled for the host, and not for
the target.

Then, 'xgcc' wants the system headers, to build the cross compiler, and not
those of the target libc.
In this case it would be my fault. I will investigate more.

Thank you.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42280


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug other/42280] libiberty configure script fails checking pid_t when without-headers
  2009-12-04 19:06 [Bug other/42280] New: libiberty configure script fails checking pid_t when without-headers viriketo at gmail dot com
                   ` (3 preceding siblings ...)
  2009-12-04 23:20 ` viriketo at gmail dot com
@ 2009-12-05 12:34 ` viriketo at gmail dot com
  2009-12-05 14:03 ` viriketo at gmail dot com
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 9+ messages in thread
From: viriketo at gmail dot com @ 2009-12-05 12:34 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from viriketo at gmail dot com  2009-12-05 12:34 -------
Sorry for not posting the full log before, but I noticed that the failing
target is "configure-target-libiberty".

I don't understand how libiberty can be built for the target when building a
cross compiler "--without-headers", because it requires system libraries.
Shouldn't "target-libiberty" be disabled under cross-compilation without
headers?

I see that under the same configure parameters, in 4.3.4, target-libiberty is
not built (looking at build logs).


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42280


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug other/42280] libiberty configure script fails checking pid_t when without-headers
  2009-12-04 19:06 [Bug other/42280] New: libiberty configure script fails checking pid_t when without-headers viriketo at gmail dot com
                   ` (4 preceding siblings ...)
  2009-12-05 12:34 ` viriketo at gmail dot com
@ 2009-12-05 14:03 ` viriketo at gmail dot com
  2009-12-05 14:37 ` rearnsha at gcc dot gnu dot org
  2009-12-05 14:50 ` viriketo at gmail dot com
  7 siblings, 0 replies; 9+ messages in thread
From: viriketo at gmail dot com @ 2009-12-05 14:03 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from viriketo at gmail dot com  2009-12-05 14:03 -------
Ok, I traced the problem down. The main change between 4.3.4 and 4.4.1 that
triggered the problem was the addition of 'zlib' in the core package (what I am
trying to build).

The configure script has the following logic around line 5370:
# Sometimes the tools are distributed with libiberty but with no other
# libraries.  In that case, we don't want to build target-libiberty.
# Don't let libgcc imply libiberty either.
if test -n "${target_configdirs}" ; then
  libgcc=
  others=
  for i in `echo ${target_configdirs} | sed -e s/target-//g` ; do
    if test "$i" = "libgcc"; then
      libgcc=target-libgcc
    elif test "$i" != "libiberty" ; then     # OFFENDING CHECK
      if test -r $srcdir/$i/configure ; then
    others=yes;
    break;
      fi
    fi
  done
  if test -z "${others}" ; then
    target_configdirs=$libgcc  # This happens only if 'zlib' is not there - and
this line should be run in my use case.
  fi
fi

So, I can't really propose a patch. What I did to get gcc 4.4.2 building is
remove the zlib directory after unpacking the core package.

I don't know the packaging procedure of gcc, but this concerns this procedure.
I don't know what status apply to the bug.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42280


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug other/42280] libiberty configure script fails checking pid_t when without-headers
  2009-12-04 19:06 [Bug other/42280] New: libiberty configure script fails checking pid_t when without-headers viriketo at gmail dot com
                   ` (5 preceding siblings ...)
  2009-12-05 14:03 ` viriketo at gmail dot com
@ 2009-12-05 14:37 ` rearnsha at gcc dot gnu dot org
  2009-12-05 14:50 ` viriketo at gmail dot com
  7 siblings, 0 replies; 9+ messages in thread
From: rearnsha at gcc dot gnu dot org @ 2009-12-05 14:37 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #7 from rearnsha at gcc dot gnu dot org  2009-12-05 14:37 -------
There probably is no patch.  If you are building a compiler with no headers,
then you can't just type 'make' and expect it to work.

Instead you must just build those targets you really need (like the core
compiler)

I tend to use make all-gcc in those circumstances.  You build and install a
compiler binary, then build and install your system headers and then finally go
back and build the support libraries you need.


-- 

rearnsha at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |RESOLVED
         Resolution|                            |WORKSFORME


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42280


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Bug other/42280] libiberty configure script fails checking pid_t when without-headers
  2009-12-04 19:06 [Bug other/42280] New: libiberty configure script fails checking pid_t when without-headers viriketo at gmail dot com
                   ` (6 preceding siblings ...)
  2009-12-05 14:37 ` rearnsha at gcc dot gnu dot org
@ 2009-12-05 14:50 ` viriketo at gmail dot com
  7 siblings, 0 replies; 9+ messages in thread
From: viriketo at gmail dot com @ 2009-12-05 14:50 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #8 from viriketo at gmail dot com  2009-12-05 14:49 -------
As I said in a previous comment, removing the 'zlib' subdirectory (not included
in releases older than 4.4.2) made "make all" and "make installl" work
perfectly.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42280


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-12-05 14:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-12-04 19:06 [Bug other/42280] New: libiberty configure script fails checking pid_t when without-headers viriketo at gmail dot com
2009-12-04 22:41 ` [Bug other/42280] " rearnsha at gcc dot gnu dot org
2009-12-04 23:14 ` viriketo at gmail dot com
2009-12-04 23:16 ` pinskia at gcc dot gnu dot org
2009-12-04 23:20 ` viriketo at gmail dot com
2009-12-05 12:34 ` viriketo at gmail dot com
2009-12-05 14:03 ` viriketo at gmail dot com
2009-12-05 14:37 ` rearnsha at gcc dot gnu dot org
2009-12-05 14:50 ` viriketo at gmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).