ubuntuusers.de

Compilerfehler seit Kernel 4.1

Status: Gelöst | Ubuntu-Version: Ubuntu 14.04 (Trusty Tahr)
Antworten |

ChaoZ

Avatar von ChaoZ

Anmeldungsdatum:
23. November 2005

Beiträge: 526

Wohnort: 247xx

Moin!

Ich nutze schon länger problemlos die mainline-Kernel. Da ich eine FritzCard nutze, compiliere ich mir immer den Treiber selber. Bis 4.0.x klappte das problemlos:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
chaoz@chaoz:~$ uname -a
Linux chaoz 4.0.8-040008-generic #201507101735 SMP Fri Jul 10 17:46:05 UTC 2015 i686 athlon i686 GNU/Linux
chaoz@chaoz:~$ capi-compile.sh 
[sudo] password for chaoz: 
rm -f main.o driver.o tools.o tables.o queue.o lib.o
rm -f fcpci.o fcpci.ko 
make -C /lib/modules/4.0.8-040008-generic/build SUBDIRS=/media/Daten/home/chaoz/Install/avm/fcpci-3.10.0/src modules
make[1]: Verzeichnis »/usr/src/linux-headers-4.0.8-040008-generic« wird betreten
  CC [M]  /media/Daten/home/chaoz/Install/avm/fcpci-3.10.0/src/main.o
  CC [M]  /media/Daten/home/chaoz/Install/avm/fcpci-3.10.0/src/driver.o
  CC [M]  /media/Daten/home/chaoz/Install/avm/fcpci-3.10.0/src/tools.o
  CC [M]  /media/Daten/home/chaoz/Install/avm/fcpci-3.10.0/src/tables.o
  CC [M]  /media/Daten/home/chaoz/Install/avm/fcpci-3.10.0/src/queue.o
  CC [M]  /media/Daten/home/chaoz/Install/avm/fcpci-3.10.0/src/lib.o
/media/Daten/home/chaoz/Install/avm/fcpci-3.10.0/src/lib.c: In function ‘printl’:
/media/Daten/home/chaoz/Install/avm/fcpci-3.10.0/src/lib.c:647:1: warning: the frame size of 1028 bytes is larger than 1024 bytes [-Wframe-larger-than=]
 } /* printl */
 ^
  LD [M]  /media/Daten/home/chaoz/Install/avm/fcpci-3.10.0/src/fcpci.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /media/Daten/home/chaoz/Install/avm/fcpci-3.10.0/src/fcpci.mod.o
  LD [M]  /media/Daten/home/chaoz/Install/avm/fcpci-3.10.0/src/fcpci.ko
make[1]: Verzeichnis »/usr/src/linux-headers-4.0.8-040008-generic« wird verlassen
»fcpci.ko“ -> »/lib/modules/4.0.8-040008-generic/kernel/extras/fcpci.ko“
depmod -a
insmod /lib/modules/4.0.8-040008-generic/kernel/extras/fcpci.ko 
            capi20.c: 164              CapiDebug():[capi20_isinstalled]: standard loop - module: rcapi
            capi20.c: 164              CapiDebug():[capi20_isinstalled]: standard loop - module: fritzbox
            capi20.c: 164              CapiDebug():[capi20_isinstalled]: standard loop - module: standard
            capi20.c: 164              CapiDebug():[capi20_isinstalled]: capi_fd: 4

Seit 4.1.x endet es mit einem Fehler aus dem ich nicht schlau werde:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
chaoz@chaoz:~$ uname -a
Linux chaoz 4.1.2-040102-generic #201507101335 SMP Fri Jul 10 17:59:11 UTC 2015 i686 athlon i686 GNU/Linux
chaoz@chaoz:~$ capi-compile.sh 
[sudo] password for chaoz: 
rm -f main.o driver.o tools.o tables.o queue.o lib.o
rm -f fcpci.o fcpci.ko 
make -C /lib/modules/4.1.2-040102-generic/build SUBDIRS=/media/Daten/home/chaoz/Install/avm/fcpci-3.10.0/src modules
make[1]: Verzeichnis »/usr/src/linux-headers-4.1.2-040102-generic« wird betreten
  CC [M]  /media/Daten/home/chaoz/Install/avm/fcpci-3.10.0/src/main.o
  CC [M]  /media/Daten/home/chaoz/Install/avm/fcpci-3.10.0/src/driver.o
/media/Daten/home/chaoz/Install/avm/fcpci-3.10.0/src/driver.c: In function ‘install_card’:
/media/Daten/home/chaoz/Install/avm/fcpci-3.10.0/src/driver.c:373:4: error: ‘IRQF_DISABLED’ undeclared (first use in this function)
    IRQF_DISABLED | IRQF_SHARED, 
    ^
/media/Daten/home/chaoz/Install/avm/fcpci-3.10.0/src/driver.c:373:4: note: each undeclared identifier is reported only once for each function it appears in
make[2]: *** [/media/Daten/home/chaoz/Install/avm/fcpci-3.10.0/src/driver.o] Fehler 1
make[1]: *** [_module_/media/Daten/home/chaoz/Install/avm/fcpci-3.10.0/src] Fehler 2
make[1]: Verzeichnis »/usr/src/linux-headers-4.1.2-040102-generic« wird verlassen
make: *** [fcpci.ko] Fehler 2
cp: der Aufruf von stat für »fcpci.ko“ ist nicht möglich: Datei oder Verzeichnis nicht gefunden
make: *** [install] Fehler 1
modprobe: FATAL: Module fcpci not found.
modprobe: FATAL: Module fcpci not found.
            capi20.c: 164              CapiDebug():[capi20_isinstalled]: standard loop - module: rcapi
            capi20.c: 164              CapiDebug():[capi20_isinstalled]: standard loop - module: fritzbox
            capi20.c: 164              CapiDebug():[capi20_isinstalled]: standard loop - module: standard
            capi20.c: 164              CapiDebug():[capi20_isinstalled]: capi_fd: -1
            capi20.c: 164              CapiDebug():[capi20_isinstalled]: other loop - module: rcapi
            capi20.c: 164              CapiDebug():[capi20_isinstalled]: capi_fd: -1
            capi20.c: 164              CapiDebug():[capi20_isinstalled]: other loop - module: fritzbox
            capi20.c: 164              CapiDebug():[capi20_isinstalled]: capi_fd: -1
            capi20.c: 164              CapiDebug():[capi20_isinstalled]: other loop - module: standard
            capi20.c: 164              CapiDebug():[capi20_isinstalled]: CapiRegNotInstalled

Moderiert von tomtomtom:

Ins passende Forum verschoben.

tomtomtom Team-Icon

Supporter
Avatar von tomtomtom

Anmeldungsdatum:
22. August 2008

Beiträge: 55452

Wohnort: Berlin

Schaut schlicht und ergreifend so aus, als ob das fcpci-Modul in deiner Quelle nicht kompatibel mit Kernel 4.1 ist und von diesem nicht erkannt wird.

Da das mit dem Originalquelltext ja sowieso nicht mehr funktioniert: Was hast du als Grundlage genutzt?

Sollte es dieser populäre Patch gewesen sein bittet der Ersteller ja um Rückmeldung, wenn es nicht funktioniert.

MartinBurnicki

Anmeldungsdatum:
10. August 2015

Beiträge: Zähle...

Hi,

ich bin gerade über diesen Thread gestolpert.

Das Flag IRQF_DISABLED war schon seit längerem obsolet und wird seit Kernel 4.1 nicht mehr unterstützt: http://patchwork.linux-mips.org/patch/9457/

D.h., der Kernel benutzt/benötigt es einfach nicht mehr. Ein möglicher Workaround besteht darin, in der Quelltext-Datei, die IRQF_DISABLED verwendet, entweder oben die folgenden Zeilen einzutragen:

1
2
3
#if !defined(IRQF_DISABLED)
#  define IRQF_DISABLED 0x00
#endif

oder einfach mit einem Texteditor alle Vorkommen des Wortes IRQF_DISABLED durch 0x00 ersetzen, was in deinem Fall auf das gleiche hinauskommt. Die Lösung mit #if defined() wäre vorzuziehen, wenn der modifizierte Treiber auch noch mit älteren Kernels verwendet werden sollte, die dies noch unterstützen.

ChaoZ

(Themenstarter)
Avatar von ChaoZ

Anmeldungsdatum:
23. November 2005

Beiträge: 526

Wohnort: 247xx

Dank, funktioniert. ☺

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
chaoz@chaoz:~$ uname -a
Linux chaoz 4.1.5-040105-generic #201508101730 SMP Mon Aug 10 21:44:30 UTC 2015 i686 athlon i686 GNU/Linux
chaoz@chaoz:~$ capiinfo 
            capi20.c: 164              CapiDebug():[capi20_isinstalled]: standard loop - module: rcapi
            capi20.c: 164              CapiDebug():[capi20_isinstalled]: standard loop - module: fritzbox
            capi20.c: 164              CapiDebug():[capi20_isinstalled]: standard loop - module: standard
            capi20.c: 164              CapiDebug():[capi20_isinstalled]: capi_fd: 4
Number of Controllers : 1
Controller 1:
Manufacturer: AVM GmbH
CAPI Version: 2.0
Manufacturer Version: 3.11-07  (49.23)

MartinBurnicki

Anmeldungsdatum:
10. August 2015

Beiträge: 2

Prima!

Wenn du den Patch verwendest, den tomtomtom erwähnt hat, magst du vielleicht das Problem und die Lösung "hochmelden".

Zudem könntest du diesen Thread auf "gelöst" setzen. 😉

Antworten |