LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Can't build GCC 9.1.0 (https://www.linuxquestions.org/questions/linux-software-2/cant-build-gcc-9-1-0-a-4175657950/)

franss62 07-24-2019 04:40 AM

Can't build GCC 9.1.0
 
Hi,
I would like to cross-build GCC on a 64-bit environment to an i586 host, it configures without issue, here is the command I type :
CC='gcc -m32' CFLAGS='-march=i586' ./configure --host=i586-pc-linux-gnu --build=i586-pc-linux-gnu --prefix=/home/repo/usr --with-mpc=/home/repo/usr --with-mpfr=/home/repo/usr --with-gmp=/home/repo/usr
But when I try to build, here is the result :
g++ -std=gnu++98 -c -g -DIN_GCC -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common -DHAVE_CONFIG_H -DGENERATOR_FILE -fno-PIE -I. -Ibuild -I../.././gcc -I../.././gcc/build -I../.././gcc/../include -I../.././gcc/../libcpp/include \
-o build/genmodes.o ../.././gcc/genmodes.c
Dans le fichier inclus depuis ./bconfig.h:3,
depuis ../.././gcc/genmodes.c:20:
./auto-host.h:2379:16: erreur: la déclaration ne déclare rien du tout [-fpermissive]
2379 | #define rlim_t long
| ^~~~
Dans le fichier inclus depuis ../.././gcc/genmodes.c:21:
../.././gcc/system.h:488:14: erreur: déclaration conflictuelle de la fonction C «*void* sbrk(int)*»
488 | extern void *sbrk (int);
| ^~~~
Dans le fichier inclus depuis ../.././gcc/system.h:294,
depuis ../.././gcc/genmodes.c:21:
/usr/include/unistd.h:1041:14: note: déclaration précédente de «*void* sbrk(intptr_t)*»
1041 | extern void *sbrk (intptr_t __delta) __THROW;
| ^~~~
Dans le fichier inclus depuis ../.././gcc/genmodes.c:21:
../.././gcc/system.h:496:14: erreur: rend ambigüe la nouvelle déclaration de «*char* strstr(const char*, const char*)*»
496 | extern char *strstr (const char *, const char *);
| ^~~~~~
Dans le fichier inclus depuis /usr/include/c++/9.1.0/cstring:42,
depuis ../.././gcc/system.h:235,
depuis ../.././gcc/genmodes.c:21:
/usr/include/string.h:311:20: note: ancienne déclaration «*const char* strstr(const char*, const char*)*»
311 | extern const char *strstr (const char *__haystack, const char *__needle)
| ^~~~~~
Dans le fichier inclus depuis ../.././gcc/genmodes.c:21:
../.././gcc/system.h:540:20: erreur: déclaration conflictuelle de la fonction C «*const char* strsignal(int)*»
540 | extern const char *strsignal (int);
| ^~~~~~~~~
Dans le fichier inclus depuis /usr/include/c++/9.1.0/cstring:42,
depuis ../.././gcc/system.h:235,
depuis ../.././gcc/genmodes.c:21:
/usr/include/string.h:446:14: note: déclaration précédente de «*char* strsignal(int)*»
446 | extern char *strsignal (int __sig) __THROW;
| ^~~~~~~~~
Dans le fichier inclus depuis ../.././gcc/system.h:691,
depuis ../.././gcc/genmodes.c:21:
../.././gcc/../include/libiberty.h:112:14: erreur: rend ambigüe la nouvelle déclaration de «*char* basename(const char*)*»
112 | extern char *basename (const char *) ATTRIBUTE_RETURNS_NONNULL ATTRIBUTE_NONNULL(1);
| ^~~~~~~~
Dans le fichier inclus depuis /usr/include/c++/9.1.0/cstring:42,
depuis ../.././gcc/system.h:235,
depuis ../.././gcc/genmodes.c:21:
/usr/include/string.h:483:26: note: ancienne déclaration «*const char* basename(const char*)*»
483 | extern "C++" const char *basename (const char *__filename)
| ^~~~~~~~
make[3]: *** [Makefile:2665: build/genmodes.o] Error 1
make[3]*: on quitte le répertoire «*/home/repo/pkg_dev/gcc-9.1.0/host-i586-pc-linux-gnu/gcc*»
make[2]: *** [Makefile:4667: all-stage1-gcc] Error 2
make[2]*: on quitte le répertoire «*/home/repo/pkg_dev/gcc-9.1.0*»
make[1]: *** [Makefile:24054: stage1-bubble] Error 2
make[1]*: on quitte le répertoire «*/home/repo/pkg_dev/gcc-9.1.0*»
make: *** [Makefile:994: all] Error 2

Any idea ?

NB : "déclaration conflictuelle" means in French "conflicting declaration" and "ne déclare rien du tout" means "declares nothing"

rtmistler 07-24-2019 07:22 AM

From those amounts of errors, it would seem that the ./configure command did not succeed. Are you sure the configure completed without error? A lot of times the configure completes, but the last line or two does indicate that it stopped because it encountered a missing prerequisite or some other issue. The difference is that errors don't jump out at you with a ton of obvious looking ones like you're seeing with your compile.

The secondary/obvious questions is: Any reason why you feel you need to build it? In other words, you cannot install it? And it may be helpful to know the environment OS you're building on, as well as the environment OS you're building for.

The more detailed things would be:
  • Inspect the README and if they have a BUILD or INSTALL file at the top level and determine if there are any special considerations you need to worry about.
  • Given that you're building, the compiler, but this means you need to use, a compiler, just a former/different version, there may be stated considerations that you cannot just build version 9.10 using version 1.0. I know you're obviously not doing that, but it's something to at least verify. I actually do not feel it is this category of problem because those errors are instead problems with references which it cannot find.

franss62 07-24-2019 09:10 AM

Hi rmistler,

Thanks for this fast reply,
I'll check the config.log file asap and post it here,

To answer your questions, I want to compile it to make it work on a quite old PC with this hardware configuration :
- CPU AMD-K6-II 400MHz
- 224 MB RAM
- GPU 3DFx Voodoo III
- HDD SCSi 10 GB
Because there is not anymore any distro compatible with CPUs without cmov (The so-called Debian i386 is in reality i686 and needs CMOV to work) except Slackware theoretically, but the kernel panics before I can have a shell, I'm trying to develop a distro from scratch to resurrect this vintage PC, as you can guess, building directly on the PC would take one year
I'm building on a PC running Artix Linux, a fork of Arch Linux without Systemd, with GCC 9.1.0, I have installed the multilib-devel packages mandatory to cross-build, I have already built successfully GMP, MPFR, MPC, and GLibc

I have already checked if there was anything interesting in the README and INSTALL files, checked on the GNU website, but I didn't find a lot about cross-building...

franss62 07-24-2019 04:37 PM

Here is the config.log file :
Code:

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by configure, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  $ ./configure --build=x86_64-pc-linux-gnu --host=i586-pc-linux-gnu --with-gmp=/home/repo/usr --with-mpfr=/home/repo/usr --with-mpc=/home/repo/usr --with-libiberty=/home/repo/usr

## --------- ##
## Platform. ##
## --------- ##

hostname = g41m-p26.home
uname -m = x86_64
uname -r = 5.1.16-artix1-1-ARTIX
uname -s = Linux
uname -v = #1 SMP PREEMPT Thu Jul 4 14:09:20 UTC 2019

/usr/bin/uname -p = unknown
/bin/uname -X    = unknown

/bin/arch              = unknown
/usr/bin/arch -k      = unknown
/usr/convex/getsysinfo = unknown
/usr/bin/hostinfo      = unknown
/bin/machine          = unknown
/usr/bin/oslevel      = unknown
/bin/universe          = unknown

PATH: /usr/local/sbin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /home/fran/.local/share/flatpak/exports/bin
PATH: /usr/lib/jvm/default/bin
PATH: /usr/bin/site_perl
PATH: /usr/bin/vendor_perl
PATH: /usr/bin/core_perl


## ----------- ##
## Core tests. ##
## ----------- ##

configure:2348: checking build system type
configure:2362: result: x86_64-pc-linux-gnu
configure:2409: checking host system type
configure:2422: result: i586-pc-linux-gnu
configure:2442: checking target system type
configure:2455: result: i586-pc-linux-gnu
configure:2509: checking for a BSD-compatible install
configure:2577: result: /usr/bin/install -c
configure:2588: checking whether ln works
configure:2610: result: yes
configure:2614: checking whether ln -s works
configure:2618: result: yes
configure:2625: checking for a sed that does not truncate output
configure:2689: result: /usr/bin/sed
configure:2698: checking for gawk
configure:2714: found /usr/bin/gawk
configure:2725: result: gawk
configure:3219: checking for libatomic support
configure:3229: result: yes
configure:3257: checking for libitm support
configure:3267: result: yes
configure:3276: checking for libsanitizer support
configure:3286: result: yes
configure:3295: checking for libvtv support
configure:3305: result: yes
configure:3315: checking for libhsail-rt support
configure:3327: result: yes
configure:3406: checking for libphobos support
configure:3416: result: yes
configure:4036: checking for i586-pc-linux-gnu-gcc
configure:4063: result: gcc -m32
configure:4332: checking for C compiler version
configure:4341: gcc -m32 --version >&5
gcc (GCC) 9.1.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:4352: $? = 0
configure:4341: gcc -m32 -v >&5
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp --enable-cet=auto
Thread model: posix
gcc version 9.1.0 (GCC)
configure:4352: $? = 0
configure:4341: gcc -m32 -V >&5
gcc: error: unrecognized command line option '-V'
gcc: fatal error: no input files
compilation terminated.
configure:4352: $? = 1
configure:4341: gcc -m32 -qversion >&5
gcc: error: unrecognized command line option '-qversion'; did you mean '--version'?
gcc: fatal error: no input files
compilation terminated.
configure:4352: $? = 1
configure:4372: checking whether the C compiler works
configure:4394: gcc -m32 -I/home/repo/usr/include -L/home/repo/usr/lib  -m32 conftest.c  >&5
/usr/bin/ld: warning: /home/repo/usr/lib/ld-linux.so.2: corrupt GNU_PROPERTY_TYPE (5) size: 0
/usr/bin/ld: warning: /home/repo/usr/lib/ld-linux.so.2: corrupt GNU_PROPERTY_TYPE (5) size: 0
configure:4398: $? = 0
configure:4446: result: yes
configure:4449: checking for C compiler default output file name
configure:4451: result: a.out
configure:4457: checking for suffix of executables
configure:4464: gcc -m32 -o conftest -I/home/repo/usr/include -L/home/repo/usr/lib  -m32 conftest.c  >&5
/usr/bin/ld: warning: /home/repo/usr/lib/ld-linux.so.2: corrupt GNU_PROPERTY_TYPE (5) size: 0
/usr/bin/ld: warning: /home/repo/usr/lib/ld-linux.so.2: corrupt GNU_PROPERTY_TYPE (5) size: 0
configure:4468: $? = 0
configure:4490: result:
configure:4512: checking whether we are cross compiling
configure:4550: result: yes
configure:4555: checking for suffix of object files
configure:4577: gcc -m32 -c -I/home/repo/usr/include -L/home/repo/usr/lib  conftest.c >&5
configure:4581: $? = 0
configure:4602: result: o
configure:4606: checking whether we are using the GNU C compiler
configure:4625: gcc -m32 -c -I/home/repo/usr/include -L/home/repo/usr/lib  conftest.c >&5
configure:4625: $? = 0
configure:4634: result: yes
configure:4643: checking whether gcc -m32 accepts -g
configure:4663: gcc -m32 -c -g  conftest.c >&5
configure:4663: $? = 0
configure:4704: result: yes
configure:4721: checking for gcc -m32 option to accept ISO C89
configure:4784: gcc -m32  -c -I/home/repo/usr/include -L/home/repo/usr/lib  conftest.c >&5
configure:4784: $? = 0
configure:4797: result: none needed
configure:4831: checking for i586-pc-linux-gnu-g++
configure:4861: result: no
configure:4831: checking for i586-pc-linux-gnu-c++
configure:4861: result: no
configure:4831: checking for i586-pc-linux-gnu-gpp
configure:4861: result: no
configure:4831: checking for i586-pc-linux-gnu-aCC
configure:4861: result: no
configure:4831: checking for i586-pc-linux-gnu-CC
configure:4861: result: no
configure:4831: checking for i586-pc-linux-gnu-cxx
configure:4861: result: no
configure:4831: checking for i586-pc-linux-gnu-cc++
configure:4861: result: no
configure:4831: checking for i586-pc-linux-gnu-cl.exe
configure:4861: result: no
configure:4831: checking for i586-pc-linux-gnu-FCC
configure:4861: result: no
configure:4831: checking for i586-pc-linux-gnu-KCC
configure:4861: result: no
configure:4831: checking for i586-pc-linux-gnu-RCC
configure:4861: result: no
configure:4831: checking for i586-pc-linux-gnu-xlC_r
configure:4861: result: no
configure:4831: checking for i586-pc-linux-gnu-xlC
configure:4861: result: no
configure:4875: checking for g++
configure:4891: found /usr/bin/g++
configure:4902: result: g++
configure:4918: WARNING: using cross tools not prefixed with host triplet
configure:4929: checking for C++ compiler version
configure:4938: g++ --version >&5
g++ (GCC) 9.1.0
Copyright (C) 2019 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:4949: $? = 0
configure:4938: g++ -v >&5
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-pc-linux-gnu/9.1.0/lto-wrapper
Target: x86_64-pc-linux-gnu
Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://bugs.archlinux.org/ --enable-languages=c,c++,ada,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --enable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp --enable-cet=auto
Thread model: posix
gcc version 9.1.0 (GCC)
configure:4949: $? = 0
configure:4938: g++ -V >&5
g++: error: unrecognized command line option '-V'
g++: fatal error: no input files
compilation terminated.
configure:4949: $? = 1
configure:4938: g++ -qversion >&5
g++: error: unrecognized command line option '-qversion'; did you mean '--version'?
g++: fatal error: no input files
compilation terminated.
configure:4949: $? = 1
configure:4953: checking whether we are using the GNU C++ compiler
configure:4972: g++ -c  conftest.cpp >&5
configure:4972: $? = 0
configure:4981: result: yes
configure:4990: checking whether g++ accepts -g
configure:5010: g++ -c -g  conftest.cpp >&5
configure:5010: $? = 0
configure:5051: result: yes
configure:5100: checking whether g++ accepts -static-libstdc++ -static-libgcc
configure:5117: g++ -o conftest -g -O2  -m32 -static-libstdc++ -static-libgcc conftest.cpp  >&5
configure:5117: $? = 0
configure:5118: result: yes
configure:5142: checking for i586-pc-linux-gnu-gnatbind
configure:5172: result: no
configure:5182: checking for gnatbind
configure:5212: result: no
configure:5234: checking for i586-pc-linux-gnu-gnatmake
configure:5264: result: no
configure:5274: checking for gnatmake
configure:5304: result: no
configure:5323: checking whether compiler driver understands Ada
configure:5346: result: no
configure:5355: checking how to compare bootstrapped objects
configure:5380: result: cmp --ignore-initial=16 $$f1 $$f2
configure:5440: checking for objdir
configure:5455: result: .libs
configure:5626: checking for the correct version of gmp.h
configure:5646: gcc -m32 -c -I/home/repo/usr/include -L/home/repo/usr/lib -I/home/repo/usr/include -I/home/repo/usr/include -I/home/repo/usr/include  conftest.c >&5
configure:5646: $? = 0
configure:5664: gcc -m32 -c -I/home/repo/usr/include -L/home/repo/usr/lib -I/home/repo/usr/include -I/home/repo/usr/include -I/home/repo/usr/include  conftest.c >&5
configure:5664: $? = 0
configure:5665: result: yes
configure:5681: checking for the correct version of mpfr.h
configure:5699: gcc -m32 -c -I/home/repo/usr/include -L/home/repo/usr/lib -I/home/repo/usr/include -I/home/repo/usr/include -I/home/repo/usr/include  conftest.c >&5
configure:5699: $? = 0
configure:5716: gcc -m32 -c -I/home/repo/usr/include -L/home/repo/usr/lib -I/home/repo/usr/include -I/home/repo/usr/include -I/home/repo/usr/include  conftest.c >&5
configure:5716: $? = 0
configure:5717: result: yes
configure:5734: checking for the correct version of mpc.h
configure:5751: gcc -m32 -c -I/home/repo/usr/include -L/home/repo/usr/lib -I/home/repo/usr/include -I/home/repo/usr/include -I/home/repo/usr/include  conftest.c >&5
configure:5751: $? = 0
configure:5767: gcc -m32 -c -I/home/repo/usr/include -L/home/repo/usr/lib -I/home/repo/usr/include -I/home/repo/usr/include -I/home/repo/usr/include  conftest.c >&5
configure:5767: $? = 0
configure:5768: result: yes
configure:5786: checking for the correct version of the gmp/mpfr/mpc libraries
configure:5817: gcc -m32 -o conftest -I/home/repo/usr/include -L/home/repo/usr/lib -I/home/repo/usr/include -I/home/repo/usr/include -I/home/repo/usr/include  -m32 conftest.c  -L/home/repo/usr/lib -L/home/repo/usr/lib -L/home/repo/usr/lib -lmpc -lmpfr -lgmp >&5
/usr/bin/ld: warning: /home/repo/usr/lib/ld-linux.so.2: corrupt GNU_PROPERTY_TYPE (5) size: 0
/usr/bin/ld: warning: /home/repo/usr/lib/ld-linux.so.2: corrupt GNU_PROPERTY_TYPE (5) size: 0
configure:5817: $? = 0
configure:5818: result: yes
configure:6003: checking for isl 0.15 or later
configure:6016: gcc -m32 -o conftest -I/home/repo/usr/include -L/home/repo/usr/lib  -I/home/repo/usr/include -I/home/repo/usr/include -I/home/repo/usr/include  -m32  -lisl -L/home/repo/usr/lib -L/home/repo/usr/lib -L/home/repo/usr/lib -lmpc -lmpfr -lgmp conftest.c  -lisl -lgmp >&5
/usr/bin/ld: warning: /home/repo/usr/lib/ld-linux.so.2: corrupt GNU_PROPERTY_TYPE (5) size: 0
/usr/bin/ld: warning: /home/repo/usr/lib/ld-linux.so.2: corrupt GNU_PROPERTY_TYPE (5) size: 0
configure:6016: $? = 0
configure:6023: result: yes
configure:7120: checking for default BUILD_CONFIG
configure:7152: result:
configure:7157: checking for --enable-vtable-verify
configure:7170: result: no
configure:7771: checking for bison
configure:7787: found /usr/bin/bison
configure:7798: result: bison -y
configure:7818: checking for bison
configure:7834: found /usr/bin/bison
configure:7845: result: bison
configure:7865: checking for gm4
configure:7895: result: no
configure:7865: checking for gnum4
configure:7895: result: no
configure:7865: checking for m4
configure:7881: found /usr/bin/m4
configure:7892: result: m4
configure:7912: checking for flex
configure:7928: found /usr/bin/flex
configure:7939: result: flex
configure:7960: checking for flex
configure:7976: found /usr/bin/flex
configure:7987: result: flex
configure:8007: checking for makeinfo
configure:8023: found /usr/bin/makeinfo
configure:8034: result: makeinfo
configure:8068: checking for expect
configure:8098: result: no
configure:8117: checking for runtest
configure:8147: result: no
configure:8223: checking for i586-pc-linux-gnu-ar
configure:8253: result: no
configure:8364: checking for i586-pc-linux-gnu-as
configure:8394: result: no
configure:8505: checking for i586-pc-linux-gnu-dlltool
configure:8535: result: no
configure:8646: checking for i586-pc-linux-gnu-ld
configure:8676: result: no
configure:8787: checking for i586-pc-linux-gnu-lipo
configure:8817: result: no
configure:8928: checking for i586-pc-linux-gnu-nm
configure:8958: result: no
configure:9069: checking for i586-pc-linux-gnu-ranlib
configure:9099: result: no
configure:9205: checking for i586-pc-linux-gnu-strip
configure:9235: result: no
configure:9341: checking for i586-pc-linux-gnu-windres
configure:9371: result: no
configure:9482: checking for i586-pc-linux-gnu-windmc
configure:9512: result: no
configure:9623: checking for i586-pc-linux-gnu-objcopy
configure:9653: result: no
configure:9764: checking for i586-pc-linux-gnu-objdump
configure:9794: result: no
configure:9905: checking for i586-pc-linux-gnu-otool
configure:9935: result: no
configure:10046: checking for i586-pc-linux-gnu-readelf
configure:10076: result: no
configure:14354: checking where to find the target ar
configure:14364: result: pre-installed
configure:14396: checking where to find the target as
configure:14406: result: pre-installed
configure:14438: checking where to find the target cc
configure:14448: result: pre-installed
configure:14480: checking where to find the target c++
configure:14490: result: pre-installed
configure:14525: checking where to find the target c++ for libstdc++
configure:14535: result: pre-installed
configure:14570: checking where to find the target dlltool
configure:14580: result: pre-installed
configure:14612: checking where to find the target gcc
configure:14622: result: pre-installed
configure:14654: checking where to find the target gfortran
configure:14664: result: pre-installed
configure:14699: checking where to find the target gccgo
configure:14709: result: pre-installed
configure:14744: checking where to find the target gdc
configure:14754: result: pre-installed
configure:14789: checking where to find the target ld
configure:14799: result: pre-installed
configure:14831: checking where to find the target lipo
configure:14841: result: pre-installed
configure:14862: checking where to find the target nm
configure:14872: result: pre-installed
configure:14904: checking where to find the target objcopy
configure:14914: result: pre-installed
configure:14946: checking where to find the target objdump
configure:14956: result: pre-installed
configure:14988: checking where to find the target otool
configure:14998: result: pre-installed
configure:15019: checking where to find the target ranlib
configure:15029: result: pre-installed
configure:15061: checking where to find the target readelf
configure:15071: result: pre-installed
configure:15103: checking where to find the target strip
configure:15113: result: pre-installed
configure:15145: checking where to find the target windres
configure:15155: result: pre-installed
configure:15187: checking where to find the target windmc
configure:15197: result: pre-installed
configure:15257: checking whether to enable maintainer-specific portions of Makefiles
configure:15266: result: no
configure:15501: creating ./config.status

## ---------------------- ##
## Running config.status. ##
## ---------------------- ##

This file was extended by config.status, which was
generated by GNU Autoconf 2.69.  Invocation command line was

  CONFIG_FILES    =
  CONFIG_HEADERS  =
  CONFIG_LINKS    =
  CONFIG_COMMANDS =
  $ ./config.status

on g41m-p26.home

config.status:1053: creating Makefile

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=x86_64-pc-linux-gnu
ac_cv_c_compiler_gnu=yes
ac_cv_cxx_compiler_gnu=yes
ac_cv_env_AR_FOR_TARGET_set=
ac_cv_env_AR_FOR_TARGET_value=
ac_cv_env_AR_set=
ac_cv_env_AR_value=
ac_cv_env_AS_FOR_TARGET_set=
ac_cv_env_AS_FOR_TARGET_value=
ac_cv_env_AS_set=
ac_cv_env_AS_value=
ac_cv_env_CCC_set=
ac_cv_env_CCC_value=
ac_cv_env_CC_FOR_TARGET_set=
ac_cv_env_CC_FOR_TARGET_value=
ac_cv_env_CC_set=set
ac_cv_env_CC_value='gcc -m32'
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-I/home/repo/usr/include -L/home/repo/usr/lib'
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CXXFLAGS_set=
ac_cv_env_CXXFLAGS_value=
ac_cv_env_CXX_FOR_TARGET_set=
ac_cv_env_CXX_FOR_TARGET_value=
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_DLLTOOL_FOR_TARGET_set=
ac_cv_env_DLLTOOL_FOR_TARGET_value=
ac_cv_env_DLLTOOL_set=
ac_cv_env_DLLTOOL_value=
ac_cv_env_GCC_FOR_TARGET_set=
ac_cv_env_GCC_FOR_TARGET_value=
ac_cv_env_GDC_FOR_TARGET_set=
ac_cv_env_GDC_FOR_TARGET_value=
ac_cv_env_GFORTRAN_FOR_TARGET_set=
ac_cv_env_GFORTRAN_FOR_TARGET_value=
ac_cv_env_GOC_FOR_TARGET_set=
ac_cv_env_GOC_FOR_TARGET_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value=-m32
ac_cv_env_LD_FOR_TARGET_set=
ac_cv_env_LD_FOR_TARGET_value=
ac_cv_env_LD_set=
ac_cv_env_LD_value=
ac_cv_env_LIBS_set=
ac_cv_env_LIBS_value=
ac_cv_env_LIPO_FOR_TARGET_set=
ac_cv_env_LIPO_FOR_TARGET_value=
ac_cv_env_LIPO_set=
ac_cv_env_LIPO_value=
ac_cv_env_NM_FOR_TARGET_set=
ac_cv_env_NM_FOR_TARGET_value=
ac_cv_env_NM_set=
ac_cv_env_NM_value=
ac_cv_env_OBJCOPY_FOR_TARGET_set=
ac_cv_env_OBJCOPY_FOR_TARGET_value=
ac_cv_env_OBJCOPY_set=
ac_cv_env_OBJCOPY_value=
ac_cv_env_OBJDUMP_FOR_TARGET_set=
ac_cv_env_OBJDUMP_FOR_TARGET_value=
ac_cv_env_OBJDUMP_set=
ac_cv_env_OBJDUMP_value=
ac_cv_env_OTOOL_FOR_TARGET_set=
ac_cv_env_OTOOL_FOR_TARGET_value=
ac_cv_env_OTOOL_set=
ac_cv_env_OTOOL_value=
ac_cv_env_RANLIB_FOR_TARGET_set=
ac_cv_env_RANLIB_FOR_TARGET_value=
ac_cv_env_RANLIB_set=
ac_cv_env_RANLIB_value=
ac_cv_env_READELF_FOR_TARGET_set=
ac_cv_env_READELF_FOR_TARGET_value=
ac_cv_env_READELF_set=
ac_cv_env_READELF_value=
ac_cv_env_STRIP_FOR_TARGET_set=
ac_cv_env_STRIP_FOR_TARGET_value=
ac_cv_env_STRIP_set=
ac_cv_env_STRIP_value=
ac_cv_env_WINDMC_FOR_TARGET_set=
ac_cv_env_WINDMC_FOR_TARGET_value=
ac_cv_env_WINDMC_set=
ac_cv_env_WINDMC_value=
ac_cv_env_WINDRES_FOR_TARGET_set=
ac_cv_env_WINDRES_FOR_TARGET_value=
ac_cv_env_WINDRES_set=
ac_cv_env_WINDRES_value=
ac_cv_env_build_alias_set=set
ac_cv_env_build_alias_value=x86_64-pc-linux-gnu
ac_cv_env_build_configargs_set=
ac_cv_env_build_configargs_value=
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=i586-pc-linux-gnu
ac_cv_env_host_configargs_set=
ac_cv_env_host_configargs_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_env_target_configargs_set=
ac_cv_env_target_configargs_value=
ac_cv_host=i586-pc-linux-gnu
ac_cv_objext=o
ac_cv_path_SED=/usr/bin/sed
ac_cv_path_install='/usr/bin/install -c'
ac_cv_prog_AWK=gawk
ac_cv_prog_BISON=bison
ac_cv_prog_CC='gcc -m32'
ac_cv_prog_FLEX=flex
ac_cv_prog_LEX=flex
ac_cv_prog_M4=m4
ac_cv_prog_MAKEINFO=makeinfo
ac_cv_prog_YACC='bison -y'
ac_cv_prog_ac_ct_CXX=g++
ac_cv_prog_cc_c89=
ac_cv_prog_cc_g=yes
ac_cv_prog_cxx_g=yes
ac_cv_target=i586-pc-linux-gnu
acx_cv_cc_gcc_supports_ada=no
acx_cv_prog_LN=ln
gcc_cv_isl=yes
gcc_cv_prog_cmp_skip='cmp --ignore-initial=16 $$f1 $$f2'
gcc_cv_tool_dirs=
gcc_cv_tool_prefix=/usr/local
lt_cv_objdir=.libs

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR='i586-pc-linux-gnu-ar'
AR_FOR_BUILD='ar'
AR_FOR_TARGET='ar'
AS='i586-pc-linux-gnu-as'
AS_FOR_BUILD='as'
AS_FOR_TARGET='as'
AWK='gawk'
BISON='bison'
BUILD_CONFIG=''
CC='gcc -m32'
CC_FOR_BUILD='gcc'
CC_FOR_TARGET='cc'
CFLAGS='-I/home/repo/usr/include -L/home/repo/usr/lib'
CFLAGS_FOR_BUILD=''
CFLAGS_FOR_TARGET='-g -O2 -I/home/repo/usr/include -L/home/repo/usr/lib'
COMPILER_AS_FOR_TARGET='$(AS_FOR_TARGET)'
COMPILER_LD_FOR_TARGET='$(LD_FOR_TARGET)'
COMPILER_NM_FOR_TARGET='$(NM_FOR_TARGET)'
CONFIGURE_GDB_TK=''
CPPFLAGS=''
CXX='g++'
CXXFLAGS='-g -O2'
CXXFLAGS_FOR_BUILD=''
CXXFLAGS_FOR_TARGET='-g -O2'
CXX_FOR_BUILD='g++'
CXX_FOR_TARGET='c++'
DEBUG_PREFIX_CFLAGS_FOR_TARGET=''
DEFS='-DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\" -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE_URL=\"\" -DLT_OBJDIR=\".libs/\"'
DLLTOOL='i586-pc-linux-gnu-dlltool'
DLLTOOL_FOR_BUILD='dlltool'
DLLTOOL_FOR_TARGET='dlltool'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT=''
EXPECT='expect'
FLAGS_FOR_TARGET=''
FLEX='flex'
GCC_FOR_TARGET='cc'
GCC_SHLIB_SUBDIR=''
GDB_TK=''
GDC_FOR_BUILD='gdc'
GDC_FOR_TARGET='gdc'
GFORTRAN_FOR_BUILD='gfortran'
GFORTRAN_FOR_TARGET='gfortran'
GNATBIND='no'
GNATMAKE='no'
GOC_FOR_BUILD='gccgo'
GOC_FOR_TARGET='gccgo'
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_GDB_TK=''
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
LD='i586-pc-linux-gnu-ld'
LDFLAGS='-m32'
LDFLAGS_FOR_BUILD=''
LDFLAGS_FOR_TARGET=''
LD_FOR_BUILD='ld'
LD_FOR_TARGET='ld'
LEX='flex'
LIBOBJS=''
LIBS=''
LIPO='i586-pc-linux-gnu-lipo'
LIPO_FOR_TARGET='lipo'
LN='ln'
LN_S='ln -s'
LTLIBOBJS=''
M4='m4'
MAINT='#'
MAINTAINER_MODE_FALSE=''
MAINTAINER_MODE_TRUE='#'
MAKEINFO='makeinfo'
NM='i586-pc-linux-gnu-nm'
NM_FOR_BUILD='nm'
NM_FOR_TARGET='nm'
OBJCOPY='i586-pc-linux-gnu-objcopy'
OBJCOPY_FOR_TARGET='objcopy'
OBJDUMP='i586-pc-linux-gnu-objdump'
OBJDUMP_FOR_TARGET='objdump'
OBJEXT='o'
OTOOL='i586-pc-linux-gnu-otool'
OTOOL_FOR_TARGET='otool'
PACKAGE_BUGREPORT=''
PACKAGE_NAME=''
PACKAGE_STRING=''
PACKAGE_TARNAME=''
PACKAGE_URL=''
PACKAGE_VERSION=''
PATH_SEPARATOR=':'
RANLIB='true'
RANLIB_FOR_BUILD='ranlib'
RANLIB_FOR_TARGET='ranlib'
RAW_CXX_FOR_TARGET='c++'
READELF='i586-pc-linux-gnu-readelf'
READELF_FOR_TARGET='readelf'
RPATH_ENVVAR='LD_LIBRARY_PATH'
RUNTEST='runtest'
SED='/usr/bin/sed'
SHELL='/bin/sh'
STRIP='true'
STRIP_FOR_TARGET='strip'
SYSROOT_CFLAGS_FOR_TARGET=''
TOPLEVEL_CONFIGURE_ARGUMENTS='./configure --build=x86_64-pc-linux-gnu --host=i586-pc-linux-gnu --with-gmp=/home/repo/usr --with-mpfr=/home/repo/usr --with-mpc=/home/repo/usr --with-libiberty=/home/repo/usr'
WINDMC='i586-pc-linux-gnu-windmc'
WINDMC_FOR_BUILD='windmc'
WINDMC_FOR_TARGET='windmc'
WINDRES='i586-pc-linux-gnu-windres'
WINDRES_FOR_BUILD='windres'
WINDRES_FOR_TARGET='windres'
YACC='bison -y'
ac_ct_CC=''
ac_ct_CXX='g++'
bindir='${exec_prefix}/bin'
build='x86_64-pc-linux-gnu'
build_alias='x86_64-pc-linux-gnu'
build_configargs=' --cache-file=./config.cache '\''--with-gmp=/home/repo/usr'\'' '\''--with-mpfr=/home/repo/usr'\'' '\''--with-mpc=/home/repo/usr'\'' '\''--with-libiberty=/home/repo/usr'\'' '\''--enable-languages=c,c++,fortran,lto,objc'\'' --program-transform-name='\''s,y,y,'\'' --disable-option-checking'
build_configdirs=' libiberty libcpp fixincludes'
build_cpu='x86_64'
build_libsubdir='build-x86_64-pc-linux-gnu'
build_noncanonical='x86_64-pc-linux-gnu'
build_os='linux-gnu'
build_subdir='build-x86_64-pc-linux-gnu'
build_tooldir='${exec_prefix}/i586-pc-linux-gnu'
build_vendor='pc'
compare_exclusions='gcc/cc*-checksum$(objext) | gcc/ada/*tools/*'
configdirs=' intl libiberty zlib libbacktrace libcpp libdecnumber fixincludes gcc libcc1 lto-plugin'
datadir='${datarootdir}'
datarootdir='${prefix}/share'
do_compare='cmp --ignore-initial=16 $$f1 $$f2'
docdir='${datarootdir}/doc/${PACKAGE}'
dvidir='${docdir}'
exec_prefix='${prefix}'
extra_host_libiberty_configure_flags='--enable-shared'
extra_host_zlib_configure_flags=''
extra_isl_gmp_configure_flags=''
extra_liboffloadmic_configure_flags=''
extra_linker_plugin_configure_flags=''
extra_linker_plugin_flags=''
extra_mpc_gmp_configure_flags=''
extra_mpc_mpfr_configure_flags=''
extra_mpfr_configure_flags=''
get_gcc_base_ver='cat'
gmpinc='-I/home/repo/usr/include -I/home/repo/usr/include -I/home/repo/usr/include '
gmplibs='-L/home/repo/usr/lib -L/home/repo/usr/lib -L/home/repo/usr/lib -lmpc -lmpfr -lgmp'
host='i586-pc-linux-gnu'
host_alias='i586-pc-linux-gnu'
host_configargs=' --cache-file=./config.cache  '\''--with-gmp=/home/repo/usr'\'' '\''--with-mpfr=/home/repo/usr'\'' '\''--with-mpc=/home/repo/usr'\'' '\''--with-libiberty=/home/repo/usr'\'' '\''--enable-languages=c,c++,fortran,lto,objc'\'' --program-transform-name='\''s,y,y,'\'' --disable-option-checking'
host_cpu='i586'
host_noncanonical='i586-pc-linux-gnu'
host_os='linux-gnu'
host_shared='no'
host_subdir='host-i586-pc-linux-gnu'
host_vendor='pc'
htmldir='${docdir}'
includedir='${prefix}/include'
infodir='${datarootdir}/info'
islinc=''
isllibs=' -lisl'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localedir='${datarootdir}/locale'
localstatedir='${prefix}/var'
mandir='${datarootdir}/man'
oldincludedir='/usr/include'
pdfdir='${docdir}'
poststage1_ldflags='-static-libstdc++ -static-libgcc'
poststage1_libs=''
prefix='/usr/local'
program_transform_name='s,y,y,'
psdir='${docdir}'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
stage1_cflags='-g'
stage1_checking='--enable-checking=yes,types'
stage1_languages='c,c++,lto'
stage1_ldflags='-static-libstdc++ -static-libgcc'
stage1_libs=''
stage2_werror_flag=''
sysconfdir='${prefix}/etc'
target='i586-pc-linux-gnu'
target_alias=''
target_configargs='--cache-file=./config.cache --enable-multilib  '\''--with-gmp=/home/repo/usr'\'' '\''--with-mpfr=/home/repo/usr'\'' '\''--with-mpc=/home/repo/usr'\'' '\''--with-libiberty=/home/repo/usr'\'' '\''--enable-languages=c,c++,fortran,lto,objc'\'' --program-transform-name='\''s,y,y,'\'' --disable-option-checking'
target_configdirs=' libgcc libbacktrace libgomp libatomic libitm libstdc++-v3 libsanitizer libvtv libssp libquadmath libgfortran libobjc'
target_cpu='i586'
target_noncanonical='i586-pc-linux-gnu'
target_os='linux-gnu'
target_subdir='i586-pc-linux-gnu'
target_vendor='pc'
tooldir='${exec_prefix}/i586-pc-linux-gnu'

## ------------------- ##
## File substitutions. ##
## ------------------- ##

alphaieee_frag='/dev/null'
host_makefile_frag='/dev/null'
ospace_frag='/dev/null'
serialization_dependencies='serdep.tmp'
target_makefile_frag='./config/mt-gnu'

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define LT_OBJDIR ".libs/"

configure: exit 0

As you can see nothing went wrong, apparently the issue is bound to libiberty, but I don't understand why, because is a part of binutils as well, and when I cross-build binutils, it works fine, so I reconfigured and added --disable-libiberty --with-libiberty=/home/repo/usr, but now it complains for something else :
make[1]*: on entre dans le répertoire «*/home/repo/pkg_dev/gcc-9.1.0*»
make[2]*: on entre dans le répertoire «*/home/repo/pkg_dev/gcc-9.1.0/host-i586-pc-linux-gnu/fixincludes*»
make[2]: *** Aucune règle pour fabriquer la cible «*../libiberty/libiberty.a*», nécessaire pour «*full-stamp*». Arrêt. no rule to make the target "../libiberty/libiberty.a", necessary for "full-stamp", Stopping.
make[2]*: on quitte le répertoire «*/home/repo/pkg_dev/gcc-9.1.0/host-i586-pc-linux-gnu/fixincludes*»
make[1]: *** [Makefile:3620: all-fixincludes] Error 2
make[1]*: on quitte le répertoire «*/home/repo/pkg_dev/gcc-9.1.0*»
make: *** [Makefile:956: all] Error 2

I googled and found a fix with sed to modify libiberty/Makefile.in, but the problem persists...
Do you have any idea how I can solve it ?

rtmistler 07-24-2019 04:54 PM

The only thing I have here is to see if the configure has switches to disable the use of that library.

I did a lot of configuring for Qt at one point to get it right for a system and I spent a few days iterating with removing stuff from the config. Finally got it to compile, and then came the task of determining if I had cut it all back so very much that it would no longer work.

./configure --help should tell you all the switches available.

knudfl 07-26-2019 06:54 PM

GCC requires a build directory outside the source directory (gcc-9.1.0/.)
And some gcc components require a 32bit linker (/usr/bin/ld) in order to build i586.
... Easy to do with a 32bits OS.
Fedora 25 - i686 has a system compiler usable for gcc-9 : gcc-6.4.1
https://archives.fedoraproject.org/p...386-25-1.3.iso
Code:

# dnf install flex bison gcc-c++ libtool elfutils-devel elfutils-libelf-devel binutils-devel automake autoconf texinfo gnulib-devel
Code:

tar xvf gcc-9.1.0.tar.xz
cd gcc-9.1.0/
tar xvf mpfr-4.0.2.tar.xz
tar xvf gmp-6.1.2.tar.xz
tar xvf mpc-1.1.0.tar.gz
mv -v mpfr-4.0.2/ mpfr && mv -v gmp-6.1.2/ gmp && mv -v mpc-1.1.0/ mpc
cd ../
mkdir build-gcc910 && cd build-gcc910/

CC='gcc -m32' CFLAGS='-march=i586' ../gcc-9.1.0/configure --host=i586-pc-linux-gnu --build=i586-pc-linux-gnu --prefix=/usr/local/gcc910 --program-suffix=91 --enable-languages=c,c++ --disable-multilib --disable-libstdcxx-pch --enable-shared

make                // no errors
# make install

Result : ~/rpms/RPMS/i586/gcc91-c++-9.1.0-1.fc25.i586.rpm (55.6MB)
https://drive.google.com/file/d/1YIU...ew?usp=sharing
... Provides /usr/bin/{gcc91, g++91}

-

franss62 07-27-2019 06:26 PM

Hi guys,
I didn't progress a lot so far with GCC, but I successfully cross-built CLang and LLVM from a 64-bit environment to an i586 target,
Anyway, cross-building from 64 to 32 bits really seems to be a pain in the ass with Arch-like distros,
I tried to cross-build binutils as well, but the linker complains /usr/lib/libwhetever.so is incompatible, even though I declare /usr/lib32 as path for the libs,
I think I'm just gonna make a VM with Xen, build a 32-bit Kernel for it and install a Arch Linux, I hope I'm gonna be more lucky,
I'll keep you informed asap ;)

serafean 07-29-2019 09:06 AM

Quote:

Originally Posted by franss62 (Post 6019129)
Hi guys,
I didn't progress a lot so far with GCC, but I successfully cross-built CLang and LLVM from a 64-bit environment to an i586 target,
Anyway, cross-building from 64 to 32 bits really seems to be a pain in the ass with Arch-like distros,
I tried to cross-build binutils as well, but the linker complains /usr/lib/libwhetever.so is incompatible, even though I declare /usr/lib32 as path for the libs,
I think I'm just gonna make a VM with Xen, build a 32-bit Kernel for it and install a Arch Linux, I hope I'm gonna be more lucky,
I'll keep you informed asap ;)

Hi,

Archlinux 32bit was built for i686. And has been discontinued. Archlinux32 is still being built for i686
May I recommend you take a look at Gentoo crossbuilding? I have successfully used it in the past, and it basically builds itself.
Or do your crossbuild in a chroot.

franss62 07-30-2019 06:44 AM

Hi Serafean,
I installed Arch Linux 32 on a VM and successfully built Glibc, Binutils, GMP, MPFR, and MPC with PKGBUILD modified scripts to build on i586 target, so that I can make a custom repository, I'm gonna try ASAP to build GCC today


All times are GMT -5. The time now is 02:25 PM.