Skip to content

Conversation

fxcoudert
Copy link
Member

Fixes #246702

First attempt at adding an ILP64 version of openblas, and using it in Julia.

@github-actions github-actions bot added the new formula PR adds a new formula to Homebrew/homebrew-core label Oct 3, 2025
@fxcoudert fxcoudert force-pushed the openblas64 branch 2 times, most recently from ae7ea2d to 4758302 Compare October 3, 2025 11:17
@github-actions github-actions bot added the automerge-skip `brew pr-automerge` will skip this pull request label Oct 3, 2025
@fxcoudert fxcoudert added the CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. label Oct 3, 2025
@ViralBShah
Copy link

ViralBShah commented Oct 3, 2025

I believe it would be best to build for 0.3.29, which is what is included in Julia 1.12. But we'll naturally need 0.3.30 soon too.

@fxcoudert
Copy link
Member Author

@ViralBShah Homebrew likes to live on the edge, and ship the latest of everything. Also, we tend not to ship multiple versions of one software. So we regularly ship julia binaries linked to library versions that are newer than what is used in binaries upstream.

@fxcoudert
Copy link
Member Author

  ranlib ../../../libopenblas64_p-r0.3.30.a
  No receipt for 'com.apple.pkg.Xcode' found at '/'.
  make[1]: warning: -jN forced in submake: disabling jobserver mode.
  ./gensymbol objconv arm64 "_" 0 0  0 0 0 0 "" "64_" 1 0 1 1 1 1 > objconv.def
  ./gensymbol osx arm64 "_" 0 0  0 0 0 0 "" "64_" 1 0 1 1 1 1 > osx.def
  objconv @objconv.def ../libopenblas64_p-r0.3.30.a ../libopenblas64_p-r0.3.30.a.osx.renamed
  make[1]: objconv: No such file or directory
  make[1]: *** [../libopenblas64_p-r0.3.30.a.osx.renamed] Error 1
  make: *** [shared] Error 2

Not sure what the No receipt for 'com.apple.pkg.Xcode' found at '/'. warning is.

And don't know why it feels it needs to use objconv on macOS when the LP64 version apparently does not.

@fxcoudert fxcoudert force-pushed the openblas64 branch 2 times, most recently from 7447853 to d05bbab Compare October 3, 2025 16:43
@ViralBShah
Copy link

IIRC, objconv is used to rename the symbols. You probably don't need it on 32-bit because no renaming is being done in that case.

@fxcoudert
Copy link
Member Author

OK now it's a linux-only failure of libblastrampoline test:

  ==> Testing libblastrampoline
  ==> /usr/bin/gcc-12 dgemm_test.c -I/home/linuxbrew/.linuxbrew/Cellar/libblastrampoline/5.14.0/include -L/home/linuxbrew/.linuxbrew/Cellar/libblastrampoline/5.14.0/lib -lblastrampoline -o dgemm_test
  ==> /usr/bin/gcc-12 api_test.c -I/home/linuxbrew/.linuxbrew/Cellar/libblastrampoline/5.14.0/include -L/home/linuxbrew/.linuxbrew/Cellar/libblastrampoline/5.14.0/lib -lblastrampoline -o api_test
  ==> ./api_test
  ERROR: Unable to load dependent library libopenblas64_.so
  Message: libopenblas64_.so: cannot open shared object file: No such file or directory
  Unable to load "libopenblas64_.so"
  api_test: api_test.c:12: main: Assertion `libs[0] != NULL' failed.

I'm not sure why it can't find or open that library, because it's clearly there:

$ ls -lh ~/Downloads/bottles_ubuntu-latest/openblas64/0.3.30/lib 
total 206904
drwxr-xr-x@ 3 fx  staff    96B Jun 19 11:45 cmake
lrwxr-xr-x@ 1 fx  staff    17B Jun 19 11:45 libblas64_.so -> libopenblas64_.so
lrwxr-xr-x@ 1 fx  staff    17B Jun 19 11:45 liblapack64_.so -> libopenblas64_.so
lrwxr-xr-x@ 1 fx  staff    25B Jun 19 11:45 libopenblas64_.a -> libopenblas64_p-r0.3.30.a
lrwxr-xr-x@ 1 fx  staff    26B Jun 19 11:45 libopenblas64_.so -> libopenblas64_p-r0.3.30.so
lrwxr-xr-x@ 1 fx  staff    26B Jun 19 11:45 libopenblas64_.so.0 -> libopenblas64_p-r0.3.30.so
-rw-r--r--@ 1 fx  staff    65M Jun 19 11:45 libopenblas64_p-r0.3.30.a
-rwxr-xr-x@ 1 fx  staff    36M Jun 19 11:45 libopenblas64_p-r0.3.30.so
drwxr-xr-x@ 3 fx  staff    96B Jun 19 11:45 pkgconfig

@ViralBShah
Copy link

Maybe needs LD_LIBRARY_PATH?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
automerge-skip `brew pr-automerge` will skip this pull request CI-no-fail-fast Continue CI tests despite failing GitHub Actions matrix builds. new formula PR adds a new formula to Homebrew/homebrew-core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Avoid 32-bit OpenBLAS by using vendered AppleAccelerate in julia formula?
2 participants