felixzero / rpitx_alsa

An ALSA sound driver collecting sound samples for F5OEO's rpitx.
GNU General Public License v3.0
14 stars 2 forks source link

Make failed #1

Open F5OEO opened 5 years ago

F5OEO commented 5 years ago

Seems that /build is not present on my /lib/modules/ make -C /lib/modules/4.14.50-v7+/build M=/home/pi/rpitx_alsa/kernel_module modules make[1]: /lib/modules/4.14.50-v7+/build: No such file or directory. Stop. Makefile:10: recipe for target 'all' failed make: [all] Error 2

I used to have this error when compiling modules, but can't remember. Thanks in pointing a solution.

felixzero commented 5 years ago

Hello,

Did you install the Linux headers? I believe the package is "raspberrypi-kernel-headers".

Cheers, felixzero

Le 28 février 2019 13:42:02 GMT+01:00, F5OEO notifications@github.com a écrit :

Seems that /build is not present on my /lib/modules/ make -C /lib/modules/4.14.50-v7+/build M=/home/pi/rpitx_alsa/kernel_module modules make[1]: /lib/modules/4.14.50-v7+/build: No such file or directory. Stop. Makefile:10: recipe for target 'all' failed make: [all] Error 2

I used to have this error when compiling modules, but can't remember. Thanks in pointing a solution.

-- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/felixzero/rpitx_alsa/issues/1

-- Envoyé de mon appareil Android avec Courriel K-9 Mail. Veuillez excuser ma brièveté.

F5OEO commented 5 years ago

Yes , I installed it (as mention in Readme).

felixzero commented 5 years ago

Hum. Do you have a folder with your kernel version in /lib/modules? Could be a discrepancy between the version numbers.

Le 28 février 2019 15:01:35 GMT+01:00, F5OEO notifications@github.com a écrit :

Yes , I installed it (as mention in Readme).

-- You are receiving this because you commented. Reply to this email directly or view it on GitHub: https://github.com/felixzero/rpitx_alsa/issues/1#issuecomment-468282939

F5OEO commented 5 years ago

Yes, there is. I guess that you have complete environment to recompile kernel, that's why you can't reproduce it. Need to investigate, sometime module is a pain to compile under raspbian.

felixzero commented 5 years ago

Hi, I think I get it. Here is what I have in /lib/modules: /lib/modules/4.14.79-v7+. And here is the result of uname -r: 4.14.79-v7+. They match as they should, and my version is more recent than yours.

Could that be that you installed the newest version of the kernel headers, but still with an old kernel? Can you try apt update && apt upgrade?

F5OEO commented 5 years ago

OK apt-get upgrade solved the issue. Thanks !

F5OEO commented 5 years ago

Oups...an other issue : pi@raspberrypi:~/rpitx_alsa/kernel_module $ make make -C /lib/modules/4.14.98-v7+/build M=/home/pi/rpitx_alsa/kernel_module modules make[1]: Entering directory '/usr/src/linux-headers-4.14.98-v7+' Building modules, stage 2. MODPOST 1 modules make[1]: Leaving directory '/usr/src/linux-headers-4.14.98-v7+' pi@raspberrypi:~/rpitx_alsa/kernel_module $ sudo insmod snd-rpitx.ko insmod: ERROR: could not insert module snd-rpitx.ko: Unknown symbol in module

felixzero commented 5 years ago

Did you try to make clean first, since you initially tried to compile with an older kernel? Can you post the output of dmesg?

F5OEO commented 5 years ago

make clean was done. [ 1652.259307] snd_rpitx: Unknown symbol snd_pcm_new (err 0) [ 1652.259329] snd_rpitx: Unknown symbol snd_card_register (err 0) [ 1652.259343] snd_rpitx: Unknown symbol snd_card_free (err 0) [ 1652.259357] snd_rpitx: Unknown symbol snd_pcm_lib_preallocate_pages_for_all (err 0) [ 1652.259398] snd_rpitx: Unknown symbol snd_card_new (err 0) [ 1652.259412] snd_rpitx: Unknown symbol snd_pcm_lib_malloc_pages (err 0) [ 1652.259439] snd_rpitx: Unknown symbol snd_pcm_lib_ioctl (err 0) [ 1652.259470] snd_rpitx: Unknown symbol snd_pcm_lib_free_pages (err 0) [ 1652.259488] snd_rpitx: Unknown symbol snd_pcm_set_ops (err 0) [ 1652.259517] snd_rpitx: Unknown symbol snd_device_new (err 0) [ 1652.259584] snd_rpitx: Unknown symbol snd_pcm_period_elapsed (err 0)

felixzero commented 5 years ago

It seems not to be able to find ALSA. Try a reboot maybe?

F5OEO commented 5 years ago

After reboot , same (miss one line on previous message) [ 42.721568] snd_rpitx: loading out-of-tree module taints kernel. [ 42.721824] snd_rpitx: Unknown symbol snd_pcm_new (err 0) [ 42.721840] snd_rpitx: Unknown symbol snd_card_register (err 0) [ 42.721854] snd_rpitx: Unknown symbol snd_card_free (err 0) [ 42.721868] snd_rpitx: Unknown symbol snd_pcm_lib_preallocate_pages_for_all (err 0) [ 42.721910] snd_rpitx: Unknown symbol snd_card_new (err 0) [ 42.721924] snd_rpitx: Unknown symbol snd_pcm_lib_malloc_pages (err 0) [ 42.721952] snd_rpitx: Unknown symbol snd_pcm_lib_ioctl (err 0) [ 42.721983] snd_rpitx: Unknown symbol snd_pcm_lib_free_pages (err 0) [ 42.722000] snd_rpitx: Unknown symbol snd_pcm_set_ops (err 0) [ 42.722029] snd_rpitx: Unknown symbol snd_device_new (err 0) [ 42.722096] snd_rpitx: Unknown symbol snd_pcm_period_elapsed (err 0)

felixzero commented 5 years ago

Well, I upgraded my system to run the same version as you and it starts fine. This definitely sounds like you compile the module for a different version as the kernel you run. You uses stock Raspbian?

F5OEO commented 5 years ago

Yes raspbian lite standard..I need to test an other more 'clean" raspi as this is my development one which has maybe some weird configuration.

abraxasneo commented 5 years ago

I have the same error after the make command ~/rpitx_alsa/kernel_module $ make make -C /lib/modules/4.19.25-v7+/build M=/home/pi/rpitx_alsa/kernel_module modules make[1]: /lib/modules/4.19.25-v7+/build: No such file or directory. Stop. Makefile:10: recipe for target 'all' failed make: [all] Error 2 I try apt update && apt upgrade make clean reboot

felixzero commented 5 years ago

@abraxasneo I just flashed a new freshly downloaded Raspbian on my Raspberry Pi 3 and followed the instructions to check the flow. It works. What surprises me it that apparently you run the "4.19.25-v7+" kernel, while on my freshly updated system, it is only the "4.14.98-v7+". Did you activate the testing and/or sid repositories or installed a custom kernel? If so, you need to install the kernel headers that match your version. (Or just install a fresh Raspbian).