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

Unable to compile on raspberry pi (again) #11

Open
Sod-Almighty opened this issue Mar 13, 2022 · 2 comments
Open

Unable to compile on raspberry pi (again) #11

Sod-Almighty opened this issue Mar 13, 2022 · 2 comments

Comments

@Sod-Almighty
Copy link

I reinstalled my build system, and during the grovel step I am once again getting the no-pie error as described in issue #5.

; cc -o /root/.cache/common-lisp/sbcl-1.4.11-linux-arm/root/quicklisp/dists/quicklisp/software/cl-libusb-20200218-git/libusb-grovel__grovel-tmpNSMC798T -g -no-pie /root/.cache/common-lisp/sbcl-1.4.11-linux-arm/root/quicklisp/dists/quicklisp/software/cl-libusb-20200218-git/libusb-grovel__grovel.o
cc: error: unrecognized command line option '-no-pie'
While evaluating the form starting at line 44, column 0

@Sod-Almighty
Copy link
Author

Sod-Almighty commented Mar 13, 2022

After an hour of arduous debugging, I found the culprit.

On certain lisps, CFFI uses cc in places that it might otherwise use ld, but it applies the same flags, despite the fact that some versions of cc will refuse to accept them.

These flags are pulled dynamically from "/usr/local/lib/sbcl/sbcl.mk".

The bottom line is: SBCL and/or CFFI has a bug that is preventing your library from loading. And there's not a huge lot you can do about it.

Personally, I will be editing sbcl.mk and removing the offending keywords system-wide.

@Sod-Almighty
Copy link
Author

Sod-Almighty commented Mar 13, 2022

FYI, the problem is in c-toolchain.lisp, in the sbcl-toolchain-parameters function.

  • It sets cc to be used in place of ld.
  • It pulls the ld flags (which include -no-pie) from sbcl.mk and applies them blindly to cc, which is ill-prepared to receive -no-pie.

I have commented on the CFFI issue, although I doubt it will be given any credence.

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

1 participant