Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
563 connectés 

  FORUM HardWare.fr
  Programmation
  C

  compilation d'une couche Ethernet modifiée sur linux

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

compilation d'une couche Ethernet modifiée sur linux

n°904584
yayien
Posté le 22-11-2004 à 11:53:39  profilanswer
 

Bonjour,  
je sais le titre n'est pas très clair.  
Voici mon problème dans le cadre d'un projet "pile réseau Java sur Linux".  
Je veux modifier la couche Ethernet de Linux et donc la recompiler et l'intégrer. A chaque fois que je tente un gcc, linux me renvoie des erreurs dans les librairies .h qui sont pourtant les siennes (linux/random.h par exemple).  
 
Que pensez vous de cette erreur ?  
 
PS : j'ai aussi mis le topic sur OS alternatifs

mood
Publicité
Posté le 22-11-2004 à 11:53:39  profilanswer
 

n°904588
skeye
Posté le 22-11-2004 à 12:02:38  profilanswer
 

Surtout donne pas les messages d'erreur, de bout de code ou de ligne de compil utilisée, on pourrait trouver le pb...[:itm]


---------------
Can't buy what I want because it's free -
n°904792
yayien
Posté le 22-11-2004 à 16:10:05  profilanswer
 

c'était un test.. bon je sors.
Sans rien modifier aux fichiers :  
 
cd /usr/src/linux-2.6.3/net/ethernet
make pe2.o  
 
Donc voila l'erreur
""""""""""""""""""""""""""""""""""""""""""
cc    -c -o pe2.o pe2.c
In file included from /usr/include/linux/sched.h:11,
                 from /usr/include/linux/mm.h:4,
                 from pe2.c:2:
/usr/include/linux/jiffies.h:16: error: parse error before "jiffies_64"
/usr/include/linux/jiffies.h:20: error: parse error before "get_jiffies_64"
In file included from /usr/include/linux/cpumask.h:8,
                 from /usr/include/linux/sched.h:14,
                 from /usr/include/linux/mm.h:4,
                 from pe2.c:2:
/usr/include/linux/bitmap.h: In function `bitmap_empty':
/usr/include/linux/bitmap.h:15: error: `BITS_PER_LONG' undeclared (first use in this function)
/usr/include/linux/bitmap.h:15: error: (Each undeclared identifier is reported only once
/usr/include/linux/bitmap.h:15: error: for each function it appears in.)
/usr/include/linux/bitmap.h: In function `bitmap_full':
/usr/include/linux/bitmap.h:29: error: `BITS_PER_LONG' undeclared (first use in this function)
/usr/include/linux/bitmap.h: In function `bitmap_equal':
/usr/include/linux/bitmap.h:44: error: `BITS_PER_LONG' undeclared (first use in this function)
/usr/include/linux/bitmap.h: In function `bitmap_shift_right':
/usr/include/linux/bitmap.h:85: error: `__shr_tmp' undeclared (first use in this function)
/usr/include/linux/bitmap.h: In function `bitmap_shift_left':
/usr/include/linux/bitmap.h:98: error: `__shl_tmp' undeclared (first use in this function)
/usr/include/linux/bitmap.h: In function `bitmap_weight':
/usr/include/linux/bitmap.h:144: error: `BITS_PER_LONG' undeclared (first use in this function)
In file included from /usr/include/linux/sched.h:14,
                 from /usr/include/linux/mm.h:4,
                 from pe2.c:2:
/usr/include/linux/cpumask.h:10:5: missing binary operator before token "("
/usr/include/linux/cpumask.h:34:5: missing binary operator before token "("
In file included from /usr/include/linux/sched.h:20,
                 from /usr/include/linux/mm.h:4,
                 from pe2.c:2:
/usr/include/asm/mmu.h: At top level:
/usr/include/asm/mmu.h:13: error: field `sem' has incomplete type
In file included from /usr/include/linux/signal.h:4,
                 from /usr/include/linux/sched.h:24,
                 from /usr/include/linux/mm.h:4,
                 from pe2.c:2:
/usr/include/linux/list.h:591:2: warning: #warning "don't include kernel headers in userspace"
In file included from /usr/include/asm/siginfo.h:4,
                 from /usr/include/linux/signal.h:7,
                 from /usr/include/linux/sched.h:24,
                 from /usr/include/linux/mm.h:4,
                 from pe2.c:2:
/usr/include/asm-generic/siginfo.h:53: error: size of array `_pad' is too large
In file included from /usr/include/linux/sched.h:28,
                 from /usr/include/linux/mm.h:4,
                 from pe2.c:2:
