public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgomp/36442]  New: libgomp fails when using --with-build-sysroot
@ 2008-06-05 20:14 psmith at gnu dot org
  2008-07-06  0:26 ` [Bug libgomp/36442] libgomp/libssp/libmudflap builds fail " ulfs at dof dot se
  2008-09-04 17:35 ` psmith at gnu dot org
  0 siblings, 2 replies; 3+ messages in thread
From: psmith at gnu dot org @ 2008-06-05 20:14 UTC (permalink / raw)
  To: gcc-bugs

I'm using both --with-build-sysroot and --with-sysroot when I compile GCC, so
that I can compile it against a different version of the local system than the
one I'm compiling on.  Most of the build works fine, with the exception of the
libraries libgomp, libmudflap, and libssp.

Each of those fails because they do not take notice of the --with-build-sysroot
directive, and thus they cannot find important files like crti.o etc.

I configured with this:

--with-build-sysroot=/tmp/invalid/gcc/i686-redhat71-linux-gnu
--with-sysroot=/invalid

where /tmp/invalid/gcc/i686-redhat71-linux-gnu is an extracted sysroot from Red
Hat 7.1 (surprise!)  Everything chugs along OK until the above-mentioned
libraries, then:

/usr/src/gcc/obj/gcc/./gcc/xgcc -B/usr/src/gcc/obj/gcc/./gcc/
-B/tmp/invalid/gcc/i686-generic-linux-gnu/bin/
-B/tmp/invalid/gcc/i686-generic-linux-gnu/lib/ -isystem
/tmp/invalid/gcc/i686-generic-linux-gnu/include -isystem
/tmp/invalid/gcc/i686-generic-linux-gnu/sys-include -shared  .libs/ssp.o
.libs/gets-chk.o .libs/memcpy-chk.o .libs/memmove-chk.o .libs/mempcpy-chk.o
.libs/memset-chk.o .libs/snprintf-chk.o .libs/sprintf-chk.o .libs/stpcpy-chk.o
.libs/strcat-chk.o .libs/strcpy-chk.o .libs/strncat-chk.o .libs/strncpy-chk.o
.libs/vsnprintf-chk.o .libs/vsprintf-chk.o  
-Wl,--version-script=/usr/src/gcc/gcc-4.2.4/libssp/ssp.map -Wl,-soname
-Wl,libssp.so.0 -o .libs/libssp.so.0.0.0
/tmp/invalid/gcc/bin/i686-generic-linux-gnu-ld: crti.o: No such file: No such
file or directory
collect2: ld returned 1 exit status
make[4]: *** [libssp.la] Error 1
make[4]: Leaving directory `/usr/src/gcc/obj/gcc/i686-generic-linux-gnu/libssp'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/usr/src/gcc/obj/gcc/i686-generic-linux-gnu/libssp'
make[2]: *** [all-target-libssp] Error 2

The other two libraries gave essentially identical errors.  I don't think the
-B etc. options here are correct; they seem to be remnants from previous
versions of GCC, before the --with-sysroot and --with-build-sysroot flags were
supported.

The configure.in files for these libraries need to be updated.


-- 
           Summary: libgomp fails when using --with-build-sysroot
           Product: gcc
           Version: 4.2.4
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgomp
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: psmith at gnu dot org
GCC target triplet: i686-generic-linux-gnu


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


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

* [Bug libgomp/36442] libgomp/libssp/libmudflap builds fail when using --with-build-sysroot
  2008-06-05 20:14 [Bug libgomp/36442] New: libgomp fails when using --with-build-sysroot psmith at gnu dot org
@ 2008-07-06  0:26 ` ulfs at dof dot se
  2008-09-04 17:35 ` psmith at gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: ulfs at dof dot se @ 2008-07-06  0:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from ulfs at dof dot se  2008-07-06 00:26 -------
I see indications in gcc-4.2.2 compiled by the buildroot system at
buildroot.uclibc.org.
Files are compiled with "--sysroot=$(STAGING_DIR)" where
STAGING_DIR=/home/ulf/projects/Buildroot/20080704/buildroot-ngw100-expanded/build_avr32/staging_dir/

When cross-compiling the libgtk2 package, the linker
tries to link with libtiff which should be located
at $(STAGING_DIR)/usr/lib/libtiff.so, but it ignores
--sysroot=$(STAGING_DIR) and instead uses the 
host /usr/lib.

It bombs already on a similar problem with /usr/lib/libpng12,
but I found a manual workaround.

/home/ulf/projects/Buildroot/20080704/buildroot-ngw100-expanded/build_avr32/staging_dir/usr/bin/avr32-linux-uclibc-gcc
-Os 
-I/home/ulf/projects/Buildroot/20080704/buildroot-ngw100-expanded/build_avr32/staging_dir/usr/include
-I/home/ulf/projects/Buildroot/20080704/buildroot-ngw100-expanded/build_avr32/staging_dir/include
--sysroot=/home/ulf/projects/Buildroot/20080704/buildroot-ngw100-expanded/build_avr32/staging_dir/
-isysroot
/home/ulf/projects/Buildroot/20080704/buildroot-ngw100-expanded/build_avr32/staging_dir
-msoft-float -shared  .libs/io-tiff.o  -Wl,--rpath
-Wl,/home/ulf/projects/Buildroot/20080704/buildroot-ngw100-expanded/build_avr32/libgtk2-2.12.6/gdk-pixbuf/.libs
/usr/lib/libtiff.so ./.libs/libgdk_pixbuf-2.0.so -lgmodule-2.0 -ldl
-lgobject-2.0 -lglib-2.0 -lintl -lm  -msoft-float -Wl,-soname
-Wl,libpixbufloader-tiff.so -o .libs/libpixbufloader-tiff.so
/usr/lib/libtiff.so: could not read symbols: File in wrong format

The error message is because the AVR32 cross-compiled files 
should not be linked with the x86 compiled libtiff.so


-- 


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


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

* [Bug libgomp/36442] libgomp/libssp/libmudflap builds fail when using --with-build-sysroot
  2008-06-05 20:14 [Bug libgomp/36442] New: libgomp fails when using --with-build-sysroot psmith at gnu dot org
  2008-07-06  0:26 ` [Bug libgomp/36442] libgomp/libssp/libmudflap builds fail " ulfs at dof dot se
@ 2008-09-04 17:35 ` psmith at gnu dot org
  1 sibling, 0 replies; 3+ messages in thread
From: psmith at gnu dot org @ 2008-09-04 17:35 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from psmith at gnu dot org  2008-09-04 17:34 -------
I tried this with the latest stable, GCC 4.3.2, and I still had the same
failures.


-- 


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


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

end of thread, other threads:[~2008-09-04 17:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-06-05 20:14 [Bug libgomp/36442] New: libgomp fails when using --with-build-sysroot psmith at gnu dot org
2008-07-06  0:26 ` [Bug libgomp/36442] libgomp/libssp/libmudflap builds fail " ulfs at dof dot se
2008-09-04 17:35 ` psmith at gnu dot org

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).