Problem beim kompilieren

Hallo Oli,

hatte mir das mit dem Compiler schon gedacht und auf 4.2.4 umgestellt. Und nun ging es reibungslos durch.
Eine Frage hierzu: Bringt es Nachteile (Stabilität usw.) die Firmware mit einer älteren Compilerversion zu bauen?

Viele Grüße
 
gcc-4.2.4 ist der Standard für Freetz und auch die Download-Toolchain nutzt den. AVM nutzt noch gcc-3.4.6...
Was der gcc-4.3.3 jetzt besser kann kann ich dir nicht sagen. Auf alle Fälle hab ich damit keine Toolchain mehr hinbekommen, die man in einer anderen Umgebung einsetzen kann.

MfG Oliver
 
Das Problem hängt damit zusammen, dass du gcc-4.3.3 verwendest. Warum auch immer wird hier bei manchen Libs das Flag "-fPIC" benötigt. Dieser Patch sollte dein Problem lösen:
Code:
--- make/netpbm/netpbm.mk    (revision 4101)
+++ make/netpbm/netpbm.mk    (working copy)
@@ -46,7 +46,7 @@
         $(MAKE) -C $(NETPBM_DIR)/lib \
         FAKEROOTDIR="$(TARGET_TOOLCHAIN_STAGING_DIR)" \
         TARGET_CROSS_PREFIX="$(TARGET_CROSS)" \
-        CFLAGS="$(TARGET_CFLAGS)" \
+        CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \
         all
 
 $($(PKG)_BINARIES_BUILD_DIR): $($(PKG)_DIR)/converter/other/%: $($(PKG)_DIR)/Makefile.depend $($(PKG)_LIB_BUILD_DIR)
@@ -54,7 +54,7 @@
         $(MAKE) -C $(NETPBM_DIR)/converter/other \
         FAKEROOTDIR="$(TARGET_TOOLCHAIN_STAGING_DIR)" \
         TARGET_CROSS_PREFIX="$(TARGET_CROSS)" \
-        CFLAGS="$(TARGET_CFLAGS)" \
+        CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \
         $(notdir $@)
 
 $($(PKG)_LIB_STAGING_DIR): $($(PKG)_LIB_BUILD_DIR)
MfG Oliver

Der Patch hat leider nichts gebracht. Nun bekomme ich ein:
Code:
PATH=""/home/xsapling/freetz-stable/freetz-usb-root-replace/toolchain/target/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games"" \
                make -j4 -C source/netpbm-10.35.69/lib \
                FAKEROOTDIR="/home/xsapling/freetz-stable/freetz-usb-root-replace/toolchain/build/gcc-4.3.3-uClibc-0.9.29/mipsel-linux-uclibc" \
                TARGET_CROSS_PREFIX="mipsel-linux-uclibc-" \
                CFLAGS="-Os -pipe -march=4kc -Wa,--trap -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC" \
                all
make[1]: Betrete Verzeichnis '/home/xsapling/freetz-stable/freetz-usb-root-replace/source/netpbm-10.35.69/lib'
/home/xsapling/freetz-stable/freetz-usb-root-replace/toolchain/build/gcc-4.3.3-uClibc-0.9.29/mipsel-linux-uclibc/usr/bin/mipsel-linux-uclibc-gcc -c -I/home/xsapling/freetz-stable/freetz-usb-root-replace/source/netpbm-10.35.69/lib/../lib -I. -Iimportinc -DNDEBUG -Os -pipe -march=4kc -Wa,--trap -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC  \
            -o libpm.o libpm.c
/home/xsapling/freetz-stable/freetz-usb-root-replace/toolchain/build/gcc-4.3.3-uClibc-0.9.29/mipsel-linux-uclibc/usr/bin/mipsel-linux-uclibc-gcc -c -I/home/xsapling/freetz-stable/freetz-usb-root-replace/source/netpbm-10.35.69/lib/../lib -I. -Iimportinc -DNDEBUG -Os -pipe -march=4kc -Wa,--trap -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC  \
            -o fileio.o fileio.c
/home/xsapling/freetz-stable/freetz-usb-root-replace/toolchain/build/gcc-4.3.3-uClibc-0.9.29/mipsel-linux-uclibc/usr/bin/mipsel-linux-uclibc-gcc -c -I/home/xsapling/freetz-stable/freetz-usb-root-replace/source/netpbm-10.35.69/lib/../lib -I. -Iimportinc -DNDEBUG -Os -pipe -march=4kc -Wa,--trap -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC  \
            -o bitio.o bitio.c
/home/xsapling/freetz-stable/freetz-usb-root-replace/toolchain/build/gcc-4.3.3-uClibc-0.9.29/mipsel-linux-uclibc/usr/bin/mipsel-linux-uclibc-gcc -c -I/home/xsapling/freetz-stable/freetz-usb-root-replace/source/netpbm-10.35.69/lib/../lib -I. -Iimportinc -DNDEBUG -Os -pipe -march=4kc -Wa,--trap -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -fPIC  \
            -o colorname.o colorname.c
In file included from pm.h:16,
                 from bitio.h:35,
                 from bitio.c:37:
importinc/pm_config.h:646:2: error: #endif without #if
In file included from importinc/pm.h:16,
                 from importinc/nstring.h:8,
                 from libpm.c:50:
importinc/pm_config.h:646:2: error: #endif without #if
In file included from importinc/nstring.h:8,
                 from libpm.c:50:
importinc/pm.h:314: error: expected ';', ',' or ')' before '*' token
importinc/pm.h:335: error: expected declaration specifiers or '...' before 'pm_filepos'
In file included from importinc/mallocvar.h:13,
                 from libpm.c:52:
importinc/pm_config.h:646:2: error: #endif without #if
In file included from importinc/pm.h:16,
                 from importinc/nstring.h:8,
                 from colorname.c:24:
importinc/pm_config.h:646:2: error: #endif without #if
In file included from pm.h:16,
                 from fileio.c:16:
importinc/pm_config.h:646:2: error: #endif without #if
In file included from fileio.c:16:
pm.h:314: error: expected ';', ',' or ')' before '*' token
pm.h:335: error: expected declaration specifiers or '...' before 'pm_filepos'
In file included from bitio.h:35,
                 from bitio.c:37:
pm.h:314: error: expected ';', ',' or ')' before '*' token
pm.h:335: error: expected declaration specifiers or '...' before 'pm_filepos'
bitio.c: In function 'pm_bitinit':
bitio.c:79: warning: incompatible implicit declaration of built-in function 'calloc'
bitio.c: In function 'pm_bitfini':
bitio.c:134: warning: incompatible implicit declaration of built-in function 'free'
libpm.c: In function 'showVersion':make[1]: *** [fileio.o] Fehler 1
make[1]: *** Warte auf noch nicht beendete Prozesse...

libpm.c:469: error: 'RGBENV' undeclared (first use in this function)
libpm.c:469: error: (Each undeclared identifier is reported only once
libpm.c:469: error: for each function it appears in.)
libpm.c: In function 'tmpDir':make[1]: *** [bitio.o] Fehler 1
In file included from importinc/nstring.h:8,
                 from colorname.c:24:
importinc/pm.h:314: error: expected ';', ',' or ')' before '*' token
libpm.c:732: error: 'TMPDIR' undeclared (first use in this function)
libpm.c: In function 'mkstempx':
libpm.c:773: error: 'O_CREAT' undeclared (first use in this function)
libpm.c:773: error: 'O_EXCL' undeclared (first use in this function)
libpm.c: At top level:
importinc/pm.h:335: error: expected declaration specifiers or '...' before 'pm_filepos'
colorname.c: In function 'pm_openColornameFile':
colorname.c:64: error: 'RGBENV' undeclared (first use in this function)
colorname.c:64: error: (Each undeclared identifier is reported only once
colorname.c:64: error: for each function it appears in.)
colorname.c:68: error: 'RGB_DB1' undeclared (first use in this function)
colorname.c:69: error: 'RGB_DB2' undeclared (first use in this function)
colorname.c:70: error: 'RGB_DB3' undeclared (first use in this function)

libpm.c:1255: error: expected specifier-qualifier-list before 'uint32n'
libpm.c: In function 'pm_bs_short':
libpm.c:1267: error: 'union cheat' has no member named 's'
libpm.c:1268: error: 'union cheat' has no member named 'c'
libpm.c:1269: error: 'union cheat' has no member named 'c'
libpm.c:1269: error: 'union cheat' has no member named 'c'
libpm.c:1270: error: 'union cheat' has no member named 'c'
libpm.c:1271: error: 'union cheat' has no member named 's'
libpm.c: In function 'pm_bs_long':make[1]: *** [colorname.o] Fehler 1

libpm.c:1281: error: 'union cheat' has no member named 'l'
libpm.c:1282: error: 'union cheat' has no member named 'c'
libpm.c:1283: error: 'union cheat' has no member named 'c'
libpm.c:1283: error: 'union cheat' has no member named 'c'
libpm.c:1284: error: 'union cheat' has no member named 'c'
libpm.c:1285: error: 'union cheat' has no member named 'c'
libpm.c:1286: error: 'union cheat' has no member named 'c'
libpm.c:1286: error: 'union cheat' has no member named 'c'
libpm.c:1287: error: 'union cheat' has no member named 'c'
libpm.c:1288: error: 'union cheat' has no member named 'l'
libpm.c: In function 'pm_tell2':
libpm.c:1307: error: 'pm_filepos' undeclared (first use in this function)
libpm.c:1307: error: expected ';' before 'const'
libpm.c:1308: error: 'filepos' undeclared (first use in this function)
libpm.c:1313: error: expected expression before 'const'
libpm.c:1314: error: 'fileposP_filepos' undeclared (first use in this function)
libpm.c:1317: error: expected ')' before numeric constant
libpm.c: At top level:
libpm.c:1346: error: expected ';', ',' or ')' before '*' token
libpm.c: In function 'pm_seek':
libpm.c:1375: error: 'pm_filepos' undeclared (first use in this function)
libpm.c:1375: error: expected ';' before 'fileposBuff'
libpm.c:1377: error: 'fileposBuff' undeclared (first use in this function)
libpm.c: At top level:
libpm.c:1443: error: expected declaration specifiers or '...' before 'pm_filepos'
libpm.c: In function 'pm_check':
libpm.c:1449: error: 'pm_filepos' undeclared (first use in this function)
libpm.c:1449: error: expected ';' before 'curpos'
libpm.c:1461: error: 'curpos' undeclared (first use in this function)
libpm.c:1475: error: expected ';' before 'const'
libpm.c:1477: error: 'have_raster_size' undeclared (first use in this function)
libpm.c:1477: error: 'need_raster_size' undeclared (first use in this function)
make[1]: *** [libpm.o] Fehler 1
make[1]: Verlasse Verzeichnis '/home/xsapling/freetz-stable/freetz-usb-root-replace/source/netpbm-10.35.69/lib'
make: *** [source/netpbm-10.35.69/lib/libnetpbm.so.10.35] Fehler 2
xsapling@m-laptop:~/freetz-stable/freetz-usb-root-replace$


so sieht die netpbm.mk bei mir aus:
Code:
$(call PKG_INIT_BIN, 10.35.69)
$(PKG)_LIB_VERSION:=10.35
$(PKG)_SOURCE:=$(pkg)-$($(PKG)_VERSION).tgz
$(PKG)_SOURCE_MD5:=428c0d62965ab9525741f922cce29dba
$(PKG)_SITE:=@SF/netpbm/super_stable/$($(PKG)_VERSION)

$(PKG)_LIBNAME := libnetpbm.so.$($(PKG)_LIB_VERSION)
$(PKG)_LIB_BUILD_DIR := $($(PKG)_DIR)/lib/$($(PKG)_LIBNAME)
$(PKG)_LIB_STAGING_DIR := $(TARGET_TOOLCHAIN_STAGING_DIR)/usr/lib/$($(PKG)_LIBNAME)
$(PKG)_LIB_TARGET_DIR := root/usr/lib/$($(PKG)_LIBNAME)

# see INTERFACE_HEADERS variable in lib/Makefile
$(PKG)_INTERFACE_HEADERS = \
    pm_config.h \
    lib/pm.h lib/pbm.h lib/bitio.h lib/pbmfont.h \
    lib/pgm.h lib/ppm.h lib/ppm.h lib/ppmcmap.h lib/ppmfloyd.h lib/colorname.h \
    lib/pnm.h lib/pam.h lib/pammap.h lib/pm_system.h lib/pm_gamma.h \
    lib/util/shhopt.h lib/util/nstring.h lib/util/mallocvar.h

$(PKG)_BINARIES := bmptopnm giftopnm jpegtopnm pngtopnm
$(PKG)_BINARIES_BUILD_DIR := $(NETPBM_BINARIES:%=$($(PKG)_DIR)/converter/other/%)
$(PKG)_BINARIES_TARGET_DIR := $(NETPBM_BINARIES:%=$($(PKG)_DEST_DIR)/usr/bin/%)

$(PKG)_DEPENDS_ON := jpeg
$(PKG)_DEPENDS_ON += libpng
$(PKG)_DEPENDS_ON += zlib

$(PKG_SOURCE_DOWNLOAD)
$(PKG_UNPACKED)
$(PKG_CONFIGURED_NOP)

#NB: we do want to compile buildtools for the system netpbm is being built on, not for the target
$($(PKG)_DIR)/buildtools/.compiled: $($(PKG)_DIR)/.configured
    $(MAKE) -C $(NETPBM_DIR)/buildtools all && touch $@

$($(PKG)_DIR)/Makefile.depend: $($(PKG)_DIR)/buildtools/.compiled
    PATH="$(TARGET_PATH)" \
        $(MAKE) -C $(NETPBM_DIR) \
        FAKEROOTDIR="$(TARGET_TOOLCHAIN_STAGING_DIR)" \
        TARGET_CROSS_PREFIX="$(TARGET_CROSS)" \
        CFLAGS="$(TARGET_CFLAGS)" \
        dep

$($(PKG)_LIB_BUILD_DIR): $($(PKG)_DIR)/Makefile.depend
    PATH="$(TARGET_PATH)" \
        $(MAKE) -C $(NETPBM_DIR)/lib \
        FAKEROOTDIR="$(TARGET_TOOLCHAIN_STAGING_DIR)" \
        TARGET_CROSS_PREFIX="$(TARGET_CROSS)" \
        CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \
        all

$($(PKG)_BINARIES_BUILD_DIR): $($(PKG)_DIR)/converter/other/%: $($(PKG)_DIR)/Makefile.depend $($(PKG)_LIB_BUILD_DIR)
    PATH="$(TARGET_PATH)" \
        $(MAKE) -C $(NETPBM_DIR)/converter/other \
        FAKEROOTDIR="$(TARGET_TOOLCHAIN_STAGING_DIR)" \
        TARGET_CROSS_PREFIX="$(TARGET_CROSS)" \
        CFLAGS="$(TARGET_CFLAGS) $(FPIC)" \
        $(notdir $@)

$($(PKG)_LIB_STAGING_DIR): $($(PKG)_LIB_BUILD_DIR)
    mkdir -p $(TARGET_TOOLCHAIN_STAGING_DIR)/usr/include/netpbm/ \
    && cp -a $(NETPBM_INTERFACE_HEADERS:%=$(NETPBM_DIR)/%) $(TARGET_TOOLCHAIN_STAGING_DIR)/usr/include/netpbm/
    mkdir -p $(TARGET_TOOLCHAIN_STAGING_DIR)/usr/lib/ \
    && cp -a $(NETPBM_DIR)/lib/libnetpbm*.{a,so}* $(TARGET_TOOLCHAIN_STAGING_DIR)/usr/lib/

$($(PKG)_LIB_TARGET_DIR): $($(PKG)_LIB_STAGING_DIR)
    $(INSTALL_LIBRARY_STRIP)

$($(PKG)_BINARIES_TARGET_DIR): $($(PKG)_DEST_DIR)/usr/bin/%: $($(PKG)_DIR)/converter/other/%
    $(INSTALL_BINARY_STRIP)

$(pkg):

$(pkg)-precompiled: $($(PKG)_LIB_TARGET_DIR) $($(PKG)_BINARIES_TARGET_DIR)

$(pkg)-clean:
    -$(MAKE) -C $(NETPBM_DIR)/lib clean
    -$(MAKE) -C $(NETPBM_DIR)/converter/other clean
    $(RM) -r \
        $(TARGET_TOOLCHAIN_STAGING_DIR)/usr/include/netpbm/ \
        $(TARGET_TOOLCHAIN_STAGING_DIR)/usr/lib/libnetpbm*

$(pkg)-uninstall:
    $(RM) \
        $(NETPBM_BINARIES_TARGET_DIR) \
        root/usr/lib/libnetpbm*

$(PKG_FINISH)
 
Wieso hat der Patch nichts gebracht? Das Problem ist jetzt ein anderes. ;-)

MfG Oliver
 
@xsapling: hänge mal Deine source/netpbm-10.35.69/pm_config.h hier an (nochmal anhängen, nicht in code-tags platzieren) oder schaue selbst in diese rein und versuch nachzuvollziehen, was dem compiler an dem #endif in der Zeile 646 nicht gefällt
 
@xsapling: hänge mal Deine source/netpbm-10.35.69/pm_config.h hier an (nochmal anhängen, nicht in code-tags platzieren) oder schaue selbst in diese rein und versuch nachzuvollziehen, was dem compiler an dem #endif in der Zeile 646 nicht gefällt


ok anbei der Anhang.
 

Anhänge

  • pm_config.txt
    22.1 KB · Aufrufe: 5
es sieht so aus, als wäre pm_config.h-Regel doppelt ausgeführt (der Inhalt von pm_config.h.in ist in Deiner pm_config.h doppelt vorhanden). Was die Ursache dafür ist, kann ich leider nicht sagen. Hast Du nachdem Wechsel zu gcc-4.2.4 ein dirclean ausgeführt? Mach' mal make netpbm-dirclean und dann make netpbm-precompiled 2>&1 | tee netpbm.log und berichte uns, ob's was ändert. Und wenn nein, hänge mal die erzeugte netpbm.log hier an.
 
Danke Euch Beiden. Aber ich bin jetzt zur Download-Toolchain zurückgekehrt und habe anschließend den Patch von Oli undoed und nun läuft es wieder. Der letztere Fehler scheint mit dem Patch von Oli zusammen zu hängen.
 

Statistik des Forums

Themen
246,301
Beiträge
2,249,717
Mitglieder
373,905
Neuestes Mitglied
tkdfd234
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.