[Erledigt] [7490] toolchain problem - too new gcc/g++?

Massa

Mitglied
Mitglied seit
18 Dez 2004
Beiträge
224
Punkte für Reaktionen
4
Punkte
18
I lately have a problem compiling a toolchain for my 7490.

First I get a lot warning messages like that:
Code:
g++ -c  -DIN_GCC_FRONTEND -D_GNU_SOURCE -fno-stack-protector -DIN_GCC -DCROSS_DIRECTORY_STRUCTURE  -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H -I. -Icp -I/home/freetz/workdir/trunk.7490/source/toolchain-mips_gcc-4.8.5_uClibc-0.9.33.2-nptl_kernel-3.10/gcc-4.8.5/gcc -I/home/freetz/workdir/trunk.7490/source/toolchain-mips_gcc-4.8.5_uClibc-0.9.33.2-nptl_kernel-3.10/gcc-4.8.5/gcc/cp -I/home/freetz/workdir/trunk.7490/source/toolchain-mips_gcc-4.8.5_uClibc-0.9.33.2-nptl_kernel-3.10/gcc-4.8.5/gcc/../include -I/home/freetz/workdir/trunk.7490/source/toolchain-mips_gcc-4.8.5_uClibc-0.9.33.2-nptl_kernel-3.10/gcc-4.8.5/gcc/../libcpp/include -I/home/freetz/workdir/trunk.7490/tools/build/include -I/home/freetz/workdir/trunk.7490/tools/build/include -I/home/freetz/workdir/trunk.7490/tools/build/include  -I/home/freetz/workdir/trunk.7490/source/toolchain-mips_gcc-4.8.5_uClibc-0.9.33.2-nptl_kernel-3.10/gcc-4.8.5/gcc/../libdecnumber -I/home/freetz/workdir/trunk.7490/source/toolchain-mips_gcc-4.8.5_uClibc-0.9.33.2-nptl_kernel-3.10/gcc-4.8.5/gcc/../libdecnumber/dpd -I../libdecnumber -I/home/freetz/workdir/trunk.7490/source/toolchain-mips_gcc-4.8.5_uClibc-0.9.33.2-nptl_kernel-3.10/gcc-4.8.5/gcc/../libbacktrace    /home/freetz/workdir/trunk.7490/source/toolchain-mips_gcc-4.8.5_uClibc-0.9.33.2-nptl_kernel-3.10/gcc-4.8.5/gcc/cp/search.c -o cp/search.o
In file included from ./tm.h:23:0,
                 from /home/freetz/workdir/trunk.7490/source/toolchain-mips_gcc-4.8.5_uClibc-0.9.33.2-nptl_kernel-3.10/gcc-4.8.5/gcc/cp/except.c:27:
/home/freetz/workdir/trunk.7490/source/toolchain-mips_gcc-4.8.5_uClibc-0.9.33.2-nptl_kernel-3.10/gcc-4.8.5/gcc/config/elfos.h:102:21: warning: invalid suffix on literal; C++11 requires a space between literal and string macro [-Wliteral-suffix]
    fprintf ((FILE), "%s"HOST_WIDE_INT_PRINT_UNSIGNED"\n",\

And then it finally stops with an error:
Code:
In file included from /home/freetz/workdir/trunk.7490/source/toolchain-mips_gcc-4.8.5_uClibc-0.9.33.2-nptl_kernel-3.10/gcc-4.8.5/gcc/cp/except.c:1008:0:
cfns.gperf: In function ‘const char* libc_name_p(const char*, unsigned int)’:
cfns.gperf:101:1: error: ‘const char* libc_name_p(const char*, unsigned int)’ redeclared inline with ‘gnu_inline’ attribute
cfns.gperf:26:14: note: ‘const char* libc_name_p(const char*, unsigned int)’ previously declared here
cfns.gperf: At global scope:
cfns.gperf:26:14: warning: inline function ‘const char* libc_name_p(const char*, unsigned int)’ used but never defined
Makefile:1059: recipe for target 'cp/except.o' failed
make[3]: *** [cp/except.o] Error 1

All that at an Ubuntu 16.04 machine where all available updates have been installed.
gcc --version:
Code:
gcc (Ubuntu 6.2.0-5ubuntu12) 6.2.0 20161005
Copyright (C) 2016 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.

Here's the complete log of "make":
freetz_make.log

And here's my config:
config_7490.txt

Is it because the gcc / g++ is too new?

Anyone know a possible fix for that problem?
 
Zuletzt bearbeitet:
Does nobody else use current Linux versions do build freetz? :confused:

Or does nobody else have this problem? :eek:
 
I'm using Ubuntu 16.04 with all updates and I don't have a gcc-6.x. I have a "gcc-6-base" packages installed, but it is tiny (and version 6.0.1).
Apparently there is a gcc-snapshot in the repository, but it says "DO NOT USE THIS SNAPSHOT FOR BUILDING DEBIAN PACKAGES!".

Did you install a PPA for gcc-6? You can probably use update-alternatives to use an older gcc.
 
Better use freetz-linux on virtualbox
 
zur Info: gcc-5.x support (experimental) für Freetz Toolchain ist in changeset r14109 seit gestern enthalten.
r14109 adds gcc-5.x support for target toolchain. It has nothing to do with host gcc.


@Massa: just use the download-toolchain or downgrade your host compiler.
 
@Massa: just use the download-toolchain or downgrade your host compiler.
Where can I download the "download-toolchain"? Never heard about it...

My host has all sorts of gcc compilers (4.9, 5, 6, mingw versions, ...) installed - which one is the one to use for freetz?
Am I able to distinguish between them (e.g. by setting an environment variable)?
Or must I remove the newer gcc versions?


Achja: kann / soll ich Deutsch schreiben? Oder erreiche ich mehr Leute, wenn ich in English schreibe?
 
Where can I download the "download-toolchain"? Never heard about it...


one can build his own toolchains and use them as download toolchains by overriding the corresponding options under "Override options/Override precompiled toolchain options":


  1. activate "Toolchain options/Build own toolchains"
  2. set toolchain related options to the desired ones under "Toolchain options"
  3. (optional) make your own modifications under $(freetz_root)/toolchain
  4. call "make KTV=freetz-${MY_VERSION}-${MY_SUFFIX} TTV=freetz-${MY_VERSION}-${MY_SUFFIX} toolchain"
  5. wait the build to complete
  6. (optional) upload created download toolchain files to some site
The toolchains created in steps above can then be reused:


  1. activate "Toolchain options/Download and use precompiled toolchains"
  2. activate "Override options/Override precompiled toolchain options"
  3. set version/suffix/md5/download-site values to the values used in the steps above

  1. adjust gcc/uClibc versions under "Toolchain options", set them to the same values as in step 2

Quelle:
http://www.freetz.org/ticket/1939#comment:3
 
Where can I download the "download-toolchain"? Never heard about it...
"make menuconfig", set "Toolchain options/Toolchains" to "Download and use precompiled toolchains"

My host has all sorts of gcc compilers (4.9, 5, 6, mingw versions, ...) installed - which one is the one to use for freetz?
As of now 4.x is the best choice, 5.x might work (never tested myself), 6.x doesn't work (as reported by you).

Am I able to distinguish between them?
yes

e.g. by setting an environment variable?
As of now no. Something like (or similar)
Code:
make TOOLS_CC=desired-gcc-version TOOLS_CXX=desired-g++-version TOOLCHAIN_HOSTCC=desired-gcc-version TOOLCHAIN_HOSTCXX=desired-g++-version
might work in the future.

Or must I remove the newer gcc versions?
No, just use update-alternatives --set ... (s. e.g. this thread for more details)

Achja: kann / soll ich Deutsch schreiben? Oder erreiche ich mehr Leute, wenn ich in English schreibe?
Die Wahl der Sprache würde ich davon abhängig machen, wie gut Du diese beherrschst (lieber Englisch als gebrochenes Deutsch). Vom Gefühl her würde ich sagen, mit Deutsch erreichst Du hier mehr Leute.


Ansonsten, Leute, macht Euch mit der Materie vertraut: host-toolchain ist nicht gleich target-toolchain, update-alternatives kann man auch selbst googeln.

Edit: and don't follow #8 from Shirocco88, it won't work as building own toolchain would fail.
 
"make menuconfig", set "Toolchain options/Toolchains" to "Download and use precompiled toolchains"
Man muss die Option "Level of user competence" auf "Expert" setzen, damit diese Option sichtbar wird.
Deswegen ist mir diese auch noch nie aufgefallen - bei mir stand das bisher immer auf "Advanced" ;)

Habe diese Variante jetzt mit dem Image für meine 3370 versucht - das funktioniert auch...


As of now 4.x is the best choice, 5.x might work (never tested myself), 6.x doesn't work (as reported by you).
5.x funktioniert auch nicht - habe es probiert; es kommt zwar nicht direkt eine gcc-Warnung, aber er bricht zwischendurch mit "can't find configure" (weiss nicht mehr genau wo) ab. :eek:

Mit gcc-4.9 funktioniert es :D

No, just use update-alternatives --set ... (s. e.g. this thread for more details)
Hmm - ich habe einfach die symbolischen Links von gcc und g++ geändert:
Code:
ln -sf /usr/bin/gcc-4.9 /usr/bin/gcc
ln -sf /usr/bin/g++-4.9 /usr/bin/g++

Danach hat es funktioniert - ist aber eine etwas brachiale Methode ;-)


Die Wahl der Sprache würde ich davon abhängig machen, wie gut Du diese beherrschst (lieber Englisch als gebrochenes Deutsch). Vom Gefühl her würde ich sagen, mit Deutsch erreichst Du hier mehr Leute.
Da Deutsch meine Muttersprache ist, wäre dann wohl Deutch die bessere Wahl :p

Ansonsten, Leute, macht Euch mit der Materie vertraut: host-toolchain ist nicht gleich target-toolchain,
Mir sind diese Unterschiede sehr bewusst!

update-alternatives kann man auch selbst googeln
Wenn man weiss, dass es so etwas gibt...
Ich dachte mehr an einen "gcc-wrapper", dem man per Kommandozeile die Version mitgeben kann - entsprechendes hatte ich auch gegoogelt!

Edit: and don't follow #8 from Shirocco88, it won't work as building own toolchain would fail.
Of course not :silly:
 
Zuletzt bearbeitet:

Neueste Beiträge

Statistik des Forums

Themen
244,695
Beiträge
2,216,687
Mitglieder
371,314
Neuestes Mitglied
Gjorstn
Holen Sie sich 3CX - völlig kostenlos!
Verbinden Sie Ihr Team und Ihre Kunden Telefonie Livechat Videokonferenzen

Gehostet oder selbst-verwaltet. Für bis zu 10 Nutzer dauerhaft kostenlos. Keine Kreditkartendetails erforderlich. Ohne Risiko testen.

3CX
Für diese E-Mail-Adresse besteht bereits ein 3CX-Konto. Sie werden zum Kundenportal weitergeleitet, wo Sie sich anmelden oder Ihr Passwort zurücksetzen können, falls Sie dieses vergessen haben.