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

Illegal Instruction #82

Closed
kenshaw opened this issue Aug 23, 2023 · 1 comment
Closed

Illegal Instruction #82

kenshaw opened this issue Aug 23, 2023 · 1 comment

Comments

@kenshaw
Copy link

kenshaw commented Aug 23, 2023

Hi, I'm hoping you can help me figure out this issue. I cannot seem to get any of the armv6l images to work, always ending up with some variation on an Illegal Instruction being reported by QEMU. For example (from here):

+ cd /usql
+ sudo apt install -y git upx tar bzip2 golang

WARNING: apt does not have a stable CLI interface. Use with caution in scripts.

Reading package lists...
Building dependency tree...
Reading state information...
bzip2 is already the newest version (1.0.8-4).
bzip2 set to manually installed.
tar is already the newest version (1.34+dfsg-1).
The following additional packages will be installed:
  git-man golang-1.15 golang-1.15-doc golang-1.15-go golang-1.15-src
  golang-doc golang-go golang-src liberror-perl libucl1
Suggested packages:
  git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk
  gitweb git-cvs git-mediawiki git-svn bzr | brz mercurial subversion
The following NEW packages will be installed:
  git git-man golang golang-1.15 golang-1.15-doc golang-1.15-go
  golang-1.15-src golang-doc golang-go golang-src liberror-perl libucl1
  upx-ucl
0 upgraded, 13 newly installed, 0 to remove and 0 not upgraded.
Need to get 66.5 MB of archives.
After this operation, 371 MB of additional disk space will be used.
Get:2 http://raspbian.raspberrypi.org/raspbian bullseye/main armhf git-man all 1:2.30.2-1+deb11u2 [1828 kB]
qemu: uncaught target signal 4 (Illegal instruction) - core dumped
qemu: uncaught target signal 4 (Illegal instruction) - core dumped
E: Method http has died unexpectedly!
E: Sub-process http received signal 4.
Error: Process completed with exit code 100.

Is this an issue with the current Raspberry PI images? Any help would be appreciated, as I'd like to start producing armv6l and arm64 release binaries for `usql.

The workflow I'm trying to use is here: https://github.com/xo/usql/blob/master/.github/workflows/arm.yml

I was able to compile usql for arm64 (aarch64), but cannot figure out what needs to be done to get this runner working. I will try to do it with QEMU locally, but thought I would reach out here to see if there was any insight you might have into this specific issue.

Really appreciate your work on this project, and thanks in advance!

@pguyot
Copy link
Owner

pguyot commented Aug 26, 2023

Thank you for your report.
I was able to reproduce the crash. The cause is that you are specifying a cpu_info describing a 32 bits CPU that is not the one that you are using for emulation.

You should determine whether you want to target Pi Zero or not.
If you do (which seems to be implied with armv6l), proper cpu info is cpuinfo/raspberrypi_zero_w
If you don't (other 32 bits CPUs are armv7l), you should use cortex-a7 for option cpu.

I am updating the documentation as part of #83 and will close this issue accordingly.

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

No branches or pull requests

2 participants