Driver failing to compile. make: *** [default] Error 2
Status: Pre-Alpha
Brought to you by:
mgrabner
Compilation failing on multiple different systems with this same error.
/~/~/trunk/audio.c:1:9: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘attribute’ before ‘<’ token include ^ /~/~/trunk/audio.c: In function ‘line6_init_audio’: /~/~/trunk/audio.c:28:2: error: implicit declaration of function ‘snd_card_create’ [-Werror=implicit-function-declaration] err = snd_card_create(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1, ^ cc1: some warnings being treated as errors make[2]: [/home/marlon/trunk/audio.o] Error 1 make[1]: [module/home/marlon/trunk] Error 2 make[1]: se sale del directorio «/usr/src/linux-headers-3.19.0-25-generic» make: *** [default] Error 2
I get similar error messages. This is the output of make (in German):
First of all, to make clear what I am talking about, this is the content of set_revision.sh:
I could solve my problem: The actual problem was that in set_revision.sh, we grep the url from the output of "svn info", which in my case (German) is
The variavble url in set_revision.sh is set by
Hence, url is given a wrong value, namely
For me, the solution was so to change line 7 of set_revision.sh from
to
Of course, this can not work globally. One would have to change the command properly such that the correct URL is grepped from the output of svn info. Moreover, the if-statement in line 9, where the value of url is tested, should probably not be tested with
but rather with
Last edit: Tobias Förster 2015-12-30
Hi Tobias,
Thanks for that. I tried doing that, but I keep getting the same errors.
This my modified set_revision.sh:
!/bin/sh
echo "#ifndef DRIVER_REVISION" > revision_new.h
if info=$(svn info . 2> /dev/null); then
echo "/ current subversion revision /" >> revision_new.h
url="http://svn.code.sf.net/p/line6linux/code/driver/trunk";
version=$(svnversion)
if test $url == "http://svn.code.sf.net/p/line6linux/code/driver/trunk"; then
revision="$version"
else
revision="$url@$version"
fi
echo "#define DRIVER_REVISION \" (revision $revision)\"" >> revision_new.h
else
echo "/ current subversion revision not available /" >> revision_new.h
echo "#define DRIVER_REVISION \"\"" >> revision_new.h
fi
echo "#endif" >> revision_new.h
if diff --brief revision.h revision_new.h > /dev/null 2>&1; then
rm -f revision_new.h
else
mv revision_new.h revision.h
fi
And this is the error message from make:
./set_revision.sh
./set_revision.sh: 9: test: http://svn.code.sf.net/p/line6linux/code/driver/trunk: unexpected operator
make -C /lib/modules/3.19.0-25-lowlatency/build CONFIG_LINE6_USB=m SUBDIRS=/home/largefinger/code/driver/trunk modules
make[1]: Entering directory
/usr/src/linux-headers-3.19.0-25-lowlatency' CC [M] /home/largefinger/code/driver/trunk/audio.o /home/largefinger/code/driver/trunk/audio.c: In function ‘line6_init_audio’: /home/largefinger/code/driver/trunk/audio.c:27:2: error: implicit declaration of function ‘snd_card_create’ [-Werror=implicit-function-declaration] err = snd_card_create(SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1, ^ cc1: some warnings being treated as errors make[2]: *** [/home/largefinger/code/driver/trunk/audio.o] Error 1 make[1]: *** [_module_/home/largefinger/code/driver/trunk] Error 2 make[1]: Leaving directory
/usr/src/linux-headers-3.19.0-25-lowlatency'make: *** [default] Error 2
I can't seem to spot any errors and the svn address appears to be the same for me. It's got me stumpe. Thanks again.
Hello everybody,
I have the same error as Matt. Have you found a way to get through it ? I Copied and tried both versions, Matt's and Tobias' for the file
revision.sh
.I executed
make -d
to have some extra details about the error. It just doesn't like the impicit déclaration of a function in the fileaudio.c
.Concerning the error baout the svn adress, both
revision.sh
files cause the same message:./set_revision.sh: 9: test: svn://svn.code.sf.net/p/line6linux/code/driver/trunk: unexpected operator
.I would like to help more but i'm not a C programmer.
Hope this helps solve the problem
Hello,
I could get it to build with a recent linux (4.5) by changing audio.c lines 27/28 from this :
to this :
Sadly my dmesg then tells me :
Last edit: Jean-Michaël Celerier 2016-03-20
Thank you Jean-Michaël,
Your solution allowed to pas over that error. Now i'm on an error on driver.c at the last line 1135:
missing terminating " character MODULE_VERSION(DRIVER_VERSION);
After I corrected the
set_revision.sh
file as proposed by Tobias it went smoothlyI'm using the kernel 4.4.0-13-generic, It's the latest on the repositories -i'm a bit of a noob-.
Jean-Michaël, the note you are getting comes from driver.c lines 948-954, Maybe it can help you.
I can use my line6 UX1 pod, even before installing this drivers, but the return on the headset is all digital crunchy. I cannot listen to what I play as I record. The recording is just as good as before installing it :-S
Thank you very much for your help
Last edit: lhtd 2016-03-20