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

macOS ARM USE_BINARYBUILDER_OPENBLAS=0: julia/user/tools/objconv: No such file or directory #46579

Closed
mkitti opened this issue Sep 1, 2022 · 11 comments · Fixed by #46726
Closed
Labels
building Build system, or building Julia or its dependencies

Comments

@mkitti
Copy link
Contributor

mkitti commented Sep 1, 2022

On a Mac Studio (M1 arm64) I recently compiled Julia master at cb5f401 and got the following error:

$ make -j10 USE_BINARYBUILDER_OPENBLAS=0
...
 cblas_zsyr2k PASSED THE COLUMN-MAJOR COMPUTATIONAL TESTS (  1764 CALLS)
 cblas_zsyr2k PASSED THE ROW-MAJOR    COMPUTATIONAL TESTS (  1764 CALLS)

 END OF TESTS
make[3]: /Users/kittisopikulm/Documents/src/julia/usr/tools/objconv: No such file or directory
make[3]: *** [../libopenblas64__armv8p-r0.3.20.a.osx.renamed] Error 1
make[2]: *** [shared] Error 2
*** Clean the OpenBLAS build with 'make -C deps clean-openblas'. Rebuild with 'make OPENBLAS_USE_THREAD=0' if OpenBLAS had trouble linking libpthread.so, and with 'make OPENBLAS_TARGET_ARCH=NEHALEM' if there were errors building SandyBridge support. Both these options can also be used simultaneously. ***
make[1]: *** [scratch/openblas-0b678b19dc03f2a999d6e038814c4c50b9640a4e/build-compiled] Error 1
make: *** [julia-deps] Error
@mkitti
Copy link
Contributor Author

mkitti commented Sep 1, 2022

Looking for objconv, it appears to be in julia/usr/bin/objconv when installing from BinaryBuilder

julia % find . -iname objconv
./usr/bin/objconv
./usr/manifest/objconv
./deps/checksums/objconv

@carlocab
Copy link
Contributor

carlocab commented Sep 1, 2022

Note that objconv works only on x64 mach-o objects. (Not sure how this works in BinaryBuilder.)

@mkitti
Copy link
Contributor Author

mkitti commented Sep 1, 2022

@mkitti
Copy link
Contributor Author

mkitti commented Sep 1, 2022

xref:
#42538
#44517
#45391

@carlocab
Copy link
Contributor

carlocab commented Sep 1, 2022

Well, that's what the description says.

I also wrote the author via email a while ago to ask a question, and they, too, said

The program supports only x86 and x86-64 systems, it will not work on ARM based Mac.

@carlocab
Copy link
Contributor

carlocab commented Sep 1, 2022

Though, I suppose you don't have to take my word for it. Building objconv is easy: just run ./build.sh after extracting the source.

Then, run

echo "int foo() { return 0; }" >> foo.c
make foo.o
./objconv -nr:_foo:_main foo.o bar.o
make bar
./bar

On an Intel Mac this produces no errors.

@mkitti
Copy link
Contributor Author

mkitti commented Sep 1, 2022

Hmm, could it be that it only works in a cross compilation scenario?

That's how BB works, and that's also what we seem to be doing over at conda-forge/openblas-feedstock#146

@staticfloat @giordano , this is an intriguing twist.

@carlocab
Copy link
Contributor

carlocab commented Sep 1, 2022

Though, having tried that on an M1 Mac, the above exercise seems to work, so 🤷

Maybe symbol renaming works (which is I think all that's needed for OpenBLAS), but the rest of it doesn't?

Or it could be subtly broken. Hard to say.

@mkitti
Copy link
Contributor Author

mkitti commented Sep 1, 2022

Without reverting anything make -j10 USE_BINARYBUILDER_OPENBLAS=0 USE_BINARYBUILDER_OBJCONV=0 seems to work.

Running ] test LinearAlgebra

ulia % usr/bin/julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.9.0-DEV.1244 (2022-09-01)
 _/ |\__'_|_|_|\__'_|  |  Commit cb5f401aaa* (0 days old master)
|__/                   |

(@v1.9) pkg> test LinearAlgebra
  Downloaded artifact: OpenSSL
  Downloaded artifact: HDF5
     Testing LinearAlgebra
      Status `/private/var/folders/5j/phv_vfc97m967ww98fbvtmfr0000gq/T/jl_nmofwk/Project.toml`
  [8f399da3] Libdl `@stdlib/Libdl`
  [37e2e46d] LinearAlgebra `@stdlib/LinearAlgebra`
  [9a3f8284] Random `@stdlib/Random`
  [8dfed614] Test `@stdlib/Test`
  [4536629a] OpenBLAS_jll v0.3.20+0 `@stdlib/OpenBLAS_jll`
  [8e850b90] libblastrampoline_jll v5.1.1+0 `@stdlib/libblastrampoline_jll`
      Status `/private/var/folders/5j/phv_vfc97m967ww98fbvtmfr0000gq/T/jl_nmofwk/Manifest.toml`
  [56f22d72] Artifacts `@stdlib/Artifacts`
  [2a0f44e3] Base64 `@stdlib/Base64`
  [b77e0a4c] InteractiveUtils `@stdlib/InteractiveUtils`
  [8f399da3] Libdl `@stdlib/Libdl`
  [37e2e46d] LinearAlgebra `@stdlib/LinearAlgebra`
  [56ddb016] Logging `@stdlib/Logging`
  [d6f4376e] Markdown `@stdlib/Markdown`
  [9a3f8284] Random `@stdlib/Random`
  [ea8e919c] SHA v0.7.0 `@stdlib/SHA`
  [9e88b42a] Serialization `@stdlib/Serialization`
  [8dfed614] Test `@stdlib/Test`
  [e66e0078] CompilerSupportLibraries_jll v0.5.2+0 `@stdlib/CompilerSupportLibraries_jll`
  [4536629a] OpenBLAS_jll v0.3.20+0 `@stdlib/OpenBLAS_jll`
  [8e850b90] libblastrampoline_jll v5.1.1+0 `@stdlib/libblastrampoline_jll`
     Testing Running tests...

@mkitti
Copy link
Contributor Author

mkitti commented Sep 1, 2022

Reverting 434d340 from #45391 seems to resolve the objconv location issue, so we need to reconcile non-binarybuilder builds and binarybuilder builds it seems.

@ViralBShah ViralBShah added the building Build system, or building Julia or its dependencies label Sep 5, 2022
@ViralBShah
Copy link
Member

A simple thing to do here may be to set USE_BINARYBUILDER_OBJCONV=0 when the user sets USE_BINARYBUILDER_OPENBLAS=0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
building Build system, or building Julia or its dependencies
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants