FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian GCC

 
 
LinkBack Thread Tools
 
Old 10-11-2011, 12:41 PM
Sedat Dilek
 
Default i386: Compiling gcc-snapshots from upstream with multiarch-toolchain?

Package: libc6-dev
Version: 2.13-21
Severity: normal

[ CCing debian-gcc ML ]

Dear Maintainer,

these problems here were already discussed on #multiarch and reported
by me (see for example #636116 or #637218), but still exist.
I did not check for a while the progress on the issues, so I am sorry
for being uninformed and tapping on your nerves by unseen
re-reporting.
Personally, I am interested in helping to get the issues solved (for
me this looks like a multiarch problem, but CCing debian-gcc folks as
well).

Again I tried to compile a gcc-4.7 snapshot tarball [1] with my
(updated) build-script.

### Workaround #1: /usr/include/gnu/stubs-32.h

# ls -l /usr/include/gnu/stubs-32.h
lrwxrwxrwx 1 root root 32 Sep 5 17:19 /usr/include/gnu/stubs-32.h ->
../i386-linux-gnu/gnu/stubs-32.h

# dpkg -S /usr/include/gnu/
libc6-dev-amd64: /usr/include/gnu

# dpkg -S /usr/include/i386-linux-gnu/gnu/stubs-32.h
libc6-dev: /usr/include/i386-linux-gnu/gnu/stubs-32.h

Q: Is it possible to have this symlink when both (libc6-dev-amd64 and
libc6-dev) packages are installed?

### Workaround #2: /usr/lib/crt*.o

# ls -l /usr/lib/crt*.o
lrwxrwxrwx 1 root root 21 Sep 5 18:24 /usr/lib/crt1.o -> i386-linux-gnu/crt1.o
lrwxrwxrwx 1 root root 21 Sep 5 18:24 /usr/lib/crti.o -> i386-linux-gnu/crti.o
lrwxrwxrwx 1 root root 21 Sep 5 18:24 /usr/lib/crtn.o -> i386-linux-gnu/crtn.o

# dpkg -S /usr/lib/i386-linux-gnu/crt*.o
libc6-dev: /usr/lib/i386-linux-gnu/crt1.o
libc6-dev: /usr/lib/i386-linux-gnu/crti.o
libc6-dev: /usr/lib/i386-linux-gnu/crtn.o

# dpkg -S /usr/lib64/crt*.o
libc6-dev-amd64: /usr/lib64/crt1.o
libc6-dev-amd64: /usr/lib64/crti.o
libc6-dev-amd64: /usr/lib64/crtn.o

# locate crt1.o crti.o crtn.o | grep ^/usr/lib | egrep -v
'gcrt1.o|Mcrt1.o|Scrt1.o' | sort
/usr/lib64/crt1.o
/usr/lib64/crti.o
/usr/lib64/crtn.o
/usr/lib/crt1.o <--- SELF-CREATED symlink
/usr/lib/crti.o <--- SELF-CREATED symlink
/usr/lib/crtn.o <--- SELF-CREATED symlink
/usr/lib/i386-linux-gnu/crt1.o
/usr/lib/i386-linux-gnu/crti.o
/usr/lib/i386-linux-gnu/crtn.o

Q: As you can see libc6-dev-amd64 places its crt*.o in /usr/lib64/, so
why should libc6-dev NOT (logically) place same files below /usr/lib/
(as symlinks)?

CONCLUSION:
I am unsure if I should split this bug-report, but both issues affect
the same Debian package and could IMHO easily solved by creating
appropriate symlinks.

NOTE:
A succesfully compiled gcc upstream snapshot tarballs is a testcase
for me before I start any compilation of a MIPSEL toolchain for a
router project called freetz.

Regards,
- Sedat (dileks) -

P.S.: ATTACHMENTS: 1. build-script 2. make logs

[1] ftp://sourceware.org/pub/gcc/snapshots/LATEST-4.7/gcc-4.7-20111008.tar.bz2
[2] http://freetz.org


-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable'), (200, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 3.1.0-rc4-next20110831.9-686-small (SMP w/1 CPU core)
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages libc6-dev depends on:
ii libc-dev-bin 2.13-21
ii libc6 2.13-21
ii linux-libc-dev 3.0.0-5

Versions of packages libc6-dev recommends:
ii gcc [c-compiler] 4:4.6.1-3
ii gcc-4.4 [c-compiler] 4.4.6-11
ii gcc-4.5 [c-compiler] 4.5.3-9
ii gcc-4.6 [c-compiler] 4.6.1-15
ii gcc-4.7 [c-compiler] 20111008-1 <--- SELF-CREATED dummy package
(done with equivs)

Versions of packages libc6-dev suggests:
pn glibc-doc <none>
pn manpages-dev <none>

-- no debconf information
 
Old 10-11-2011, 12:50 PM
Sedat Dilek
 
Default i386: Compiling gcc-snapshots from upstream with multiarch-toolchain?

Some additional informations on created gcc-4.7 compiler:

# which gcc-4.7
/usr/bin/gcc-4.7

# l /usr/bin/gcc-4.7
lrwxrwxrwx 1 root root 24 Jul 31 14:28 /usr/bin/gcc-4.7 ->
/opt/gcc-4.7/bin/gcc-4.7

# gcc-4.7 -v
Using built-in specs.
COLLECT_GCC=gcc-4.7
COLLECT_LTO_WRAPPER=/opt/gcc-4.7/lib/gcc/i486-linux-gnu/4.7.0/lto-wrapper
Target: i486-linux-gnu
Configured with: ../gcc-4.7-20111008/configure --prefix=/opt/gcc-4.7
--libdir=/opt/gcc-4.7/lib --libexecdir=/opt/gcc-4.7/lib
--program-suffix=-4.7 --enable-clocale=gnu --enable-languages=c,c++
--enable-shared --enable-threads=posix --disable-bootstrap
--disable-libssp --disable-multilib --disable-nls --with-system-zlib
--without-cloog --without-ppl --with-arch-32=i586 --with-tune=generic
--build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
Thread model: posix
gcc version 4.7.0 20111008 (experimental) (GCC)


--
To UNSUBSCRIBE, email to debian-gcc-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: CA+icZUXWaS7jFuy3mQPjjECMuY_expujXLjcL4tOtN4OCK3Dc Q@mail.gmail.com">http://lists.debian.org/CA+icZUXWaS7jFuy3mQPjjECMuY_expujXLjcL4tOtN4OCK3Dc Q@mail.gmail.com
 
Old 10-11-2011, 03:32 PM
Sedat Dilek
 
Default i386: Compiling gcc-snapshots from upstream with multiarch-toolchain?

I played again with CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET by exporting them.

-I/usr/include/${HOST_SYSTEM_MULTIARCH_TYPE} ...
...catches the gnu/stub-32.h issue.

-B/usr/lib/${HOST_SYSTEM_MULTIARCH_TYPE} ...
...does NOT catch the problem with crt*.o files.

-B/lib/${HOST_SYSTEM_MULTIARCH_TYPE}
-B/usr/lib/${HOST_SYSTEM_MULTIARCH_TYPE} ...
... NOPE, too.

- Sedat -
 
Old 10-11-2011, 03:41 PM
Sedat Dilek
 
Default i386: Compiling gcc-snapshots from upstream with multiarch-toolchain?

[ RESEND ]

I played again with CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET by exporting them.

-I/usr/include/${HOST_SYSTEM_MULTIARCH_TYPE} ...
...catches the gnu/stub-32.h issue.

-B/usr/lib/${HOST_SYSTEM_MULTIARCH_TYPE} ...
...does NOT catch the problem with crt*.o files.

-B/lib/${HOST_SYSTEM_MULTIARCH_TYPE}
-B/usr/lib/${HOST_SYSTEM_MULTIARCH_TYPE} ...
... NOPE, too.

- Sedat -
 
Old 10-11-2011, 09:13 PM
Sedat Dilek
 
Default i386: Compiling gcc-snapshots from upstream with multiarch-toolchain?

On Tue, Oct 11, 2011 at 9:53 PM, Jonathan Nieder <jrnieder@gmail.com> wrote:
> reassign 644986 general
> severity 644986 critical
> merge 637232 644986
> quit
>
> Sedat Dilek wrote:
>
>> I played again with CFLAGS_FOR_TARGET and CXXFLAGS_FOR_TARGET by exporting them.
> [...]
>> -B/usr/lib/${HOST_SYSTEM_MULTIARCH_TYPE} ...
>> ...does NOT catch the problem with crt*.o files.
>
> Last time we went through this, didn't we discover that one has to set
>
> *FLAGS_FOR_TARGET (instead of CFLAGS_FOR_TARGET or CXXFLAGS_FOR_TARGET)
>
> and
>
> *on the "make" command line (instead of through the environment or as
> *a ./configure argument)
>
> ? *Yes, I know it is clunky.
>
> Reassigning to "general" because the underlying problem (Debian as a
> whole is moving to multiarch paths, and we don't provide enough help
> with building upstream toolchains that don't know about that) is not
> at all specific to libc6-dev. *Progress in the form of code or
> documentation, in Debian or upstream, would be welcome as always.
>
> Cheers,
> Jonathan
>

I re-reflected on experiences from #637218 and #629819.

Attached is v7 of my build-script.

I had success with:

HOST_SYSTEM_MULTIARCH_TYPE=$(dpkg-architecture -qDEB_HOST_MULTIARCH)

MULTIARCH_FLAGS="-B/usr/lib/${HOST_SYSTEM_MULTIARCH_TYPE}
-I/usr/include/${HOST_SYSTEM_MULTIARCH_TYPE}"

export CFLAGS="-g -O2"
export CXXFLAGS="${CFLAGS}"
export CFLAGS_FOR_TARGET="${CFLAGS} ${MULTIARCH_FLAGS}"
export CXXFLAGS_FOR_TARGET="${CXXFLAGS} ${MULTIARCH_FLAGS}"

...and...

make FLAGS_FOR_TARGET="${FLAGS_FOR_TARGET} ${MULTIARCH_FLAGS}"
-j${MAKE_JOBS} 2>&1 | tee ${BUILD_LOG_FILE}

...and...

# cat /usr/bin/gcc-4.7
#!/bin/sh

exec /opt/gcc-4.7/bin/gcc-4.7 -B/usr/lib/i386-linux-gnu
-I/usr/include/i386-linux-gnu "$@"

...and...

# cat /usr/bin/g++-4.7
#!/bin/sh

exec /opt/gcc-4.7/bin/g++-4.7 -B/usr/lib/i386-linux-gnu
-I/usr/include/i386-linux-gnu "$@"

Building mesa-from-git was fine.

- Sedat -

P.S.: build-script (v7) and make-log (v7) attached

$ egrep 'CFLAGS|CXXFLAGS|FLAGS_FOR_TARGET' gcc-build/config.log
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-g -O2'
ac_cv_env_CXXFLAGS_set=set
ac_cv_env_CXXFLAGS_value='-g -O2'
CFLAGS='-g -O2'
CFLAGS_FOR_BUILD='-g -O2'
CFLAGS_FOR_TARGET='-g -O2 -B/usr/lib/i386-linux-gnu
-I/usr/include/i386-linux-gnu'
CXXFLAGS='-g -O2'
CXXFLAGS_FOR_BUILD='-g -O2'
CXXFLAGS_FOR_TARGET='-g -O2 -B/usr/lib/i386-linux-gnu
-I/usr/include/i386-linux-gnu'
DEBUG_PREFIX_CFLAGS_FOR_TARGET='
FLAGS_FOR_TARGET=' -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/
-isystem $(build_tooldir)/include -isystem
$(build_tooldir)/sys-include'
LDFLAGS_FOR_TARGET='
SYSROOT_CFLAGS_FOR_TARGET='
 

Thread Tools




All times are GMT. The time now is 04:03 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org