[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: compile-Probleme




Am Samstag, 9. Juli 2005 13:30 schrieb Christian Fromme:
> Welche gcc Version verwendest du?

rd-gate:/home/frschorer/fritz# gcc --version
gcc (GCC) 3.3.5 (Debian 1:3.3.5-13)

Die Kiste ist eine Standard-Sarge-Installation, die bisher nur 
Security-Updates erfahren hat. Der Rest der Pakete stammt ausschließlich aus 
dem stable-Repository.

> Zur Fehlerquelle: Wenn du eine file.c Datei mit -c als Parameter
> übersetzt, ist es im Grunde überflüssig, noch ein -o file.o anzugeben,
> weil -c sowieso bewirkt, das die Quelldatei in eine Objektdatei
> übersetzt wird, ohne danach den Linker anzuwerfen.
>
> Als Würgaround könntest du mal versuchen, im Makefile das -o file.o
> wegzulöschen und nur das -c stehen zu lassen.

Hmm. Danke, das war schon mal was Gutes - ging aber nur anders herum: Die 
Definitionen im makefile lauten jetzt so: 

-------------------------- snip -----------------------
[...]
DEFINES = -DMODULE -DMODVERSIONS -D__KERNEL__ -DNDEBUG \
-D__$(CARD)__ -DTARGET=\"$(CARD)\"
CCFLAGS = $(DEFINES) -march=k6 -O2 \
-Wall -I $(KRNLINCL) -include $(KRNLINCL)/linux/modversions.h
[...]
all:            $(CARD).o $(LIBRARY) $(CS_MOD)
[...]
-------------------------- snip -----------------------

Das -c stnad in der Definition für $CCFLAGS.

Gehen tut'S aber immer noch nicht - nun hat sich der Fehler geändert:

-------------------------- snip -----------------------
rd-gate:/home/xxx/fritz# make
(cd src.drv; make CARD=fcclassic)
make[1]: Entering directory `/home/xxx/fritz/src.drv'
cc -DMODULE -DMODVERSIONS -D__KERNEL__ -DNDEBUG -D__fcclassic__ 
-DTARGET=\"fcclassic\" -march=k6 -O2 -Wall -I /lib/modules/"`uname 
-r`"/build/include -include /lib/modules/"`uname 
-r`"/build/include/linux/modversions.h main.c -o main.o
In file included 
from /lib/modules/2.4.27-2-k6/build/include/linux/spinlock.h:6,
                 from /lib/modules/2.4.27-2-k6/build/include/linux/wait.h:16,
                 from /lib/modules/2.4.27-2-k6/build/include/linux/fs.h:12,
                 
from /lib/modules/2.4.27-2-k6/build/include/linux/capability.h:17,
                 
from /lib/modules/2.4.27-2-k6/build/include/linux/binfmts.h:5,
                 from /lib/modules/2.4.27-2-k6/build/include/linux/sched.h:9,
                 from /lib/modules/2.4.27-2-k6/build/include/asm/uaccess.h:8,
                 from main.c:28:
/lib/modules/2.4.27-2-k6/build/include/asm/system.h: In Funktion 
»__set_64bit_var«:
/lib/modules/2.4.27-2-k6/build/include/asm/system.h:190: Warnung: 
dereferencing type-punned pointer will break strict-aliasing rules
/lib/modules/2.4.27-2-k6/build/include/asm/system.h:190: Warnung: 
dereferencing type-punned pointer will break strict-aliasing rules
/usr/lib/gcc-lib/i486-linux/3.3.5/../../../crt1.o(.text+0x18): In function 
`_start':
../sysdeps/i386/elf/start.S:98: undefined reference to `main'
/tmp/ccXLNaLz.o(.text+0x5): In function `inc_use_count':
: undefined reference to `__this_module'
/tmp/ccXLNaLz.o(.text+0xb): In function `inc_use_count':
: undefined reference to `__this_module'
/tmp/ccXLNaLz.o(.text+0x25): In function `dec_use_count':
: undefined reference to `__this_module'
/tmp/ccXLNaLz.o(.text+0x2b): In function `dec_use_count':
: undefined reference to `__this_module'
/tmp/ccXLNaLz.o(.text+0x77): In function `init_module':
: undefined reference to `_ctype_R8d3894f2'
/tmp/ccXLNaLz.o(.text+0xce): In function `init_module':
: undefined reference to `lprintf'
/tmp/ccXLNaLz.o(.text+0xee): In function `init_module':
: undefined reference to `lprintf'
/tmp/ccXLNaLz.o(.text+0xf7): In function `init_module':
: undefined reference to `__this_module'
/tmp/ccXLNaLz.o(.text+0x107): In function `init_module':
: undefined reference to `__this_module'
/tmp/ccXLNaLz.o(.text+0x10d): In function `init_module':
: undefined reference to `lprintf'
/tmp/ccXLNaLz.o(.text+0x112): In function `init_module':
: undefined reference to `driver_init'
/tmp/ccXLNaLz.o(.text+0x125): In function `init_module':
: undefined reference to `capi_interface'
/tmp/ccXLNaLz.o(.text+0x12a): In function `init_module':
: undefined reference to `attach_capi_driver_R92b84717'
/tmp/ccXLNaLz.o(.text+0x134): In function `init_module':
: undefined reference to `capi_driver'
/tmp/ccXLNaLz.o(.text+0x143): In function `init_module':
: undefined reference to `libheap_init'
/tmp/ccXLNaLz.o(.text+0x154): In function `init_module':
: undefined reference to `lprintf'
/tmp/ccXLNaLz.o(.text+0x15d): In function `init_module':
: undefined reference to `__this_module'
/tmp/ccXLNaLz.o(.text+0x168): In function `init_module':
: undefined reference to `__this_module'
/tmp/ccXLNaLz.o(.text+0x182): In function `init_module':
: undefined reference to `lprintf'
/tmp/ccXLNaLz.o(.text+0x193): In function `init_module':
: undefined reference to `lprintf'
/tmp/ccXLNaLz.o(.text+0x198): In function `init_module':
: undefined reference to `driver_exit'
/tmp/ccXLNaLz.o(.text+0x1a1): In function `init_module':
: undefined reference to `__this_module'
/tmp/ccXLNaLz.o(.text+0x1b9): In function `init_module':
: undefined reference to `lprintf'
/tmp/ccXLNaLz.o(.text+0x1ca): In function `init_module':
: undefined reference to `lprintf'
/tmp/ccXLNaLz.o(.text+0x1d3): In function `init_module':
: undefined reference to `__this_module'
/tmp/ccXLNaLz.o(.text+0x206): In function `cleanup_module':
: undefined reference to `capi_controller'
/tmp/ccXLNaLz.o(.text+0x21b): In function `cleanup_module':
: undefined reference to `lprintf'
/tmp/ccXLNaLz.o(.text+0x222): In function `cleanup_module':
: undefined reference to `capi_interface'
/tmp/ccXLNaLz.o(.text+0x227): In function `cleanup_module':
: undefined reference to `detach_capi_driver_R0ec975d1'
/tmp/ccXLNaLz.o(.text+0x22c): In function `cleanup_module':
: undefined reference to `libheap_exit'
/tmp/ccXLNaLz.o(.text+0x231): In function `cleanup_module':
: undefined reference to `driver_exit'
/tmp/ccXLNaLz.o(.text+0x242): In function `cleanup_module':
: undefined reference to `lprintf'
/tmp/ccXLNaLz.o(.text+0x255): In function `cleanup_module':
: undefined reference to `lprintf'
/tmp/ccXLNaLz.o(.text+0x25c): In function `cleanup_module':
: undefined reference to `capi_card'
/tmp/ccXLNaLz.o(.text+0x261): In function `cleanup_module':
: undefined reference to `stop'
/tmp/ccXLNaLz.o(.text+0x268): In function `cleanup_module':
: undefined reference to `capi_controller'
/tmp/ccXLNaLz.o(.text+0x26d): In function `cleanup_module':
: undefined reference to `capi_driver'
collect2: ld returned 1 exit status
make[1]: *** [main.o] Fehler 1
make[1]: Leaving directory `/home/xxx/fritz/src.drv'
make: *** [drv] Fehler 2
-------------------------- snip -----------------------

Any hints dazu?


	Friedemann



Reply to: