1

I'm running the latest Raspbian from the Raspberry Pi website.

I tried to compile this wireless driver from https://github.com/gnab/rtl8812au that supports Raspberry PI but I run into the following error.

$ make ARCH=arm CROSS_COMPILE= -C /lib/modules/3.18.8-v7+/build M=/home/pi/Desktop/rtl8812au  modules
make[1]: Entering directory '/lib/modules/3.18.8-v7+/build'
  CC [M]  /home/pi/Desktop/rtl8812au/core/rtw_cmd.o
./scripts/recordmcount: 1: ./scripts/recordmcount: Syntax error: word unexpected (expecting ")")
scripts/Makefile.build:257: recipe for target '/home/pi/Desktop/rtl8812au/core/rtw_cmd.o' failed
make[2]: *** [/home/pi/Desktop/rtl8812au/core/rtw_cmd.o] Error 2
Makefile:1381: recipe for target '_module_/home/pi/Desktop/rtl8812au' failed
make[1]: *** [_module_/home/pi/Desktop/rtl8812au] Error 2
make[1]: Leaving directory '/lib/modules/3.18.8-v7+/build'
Makefile:1051: recipe for target 'modules' failed
make: *** [modules] Error 2

/lib/modules/3.18.8-v7+build/scripts/Makefile.build

# Built-in and composite module parts
$(obj)/%.o: $(src)/%.c $(recordmcount_source) FORCE
        $(call cmd,force_checksrc)              #<--------------LINE 257
        $(call if_changed_rule,cc_o_c)

The code for line 257 looks about right... anyone know what the problem might be?
I have a Raspberry Pi 2.

Update:

I tried compiling the kernel on the RPi2 directly and now it seems to work. I didn't want to have to do it on the RPi2 since compiling the kernel takes ages.

I had cross-compiled from an Ubuntu 14.10 64-bit installation since it only took minutes. However, I don't think it liked the kernel being compiled from there. Time to investigate and update this question later with more details.

  • What about ./scripts/recordmcount? – goldilocks Mar 6 '15 at 15:41
  • @goldilocks It's a binary file. So it's unreadable. – Tek Mar 6 '15 at 15:42
  • 1
    I encountered similar problem... Have you solved it? – Douglas Su Jul 6 '15 at 16:04
  • @DouglasSu Did you read my update? Compiling on the RP2 itself works fine... I only got that error when I cross compiled – Tek Apr 1 '16 at 10:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.