Comments (23)
Wooohoo that seemed to work! Thank you so much!
I will go through some of the owl tutorials and let you know if there's any issues, but I was able to load in owl and create an owl array, so I think I am in the clear!
from owl.
Aa an update I was able to get past this error using rosetta, but now got to the next error. I am stuck at this point.
isaacflath@Isaacs-MacBook-Pro ~ % opam install owl
<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><> π«
[owl.1.0.2] synchronised (no changes)
The following actions will be performed:
β install owl 1.0.2*
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><> π«
β¬ retrieved owl.1.0.2 (no changes)
[ERROR] The compilation of owl.1.0.2 failed at "dune build -p owl -j 9".
#=== ERROR while compiling owl.1.0.2 ==========================================#
# context 2.1.2 | macos/x86_64 | ocaml-base-compiler.4.13.1 | pinned(git+file:///Users/isaacflath/owl_mseri#arm64#2537f1b6)
# path ~/.opam/4.13.1/.opam-switch/build/owl.1.0.2
# command ~/.opam/opam-init/hooks/sandbox.sh build dune build -p owl -j 9
# exit-code 1
# env-file ~/.opam/log/owl-6952-c247f9.env
# output-file ~/.opam/log/owl-6952-c247f9.out
### output ###
# /var/folders/vs/j71s84gs4f7d059xxqrf71wc0000gn/T/build_73ae1a_dune/camlasmfc609d.s:2664:2: error: invalid instruction mnemonic 'bl'
# [...]
# /var/folders/vs/j71s84gs4f7d059xxqrf71wc0000gn/T/build_73ae1a_dune/camlasmfc609d.s:2666:15: error: unknown token in expression
# orr x0, xzr, #1
# ^
# /var/folders/vs/j71s84gs4f7d059xxqrf71wc0000gn/T/build_73ae1a_dune/camlasmfc609d.s:2667:11: error: brackets expression not supported on this target
# ldr x30, [sp, #24]
# ^
# /var/folders/vs/j71s84gs4f7d059xxqrf71wc0000gn/T/build_73ae1a_dune/camlasmfc609d.s:2668:14: error: unknown token in expression
# add sp, sp, #32
# ^
# File "src/owl/config/configure.ml", line 1:
# Error: Assembler error, input left in file /var/folders/vs/j71s84gs4f7d059xxqrf71wc0000gn/T/build_73ae1a_dune/camlasmfc609d.s
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><> π«
ββ The following actions failed
β Ξ» build owl 1.0.2
ββ
βΆβ No changes have been performed
from owl.
If you pin #609 and owlbarn/eigen#36, does it install fine?
from owl.
No, I still get the assembler error.
isaacflath@Isaacs-MacBook-Pro ~ % arch
i386
isaacflath@Isaacs-MacBook-Pro ~ % opam install owl
<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><> π«
[owl.1.0.2] synchronised (no changes)
The following actions will be performed:
β install owl 1.0.2*
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><> π«
β¬ retrieved owl.1.0.2 (no changes)
[ERROR] The compilation of owl.1.0.2 failed at "dune build -p owl -j 9".
#=== ERROR while compiling owl.1.0.2 ==========================================#
# context 2.1.2 | macos/x86_64 | ocaml-base-compiler.4.13.1 | pinned(git+file:///Users/isaacflath/owl#arm64#2537f1b6)
# path ~/.opam/4.13.1/.opam-switch/build/owl.1.0.2
# command ~/.opam/opam-init/hooks/sandbox.sh build dune build -p owl -j 9
# exit-code 1
# env-file ~/.opam/log/owl-14881-45a05f.env
# output-file ~/.opam/log/owl-14881-45a05f.out
### output ###
# /var/folders/vs/j71s84gs4f7d059xxqrf71wc0000gn/T/build_eb6077_dune/camlasm1b9b95.s:2664:2: error: invalid instruction mnemonic 'bl'
# [...]
# /var/folders/vs/j71s84gs4f7d059xxqrf71wc0000gn/T/build_eb6077_dune/camlasm1b9b95.s:2666:15: error: unknown token in expression
# orr x0, xzr, #1
# ^
# /var/folders/vs/j71s84gs4f7d059xxqrf71wc0000gn/T/build_eb6077_dune/camlasm1b9b95.s:2667:11: error: brackets expression not supported on this target
# ldr x30, [sp, #24]
# ^
# /var/folders/vs/j71s84gs4f7d059xxqrf71wc0000gn/T/build_eb6077_dune/camlasm1b9b95.s:2668:14: error: unknown token in expression
# add sp, sp, #32
# ^
# File "src/owl/config/configure.ml", line 1:
# Error: Assembler error, input left in file /var/folders/vs/j71s84gs4f7d059xxqrf71wc0000gn/T/build_eb6077_dune/camlasm1b9b95.s
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><> π«
ββ The following actions failed
β Ξ» build owl 1.0.2
ββ
βΆβ No changes have been performed
isaacflath@Isaacs-MacBook-Pro ~ % opam pin
eigen.0.3.0 git git+file:///Users/isaacflath/eigen#fix-0.3.0
owl.1.0.2 (uninstalled) git git+file:///Users/isaacflath/owl#arm64
owl-base.1.0.2 git git+file:///Users/isaacflath/owl#arm64
owl-plplot.1.0.2 (uninstalled) git git+file:///Users/isaacflath/owl#arm64
owl-top.1.0.2 (uninstalled) git git+file:///Users/isaacflath/owl#arm64
owl-zoo.1.0.2 (uninstalled) git git+file:///Users/isaacflath/owl#arm64
from owl.
What if you compile for M1, avoiding Rosetta?
from owl.
Different error
isaacflath@Isaacs-MacBook-Pro eigen % opam install owl
<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><> π«
[owl.1.0.2] synchronised (no changes)
The following actions will be performed:
β install owl 1.0.2*
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><> π«
β¬ retrieved owl.1.0.2 (no changes)
[ERROR] The compilation of owl.1.0.2 failed at "dune build -p owl -j 9".
#=== ERROR while compiling owl.1.0.2 ==========================================#
# context 2.1.2 | macos/arm64 | ocaml-base-compiler.4.13.1 | pinned(git+file:///Users/isaacflath/owl#arm64#2537f1b6)
# path ~/.opam/4.13.1/.opam-switch/build/owl.1.0.2
# command ~/.opam/opam-init/hooks/sandbox.sh build dune build -p owl -j 9
# exit-code 1
# env-file ~/.opam/log/owl-15788-373026.env
# output-file ~/.opam/log/owl-15788-373026.out
### output ###
# [...]
# File "src/owl/dune", line 47, characters 0-2787:
# 47 | (library
# 48 | (name owl)
# 49 | (public_name owl)
# .....213 | :standard
# 214 | (:include ocaml_flags.sexp))
# 215 | (libraries ctypes ctypes.stubs eigen owl-base npy))
# (cd _build/default && /Users/isaacflath/.opam/4.13.1/bin/ocamlmklib.opt -g -o src/owl/owl_stubs src/owl/SFMT.o src/owl/airy.o src/owl/airyf.o src/owl/bdtr.o src/owl/beta.o src/owl/btdtr.o src/owl/cbrt.o src/owl/chbevl.o src/owl/chbevlf.o src/owl/chdtr.o src/owl/const.o src/owl/constf.o src/owl/dawsn.o src/owl/dawsnf.o src/owl/ellie.o src/owl/ellik.o src/owl/ellpe.o src/owl/ellpj.o src/owl/ell[...]
# ld: warning: dylib (/opt/homebrew/opt/gcc/lib/gcc/11/libgfortran.5.dylib) was built for newer macOS version (12.2) than being linked (12.0)
# ld: warning: dylib (/opt/homebrew/opt/gcc/lib/gcc/11/libgomp.1.dylib) was built for newer macOS version (12.2) than being linked (12.0)
# ld: file not found: @rpath/libgcc_s.1.1.dylib for architecture arm64
# clang: error: linker command failed with exit code 1 (use -v to see invocation)
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><> π«
ββ The following actions failed
β Ξ» build owl 1.0.2
ββ
βΆβ No changes have been performed
from owl.
This one is due to multi archs: you donβt have arm64 gcc installed or is shadowed by x86 one
from owl.
Ok, I am not sure how to fix that or change the shadowing.
Is this what I should install to fix this? https://formulae.brew.sh/cask/gcc-arm-embedded
from owl.
No, I think you have two gcc installed, one on x86 homebrew path: /usr/local/...
and one in the arm64 path /opt/local/homebrew/...
and somehow the x64 one gets in the way. I don't use homebrew, so I cannot help unfortunately.
I remember this same issue popping up when compiling openblas and numpy when the first M1 started appearing and people still had a mixture of x86 and arm libraries installed, but that's about it
from owl.
Without using rosetta, it should be possible to install native M1 owl with
opam pin -n git+https://github.com/mseri/eigen.git#fix-0.3.0
opam pin -n git+https://github.com/mseri/owl.git#arm64
opam install owl
At least this seems to work on both my laptop (x86_64) and desktop (M1)
from owl.
Alright well I don't think I know enough about what's going on to know how to fix this. I am a bit worried about changing too much here given my lack of understanding of all this, as I do not want to break anything that I don't know how to un-break. In addition, even if I did get it figured out it's not ideal to have it working because I pinned particular versions as I can't freely just upgrade to the latest version. Unfortunately, I am going to move forward without owl for now.
I will leave this issue open as it's an open issue on my end and maybe it's helpful information to library maintainers.
Feel free to close it out though if having this ticket open is not helpful
Thank you for all your time and help.
from owl.
Sure. Hopefully the two PRs will be merged soon, then from the next version owl should work out of the box
from owl.
Just as a curiosity. It you have time can you check what happens if you do
opam pin -n git+https://github.com/mseri/eigen.git#fix-0.3.0
opam pin -n git+https://github.com/mseri/owl.git#arm64
PKG_CONFIG_PATH="/opt/homebrew/opt/openblas/lib/pkgconfig" opam install owl
I think it may be openblas which is the x86 version
from owl.
No luck unfortunately
[NOTE] Package eigen is currently pinned to git+file:///Users/isaacflath/eigen#fix-0.3.0 (version 0.3.0).
eigen is now pinned to git+https://github.com/mseri/eigen.git#fix-0.3.0 (version 0.3.0)
This will pin the following packages: owl-base, owl-plplot, owl-top, owl-zoo, owl. Continue? [Y/n] Y
[NOTE] Package owl-base is currently pinned to git+file:///Users/isaacflath/owl#arm64 (version 1.0.2).
owl-base is now pinned to git+https://github.com/mseri/owl.git#arm64 (version 1.0.2)
[NOTE] Package owl-plplot is currently pinned to git+file:///Users/isaacflath/owl#arm64 (version 1.0.2).
owl-plplot is now pinned to git+https://github.com/mseri/owl.git#arm64 (version 1.0.2)
[NOTE] Package owl-top is currently pinned to git+file:///Users/isaacflath/owl#arm64 (version 1.0.2).
owl-top is now pinned to git+https://github.com/mseri/owl.git#arm64 (version 1.0.2)
[NOTE] Package owl-zoo is currently pinned to git+file:///Users/isaacflath/owl#arm64 (version 1.0.2).
owl-zoo is now pinned to git+https://github.com/mseri/owl.git#arm64 (version 1.0.2)
[NOTE] Package owl is currently pinned to git+file:///Users/isaacflath/owl#arm64 (version 1.0.2).
owl is now pinned to git+https://github.com/mseri/owl.git#arm64 (version 1.0.2)
<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><> π«
[owl.1.0.2] synchronised (git+https://github.com/mseri/owl.git#arm64)
The following actions will be performed:
β» recompile eigen 0.3.0* [upstream or system changes]
β» recompile owl-base 1.0.2* [upstream or system changes]
β install stdio v0.15.0 [required by owl]
β install owl 1.0.2*
===== β 2 β» 2 =====
Do you want to continue? [Y/n] Y
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><> π«
β¬ retrieved owl.1.0.2 (no changes)
β¬ retrieved stdio.v0.15.0 (cached)
β¬ retrieved eigen.0.3.0 (git+https://github.com/mseri/eigen.git#fix-0.3.0)
β¬ retrieved owl-base.1.0.2 (git+https://github.com/mseri/owl.git#arm64)
β installed stdio.v0.15.0
β removed owl-base.1.0.2
β installed owl-base.1.0.2
β removed eigen.0.3.0
β installed eigen.0.3.0
[ERROR] The compilation of owl.1.0.2 failed at "dune build -p owl -j 9".
#=== ERROR while compiling owl.1.0.2 ==========================================#
# context 2.1.2 | macos/arm64 | ocaml-base-compiler.4.13.1 | pinned(git+https://github.com/mseri/owl.git#arm64#2537f1b6)
# path ~/.opam/4.13.1/.opam-switch/build/owl.1.0.2
# command ~/.opam/opam-init/hooks/sandbox.sh build dune build -p owl -j 9
# exit-code 1
# env-file ~/.opam/log/owl-20677-887acc.env
# output-file ~/.opam/log/owl-20677-887acc.out
### output ###
# [...]
# File "src/owl/dune", line 47, characters 0-2787:
# 47 | (library
# 48 | (name owl)
# 49 | (public_name owl)
# .....213 | :standard
# 214 | (:include ocaml_flags.sexp))
# 215 | (libraries ctypes ctypes.stubs eigen owl-base npy))
# (cd _build/default && /Users/isaacflath/.opam/4.13.1/bin/ocamlmklib.opt -g -o src/owl/owl_stubs src/owl/SFMT.o src/owl/airy.o src/owl/airyf.o src/owl/bdtr.o src/owl/beta.o src/owl/btdtr.o src/owl/cbrt.o src/owl/chbevl.o src/owl/chbevlf.o src/owl/chdtr.o src/owl/const.o src/owl/constf.o src/owl/dawsn.o src/owl/dawsnf.o src/owl/ellie.o src/owl/ellik.o src/owl/ellpe.o src/owl/ellpj.o src/owl/ell[...]
# ld: warning: dylib (/opt/homebrew/opt/gcc/lib/gcc/11/libgfortran.5.dylib) was built for newer macOS version (12.2) than being linked (12.0)
# ld: warning: dylib (/opt/homebrew/opt/gcc/lib/gcc/11/libgomp.1.dylib) was built for newer macOS version (12.2) than being linked (12.0)
# ld: file not found: @rpath/libgcc_s.1.1.dylib for architecture arm64
# clang: error: linker command failed with exit code 1 (use -v to see invocation)
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><> π«
ββ The following actions failed
β Ξ» build owl 1.0.2
ββ
ββ The following changes have been performed
β β» recompile eigen 0.3.0
β β» recompile owl-base 1.0.2
β β install stdio v0.15.0
ββ
The former state can be restored with:
/opt/homebrew/bin/opam switch import "/Users/isaacflath/.opam/4.13.1/.opam-switch/backup/state-20220507161004.export"
from owl.
Also, GCC appears to be for arm64
isaacflath@Isaacs-MacBook-Pro % which gcc
/usr/bin/gcc
isaacflath@Isaacs-MacBook-Pro % gcc -v
Apple clang version 13.1.6 (clang-1316.0.21.2)
Target: arm64-apple-darwin21.3.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin
from owl.
thanks for checking!
Also, GCC appears to be for arm64
yes but this is not the one that homebrew has installed and used for gfortran. The issue you face is the same as firedrakeproject/firedrake#2320 and Homebrew/discussions#1490
Unfortunately, not using homebrew I have hard times figuring it out myself. But it was worth a shot
from owl.
One last test, sorry. With this I may be able to figure out a way to fix things.
If you create a symlink of /opt/homebrew/opt/gcc/lib/gcc/11/libgcc_s.1.1.dylib
inside /opt/homebrew/opt/openblas/lib
, does the previous command work?
from owl.
I am unable to install owl-top
or owl-zoo
. I am putting it in this issue, because my best guess it it's related to the pinning that we had to do in this issue to make the M1 install work. I'm happy to close this and put it in a new issue if that would be preferred. The main owl library that this issue resolved is working great, this is just for getting owl-top
working (different, but possibly related issue?).
I don't need these fixed urgently, but thought it may be worth mentioning in case it's something that needs to be looked into before the M1 compatibility prs are merged in. Happy to test any fixes though!
isaacflath@Isaacs-MacBook-Pro stocks % opam install owl-top
<><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><> π«
[owl-top.1.0.2] synchronised (no changes)
The following actions will be performed:
β install owl-zoo 1.0.2* [required by owl-top]
β install owl-top 1.0.2*
===== β 2 =====
Do you want to continue? [Y/n] Y
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><> π«
β¬ retrieved owl-top.1.0.2 (no changes)
β¬ retrieved owl-zoo.1.0.2 (no changes)
[ERROR] The compilation of owl-zoo.1.0.2 failed at "dune build -p owl-zoo -j 9".
#=== ERROR while compiling owl-zoo.1.0.2 ======================================#
# context 2.1.2 | macos/arm64 | ocaml-base-compiler.4.13.1 | pinned(git+https://github.com/mseri/owl.git#arm64#2537f1b6)
# path ~/.opam/4.13.1/.opam-switch/build/owl-zoo.1.0.2
# command ~/.opam/opam-init/hooks/sandbox.sh build dune build -p owl-zoo -j 9
# exit-code 1
# env-file ~/.opam/log/owl-zoo-85532-13f91f.env
# output-file ~/.opam/log/owl-zoo-85532-13f91f.out
### output ###
# (cd _build/default && /Users/isaacflath/.opam/4.13.1/bin/ocamlc.opt -w -40 -g -bin-annot -I src/zoo/.owl_zoo.objs/byte -I /Users/isaacflath/.opam/4.13.1/lib/bigarray-compat -I /Users/isaacflath/.opam/4.13.1/lib/camlzip -I /Users/isaacflath/.opam/4.13.1/lib/ctypes -I /Users/isaacflath/.opam/4.13.1/lib/eigen -I /Users/isaacflath/.opam/4.13.1/lib/eigen/cpp -I /Users/isaacflath/.opam/4.13.1/lib/i[...]
# File "src/zoo/owl_zoo_dir.ml", line 59, characters 21-33:
# 59 | let input = Toploop.File f' in
# ^^^^^^^^^^^^
# Error: Unbound constructor Toploop.File
# (cd _build/default && /Users/isaacflath/.opam/4.13.1/bin/ocamlc.opt -w -40 -g -bin-annot -I src/zoo/.owl_zoo.objs/byte -I /Users/isaacflath/.opam/4.13.1/lib/bigarray-compat -I /Users/isaacflath/.opam/4.13.1/lib/camlzip -I /Users/isaacflath/.opam/4.13.1/lib/ctypes -I /Users/isaacflath/.opam/4.13.1/lib/eigen -I /Users/isaacflath/.opam/4.13.1/lib/eigen/cpp -I /Users/isaacflath/.opam/4.13.1/lib/i[...]
# File "src/zoo/owl_zoo_cmd.ml", line 116, characters 19-33:
# 116 | let new_script = Toploop.String (preprocess script) in
# ^^^^^^^^^^^^^^
# Error: Unbound constructor Toploop.String
<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><> π«
ββ The following actions failed
β Ξ» build owl-zoo 1.0.2
ββ
βΆβ No changes have been performed
from owl.
# Error: Unbound constructor Toploop.File
I think this is a recent additions (ocaml/ocaml@d0d877a) and may be available only in 4.14. It looks like a wrong constraint in opam.
from owl.
Indeed, owl-top is not compatible with recent ocaml. I think @ryanrhymes is working on fixing that sorry I wrote that backwards. I think it was introduced with the fix for 4.14. You should be able to install it with 4.13 by unpinning it: opam pin remove owl-zoo
from owl.
Hi all is working! Thank you all!
from owl.
Works for me too, if you need more confirmation
from owl.
Fantastic, thanks for checking
from owl.
Related Issues (20)
- Cannot install owl-1.1 through opam because of `unmet availability conditions` HOT 2
- `libgfortran.so` not linked and causing compilation error HOT 8
- Cephes build warnings on Arch Linux
- Incorrect `Owl_const.min_float64` value? HOT 1
- Owl_dataframe shouldn' t use 'string_of_float' HOT 1
- Documentation is not in sync with current way plots are working
- OCaml cannot fins owl package HOT 1
- ssqr_diff' modifies inputs in place HOT 2
- Failure to load datasets for neural nets HOT 1
- Broken link to Algodiff module. HOT 2
- Exponential regression -- incorrect case HOT 1
- Test fails with GCC 13 HOT 1
- `Dataframe.to_cols` returns columns of incorrect size HOT 1
- Move project to ocaml-community HOT 7
- OCaml 5.2 support HOT 4
- Reintroduce owl-plplot HOT 6
- Dead link to TODO list HOT 1
- Random.float bounds are inclusive, be careful with logarithms
- Dataframe issues
- gamma_isf nan HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from owl.