PDA

View Full Version : -Werror=implicit-function-declaration while compiling



joblafors
June 25th, 2012, 12:22 PM
Hello, im trying to compile wifi drivers but get some warnings while doing it.

I searched all files for "-Werror=implicit-function-declaration", but cant find it anywhere, how to remove this warning as error thing.



home@home-desktop:~/Desktop/compat/compat-wireless-3.2.5-1$ sudo make
make -C /lib/modules/3.2.0-25-generic/build M=/home/home/Desktop/compat/compat-wireless-3.2.5-1 modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-25-generic'
CC [M] /home/home/Desktop/compat/compat-wireless-3.2.5-1/net/wireless/util.o
/home/home/Desktop/compat/compat-wireless-3.2.5-1/net/wireless/util.c: In function ‘cfg80211_change_iface’:
/home/home/Desktop/compat/compat-wireless-3.2.5-1/net/wireless/util.c:810:2: error: implicit declaration of function ‘br_port_exists’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [/home/home/Desktop/compat/compat-wireless-3.2.5-1/net/wireless/util.o] Error 1
make[2]: *** [/home/home/Desktop/compat/compat-wireless-3.2.5-1/net/wireless] Error 2
make[1]: *** [_module_/home/home/Desktop/compat/compat-wireless-3.2.5-1] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-25-generic'
make: *** [modules] Error 2


Thank you for your help.

steeldriver
June 25th, 2012, 12:38 PM
did you install any build packages before trying the 'make'? the usual recommendation is to install the build-essential meta package which will make sure you get gcc/g++ with all the trimmings


apt-get install build-essentialIt kind of looks like 'make' is finding the default 'cc' compiler not gcc

joblafors
June 25th, 2012, 12:42 PM
did you install any build packages before trying the 'make'? the usual recommendation is to install the build-essential meta package which will make sure you get gcc/g++ with all the trimmings


apt-get install build-essentialIt kind of looks like 'make' is finding the default 'cc' compiler not gcc

Yes "build-essential" is at newest version.

steeldriver
June 25th, 2012, 01:37 PM
well then I don't know - likely Werror-implicit-function-declaration is enabled by a catch-all warning like -Wall which is why you can't find an explicit reference to it in the makefile

beyond that I can't help - sorry

oldos2er
June 25th, 2012, 05:37 PM
Moved to Packaging and Compiling Programs.

Bachstelze
June 26th, 2012, 09:06 AM
Where does this code come from? Generally, errors when building a driver indicate that the code is not compatible with the kernel version on the system.

joblafors
June 27th, 2012, 09:29 PM
Thank you all for your help and interest in this.
I managed to get this working, and yes Kernel version was one of the problems, but just the first one :)

latebeat
February 4th, 2013, 06:04 AM
Hello, im trying to compile wifi drivers but get some warnings while doing it.

I searched all files for "-Werror=implicit-function-declaration", but cant find it anywhere, how to remove this warning as error thing.



home@home-desktop:~/Desktop/compat/compat-wireless-3.2.5-1$ sudo make
make -C /lib/modules/3.2.0-25-generic/build M=/home/home/Desktop/compat/compat-wireless-3.2.5-1 modules
make[1]: Entering directory `/usr/src/linux-headers-3.2.0-25-generic'
CC [M] /home/home/Desktop/compat/compat-wireless-3.2.5-1/net/wireless/util.o
/home/home/Desktop/compat/compat-wireless-3.2.5-1/net/wireless/util.c: In function ‘cfg80211_change_iface’:
/home/home/Desktop/compat/compat-wireless-3.2.5-1/net/wireless/util.c:810:2: error: implicit declaration of function ‘br_port_exists’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [/home/home/Desktop/compat/compat-wireless-3.2.5-1/net/wireless/util.o] Error 1
make[2]: *** [/home/home/Desktop/compat/compat-wireless-3.2.5-1/net/wireless] Error 2
make[1]: *** [_module_/home/home/Desktop/compat/compat-wireless-3.2.5-1] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-25-generic'
make: *** [modules] Error 2


Thank you for your help.

Hello,

I'm having the exact same complilation error, did you solve it somehow?

MadCow108
February 4th, 2013, 08:06 PM
the proper solution is to search for the function signature of br_port_exists in all the files and dump it into the file that needs it (or include the header that holds the signature)

more can't be said without source

latebeat
February 5th, 2013, 09:45 AM
the proper solution is to search for the function signature of br_port_exists in all the files and dump it into the file that needs it (or include the header that holds the signature)

more can't be said without source

Would you mind explaining that to me a little more?
I'm trying to compile compat-wireless for 12.04 lts like you did from source, and I'm having the exact same error.

http://www.orbit-lab.org/kernel/compat-wireless-3-stable/v3.2/