/usr/include/linux/completion.h:15: error: parse error before "wait_queue_head_t"
/usr/include/linux/completion.h: In function `init_completion':
/usr/include/linux/completion.h:26: error: dereferencing pointer to incomplete type
/usr/include/linux/completion.h:27: error: dereferencing pointer to incomplete type
In file included from /usr/include/linux/sched.h:29,
                 from /usr/include/linux/mm.h:4,
                 from pe2.c:2:
/usr/include/linux/pid.h: At top level:
/usr/include/linux/pid.h:18: error: field `task_list' has incomplete type
/usr/include/linux/pid.h:19: error: field `hash_chain' has incomplete type
/usr/include/linux/pid.h:24: error: field `pid_chain' has incomplete type
In file included from /usr/include/linux/sched.h:30,
                 from /usr/include/linux/mm.h:4,
                 from pe2.c:2:
/usr/include/linux/percpu.h: In function `__alloc_percpu':
/usr/include/linux/percpu.h:46: error: `GFP_KERNEL' undeclared (first use in this function)
In file included from /usr/include/linux/sched.h:101,
                 from /usr/include/linux/mm.h:4,
                 from pe2.c:2:
/usr/include/linux/timer.h: At top level:
/usr/include/linux/timer.h:10: error: field `entry' has incomplete type
In file included from /usr/include/linux/highmem.h:8,
                 from /usr/include/linux/skbuff.h:27,
                 from pe2.c:5:
/usr/include/asm/cacheflush.h:25: error: parse error before "pgprot_t"
pe2.c:7:26: net/datalink.h: No such file or directory
pe2.c:10: warning: `struct datalink_proto' declared inside parameter list
pe2.c: In function `pEII_request':
pe2.c:17: error: dereferencing pointer to incomplete type
pe2.c:18: error: dereferencing pointer to incomplete type
pe2.c: In function `make_EII_client':
pe2.c:25: error: dereferencing pointer to incomplete type
pe2.c:25: error: `GFP_ATOMIC' undeclared (first use in this function)
pe2.c:25: warning: initialization makes pointer from integer without a cast
pe2.c:28: error: dereferencing pointer to incomplete type
pe2.c:29: error: dereferencing pointer to incomplete type
make: *** [pe2.o] Erreur 1
""""""""""""""""""""""""""""""""""""""""""

n°904851
manatane
En vous remerciant, bonsoir
Posté le 22-11-2004 à 17:18:36  profilanswer
 

Je comprend pas ce que tu veux faire...
La pile réseau de linux n'est pas un module (dumoins çà m'étonnerais). Par conséquent, pas de insmod/rmmod ; si tu veux la modifier il te faut bricoler les bons fichiers, puis recompiler tout le noyau, non?
 
Tu as sans doute le noyau d'une distribution?
 
Quoiqu'il en soit il ne te reste plus qu'à recompiler un nouveau noyau plus récent et probablement plus stable http://kernel.org/ genre le 2.6.9 après avoir modifié tes sources...

n°904857
Lam's
Profil: bas.
Posté le 22-11-2004 à 17:29:44  profilanswer
 

manatane a écrit :

Quoiqu'il en soit il ne te reste plus qu'à recompiler un nouveau noyau plus récent et probablement plus stable http://kernel.org/ genre le 2.6.9 après avoir modifié tes sources...


 
Il y a surtout qu'il doit être presque impossible de ne recompiler qu'un seul fichier: Le make-system a besoin de générer les infos de configuration, et de mettre les bonnes définitions aux bon endroits.
 
make bidule.o ne se base que sur les règles implicites de make. Donc, il n'y a pas de définition d'architecture, de répertoires d'includes ou autres qui sont inclues en ligne de commande.
 
Donc, ta réponse est la bonne : il faut recompiler tout le noyau. Que benni soit le nom de Tannenbaum. :D

n°904879
manatane
En vous remerciant, bonsoir
Posté le 22-11-2004 à 17:53:43  profilanswer
 

:)
Je conseille donc à notre ami de faire sa manipulation sur un micronoyau comme Hurd ou Windows NT (et dérivés) :D


Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  C

  compilation d'une couche Ethernet modifiée sur linux

 

Sujets relatifs
[jsp]problème à la compilation : class file contains wrong classUn bon RAD pour linux ?
Serveur X & Ja va sous Linux[DevC++] problème de compilation avec des templates
ServerSocket et Linux[C] thread sur SUN et sur linux
[GNU] options de compilation[C] Compiler un code C (from linux) avec un compiler win
[C/C++] interroger le système (connaitre le path sous linux)Compilation php?
Plus de sujets relatifs à : compilation d'une couche Ethernet modifiée sur linux


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR