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

Error when compiling jpeg-turbo on Apple Silicon with Homebrew #51

Closed
dotinspace opened this issue Jul 27, 2024 · 5 comments
Closed

Error when compiling jpeg-turbo on Apple Silicon with Homebrew #51

dotinspace opened this issue Jul 27, 2024 · 5 comments

Comments

@dotinspace
Copy link

dotinspace commented Jul 27, 2024

I am running into compilation errors on Apple Silicon when trying to (ql:quickload :ciel): A compilation error occurs when running:

; clang -o                                                                          
/Users/dot/.cache/common-lisp/sbcl-2.4.6-macosx-arm64/Users/dot/quicklisp/dists/ult\
ralisp/software/shamazmazum-jpeg-turbo-20201121072458/src/grovel__grovel-tmpDMIL0RV\
K.o -c -g -Wall -Wundef -Wsign-compare -Wpointer-arith -O3 -g -Wall                 
-fdollars-in-identifiers -fno-omit-frame-pointer -I/usr/local/include -fPIC         
-I/Users/dot/quicklisp/local-projects/cffi/                                         
/Users/dot/.cache/common-lisp/sbcl-2.4.6-macosx-arm64/Users/dot/quicklisp/dists/ult\
ralisp/software/shamazmazum-jpeg-turbo-20201121072458/src/grovel__grovel.c          
;                                                                                   
; compilation unit aborted                                                          
;   caught 1 fatal ERROR condition       

Backtrace

Backtrace:
 0: (CFFI-GROVEL:GROVEL-ERROR "~a" #<UIOP/RUN-PROGRAM:SUBPROCESS-ERROR              
{700AE17C03}>)
 1: ((FLET "THUNK" :IN CFFI-GROVEL:PROCESS-GROVEL-FILE))
 2: (SB-IMPL::%WITH-STANDARD-IO-SYNTAX #<FUNCTION (FLET "THUNK" :IN                 
CFFI-GROVEL:PROCESS-GROVEL-FILE) {105CA21FB}>)
 3: (CFFI-GROVEL:PROCESS-GROVEL-FILE                                                
#P"/Users/dot/quicklisp/dists/ultralisp/software/shamazmazum-jpeg-turbo-20201121072\
458/src/grovel.lisp"                                                                
#P"/Users/dot/.cache/common-lisp/sbcl-2.4.6-macosx-arm64/Users/..
 4: ((:METHOD ASDF/ACTION:PERFORM (CFFI-GROVEL::PROCESS-OP                          
CFFI-GROVEL:GROVEL-FILE)) #<CFFI-GROVEL::PROCESS-OP > #<CFFI-GROVEL:GROVEL-FILE     
"jpeg-turbo" "src/grovel">) [fast-method]
 5: ((SB-PCL::EMF ASDF/ACTION:PERFORM) #<unused argument> #<unused argument>        
#<CFFI-GROVEL::PROCESS-OP > #<CFFI-GROVEL:GROVEL-FILE "jpeg-turbo" "src/grovel">)

Any suggestions on what may be the problem?
jpeg-turbo is installed via homebrew, if that makes any difference.

  • quicklisp => "2023-10-21"
  • ultralisp => "20240718171000"
  • asdf => "3.3.7"
@vindarel
Copy link
Contributor

Hello, thanks for the report.

I think this comes from our nodgui dependency (I'm not 100% sure where it comes from).

Could you try by cloning and loading the latest nodgui ?

the jpeg library in question: https://github.com/shamazmazum/jpeg-turbo

To build this wrapper make sure that both libjpeg-turbo library and headers are installed (on FreeBSD this is done by installing graphics/libjpeg-turbo port).

Do you have the headers? (on Debian, the "-dev" package)

@dotinspace
Copy link
Author

Thanks for the swift response.

I tried cloning the latest nodgui and use that to no avail.

I have the header file turbojpeg.h, but because of homebrew include dir location, they are not readily available to clang, as far as I can tell. Unfortunately, I don't have a lot of experience with compiling C, let alone on MacOS, and which env vars should be set to include header files located at irregular places, so I tested CIEL on FreeBSD instead, and it works fine. So, I'll just stick to that.

@vindarel vindarel changed the title Error when compiling shamazmazum-jpeg-turbo Error when compiling shamazmazum-jpeg-turbo on Apple Silicon with Homebrew Jul 30, 2024
@vindarel vindarel changed the title Error when compiling shamazmazum-jpeg-turbo on Apple Silicon with Homebrew Error when compiling jpeg-turbo on Apple Silicon with Homebrew Jul 30, 2024
@vindarel vindarel reopened this Jul 30, 2024
@dotinspace
Copy link
Author

Hmmm, seems it is working now:
export CPATH=/opt/homebrew/include

Seems to pick up turbojpeg.h.

@vindarel
Copy link
Contributor

Nice! Would you like to mention this on the README?

@vindarel
Copy link
Contributor

We removed the nodgui dependency. We have yet to test the shiny new nodgui-lite.

see #56

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

2 participants