From: Stefan Ring <stefanrin@gmail.com>
To: gcc-help <gcc-help@gcc.gnu.org>
Subject: Re: Gcc build fails with test_real_width is negative
Date: Thu, 2 Dec 2021 22:22:49 +0100 [thread overview]
Message-ID: <CAAxjCEzdH=ABoRkWzcQQ3qgSs8HEBCA6DkVQd5-DEccCpYoKqQ@mail.gmail.com> (raw)
In-Reply-To: <CAAxjCExg+RZb85M6T3tz9-UmCQZCh0i1Wqe4njiQG4Jrk02LUg@mail.gmail.com>
On Thu, Dec 2, 2021 at 10:20 AM Stefan Ring <stefanrin@gmail.com> wrote:
>
> On Mon, Nov 29, 2021 at 8:40 PM Mr Dini via Gcc-help
> <gcc-help@gcc.gnu.org> wrote:
> >
> > I am sure this is not a common practice, but since I couldn't get gcc to compile and I am out of ideas as to why libgcc is not picking up the environment variables, I decided to share the chroot I am trying to build from.
> >
> > The file can be found here: https://mega.nz/file/qqBB2QKZ#mQVV3Vqyre6MYtdGJlx2rNq7el8Aiimr6uv4aTZR97g
> >
> > When I chroot I firstly run the command to populate the environment variables:
> >
> > . /opt/webos-sdk-x86_64/1.0.g/environment-setup-armv7a-neon-webos-linux-gnueabi
> >
> > Then execute the following commands to start the build process:
> >
> > cd /root/gcc-build
> >
> > CC="arm-webos-linux-gnueabi-gcc -march=armv7-a -mfpu=neon -mfloat-abi=softfp --sysroot=/opt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-webos-linux-gnueabi" CXX="arm-webos-linux-gnueabi-g++ -march=armv7-a -mfpu=neon -mfloat-abi=softfp --sysroot=/opt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-webos-linux-gnueabi" ../gcc-6.2.0/configure --prefix=/opt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-webos-linux-gnueabi --with-mpfr=/opt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-webos-linux-gnueabi --host=armv7a-linux-gnueabi --target=armv7a-linux-gnueabi --build=x86_64-linux-gnu
> >
> > make -j8
> >
> > Right now, the folder contains a state where it fails with stdio.h no such file or directory. If you skip the configure part and run make -j8 directly after setting the env vars, you can see what's going on.
> >
> > I appreciate any feedback!
> >
> > Thanks
Running the toolchain gcc with -v reveals that it was configured with
--with-sysroot=/not/exist. ;)
So I got a little creative and used:
mkdir /not
ln -s /opt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-webos-linux-gnueabi
/not/exist
Then I set:
export PATH=/opt/webos-sdk-x86_64/1.0.g/sysroots/x86_64-webossdk-linux/usr/bin/arm-webos-linux-gnueabi:$PATH
and only this. Forget about all the crap in
/opt/webos-sdk-x86_64/1.0.g/environment-setup-armv7a-neon-webos-linux-gnueabi!
Then
/root/gcc-6.2.0/configure
--prefix=/opt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-webos-linux-gnueabi
--build= --host=arm-webos-linux-gnueabi
--target=arm-webos-linux-gnueabi --with-sysroot=/
--with-build-sysroot=/opt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-webos-linux-gnueabi
--with-float=softfp --with-fpu=neon --with-arch=armv7-a
--enable-languages=c,c++ --disable-multilib
--with-mpfr=/opt/webos-sdk-x86_64/1.0.g/sysroots/armv7a-neon-webos-linux-gnueabi
make -j8
gives me a working build. At least a build running to completion. If
it actually works I cannot tell because I do not own the target. The
--with-build-sysroot is not strictly necessary because of the
/not/exist trick, but I consider it good taste. I’m also not sure
about the --with-sysroot=/. It may or may not help or hurt. Also, your
--prefix is probably not the best idea. Just use something short like
/usr/gcc6 or similar, and install with make install
DESTDIR=<somewhere>.
next prev parent reply other threads:[~2021-12-02 21:23 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-29 11:05 Mr Dini
2021-11-29 12:00 ` Stefan Ring
2021-11-29 12:12 ` Mr Dini
2021-11-29 12:18 ` AW: " Stefan Franke
2021-11-29 19:40 ` Mr Dini
2021-12-02 9:20 ` Stefan Ring
2021-12-02 21:22 ` Stefan Ring [this message]
-- strict thread matches above, loose matches on Subject: below --
2021-11-28 19:16 Mr Dini
2021-11-29 10:10 ` Stefan Ring
2021-11-29 14:01 ` Jonathan Wakely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAAxjCEzdH=ABoRkWzcQQ3qgSs8HEBCA6DkVQd5-DEccCpYoKqQ@mail.gmail.com' \
--to=stefanrin@gmail.com \
--cc=gcc-help@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).