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

openblas: fix cross-compilation #53450

Merged
merged 1 commit into from Jan 15, 2019
Merged

openblas: fix cross-compilation #53450

merged 1 commit into from Jan 15, 2019

Conversation

FRidh
Copy link
Member

@FRidh FRidh commented Jan 5, 2019

Motivation for this change
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@FRidh FRidh added the 6.topic: cross-compilation Building packages on a different sort platform than than they will be run on label Jan 5, 2019
@matthewbauer
Copy link
Member

I think we need "FC=${stdenv.cc.targetPrefix}gfortran" to get the cross gfortran.

@FRidh
Copy link
Member Author

FRidh commented Jan 6, 2019

Thanks. I'll have a look at it. Some other mentions of FC OpenMathLib/OpenBLAS#862 http://iprc.soest.hawaii.edu/users/xfu/tool/INSTALL.html

@FRidh
Copy link
Member Author

FRidh commented Jan 13, 2019

Got a bit further, but encountered now OpenMathLib/OpenBLAS#1958.

@FRidh
Copy link
Member Author

FRidh commented Jan 13, 2019

/nix/store/k2gsj607cl4dcmgi60n17vcsmh17gqar-aarch64-unknown-linux-gnu-binutils-2.30/bin/aarch64-unknown-linux-gnu-ld: ../libopenblasp-r0.3.4.a(saxpy.o): Relocations in generic ELF (EM: 62)
/nix/store/k2gsj607cl4dcmgi60n17vcsmh17gqar-aarch64-unknown-linux-gnu-binutils-2.30/bin/aarch64-unknown-linux-gnu-ld: ../libopenblasp-r0.3.4.a(saxpy.o): Relocations in generic ELF (EM: 62)
../libopenblasp-r0.3.4.a: error adding symbols: File in wrong format
collect2: error: ld returned 1 exit status
make[1]: *** [Makefile:134: sblat1] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/build/source/test'
make: *** [Makefile:124: tests] Error 2

@FRidh FRidh changed the title WIP: openblas: fix cross-compilation openblas: fix cross-compilation Jan 13, 2019
@FRidh
Copy link
Member Author

FRidh commented Jan 13, 2019

Working now.

@FRidh
Copy link
Member Author

FRidh commented Jan 13, 2019

@GrahamcOfBorg build openblas openblasCompat pkgsCross.aarch64-multiplatform.openblas

@FRidh FRidh merged commit 05ee101 into NixOS:staging Jan 15, 2019
@FRidh FRidh deleted the openblas branch January 15, 2019 09:11
@matthewbauer
Copy link
Member

Note: this broke openblas on darwin. Should be fixed by cfc4313.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: cross-compilation Building packages on a different sort platform than than they will be run on 10.rebuild-darwin: 501+ 10.rebuild-linux: 501+
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants