This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Can't build correctly working crosscompiler with 4.3.0. 4.2.1 worked like charm


On Wednesday 16 April 2008 17:21, Denys Vlasenko wrote:
> I do it not not only for gcc but for almost everything.
> 
> I discovered that a lot of packages will "remember" patchs given
> to configure and use those at runtime. I want them to use
> /ust/bin/something rather than /usr/app/bar/bin/something.
> 
> I found that usually giving bindir=/usr/bin to configure
> but giving bindir=/usr/app/bar/bin to "make install" will do the trick.
> 
> > That's causing this:
> > 
> > > 30816 stat64("/.share/usr/app/gcc-4.3.0-i486-linux-uclibc/bin/../app/gcc-4.3.0-i486-linux-uclibc/libexec/gcc/i486-linux-uclibc/4.3.0/cc1", 0xffde613c) = -1 ENOENT (No such file or directory)
> > 
> > At this point it's clear something is wrong.  The libexec directory is
> > not in the same relation to bindir that it was at configure time.
> 
> Yes, I see... I will try giving bindir=/usr/app/gcc-N.N.N-target/bin
> to configure. Will let you know if it still doesn't work.

Builds ok and can find cc1 now. Well, it still does "xxx/../xxx stuff but at least
end result is ok:
21396 stat64("/.share/usr/app/gcc-4.3.0-x86_64-linux-uclibc/bin/../libexec/gcc/x86_64-linux-uclibc/4.3.0/cc1", {st_mode=S_IFREG|0755, st_s
ize=6008611, ...}) = 0

As I mentined in the first mail, it's not the end of a story.
Next issue: can't find header files. This used to work with 4.2.1:

strace -f -o zstrace.log \
 x86_64-linux-uclibc-gcc -Wp,-MD,applets/.applets.o.d   -std=gnu99 -Iinclude
-Ilibbb  -I/.1/usr/srcdevel/bbox/fix/busybox.t8_64prime/libbb -include
include/autoconf.h -D_GNU_SOURCE -DNDEBUG -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -D"BB_VER=KBUILD_STR(1.11.0.svn)"
-DBB_BT=AUTOCONF_TIMESTAMP  -Wall -Wshadow -Wwrite-strings -Wundef
-Wstrict-prototypes -Wunused -Wunused-parameter -Werror -Wold-style-definition
-Os -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer
-ffunction-sections -fdata-sections -fno-guess-branch-probability
-funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1
-falign-labels=1 -falign-loops=1 -Wdeclaration-after-statement
-Wno-pointer-sign    -D"KBUILD_STR(s)=#s"
-D"KBUILD_BASENAME=KBUILD_STR(applets)"  -D"KBUILD_MODNAME=KBUILD_STR(applets)"
-c -o applets/applets.o applets/applets.c

4.2.1 was finding headers here:

21446 stat64("include/assert.h.gch", 0xff926550) = -1 ENOENT (No such file or directory)
21446 open("include/assert.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
21446 stat64("libbb/assert.h.gch", 0xff926550) = -1 ENOENT (No such file or directory)
21446 open("libbb/assert.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
21446 stat64("/.share/usr/app/gcc-4.2.3-x86_64-linux-uclibc/bin/../lib/gcc/x86_64-linux-uclibc/4.2.3/include/assert.h.gch", 0xff926550) =
21446 open("/.share/usr/app/gcc-4.2.3-x86_64-linux-uclibc/bin/../lib/gcc/x86_64-linux-uclibc/4.2.3/include/assert.h", O_RDONLY|O_NOCTTY) =
21446 stat64("/usr/lib/../x86_64-linux-uclibc/include/assert.h.gch", 0xff926550) = -1 ENOENT (No such file or directory)
21446 open("/usr/lib/../x86_64-linux-uclibc/include/assert.h", O_RDONLY|O_NOCTTY) = 5

but 4.3.0 doesn't:

21397 stat64("include/assert.h.gch", 0xffa710f0) = -1 ENOENT (No such file or directory)
21397 open("include/assert.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
21397 stat64("libbb/assert.h.gch", 0xffa710f0) = -1 ENOENT (No such file or directory)
21397 open("libbb/assert.h", O_RDONLY|O_NOCTTY) = -1 ENOENT (No such file or directory)
21397 stat64("/.share/usr/app/gcc-4.3.0-x86_64-linux-uclibc/bin/../lib/gcc/x86_64-linux-uclibc/4.3.0/include/assert.h.gch", 0xffa710f0) =
21397 open("/.share/usr/app/gcc-4.3.0-x86_64-linux-uclibc/bin/../lib/gcc/x86_64-linux-uclibc/4.3.0/include/assert.h", O_RDONLY|O_NOCTTY) =
21397 stat64("/.share/usr/app/gcc-4.3.0-x86_64-linux-uclibc/bin/../lib/gcc/x86_64-linux-uclibc/4.3.0/include-fixed/assert.h.gch", 0xffa710
21397 open("/.share/usr/app/gcc-4.3.0-x86_64-linux-uclibc/bin/../lib/gcc/x86_64-linux-uclibc/4.3.0/include-fixed/assert.h", O_RDONLY|O_NOC
21397 write(2, "applets/applets.c:10:20:", 24) = 24
21397 write(2, " ", 1)                  = 1
21397 write(2, "error: ", 7)            = 7
21397 write(2, "assert.h: No such file or direct"..., 35) = 35
21397 write(2, "\n", 1)                 = 1

Basically, it used to look into /usr/lib/../x86_64-linux-uclibc,
but now it does not.

configure invocation was:

STATIC=/usr/app/gcc-4.3.0-x86_64-linux-uclibc

$SRC/configure \
--prefix=$STATIC                                \
--exec-prefix=$STATIC                           \
--bindir=$STATIC/bin                            \
--sbindir=$STATIC/sbin                          \
--libexecdir=$STATIC/libexec                    \
--datadir=$STATIC/share                         \
--sysconfdir=/etc                               \
--sharedstatedir=$STATIC/var/com                \
--localstatedir=$STATIC/var                     \
--libdir=$STATIC/lib                            \
--includedir=$STATIC/include                    \
--infodir=$STATIC/info                          \
--mandir=$STATIC/man                            \
\
--disable-nls                                   \
\
--with-local-prefix=/usr/local                  \
--with-slibdir=$STATIC/lib                      \
--with-gxx-include-dir=$STATIC/include/g++-v3   \
\
--build=i386-pc-linux-gnu                       \
--host=i386-pc-linux-gnu                        \
--target=$CROSS                                 \
\
--with-gnu-ld                                   \
--with-ld="$CROSS-ld"                           \
--with-gnu-as                                   \
--with-as="$CROSS-as"                           \
\
--enable-languages="c,c++"                      \
--enable-target-optspace                        \
--disable-shared                                \
--disable-__cxa_atexit                          \
--disable-threads                               \
--disable-tls                                   \
--disable-multilib                              \
--without-headers                               \
\

--
vda


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]