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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Scipy doesn't build on Mac OS #4348

Open
ksjogo opened this issue Dec 21, 2023 · 1 comment
Open

Scipy doesn't build on Mac OS #4348

ksjogo opened this issue Dec 21, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@ksjogo
Copy link

ksjogo commented Dec 21, 2023

馃悰 Bug

Running env PYODIDE_PACKAGES="scipy" make on Mac OS with the latest Xcode CLI tools will error out with the following:

../../meson.build:82:0: ERROR: Unable to detect linker for compiler `/var/folders/gs/_09x7sbx28qblghy92lydm0c0000gn/T/tmp00vmch6v/gfortran             
-Wl,--version`                                                                                                                                         
stdout:                                                                                                                                                
stderr: collect2 version 13.2.0                                                                                                                        
/usr/bin/ld -syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk/ -dynamic -arch arm64 -platform_version macos 14.0.0 0.0 -o a.out        
-L/opt/homebrew/Cellar/gcc/13.2.0/bin/../lib/gcc/current/gcc/aarch64-apple-darwin23/13 -L/opt/homebrew/Cellar/gcc/13.2.0/bin/../lib/gcc/current/gcc    
-L/opt/homebrew/Cellar/gcc/13.2.0/bin/../lib/gcc/current/gcc/aarch64-apple-darwin23/13/../../.. --version -lemutls_w -lgcc -lSystem -no_compact_unwind 
-rpath @loader_path -rpath /opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc/aarch64-apple-darwin23/13 -rpath                                        
/opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current/gcc -rpath /opt/homebrew/Cellar/gcc/13.2.0/lib/gcc/current                                             
ld: unknown options: --version                                                                                                                         
collect2: error: ld returned 1 exit status                         

There are some related issues like:
sagemath/sage#36342
mesonbuild/meson#12282

It seems to be caused by an incompability with the latest CLI tools.
Supposedly it is fixable by introducing export LDFLAGS="$LDFLAGS -Wl,-ld_classic"
But I couldn't get that to work (quite new to this), setting it in env or in packages/scipy/meta.yaml

Expected behavior

scipy builds

Environment

  • Pyodide Version master
  • Any other relevant information:
    On commit: 1849625
    OS: Sonoma 14.0
@ksjogo ksjogo added the bug Something isn't working label Dec 21, 2023
@ryanking13
Copy link
Member

Thanks for the report @ksjogo! I think we need to change the gfortran linker to not point to the native ld but to point ld wrapper. I'll see if I can fix this.

@ryanking13 ryanking13 self-assigned this Dec 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants