bondagit / ravenna-alsa-lkm

RAVENNA ALSA LKM
20 stars 9 forks source link

Cannot compile on kernel 6.2 and 6.3 #10

Closed olm52 closed 1 year ago

olm52 commented 1 year ago

Cannot compile it in kernel 6.2. Tried with gcc 12.2.1-5 and also with clang 15.0.7-4 This is the output:

DKMS make.log for ravenna-alsa-lkm-r135.140abf6 for kernel 6.2.2-1-cachyos-rt (x86_64) Wed Mar 22 03:41:54 PM +07 2023 make -C /lib/modules/6.2.2-1-cachyos-rt/build/ M=/var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build modules CC [M] /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/c_wrapper_lib.o CC [M] /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/audio_driver.o CC [M] /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/manager.o CC [M] /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/module_main.o CC [M] /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/PTP.o CC [M] /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/module_interface.o CC [M] /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/module_netlink.o CC [M] /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/module_timer.o CC [M] /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/EtherTubeNetfilter.o CC [M] /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/RTP_streams_manager.o CC [M] /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/RTP_audio_stream.o /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/RTP_audio_stream.c:1044:13: warning: unused variable 'delta' [-Wunused-variable] int64_t delta = self->m_tRTPStream.m_ui64LastAudioSampleReceivedSAC - pManager->get_global_SAC(pManager->user); ^ CC [M] /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/RTP_stream.o 1 warning generated. CC [M] /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/RTP_stream_info.o CC [M] /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/MTAL_EthUtils.o /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/audio_driver.c:1340:8: warning: variable 'ptp_frame_size' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized] if(chip->ravenna_peer) ^~~~~~~~~~~~~~~~~~ /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/audio_driver.c:1344:22: note: uninitialized use occurs here if(periodSize != ptp_frame_size) ^~~~~~~~~~~~~~ /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/audio_driver.c:1340:5: note: remove the 'if' if its condition is always true if(chip->ravenna_peer) ^~~~~~~~~~~~~~~~~~~~~~ /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/audio_driver.c:1304:28: note: initialize the variable 'ptp_frame_size' to silence this warning uint32_t ptp_frame_size; ^ = 0 /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/MTAL_EthUtils.c:107:11: warning: unused variable 'by' [-Wunused-variable] uint8_t by = (ullID >> (ui32 * 8)) & 0xFF; ^ /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/MTAL_EthUtils.c:556:29: warning: unused variable 'pSynch' [-Wunused-variable] TAppleMIDI_Synch_Packet* pSynch = (TAppleMIDI_Synch_Packet*)pAppleMIDI_PacketBase; ^ /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/MTAL_EthUtils.c:580:35: warning: unused variable 'pAppleMIDI_IN_NO_OK_BY_Packet' [-Wunused-variable] TAppleMIDI_IN_NO_OK_BY_Packet* pAppleMIDI_IN_NO_OK_BY_Packet = (TAppleMIDI_IN_NO_OK_BY_Packet*)pAppleMIDI_PacketBase; ^ CC [M] /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/MTAL_LKernelAPI.o 3 warnings generated. CC [M] /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/MTConvert.o 1 warning generated. /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/MTConvert.c:176:19: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] void MTConvertInit() //Init_Converter() ^ void 1 error generated. make[2]: *** [scripts/Makefile.build:252: /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build/MTConvert.o] Error 1 make[2]: *** Waiting for unfinished jobs.... make[1]: *** [Makefile:2019: /var/lib/dkms/ravenna-alsa-lkm/r135.140abf6/build] Error 2 make: *** [Makefile:15: modules] Error 2

olm52 commented 1 year ago

Still not compiling also on kernel 6.3.1 See attachment. make.log

bondagit commented 1 year ago

this should be fixed in branch aes67-daemon-issue11. Can you give it a try ?

bondagit commented 1 year ago
git clone https://github.com/bondagit/ravenna-alsa-lkm.git
git checkout aes67-daemon-issue11

Please let me know if this compiles, I will merge the changes when the new driver version is ready.

olm52 commented 1 year ago

It seems OK

audiolinux@audiolinux driver]$ make clean make -C /lib/modules/6.3.1-1-cachyos-rt/build/ M=/home/audiolinux/Downloads/Temp/ravenna-alsa-lkm/driver clean [audiolinux@audiolinux driver]$ BUILD_FLAGS=(
CC=clang LD=ld.lld LLVM=1 LLVM_IAS=1 ) make ${BUILD_FLAGS[*]} -C /lib/modules/uname -r/build M=$PWD CC [M] /home/audiolinux/Downloads/Temp/ravenna-alsa-lkm/driver/c_wrapper_lib.o CC [M] /home/audiolinux/Downloads/Temp/ravenna-alsa-lkm/driver/audio_driver.o CC [M] /home/audiolinux/Downloads/Temp/ravenna-alsa-lkm/driver/manager.o CC [M] /home/audiolinux/Downloads/Temp/ravenna-alsa-lkm/driver/module_main.o CC [M] /home/audiolinux/Downloads/Temp/ravenna-alsa-lkm/driver/PTP.o CC [M] /home/audiolinux/Downloads/Temp/ravenna-alsa-lkm/driver/module_interface.o CC [M] /home/audiolinux/Downloads/Temp/ravenna-alsa-lkm/driver/module_netlink.o CC [M] /home/audiolinux/Downloads/Temp/ravenna-alsa-lkm/driver/module_timer.o CC [M] /home/audiolinux/Downloads/Temp/ravenna-alsa-lkm/driver/EtherTubeNetfilter.o CC [M] /home/audiolinux/Downloads/Temp/ravenna-alsa-lkm/driver/RTP_streams_manager.o CC [M] /home/audiolinux/Downloads/Temp/ravenna-alsa-lkm/driver/RTP_audio_stream.o CC [M] /home/audiolinux/Downloads/Temp/ravenna-alsa-lkm/driver/RTP_stream.o CC [M] /home/audiolinux/Downloads/Temp/ravenna-alsa-lkm/driver/RTP_stream_info.o CC [M] /home/audiolinux/Downloads/Temp/ravenna-alsa-lkm/driver/MTAL_EthUtils.o CC [M] /home/audiolinux/Downloads/Temp/ravenna-alsa-lkm/driver/MTAL_LKernelAPI.o CC [M] /home/audiolinux/Downloads/Temp/ravenna-alsa-lkm/driver/MTConvert.o LD [M] /home/audiolinux/Downloads/Temp/ravenna-alsa-lkm/driver/MergingRavennaALSA.o MODPOST /home/audiolinux/Downloads/Temp/ravenna-alsa-lkm/driver/Module.symvers CC [M] /home/audiolinux/Downloads/Temp/ravenna-alsa-lkm/driver/MergingRavennaALSA.mod.o LD [M] /home/audiolinux/Downloads/Temp/ravenna-alsa-lkm/driver/MergingRavennaALSA.ko

bondagit commented 1 year ago

it looks good then. I will merge the changes when the new version is ready.

olm52 commented 1 year ago

Thanks!