Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 15/09/2006, à 17:24

Thomas51

Je n'ai jamais pu compiler

Bonjour.

Je pars de ce constat simple: "Je n'ai jamais pu compiler, sous Linux"

J'ai Kernel 2.6.x. Quand je lance la commande #make pour le driver qui se trouve sur cette page http://at76c503a.berlios.de/index.html (le 0.13) j'obtiens:

root@ubuntu:/home/thomas/at76c503a# make
mkdir -p .tmp_versions
make -C /lib/modules/2.6.12-10-386/build M=/home/thomas/at76c503a MODVERDIR=/home/thomas/at76c503a/.tmp_versions \EXTRA_CFLAGS=" -DCOMPILE_FIRMWARE_INTO_DRIVER" modules
/usr/src/linux-headers-2.6.12-10-386/scripts/gcc-version.sh: line 11: gcc-3.4: command not found/usr/src/linux-headers-2.6.12-10-386/scripts/gcc-version.sh: line 12: gcc-3.4: command not foundmake[1]: gcc-3.4 : commande introuvable
make[1]: entrant dans le répertoire « /usr/src/linux-headers-2.6.12-10-386 »
  CC [M]  /home/thomas/at76c503a/at76c503-i3861.o
In file included from include/asm/timex.h:10,
                 from include/linux/timex.h:61,
                 from include/linux/sched.h:11,
                 from include/linux/module.h:10,
                 from /home/thomas/at76c503a/at76c503-i3861.c:32:
include/asm/processor.h: In function ‘load_esp0’:
include/asm/processor.h:486: attention : implicit declaration of function ‘unlikely’In file included from include/linux/sched.h:12,
                 from include/linux/module.h:10,
                 from /home/thomas/at76c503a/at76c503-i3861.c:32:
include/linux/jiffies.h: Hors de toute fonction :
include/linux/jiffies.h:84: attention : type defaults to ‘int’ in declaration of ‘u64’include/linux/jiffies.h:84: erreur: syntax error before ‘jiffies_64’
include/linux/jiffies.h:88: erreur: syntax error before ‘get_jiffies_64’
include/linux/jiffies.h:88: attention : type defaults to ‘int’ in declaration of ‘get_jiffies_64’include/linux/jiffies.h:88: attention : la définition de données n'a pas de type ni de classe de stockageinclude/linux/jiffies.h: In function ‘timespec_to_jiffies’:
include/linux/jiffies.h:320: erreur: called object ‘u64’ is not a function
include/linux/jiffies.h:320: erreur: called object ‘u64’ is not a function
include/linux/jiffies.h:320: erreur: ‘NSEC_PER_SEC’ undeclared (first use in this function)include/linux/jiffies.h:320: erreur: (Chaque identificateur non déclaré est rapporté une seule foisinclude/linux/jiffies.h:320: erreur: pour chaque fonction dans laquelle il apparaît.)include/linux/jiffies.h:321: erreur: called object ‘u64’ is not a function
include/linux/jiffies.h:321: erreur: called object ‘u64’ is not a function
include/linux/jiffies.h:324: erreur: syntax error before ‘sec’
include/linux/jiffies.h:324: erreur: syntax error before ‘NSEC_PER_SEC’
include/linux/jiffies.h:324: erreur: called object ‘u64’ is not a function
include/linux/jiffies.h:324: erreur: syntax error before ‘)’ token
include/linux/jiffies.h:328: attention : « return » manquant dans une fonction devant retourner une valeurinclude/linux/jiffies.h: In function ‘jiffies_to_timespec’:
include/linux/jiffies.h:337: erreur: syntax error before ‘nsec’
include/linux/jiffies.h:338: erreur: ‘nsec’ undeclared (first use in this function)include/linux/jiffies.h:338: erreur: ‘NSEC_PER_SEC’ undeclared (first use in this function)include/linux/jiffies.h: In function ‘timeval_to_jiffies’:
include/linux/jiffies.h:359: erreur: called object ‘u64’ is not a function
include/linux/jiffies.h:359: erreur: called object ‘u64’ is not a function
include/linux/jiffies.h:359: erreur: ‘NSEC_PER_SEC’ undeclared (first use in this function)include/linux/jiffies.h:360: erreur: called object ‘u64’ is not a function
include/linux/jiffies.h:360: erreur: called object ‘u64’ is not a function
include/linux/jiffies.h:363: erreur: syntax error before ‘sec’
include/linux/jiffies.h:363: erreur: syntax error before ‘NSEC_PER_SEC’
include/linux/jiffies.h:363: erreur: called object ‘u64’ is not a function
include/linux/jiffies.h:363: erreur: syntax error before ‘)’ token
include/linux/jiffies.h:366: attention : « return » manquant dans une fonction devant retourner une valeurinclude/linux/jiffies.h: In function ‘jiffies_to_timeval’:
include/linux/jiffies.h:375: erreur: syntax error before ‘nsec’
include/linux/jiffies.h:376: erreur: ‘nsec’ undeclared (first use in this function)include/linux/jiffies.h:376: erreur: ‘NSEC_PER_SEC’ undeclared (first use in this function)include/linux/jiffies.h:377: erreur: ‘NSEC_PER_USEC’ undeclared (first use in this function)Dans le fichier inclus à partir de include/linux/sched.h:12,
          à partir de include/linux/module.h:10,
          à partir de /home/thomas/at76c503a/at76c503-i3861.c:32:
include/linux/jiffies.h:385:41: erreur: division par zéro dans #if
include/linux/jiffies.h:385:42: erreur: division par zéro dans #if
include/linux/jiffies.h: In function ‘jiffies_to_clock_t’:
include/linux/jiffies.h:388: erreur: syntax error before ‘tmp’
include/linux/jiffies.h:389: erreur: ‘NSEC_PER_SEC’ undeclared (first use in this function)include/linux/jiffies.h:389: erreur: ‘USER_HZ’ undeclared (first use in this function)include/linux/jiffies.h:389: erreur: ‘tmp’ undeclared (first use in this function)include/linux/jiffies.h:389: erreur: invalid lvalue in asm output 0
include/linux/jiffies.h:396:18: erreur: division par zéro dans #if
include/linux/jiffies.h: In function ‘clock_t_to_jiffies’:
include/linux/jiffies.h:401: erreur: syntax error before ‘jif’
include/linux/jiffies.h:404: erreur: ‘USER_HZ’ undeclared (first use in this function)include/linux/jiffies.h:408: erreur: ‘jif’ undeclared (first use in this function)include/linux/jiffies.h:408: erreur: syntax error before numeric constant
include/linux/jiffies.h:409: erreur: invalid lvalue in asm output 0
include/linux/jiffies.h: Hors de toute fonction :
include/linux/jiffies.h:414: erreur: syntax error before ‘jiffies_64_to_clock_t’include/linux/jiffies.h:414: erreur: syntax error before ‘x’
include/linux/jiffies.h:415: attention : return type defaults to ‘int’
include/linux/jiffies.h:415: attention : function declaration isn’t a prototype
include/linux/jiffies.h:416:41: erreur: division par zéro dans #if
include/linux/jiffies.h:416:42: erreur: division par zéro dans #if
include/linux/jiffies.h: In function ‘jiffies_64_to_clock_t’:
include/linux/jiffies.h:424: erreur: ‘x’ undeclared (first use in this function)include/linux/jiffies.h:425: erreur: ‘NSEC_PER_SEC’ undeclared (first use in this function)include/linux/jiffies.h:425: erreur: ‘USER_HZ’ undeclared (first use in this function)include/linux/jiffies.h:425: erreur: invalid lvalue in asm output 0
include/linux/jiffies.h: Hors de toute fonction :
include/linux/jiffies.h:430: erreur: syntax error before ‘nsec_to_clock_t’
include/linux/jiffies.h:430: erreur: syntax error before ‘x’
include/linux/jiffies.h:431: attention : return type defaults to ‘int’
include/linux/jiffies.h:431: attention : function declaration isn’t a prototype
include/linux/jiffies.h:432:28: erreur: division par zéro dans #if
include/linux/jiffies.h: In function ‘nsec_to_clock_t’:

etc. ..... des pages et des pages d'erreur

/home/thomas/at76c503a/at76c503-fw_skel.c:125: attention : assignment makes pointer from integer without a cast
/home/thomas/at76c503a/at76c503-fw_skel.c:126: attention : implicit declaration of function ‘usb_set_intfdata’
/home/thomas/at76c503a/at76c503-fw_skel.c:128: attention : implicit declaration of function ‘info’
/home/thomas/at76c503a/at76c503-fw_skel.c:128: erreur: déréférencement d'un pointeur de type incomplet
/home/thomas/at76c503a/at76c503-fw_skel.c: In function ‘mod_init’:
/home/thomas/at76c503a/at76c503-fw_skel.c:149: attention : implicit declaration of function ‘usb_register’
/home/thomas/at76c503a/at76c503-fw_skel.c: In function ‘mod_exit’:
/home/thomas/at76c503a/at76c503-fw_skel.c:162: attention : implicit declaration of function ‘usb_deregister’
make[2]: *** [/home/thomas/at76c503a/at76c503-i3861.o] Erreur 1
make[1]: *** [_module_/home/thomas/at76c503a] Erreur 2
make[1]: quittant le répertoire « /usr/src/linux-headers-2.6.12-10-386 »
make: *** [modules] Erreur 2

Comme dit Leeloo, dans le Cinquième Element: "Please, Help!"

Merci neutral Thomas.

Hors ligne

#2 Le 15/09/2006, à 17:35

FestinMWM

Re : Je n'ai jamais pu compiler

/usr/src/linux-headers-2.6.12-10-386/scripts/gcc-version.sh: line 11: gcc-3.4: command not found/usr/src/linux-headers-2.6.12-10-386/scripts/gcc-version.sh: line 12: gcc-3.4: command not foundmake[1]: gcc-3.4 : commande introuvable

gcc-3.4 n'est pas installé.

Pour mieux régler le pb :
Mets-nous le contenu du Makefile du driver, ta version de linux par la commande uname -r, stp


Dapper-->Edgy-->Feisty-->Gutsy-->Hardy-->Ibby-->Jaunty-->Karmic> Mint LXDE sur PC de 2001 AMD 800 MHz, 1024Mo RAM, 9 Go linux, geforce old 4200
La liberté, c'est ce que permet la longueur de la laisse.

Hors ligne

#3 Le 15/09/2006, à 17:57

bergi

Re : Je n'ai jamais pu compiler

en se servant de la fabuleuse fonction accecible seulement à une elite qui arrive a taper compilation dans le champ "recherche rapide" de la documenattion de ce superbe site :
http://www.google.fr/search?hl=fr&q=compilation+site%3Adoc.ubuntu-fr.org

Hors ligne

#4 Le 15/09/2006, à 18:32

Thomas51

Re : Je n'ai jamais pu compiler

Makefile=

#$Id: Makefile,v 1.42 2006/06/21 08:50:07 maximsch2 Exp $
#
# Copyright (c) 2002 - 2003 Oliver Kurth
#           (c) 2003 - 2004 Jörg Albert <joerg.albert@gmx.de>
#
#	This program is free software; you can redistribute it and/or
#	modify it under the terms of the GNU General Public License as
#	published by the Free Software Foundation; either version 2 of
#	the License, or (at your option) any later version.
#

CC=gcc

ifneq (,$(KVERS))
 KERNEL_VERSION=$(KVERS)
else
 KERNEL_VERSION = $(shell uname -r)
endif


ifneq (,$(KSRC))
 KERNEL_SRC = $(KSRC)
else
 KERNEL_SRC = /lib/modules/$(KERNEL_VERSION)/build
endif

KERNEL_HEADERS = $(KERNEL_SRC)/include
FW_DL=

# compile for firmware download from user space
# if no firmware header files are available
ifneq ($(wildcard fw-pkg*.h),)
FW_DL += -DCOMPILE_FIRMWARE_INTO_DRIVER
endif

MODULES = at76c503-i3861.o at76c503-rfmd.o at76c503-rfmd-acc.o \
          at76c505-rfmd.o at76c503-i3863.o at76c505-rfmd2958.o at76c505a-rfmd2958.o \
	  at76c503.o at76_usbdfu.o 

SRCS = at76c503.c at76_usbdfu.c at76c503-rfmd.c at76c505-rfmd.c at76c503-rfmd-acc.c \
       at76c503-i3861.c at76c503-i3863.c at76c505-rfmd2958.c at76c505a-rfmd2958.c

HDRS = at76c503.h at76_ieee802_11.h at76_usbdfu.h at76c503-fw_skel.c
FW_HDRS= fw-pkg-505-rfmd2958-1.101.0-86.h  fw-pkg-i3863.h  \
	fw-pkg-rfmd-1.101.0-84.h fw-pkg-i3861.h \
	fw-pkg-rfmd-0.90.2-140.h \
	fw-pkg-r505.h fw-pkg-rfmd-acc-1.101.0-84.h \
	fw-pkg-505a-rfmd2958-1.102.0-113.h

SCRIPTS = fwbin2h fwbin2pkg.sh fwconvert fwversion

DISTFILES = $(SRCS) $(HDRS) Makefile README COPYING \
            CHANGELOG gen_fw.c kernel_patch.sh Makefile.k26
TOPDISTFILES = 

# get the version from at76c503.h
# for 2.6.x kernels the shell command is evaluated too late, 
#  looking for at76c503.h in the kernel root dir :-(
#VERSION = -
#VERSION += $(shell grep '\#define DRIVER_VERSION' at76c503.h | sed 's/\#define.*DRIVER_VERSION.*"\(.*\)"/\1/g' )
VERSION = 
DISTNAME = at76c503$(VERSION)
DISTDIR = ../dist

# delete any old module in this tree before installing a new one
DEL_MODULE_DIR = $(DESTDIR)/lib/modules/$(KERNEL_VERSION)
MODULE_DIR = $(DESTDIR)/lib/modules/$(KERNEL_VERSION)/kernel/drivers/net/wireless/at76c503
DEPMOD = /sbin/depmod

# if Rules.make exists in the kernel tree, we assume 2.4 style modules
# if it doesn't assume 2.5 style
OLDMAKE = $(wildcard $(KERNEL_SRC)/Rules.make)

ifeq (,$(OLDMAKE))
# 2.5 style modules, get the kernel makefiles to do the work

SRCDIR = $(shell pwd)
MODVERDIR = $(SRCDIR)/.tmp_versions

obj-m := $(MODULES)

all: modules

modules:
	mkdir -p .tmp_versions
	$(MAKE) -C $(KERNEL_SRC) M=$(SRCDIR) MODVERDIR=$(MODVERDIR) \
		EXTRA_CFLAGS="$(FW_DL)" modules

mv_old:
	for i in $(MODULES:%.o=%.ko); do \
	  find $(DEL_MODULE_DIR) -name $$i -exec rm -f {} {}.orig \; ;done 

install-modules: all
	mkdir -p $(MODULE_DIR)
	install -m 644 -o 0 -g 0 $(MODULES:%.o=%.ko) $(MODULE_DIR)

install: mv_old install-modules
	$(DEPMOD) -ae

uninstall:
	for f in $(MODULES:%.o=%.ko); do rm $(MODULE_DIR)/$$f; done

else
# 2.4 style modules

CPPFLAGS = -D__KERNEL__ \
	-DMODULE -DEXPORT_SYMTAB \
	-I$(KERNEL_HEADERS)
CFLAGS = -O2 -Wall -Wstrict-prototypes -pipe -fno-strict-aliasing \
	 $(FW_DL) \
         -fno-common -Wno-sign-compare -Wno-unused

MODVER = $(shell if cat $(KERNEL_HEADERS)/linux/autoconf.h 2>/dev/null | \
grep -q '^[[:space:]]*\#define[[:space:]]*CONFIG_MODVERSIONS[[:space:]]*1'; \
then echo 1; else echo 0; fi)

ifeq ($(MODVER),1)
MFLAG = -DMODVERSIONS -include $(KERNEL_HEADERS)/linux/modversions.h
endif

CCDEP = $(CC) $(CFLAGS) -M
TAR = tar

all: $(MODULES)

mv_old:
	for i in $(MODULES); do \
	  find $(DEL_MODULE_DIR) -name $$i -exec rm -f {} {}.orig \; ;done 

install-modules: all
	mkdir -p $(MODULE_DIR)
	for f in $(MODULES); do install -m 644 -o 0 -g 0 $$f $(MODULE_DIR)/$$f; done

install: mv_old install-modules
	$(DEPMOD) -ae

uninstall:
	for f in $(MODULES); do rm $(MODULE_DIR)/$$f; done

%.o: %.c
	$(CC) -MD $(CFLAGS) $(CPPFLAGS) $(MFLAG) -c $<

%.s: %.c
	$(CC) -MD $(CFLAGS) $(CPPFLAGS) -S $<

%.i: %.c
	$(CC) -MD $(CPPFLAGS) -E $< -o $@

-include $(SRCS:%.c=%.d)

endif

.PHONY: all dist kernel_patch rmmod mv_old install-modules install modules

TAGS:
	rm -f TAGS
	etags --append $(SRCS) $(HDRS)

clean:
	rm -f core *.o *~ a.out *.d
	rm -f *.ko *.mod.c .*.cmd
	rm -f *.s *.i
	rm -rf .tmp_versions

dist:
	[ -d $(DISTNAME) ] && rm -rf $(DISTNAME) || true
	mkdir $(DISTNAME)
	cp -aR $(DISTFILES) $(DISTNAME)
	mkdir $(DISTNAME)/scripts
	(cd scripts ; cp -aR $(SCRIPTS) ../$(DISTNAME)/scripts)
	tar zcvf $(DISTNAME).tar.gz $(DISTNAME)
	cd $(DISTNAME) ; rm $(FW_HDRS) ; cd ..
	mv $(DISTNAME) $(DISTNAME)-fwdl
	tar zcvf $(DISTNAME)-fwdl.tar.gz $(DISTNAME)-fwdl
	rm -rf $(DISTNAME)-fwdl

kernel_patch:
	 DRV_SRC="$(SRCS)" DRV_HDR="$(HDRS)" ./kernel_patch.sh $(KERNEL_SRC)

rmmod:
	-rmmod $(MODULES:%.o=%)

et ma version est 2.6.12-10-386

Hors ligne

#5 Le 15/09/2006, à 21:17

Thomas51

Re : Je n'ai jamais pu compiler

J'ai installé gcc-3.4 et ça marche #make puis #checkinstall, nickel. Au fait, il m'a créé un .deb. Ca sert à désinstaller? Quelle est la commande pour ça? Merci

Hors ligne

#6 Le 15/09/2006, à 21:25

kaworu

Re : Je n'ai jamais pu compiler

Si t'as pas de compilateur, il faut pas t'étonner de ne pas parvenir à compiler wink


"There are in order of increasing severity: lies, damn lies, statistics, and computer benchmarks."

Hors ligne

#7 Le 15/09/2006, à 21:58

Galileo

Re : Je n'ai jamais pu compiler

J'ai installé gcc-3.4 et ça marche #make puis #checkinstall, nickel. Au fait, il m'a créé un .deb. Ca sert à désinstaller? Quelle est la commande pour ça? Merci

Les paquet debians sont les principales sources d'applications sous ubuntu (et... debian !) , ils les installent et dés installe, sont rangé dans Synaptic !

Une page du wiki sur les paquets Debian: http://doc.ubuntu-fr.org/installation/creer_un_paquet

EDIT : Pour desinstaller cherche le dans synaptic big_smile

Dernière modification par Galileo (Le 15/09/2006, à 22:01)


Keyboard not found,  press enter to continue :

Hors ligne