Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Raspberry Pi OS 64-bit - Issue with installing on 5.4.72 #258

Closed
Arkert opened this issue Nov 4, 2020 · 21 comments
Closed

Raspberry Pi OS 64-bit - Issue with installing on 5.4.72 #258

Arkert opened this issue Nov 4, 2020 · 21 comments
Assignees

Comments

@Arkert
Copy link

Arkert commented Nov 4, 2020

Current Raspberry Pi OS 64-Bit, Linux version 5.4.72-v8+. If I want to install, I get following error message:

make -j4 KERNELRELEASE=5.4.72-v8+ -C /lib/modules/5.4.72-v8+/build M=/var/lib/dkms/seeed-voicecard/0.3/build.....(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.4.72-v8+ (aarch64)

And in the logs:

ERROR: "_mcount" [/var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-seeed-voicecard.ko] undefined!
ERROR: "_mcount" [/var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-ac108.ko] undefined!
ERROR: "cpu_hwcap_keys" [/var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-ac108.ko] undefined!
ERROR: "arm64_const_caps_ready" [/var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-ac108.ko] undefined!
ERROR: "_mcount" [/var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-wm8960.ko] undefined!

Do I have any chance to install the drivers on a Raspberry Pi OS 64 bit?

Thanks

@HinTak
Copy link
Contributor

HinTak commented Nov 4, 2020

Same as #256 - stop using --compat-kernel , etc.

@Arkert
Copy link
Author

Arkert commented Nov 4, 2020

Same as #256 - stop using --compat-kernel , etc.

I'm not using --compat-kernel.

Fresh installation.
Updating everything to current version.
clone your (HinTak) repository.
Let default branch active (v5.5)
sudo ./install.h

Then I get the error message I quoted above. Btw: It's the 6-mic-array

@HinTak
Copy link
Contributor

HinTak commented Nov 4, 2020

Download the matching kernel-header-*.arm64.deb and install that (sudo apt-get install ... ) : http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/ ?

Ubuntu 64-bit does work as is...

@Arkert
Copy link
Author

Arkert commented Nov 4, 2020

Download the matching kernel-header-*.arm64.deb and install that (sudo apt-get install ... ) : http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/ ?

Thanks! I will test it.

Ubuntu 64-bit does work as is...

With Ubuntu 64-bit I had crashes (kernel panic) after driver installation. Dunno why. Now I'm testing raspberry pi os

@HinTak
Copy link
Contributor

HinTak commented Nov 4, 2020

Argh, the crash / kernel panic would likely be #251 .

@Arkert
Copy link
Author

Arkert commented Nov 5, 2020

Download the matching kernel-header-*.arm64.deb and install that (sudo apt-get install ... ) : http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/ ?

Thanks! I will test it.

Still same error:

make -j4 KERNELRELEASE=5.4.72-v8+ -C /lib/modules/5.4.72-v8+/build M=/var/lib/dkms/seeed-voicecard/0.3/build.....(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.4.72-v8+ (aarch64)

make.log:

DKMS make.log for seeed-voicecard-0.3 for kernel 5.4.72-v8+ (aarch64)
make: Entering directory '/usr/src/linux-headers-5.4.72-v8+'
AR /var/lib/dkms/seeed-voicecard/0.3/build/built-in.a
CC [M] /var/lib/dkms/seeed-voicecard/0.3/build/wm8960.o
CC [M] /var/lib/dkms/seeed-voicecard/0.3/build/ac108.o
CC [M] /var/lib/dkms/seeed-voicecard/0.3/build/ac101.o
CC [M] /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.o
LD [M] /var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-wm8960.o
LD [M] /var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-seeed-voicecard.o
LD [M] /var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-ac108.o
Building modules, stage 2.
MODPOST 3 modules
ERROR: "__stack_chk_guard" [/var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-seeed-voicecard.ko] undefined!
ERROR: "__stack_chk_guard" [/var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-ac108.ko] undefined!
make[1]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
make: *** [Makefile:1645: modules] Error 2
make: Leaving directory '/usr/src/linux-headers-5.4.72-v8+'

I'm clueless right now. Can't get it running on any 64 bit operating system. On ubuntu I get kernel panic and on Raspberry Pi OS 64 bit I get this.

@nmgcfxm
Copy link

nmgcfxm commented Nov 5, 2020

Download the matching kernel-header-*.arm64.deb and install that (sudo apt-get install ... ) : http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/ ?

Thanks! I will test it.

Still same error:

make -j4 KERNELRELEASE=5.4.72-v8+ -C /lib/modules/5.4.72-v8+/build M=/var/lib/dkms/seeed-voicecard/0.3/build.....(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.4.72-v8+ (aarch64)

make.log:

DKMS make.log for seeed-voicecard-0.3 for kernel 5.4.72-v8+ (aarch64)
make: Entering directory '/usr/src/linux-headers-5.4.72-v8+'
AR /var/lib/dkms/seeed-voicecard/0.3/build/built-in.a
CC [M] /var/lib/dkms/seeed-voicecard/0.3/build/wm8960.o
CC [M] /var/lib/dkms/seeed-voicecard/0.3/build/ac108.o
CC [M] /var/lib/dkms/seeed-voicecard/0.3/build/ac101.o
CC [M] /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.o
LD [M] /var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-wm8960.o
LD [M] /var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-seeed-voicecard.o
LD [M] /var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-ac108.o
Building modules, stage 2.
MODPOST 3 modules
ERROR: "__stack_chk_guard" [/var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-seeed-voicecard.ko] undefined!
ERROR: "__stack_chk_guard" [/var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-ac108.ko] undefined!
make[1]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
make: *** [Makefile:1645: modules] Error 2
make: Leaving directory '/usr/src/linux-headers-5.4.72-v8+'

I'm clueless right now. Can't get it running on any 64 bit operating system. On ubuntu I get kernel panic and on Raspberry Pi OS 64 bit I get this.

我也有这个相同问题(I have this same problem)

@nmgcfxm
Copy link

nmgcfxm commented Nov 5, 2020

Download the matching kernel-header-*.arm64.deb and install that (sudo apt-get install ... ) : http://archive.raspberrypi.org/debian/pool/main/r/raspberrypi-firmware/ ?

Thanks! I will test it.

Still same error:

make -j4 KERNELRELEASE=5.4.72-v8+ -C /lib/modules/5.4.72-v8+/build M=/var/lib/dkms/seeed-voicecard/0.3/build.....(bad exit status: 2)
Error! Bad return status for module build on kernel: 5.4.72-v8+ (aarch64)

make.log:

DKMS make.log for seeed-voicecard-0.3 for kernel 5.4.72-v8+ (aarch64)
make: Entering directory '/usr/src/linux-headers-5.4.72-v8+'
AR /var/lib/dkms/seeed-voicecard/0.3/build/built-in.a
CC [M] /var/lib/dkms/seeed-voicecard/0.3/build/wm8960.o
CC [M] /var/lib/dkms/seeed-voicecard/0.3/build/ac108.o
CC [M] /var/lib/dkms/seeed-voicecard/0.3/build/ac101.o
CC [M] /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.o
LD [M] /var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-wm8960.o
LD [M] /var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-seeed-voicecard.o
LD [M] /var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-ac108.o
Building modules, stage 2.
MODPOST 3 modules
ERROR: "__stack_chk_guard" [/var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-seeed-voicecard.ko] undefined!
ERROR: "__stack_chk_guard" [/var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-ac108.ko] undefined!
make[1]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
make: *** [Makefile:1645: modules] Error 2
make: Leaving directory '/usr/src/linux-headers-5.4.72-v8+'

I'm clueless right now. Can't get it running on any 64 bit operating system. On ubuntu I get kernel panic and on Raspberry Pi OS 64 bit I get this.

我也有这个相同问题(I have this same problem)

这个git项目(This git project): https://github.com/HinTak/seeed-voicecard/tree/v5.5
An error occurred when executing the command: sudo ./install.h

@xevilstar
Copy link

xevilstar commented Nov 17, 2020

cat /var/lib/dkms/seeed-voicecard/0.3/build/make.log
DKMS make.log for seeed-voicecard-0.3 for kernel 5.4.72-v8+ (aarch64)
Tue 17 Nov 2020 06:30:56 PM CET
make: Entering directory '/usr/src/linux-headers-5.4.72-v8+'
AR /var/lib/dkms/seeed-voicecard/0.3/build/built-in.a
CC [M] /var/lib/dkms/seeed-voicecard/0.3/build/ac108.o
CC [M] /var/lib/dkms/seeed-voicecard/0.3/build/wm8960.o
CC [M] /var/lib/dkms/seeed-voicecard/0.3/build/ac101.o
CC [M] /var/lib/dkms/seeed-voicecard/0.3/build/seeed-voicecard.o
LD [M] /var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-wm8960.o
LD [M] /var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-seeed-voicecard.o
LD [M] /var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-ac108.o
Building modules, stage 2.
MODPOST 3 modules
ERROR: "__stack_chk_guard" [/var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-seeed-voicecard.ko] undefined!
ERROR: "__stack_chk_guard" [/var/lib/dkms/seeed-voicecard/0.3/build/snd-soc-ac108.ko] undefined!
make[1]: *** [scripts/Makefile.modpost:94: __modpost] Error 1
make: *** [Makefile:1645: modules] Error 2
make: Leaving directory '/usr/src/linux-headers-5.4.72-v8+'

apt-get install raspberrypi-kernel-headers
Reading package lists... Done
Building dependency tree
Reading state information... Done
raspberrypi-kernel-headers is already the newest version (1.20201022-1).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

@HinTak
Copy link
Contributor

HinTak commented Nov 17, 2020

That's interesting - __stack_chk_guard sounds like it is an internal / compiler-built-in (__* are, a convention) routinea not supposed to be seen. Anything unusual about your build environment?

@HinTak
Copy link
Contributor

HinTak commented Nov 17, 2020

@xevilstar @xiaovsma @Arkert could you try adding this like to Makefile, before the if DEBUG line?

ccflags-y += -fno-stack-protector

It is not the ideal answer but should get you a working driver.

EDIT: -fno-stack-protector is for gcc, the --no_stack_protect is for arm's armcc.

@HinTak
Copy link
Contributor

HinTak commented Nov 17, 2020

Upstream is aware of the problem with__stack_chk_guard
. See raspberrypi/Raspberry-Pi-OS-64bit#4 (comment)

@HinTak
Copy link
Contributor

HinTak commented Nov 17, 2020

The upstream bug is raspberrypi/firmware#1364

@WilliamVJacob
Copy link

WilliamVJacob commented Feb 19, 2021

I have added the fix to install Respeaker Driver for 64 bit Raspbian OS
Check my forked seeed-voicecard repository for solution
https://github.com/WilliamVJacob/seeed-voicecard

@Pittermaennchen
Copy link

@WilliamVJacob I tried that, but still I get

DKMS: add completed.
Error! echo
Your kernel headers for kernel 5.4.72-v8+ cannot be found at
/lib/modules/5.4.72-v8+/build or /lib/modules/5.4.72-v8+/source.
Can't compile with this kernel, aborting
Please try to compile with the option --compat-kernel

when running sudo ./install.sh --compat-kernel

@ghost
Copy link

ghost commented Jul 23, 2021

@Arkert ,
This action was performed automatically.
Please describe the issue according to bug template - if the issue was resolved, ignore this message. The issue will be marked as closed in 7 days if inactive.

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior
A clear and concise description of what you expected to happen.

Platform
What platform are you running the code on.

  • Device: [e.g. Raspberry Pi 4]
  • OS: [e.g. Raspbian OS 32bit kernel version ...]
  • Version/commit number [e.g. d1816f5]

Relevant log output
Please copy and paste any relevant log output.

@AIWintermuteAI
Copy link
Contributor

AIWintermuteAI commented Aug 20, 2021

Hi, @Arkert !
I made some changes to install.sh script and tested them on 5.10.52-v8+ Raspberry Pi OS on Raspberry Pi 4 1 Gb with 2-mic reSpeaker. After some consideration, I decided to split installation script in 32-bit version and 64-bit version - it is indicated in README now. So, try

sudo ./install_arm64.sh

and see if it works for you.

@HinTak
Copy link
Contributor

HinTak commented Aug 20, 2021

@AIWintermuteAI FWIW, I'd say please don't make another nearly identical copy of the script. You end up having to make nearly identical changes twice in both scripts later, etc.

@AIWintermuteAI
Copy link
Contributor

Of course, the changes now are very small - but in future they might diverge more. There is no immediate problem in having two scripts now. I'll reconsider this at later date.

@HinTak
Copy link
Contributor

HinTak commented Aug 20, 2021

@AIWintermuteAI there is a useful option uname -m to ask the current kernel if it is 32-bit or 64-bit. This should be sufficient to merge any difference you need between 32-bit and 64-bit into a few if/then's.

@AIWintermuteAI
Copy link
Contributor

Installation issue has been fixed. Installation script might change in the future, pay attention to instruction in the README.
Closing the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants