8000 Bus Error 10 on Apple Silicon compiled for python 3.8 · Issue #19097 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

Bus Error 10 on Apple Silicon compiled for python 3.8 #19097

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

Closed
iRonJ opened this issue Jan 3, 2021 · 9 comments
Closed

Bus Error 10 on Apple Silicon compiled for python 3.8 #19097

iRonJ opened this issue Jan 3, 2021 · 9 comments

Comments

@iRonJ
Copy link
iRonJ commented Jan 3, 2021

Describe the bug

When building from source for python3.8 on an Apple Silicon Mac, the build succeeds, but you can't import sklearn in python

Steps/Code to Reproduce

Follow directions here:
https://scikit-learn.org/stable/developers/advanced_installation.html

Install libomp via brew:
brew install libomp

Set libomp flags per openmp_helpers.py:

export LDFLAGS="$LDFLAGS -Wl,-rpath,/opt/homebrew/lib/ -L/usr/local/opt/libomp/lib -lomp"

export CPPFLAGS="$CPPFLAGS -Xpreprocessor -fopenmp"

Build succeeds but testing gives the error:

Successfully installed scikit-learn
Removed build tracker: '/private/var/folders/lp/ytqhb2lj0sxf89sdd16z61pc0000gn/T/pip-req-tracker-ja_3b66l'
(tfmac) bash-3.2$ python3 -c "import sklearn; sklearn.show_versions()"
Bus error: 10
(tfmac) bash-3.2$ 

Expected Results

python3 -c "import sklearn; sklearn.show_versions()" works correctly

Actual Results

Successfully installed scikit-learn
Removed build tracker: '/private/var/folders/lp/ytqhb2lj0sxf89sdd16z61pc0000gn/T/pip-req-tracker-ja_3b66l'
(tfmac) bash-3.2$ python3 -c "import sklearn; sklearn.show_versions()"
Bus error: 10
(tfmac) bash-3.2$ 

Versions

scipy.version.version
'1.7.0.dev0+9b9f2e8'
numpy.version.version
'1.18.5'
Full log of install process here:
https://pastebin.com/4yXK6KHS

@iRonJ
Copy link
Author
iRonJ commented Jan 4, 2021

Here's part of the crash dump if this helps:

Path:                  /opt/homebrew/*/Python.framework/Versions/3.8/Resources/Python.app/Contents/MacOS/Python
Identifier:            Python
Version:               3.8.7 (3.8.7)
Code Type:             ARM-64 (Native)
Parent Process:        bash [27614]
Responsible:           Terminal [2051]
User ID:               501

Date/Time:             2021-01-03 23:20:35.237 -0500
OS Version:            macOS 11.1 (20C69)
Report Version:        12
Anonymous UUID:        81CDF7D7-A72E-587A-21C6-6F5C28028188

Sleep/Wake UUID:       D8EFD206-4AE2-4EA2-8FE1-2BFAC222C6AA

Time Awake Since Boot: 130000 seconds
Time Since Wake:       3600 seconds

System Integrity Protection: enabled

Crashed Thread:        0  Dispatch queue: com.apple.main-thread

Exception Type:        EXC_BAD_ACCESS (SIGBUS)
Exception Codes:       EXC_ARM_DA_ALIGN at 0xf9000100d503201f
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Bus error: 10
Termination Reason:    Namespace SIGNAL, Code 0xa
Terminating Process:   exc handler [88375]

VM Regions Near 0x100d503201f:
--> GPU Carveout (reserved)    1000000000-7000000000   [384.0G] ---/--- SM=NUL  reserved VM address space (unallocated)
    

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   ???                           	0x00000100d503201f 0 + 1103085379615
1   _arpack.cpython-38-darwin.so  	0x00000001173e2e0c PyFortranObject_New + 40 (fortranobject.c:43)
2   _arpack.cpython-38-darwin.so  	0x00000001173db8b0 PyInit__arpack + 1024 (_arpackmodule.c:4889)
3   org.python.python             	0x0000000103322424 _PyImport_LoadDynamicModuleWithSpec + 668
4   org.python.python             	0x0000000103321c90 _imp_create_dynamic + 328
5   org.python.python             	0x000000010329540c cfunction_vectorcall_FASTCALL + 220
6   org.python.python             	0x0000000103262c44 PyVectorcall_Call + 104
7   org.python.python             	0x0000000103305414 _PyEval_EvalFrameDefault + 25512
8   org.python.python             	0x00000001033082e8 _PyEval_EvalCodeWithName + 2040
9   org.python.python             	0x000000010326342c _PyFunction_Vectorcall + 228
10  org.python.python             	0x0000000103307760 call_function + 288
11  org.python.python             	0x0000000103305040 _PyEval_EvalFrameDefault + 24532
...
466 org.python.python             	0x0000000103307760 call_function + 288
467 org.python.python             	0x00000001033050c8 _PyEval_EvalFrameDefault + 24668
468 org.python.python             	0x00000001032632c0 function_code_fastcall + 120
469 org.python.python             	0x0000000103264458 object_vacall + 296
470 org.python.python             	0x000000010326453c _PyObject_CallMethodIdObjArgs + 96
471 org.python.python             	0x0000000103320c5c PyImport_ImportModuleLevelObject + 1496
472 org.python.python             	0x00000001033039a4 _PyEval_EvalFrameDefault + 18744
473 org.python.python             	0x00000001033082e8 _PyEval_EvalCodeWithName + 2040
474 org.python.python             	0x00000001032fefd8 PyEval_EvalCode + 60
475 org.python.python             	0x0000000103335940 run_eval_code_obj + 108
476 org.python.python             	0x00000001033349c4 run_mod + 96
477 org.python.python             	0x00000001033338fc PyRun_StringFlags + 128
478 org.python.python             	0x0000000103333838 PyRun_SimpleStringFlags + 64
479 org.python.python             	0x000000010334ad3c Py_RunMain + 408
480 org.python.python             	0x000000010334b57c pymain_main + 324
481 org.python.python             	0x000000010334b5f8 Py_BytesMain + 40
482 libdyld.dylib                 	0x0000000182d80f34 start + 4

Thread 0 crashed with ARM Thread State (64-bit):
    x0: 0x000000011744e950   x1: 0x000000011744e954   x2: 0x000000011744e958   x3: 0x000000011744e95c
    x4: 0x000000011744e960   x5: 0x000000011744e964   x6: 0x000000011744e968   x7: 0x000000011744e96c
    x8: 0xf9000100d503201f   x9: 0x000000011744e970  x10: 0x000000011744e9ac  x11: 0x000000011744e9a8
   x12: 0x000000011744e9a4  x13: 0x000000011744e9a0  x14: 0x000000011744e99c  x15: 0x000000011744e998
   x16: 0x10346ae8d65f03c0  x17: 0x000000011744e990  x18: 0x0000000000000000  x19: 0x0000000117358270
   x20: 0x0000000117359300  x21: 0x000000011744b8e0  x22: 0x0000000117354780  x23: 0x0000000117447ad0
   x24: 0x000000000000000d  x25: 0x0000000000000170  x26: 0x0000000117354440  x27: 0x0000000103484710
   x28: 0x0000000000000000   fp: 0x000000016cec71e0   lr: 0x00000001173e4d68
    sp: 0x000000016cec7120   pc: 0xf9000100d503201f cpsr: 0x20000000
   far: 0xf9000100d503201f  esr: 0x8a000000


Binary Images:
       0x102f24000 -        0x102f27fff +org.python.python (3.8.7 - 3.8.7) <2D8F2D70-3ABB-35E1-8F4B-6D7BDA8D5322> /opt/homebrew/*/Python.framework/Versions/3.8/Resources/Python.app/Contents/MacOS/Python
       0x103144000 -        0x1031bffff  dyld (832.7.1) <B7DB9E8A-A898-3C11-91A0-2B0264F05CB6> /usr/lib/dyld
       0x103248000 -        0x10342bfff +org.python.python (3.8.7, [c] 2001-2019 Python Software Foundation. - 3.8.7) <5D9B93B8-4F63-370B-A9A2-87C91994432A> /opt/homebrew/*/Python.framework/Versions/3.8/Python
       0x1034f0000 -        0x1034f3fff +_heapq.cpython-38-darwin.so (0) <39281BD4-20B9-3B7B-8D9E-82FFC60886D3> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_heapq.cpython-38-darwin.so
       0x103600000 -        0x103607fff +math.cpython-38-darwin.so (0) <2565DA25-9706-3920-9FCE-FBB92351CEB4> /
8000
opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/math.cpython-38-darwin.so
       0x103614000 -        0x103617fff +_bisect.cpython-38-darwin.so (0) <7A5537DD-5EC8-3102-B276-793BBD7390CA> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_bisect.cpython-38-darwin.so
       0x103624000 -        0x103627fff +_sha512.cpython-38-darwin.so (0) <139392ED-C6D1-371F-90B3-F8645FB96D48> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_sha512.cpython-38-darwin.so
       0x103634000 -        0x103637fff +_random.cpython-38-darwin.so (0) <8A4D1674-4FE1-3BEA-A1FB-0ABA0106540D> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_random.cpython-38-darwin.so
       0x103684000 -        0x103687fff +_check_build.cpython-38-darwin.so (0) <ED3B96AE-C2F5-3ED5-9AFC-342C735FDB6B> /Users/USER/Documents/*/_check_build.cpython-38-darwin.so
       0x103694000 -        0x1036effff +libomp.dylib (0) <8C4747FA-2185-3E55-A04F-EC429C047041> /opt/homebrew/*/libomp.dylib
       0x103768000 -        0x10376bfff +_opcode.cpython-38-darwin.so (0) <0DC64B1A-FB99-37E7-BD63-16D74B602D3C> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_opcode.cpython-38-darwin.so
       0x1037b8000 -        0x103957fff +_multiarray_umath.cpython-38-darwin.so (0) <7955FB9A-3EA9-3040-8610-D3517A2FBCD5> /Users/USER/Documents/*/_multiarray_umath.cpython-38-darwin.so
       0x103a84000 -        0x103a93fff +_datetime.cpython-38-darwin.so (0) <091A1023-57A8-347C-BD46-BEAA0259CD23> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_datetime.cpython-38-darwin.so
       0x103b24000 -        0x103b2bfff +_struct.cpython-38-darwin.so (0) <E0EDA83A-E4F7-35F8-9062-084E3FAA2E80> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_struct.cpython-38-darwin.so
       0x103b38000 -        0x103b47fff +_pickle.cpython-38-darwin.so (0) <2B7C7FC3-6247-33EF-95E4-F849D8AF9DCF> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_pickle.cpython-38-darwin.so
       0x103c98000 -        0x103ca7fff +_multiarray_tests.cpython-38-darwin.so (0) <730E3E92-3744-3793-BD26-3CE52800E3A1> /Users/USER/Documents/*/_multiarray_tests.cpython-38-darwin.so
       0x103cc4000 -        0x103cd7fff +_ctypes.cpython-38-darwin.so (0) <E901A0E4-5917-389F-BA87-FB3D4584FE21> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_ctypes.cpython-38-darwin.so
       0x103d68000 -        0x103d6bfff +lapack_lite.cpython-38-darwin.so (0) <4C3F2545-AA6C-3897-B2D0-198D172AEDB0> /Users/USER/Documents/*/lapack_lite.cpython-38-darwin.so
       0x103d7c000 -        0x103d8ffff +_umath_linalg.cpython-38-darwin.so (0) <37557893-C08C-33B9-BFD9-549D5DA4A012> /Users/USER/Documents/*/_umath_linalg.cpython-38-darwin.so
       0x103e2c000 -        0x103e33fff +zlib.cpython-38-darwin.so (0) <4DEDF183-7E3C-38C0-B5D1-BFB7D3554BCD> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/zlib.cpython-38-darwin.so
       0x103e40000 -        0x103e43fff +_bz2.cpython-38-darwin.so (0) <8F63B9A3-7EFF-3FAC-9BC9-A0BF32C28DB3> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_bz2.cpython-38-darwin.so
       0x103e90000 -        0x103e97fff +_lzma.cpython-38-darwin.so (0) <E7A0689E-04B5-3610-9394-A03F85B4E3B0> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_lzma.cpython-38-darwin.so
       0x103ea8000 -        0x103ec3fff +liblzma.5.dylib (0) <61710133-D7DB-31A2-B802-1048FF52D21C> /opt/homebrew/*/liblzma.5.dylib
       0x103ed8000 -        0x103edbfff +grp.cpython-38-darwin.so (0) <9B9F9B3F-1C6C-3884-A9D3-613449CE3BD5> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/grp.cpython-38-darwin.so
       0x103f28000 -        0x103f2bfff +_contextvars.cpython-38-darwin.so (0) <05E4E798-CABD-3027-96CC-A6A0ACA6C394> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_contextvars.cpython-38-darwin.so
       0x103f78000 -        0x103f83fff +_pocketfft_internal.cpython-38-darwin.so (0) <1D24AF92-863E-3722-90AE-D74FB1721528> /Users/USER/Documents/*/_pocketfft_internal.cpython-38-darwin.so
       0x103fd4000 -        0x10402ffff +mtrand.cpython-38-darwin.so (0) <61D46018-6608-30F9-A349-F9958C5C4D4C> /Users/USER/Documents/*/mtrand.cpython-38-darwin.so
       0x104090000 -        0x1040abfff +_bit_generator.cpython-38-darwin.so (0) <FC2F24E6-ADCD-32E7-9596-8439762EF45D> /Users/USER/Documents/*/_bit_generator.cpython-38-darwin.so
       0x1040d0000 -        0x1040f7fff +_common.cpython-38-darwin.so (0) <89D6B761-0706-360F-AC6E-8404DF64492F> /Users/USER/Documents/*/_common.cpython-38-darwin.so
       0x104118000 -        0x10411ffff +binascii.cpython-38-darwin.so (0) <E3594B42-FE43-3254-A180-D1D2F09E94CC> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/binascii.cpython-38-darwin.so
       0x10416c000 -        0x104173fff +_hashlib.cpython-38-darwin.so (0) <ECA67EF2-87CA-31E4-9FE9-9D3D4B069E8C> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_hashlib.cpython-38-darwin.so
       0x104184000 -        0x1041cffff +libssl.1.1.dylib (0) <46010D7B-A080-316B-88B4-3F63B39B7311> /opt/homebrew/*/libssl.1.1.dylib
       0x104204000 -        0x104383fff +libcrypto.1.1.dylib (0) <5626D593-8CAF-3F4D-B4DB-1885B08637C8> /opt/homebrew/*/libcrypto.1.1.dylib
       0x104424000 -        0x10442bfff +_blake2.cpython-38-darwin.so (0) <A201AD27-17D2-3EE9-B7BC-DC1142E744E1> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_blake2.cpython-38-darwin.so
       0x104438000 -        0x104447fff +_sha3.cpython-38-darwin.so (0) <D8239C2E-A1D7-35FA-ADAD-05B0EFC4929D> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_sha3.cpython-38-darwin.so
       0x104454000 -        0x104493fff +_bounded_integers.cpython-38-darwin.so (0) <D69A5267-2C77-3FE9-ADB7-D205DF8589AA> /Users/USER/Documents/*/_bounded_integers.cpython-38-darwin.so
       0x1044c0000 -        0x1044d3fff +_mt19937.cpython-38-darwin.so (0) <A140F7C8-07A1-3FFE-AC98-FE48A379F8A2> /Users/USER/Documents/*/_mt19937.cpython-38-darwin.so
       0x1044ec000 -        0x1044f7fff +_philox.cpython-38-darwin.so (0) <C43DCF06-1A38-3459-B330-B832497F1D1E> /Users/USER/Documents/*/_philox.cpython-38-darwin.so
       0x104510000 -        0x10451bfff +_pcg64.cpython-38-darwin.so (0) <DAEBC3D8-A2D0-368B-922E-9ECB10406A13> /Users/USER/Documents/*/_pcg64.cpython-38-darwin.so
       0x104534000 -        0x10453bfff +_sfc64.cpython-38-darwin.so (0) <E6F47C01-08C3-3BDE-808A-F26499598539> /Users/USER/Documents/*/_sfc64.cpython-38-darwin.so
       0x104550000 -        0x1045bbfff +_generator.cpython-38-darwin.so (0) <46C9F465-BB3A-3BE7-9E87-7C0F5C5D712D> /Users/USER/Documents/*/_generator.cpython-38-darwin.so
       0x10471c000 -        0x104727fff +_ccallback_c.cpython-38-darwin.so (0) <2C0D6AA4-EA84-35F9-A6C0-A5F7A4DC35A6> /Users/USER/Documents/*/_ccallback_c.cpython-38-darwin.so
       0x104778000 -        0x104a8bfff +_sparsetools.cpython-38-darwin.so (0) <22ED7C35-4207-3386-B1D5-19616FAA63B7> /Users/USER/Documents/*/_sparsetools.cpython-38-darwin.so
       0x104bc0000 -        0x104c1bfff +_csparsetools.cpython-38-darwin.so (0) <24D65172-0B27-3B6D-AA88-0612CE386B2E> /Users/USER/Documents/*/_csparsetools.cpython-38-darwin.so
       0x104c78000 -        0x104cbffff +_shortest_path.cpython-38-darwin.so (0) <5F1C5AA5-498C-3AA3-983A-36CD3D2E6613> /Users/USER/Documents/*/_shortest_path.cpython-38-darwin.so
       0x104cdc000 -        0x104cf3fff +_tools.cpython-38-darwin.so (0) <23270A40-72A0-3CDF-8A32-3FC6CAA02223> /Users/USER/Documents/*/_tools.cpython-38-darwin.so
       0x104d04000 -        0x104d1bfff +_traversal.cpython-38-darwin.so (0) <9701558C-6D2F-3F79-BCF7-5A082C21C9B4> /Users/USER/Documents/*/_traversal.cpython-38-darwin.so
       0x104d2c000 -        0x104d47fff +_min_spanning_tree.cpython-38-darwin.so (0) <7B5226AB-58F9-33D8-A3C4-D15906F4C812> /Users/USER/Documents/*/_min_spanning_tree.cpython-38-darwin.so
       0x104d5c000 -        0x104d7ffff +_flow.cpython-38-darwin.so (0) <9ED47DD3-5AA3-359E-B671-A90194AD82B2> /Users/USER/Documents/*/_flow.cpython-38-darwin.so
       0x104d98000 -        0x104dbffff +_matching.cpython-38-darwin.so (0) <F884B262-D653-36D0-BDCD-F22F713732A0> /Users/USER/Documents/*/_matching.cpython-38-darwin.so
       0x104dd8000 -        0x104dfffff +_reordering.cpython-38-darwin.so (0) <81F74073-9E88-3B34-92B3-4E6140EE640D> /Users/USER/Documents/*/_reordering.cpython-38-darwin.so
       0x104e58000 -        0x104e63fff +murmurhash.cpython-38-darwin.so (0) <883D4188-91F0-39FD-926D-0DF6999CBB87> /Users/USER/Documents/*/murmurhash.cpython-38-darwin.so
       0x104f34000 -        0x104f43fff +_socket.cpython-38-darwin.so (0) <1AB0B747-2F17-3E0F-B9D5-6C050ACDDC17> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_socket.cpython-38-darwin.so
       0x104f50000 -        0x104f57fff +select.cpython-38-darwin.so (0) <D5421F91-2EA2-355C-BEE9-9DD6B018F0DB> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/select.cpython-38-darwin.so
       0x104f64000 -        0x104f6bfff +array.cpython-38-darwin.so (0) <552FEEC0-825F-3F07-AB61-2AF3A3F722B8> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/array.cpython-38-darwin.so
       0x104f78000 -        0x104f7bfff +_posixsubprocess.cpython-38-darwin.so (0) <2788AA20-1EE8-334A-88A9-12C19F3F27E9> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_posixsubprocess.cpython-38-darwin.so
       0x104fc8000 -        0x104fcffff +_json.cpython-38-darwin.so (0) <ED6A173C-7DB7-33B0-A4CC-85FB4E42B075> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_json.cpython-38-darwin.so
       0x10501c000 -        0x10501ffff +_uuid.cpython-38-darwin.so (0) <B20549D1-8F1B-3B23-8EE6-3529C0CCCC8A> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_uuid.cpython-38-darwin.so
       0x10502c000 -        0x10502ffff +_queue.cpython-38-darwin.so (0) <3FC32037-473C-3777-A907-02B567312271> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_queue.cpython-38-darwin.so
       0x10503c000 -        0x10503ffff +_multiprocessing.cpython-38-darwin.so (0) <C9FE17DE-B3D2-3782-A39A-8B591609DF13> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/_multiprocessing.cpython-38-darwin.so
       0x10508c000 -        0x10508ffff +mmap.cpython-38-darwin.so (0) <FE310B5B-AC92-3CCC-803B-6A238D1DFC2B> /opt/homebrew/*/Python.framework/Versions/3.8/lib/python3.8/lib-dynload/mmap.cpython-38-darwin.so
       0x10519c000 -        0x105213fff +ckdtree.cpython-38-darwin.so (0) <25CDA4A6-0952-3322-9D7E-D4570E8B470B> /Users/USER/Documents/*/ckdtree.cpython-38-darwin.so
       0x105248000 -        0x1052fffff +qhull.cpython-38-darwin.so (0) <3E95EC83-B325-35E5-AF65-0EA65F773F75> /Users/USER/Documents/*/qhull.cpython-38-darwin.so
       0x105334000 -        0x106513fff +libopenblas.0.dylib (0) <6468957E-997C-3825-A983-BB85582DB9B1> /opt/homebrew/*/libopenblas.0.dylib
       0x1066ac000 -        0x1067d7fff +libgfortran.5.dylib (0) <8C56A28B-D541-332C-90D4-19116F345FCD> /opt/homebrew/*/libgfortran.5.dylib
       0x106848000 -        0x10687bfff +libgomp.1.dylib (0) <16C16CF7-578C-3E91-A48E-513DDE7F5C77> /opt/homebrew/*/libgomp.1.dylib
       0x1068a4000 -        0x1068abfff +libgcc_s.2.dylib (0) <583C345F-8FFB-3698-A734-80CD619416D5> /opt/homebrew/*/libgcc_s.2.dylib
       0x1168fc000 -        0x116903fff +messagestream.cpython-38-darwin.so (0) <B59C6D94-0D1A-392C-B553-EB5C1967004D> /Users/USER/Documents/*/messagestream.cpython-38-darwin.so
       0x116910000 -        0x116927fff +_voronoi.cpython-38-darwin.so (0) <47EE0876-AACF-3759-B049-CE50074A98E2> /Users/USER/Documents/*/_voronoi.cpython-38-darwin.so
       0x11693c000 -        0x116987fff +_fblas.cpython-38-darwin.so (0) <B236BFCB-5E0B-3C57-AF66-2D2F7D7A2668> /Users/USER/Documents/*/_fblas.cpython-38-darwin.so
       0x1169c8000 -        0x116ab3fff +_flapack.cpython-38-darwin.so (0) <83C1CD89-34C8-34D6-90DD-A0FEA69938E6> /Users/USER/Documents/*/_flapack.cpython-38-darwin.so
       0x116bbc000 -        0x116bc7fff +_flinalg.cpython-38-darwin.so (0) <17A04051-8C6D-312E-8212-22626C41287E> /Users/USER/Documents/*/_flinalg.cpython-38-darwin.so
       0x116bd4000 -        0x116bf3fff +_solve_toeplitz.cpython-38-darwin.so (0) <6C506958-553A-30DA-BBEA-BE4177E32CCE> /Users/USER/Documents/*/_solve_toeplitz.cpython-38-darwin.so
       0x116c48000 -        0x116c63fff +_matfuncs_sqrtm_triu.cpython-38-darwin.so (0) <AB6C276A-8E24-3866-921E-B63A70B3A9FE> /Users/USER/Documents/*/_matfuncs_sqrtm_triu.cpython-38-darwin.so
       0x116c78000 -        0x116ca3fff +_decomp_update.cpython-38-darwin.so (0) <46A8B0CE-FABB-3D74-B7E7-5D1FCA4745A2> /Users/USER/Documents/*/_decomp_update.cpython-38-darwin.so
       0x116cbc000 -        0x116cdffff +cython_blas.cpython-38-darwin.so (0) <D2164937-236D-39CE-B5A8-B2E1D36B4607> /Users/USER/Documents/*/cython_blas.cpython-38-darwin.so
       0x116cfc000 -        0x116d6bfff +cython_lapack.cpython-38-darwin.so (0) <BAB839AC-C488-3C8E-91A4-E5B48F550B7E> /Users/USER/Documents/*/cython_lapack.cpython-38-darwin.so
       0x116e10000 -        0x116e1bfff +_distance_wrap.cpython-38-darwin.so (0) <6572B1C3-50B3-34EB-8754-C1546B528375> /Users/USER/Documents/*/_distance_wrap.cpython-38-darwin.so
       0x116e30000 -        0x116e4bfff +_hausdorff.cpython-38-darwin.so (0) <04EDA219-5D28-32CC-9E92-3C00B091040C> /Users/USER/Documents/*/_hausdorff.cpython-38-darwin.so
       0x116e60000 -        0x116f77fff +_ufuncs.cpython-38-darwin.so (0) <178C0D07-D1BA-3846-AA74-09AB80CA80D7> /Users/USER/Documents/*/_ufuncs.cpython-38-darwin.so
       0x116fc0000 -        0x116fd3fff +_ufuncs_cxx.cpython-38-darwin.so (0) <8DB4B046-CE29-373C-87D6-16C713E7BF5C> /Users/USER/Documents/*/_ufuncs_cxx.cpython-38-darwin.so
       0x116fe8000 -        0x117063fff +specfun.cpython-38-darwin.so (0) <EC608389-2CF4-3E00-8209-39069385598D> /Users/USER/Documents/*/specfun.cpython-38-darwin.so
       0x1170bc000 -        0x1170bffff +_comb.cpython-38-darwin.so (0) <BDAC88F4-8BC6-3BDD-952B-1478F5CED6B1> /Users/USER/Documents/*/_comb.cpython-38-darwin.so
       0x1170cc000 -        0x1170d7fff +_ellip_harm_2.cpython-38-darwin.so (0) <D5BAD5CC-AD6E-3198-A397-064527A6EAEB> /Users/USER/Documents/*/_ellip_harm_2.cpython-38-darwin.so
       0x1170e8000 -        0x117147fff +rotation.cpython-38-darwin.so (0) <18DF6336-0503-3803-BCF2-976592251D50> /Users/USER/Documents/*/rotation.cpython-38-darwin.so
       0x1171f4000 -        0x11720bfff +_nd_image.cpython-38-darwin.so (0) <F560A498-78D0-3491-A950-92CBEE3F0EEE> /Users/USER/Documents/*/_nd_image.cpython-38-darwin.so
       0x11721c000 -        0x11724ffff +_ni_label.cpython-38-darwin.so (0) <BB3885EF-2367-3417-9C36-91F444299A4B> /Users/USER/Documents/*/_ni_label.cpython-38-darwin.so
       0x1172e8000 -        0x1172effff +minpack2.cpython-38-darwin.so (0) <9184F43F-3BBA-3600-AB53-957D4FEE9275> /Users/USER/Documents/*/minpack2.cpython-38-darwin.so
       0x1172fc000 -        0x117323fff +_iterative.cpython-38-darwin.so (0) <9426AC51-C253-3C51-85EF-52A2A9C32112> /Users/USER/Documents/*/_iterative.cpython-38-darwin.so
       0x117380000 -        0x1173bbfff +_superlu.cpython-38-darwin.so (0) <5FEF5842-6548-39F5-B856-56F820F844E4> /Users/USER/Documents/*/_superlu.cpython-38-darwin.so
       0x1173d8000 -        0x11743ffff +_arpack.cpython-38-darwin.so (0) <B0646787-040A-3EF0-94AE-0347A553C099> /Users/USER/Documents/*/_arpack.cpython-38-darwin.so
       0x182ac2000 -        0x182ac3fff  libsystem_blocks.dylib (78) <D3998C8A-7A1C-3962-822C-91DFC11ACBF7> /usr/lib/system/libsystem_blocks.dylib
       0x182ac4000 -        0x182afbfff  libxpc.dylib (2038.40.38) <D87D7BAA-9E73-3A84-8247-3456B703C302> /usr/lib/system/libxpc.dylib
       0x182afc000 -        0x182b13fff  libsystem_trace.dylib (1277.50.1) <D67123A1-A8BC-329C-BC76-830E95EBA1B3> /usr/lib/system/libsystem_trace.dylib
       0x182b14000 -        0x182b87fff  libcorecrypto.dylib (1000.60.19) <D6B8B5AA-56DF-3E47-A778-007A7AA81372> /usr/lib/system/libcorecrypto.dylib
       0x182b88000 -        0x182bb3fff  libsystem_malloc.dylib (317.40.8) <E47334AF-7E46-3FAE-B71C-9D9B4F1DF1DE> /usr/lib/system/libsystem_malloc.dylib
       0x182bb4000 -        0x182bf7fff  libdispatch.dylib (1271.40.12) <68CAA910-6621-32A1-95AE-40594BA75013> /usr/lib/system/libdispatch.dylib
       0x182bf8000 -        0x182c30fff  libobjc.A.dylib (818.2) <A4BC7D83-2CA5-32B1-B1CA-1D1431C04916> /usr/lib/libobjc.A.dylib
       0x182c31000 -        0x182c33fff  libsystem_featureflags.dylib (28.60.1) <790541FA-8846-39B1-B87F-BCB1C87A6A27> /usr/lib/system/libsystem_featureflags.dylib
       0x182c34000 -        0x182cb4fff  libsystem_c.dylib (1439.40.11) <4A324485-84D9-318F-8267-70FF10504289> /usr/lib/system/libsystem_c.dylib
       0x182cb5000 -        0x182d10fff  libc++.1.dylib (904.4) <28BA0783-4F54-33EB-8DC0-DC23CD3BC576> /usr/lib/libc++.1.dylib
       0x182d11000 -        0x182d2afff  libc++abi.dylib (904.4) <9291CD18-15AA-33CB-96FD-C5CB7F500470> /usr/lib/libc++abi.dylib
       0x182d2b000 -        0x182d5dfff  libsystem_kernel.dylib (7195.60.75) <35BFD663-2C38-3E0F-A35E-8C1BC6400898> /usr/lib/system/libsystem_kernel.dylib
       0x182d5e000 -        0x182d69fff  libsystem_pthread.dylib (454.60.1) <EDB716F3-BF94-3941-B7DA-D6C91094C645> /usr/lib/system/libsystem_pthread.dylib
       0x182d6a000 -        0x182da8fff  libdyld.dylib (832.7.1) <87B502C5-584E-381A-8C99-6105402B8A6E> /usr/lib/system/libdyld.dylib
       0x182da9000 -        0x182daffff  libsystem_platform.dylib (254.60.1) <089E074F-F575-3853-B081-B3B0A23FDA61> /usr/lib/system/libsystem_platform.dylib
       0x182db0000 -        0x182ddbfff  libsystem_info.dylib (542.40.3) <CFE4640F-4E04-3DC5-80F6-79E0BF7F4FAF> /usr/lib/system/libsystem_info.dylib
       0x182ddc000 -        0x183285fff  com.apple.CoreFoundation (6.9 - 1770.300) <396F9604-7574-3C1B-ACA7-C7EB24FE3544> /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
       0x183592000 -        0x1837ecfff  libBLAS.dylib (1336.40.1) <7BF1EC0C-692E-3D4A-AD4E-0C8C29C4C178> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib
       0x183838000 -        0x18389afff  libSparse.dylib (106) <8E6B9AAB-79F7-3ADA-B7CF-DD0FA0DBBCE8> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparse.dylib
       0x184eec000 -        0x18515dfff  libicucore.A.dylib (66109) <CFFBBD7C-F4CB-3D78-AD6C-86901ECE567F> /usr/lib/libicucore.A.dylib
       0x18515e000 -        0x185168fff  libsystem_darwin.dylib (1439.40.11) <1DEB48CE-5F39-3BBC-8D13-00C7636F7FE5> /usr/lib/system/libsystem_darwin.dylib
       0x18559b000 -        0x1855a6fff  libsystem_notify.dylib (279.40.4) <C8ADD6C0-5150-359F-8A38-AEAA3351AA5C> /usr/lib/system/libsystem_notify.dylib
       0x187555000 -        0x187564fff  libsystem_networkextension.dylib (1295.60.5) <399ACCA2-77CA-3A30-9930-1382F8DBBAD3> /usr/lib/system/libsystem_networkextension.dylib
       0x1875bc000 -        0x1875d3fff  libsystem_asl.dylib (385) <B25E1954-9781-3238-8B1C-0CF44B5FA684> /usr/lib/system/libsystem_asl.dylib
       0x188b43000 -        0x188b4afff  libsystem_symptoms.dylib (1431.60.1) <CF9E7636-168A-36DD-95F0-6CA76B91D3DC> /usr/lib/system/libsystem_symptoms.dylib
       0x188dbe000 -        0x1890dcfff  com.apple.vImage (8.1 - 544) <818B9B01-AA84-3D24-A04D-00EA8D66C14F> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage
       0x18a5b4000 -        0x18a5c5fff  libsystem_containermanager.dylib (318.60.1) <165B6DCF-6B92-3EC9-84D3-98FBFAB26EA1> /usr/lib/system/libsystem_containermanager.dylib
       0x18b237000 -        0x18b23bfff  libsystem_configuration.dylib (1109.60.2) <5D4DB975-F8DC-3B07-8F2B-4054CCA4B9B6> /usr/lib/system/libsystem_configuration.dylib
       0x18b23c000 -        0x18b240fff  libsystem_sandbox.dylib (1441.60.4) <0EE4CE47-4715-3EE3-93CA-F4863FE29A5C> /usr/lib/system/libsystem_sandbox.dylib
       0x18b2e0000 -        0x18b794fff  libBNNS.dylib (288.60.2) <A4896748-ACA6-3491-842E-59A6E1A386DF> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBNNS.dylib
       0x18b795000 -        0x18b847fff  libvDSP.dylib (760.40.6) <C9471CC1-5622-390D-A38A-F730A17924C4> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib
       0x18bbfb000 -        0x18bbfdfff  libquarantine.dylib (119.40.2) <C55DCBDE-51FF-3D90-AF78-9BE9F8FC8DD6> /usr/lib/system/libquarantine.dylib
       0x18bc80000 -        0x18bc95fff  libLinearAlgebra.dylib (1336.40.1) <EF07960C-DBF1-34A0-9F03-E8969D4BA4E8> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib
       0x18c125000 -        0x18c131fff  libbz2.1.0.dylib (44) <78DA9846-BC91-3FEF-BCAE-DA445E2F4007> /usr/lib/libbz2.1.0.dylib
       0x18c132000 -        0x18c136fff  libsystem_coreservices.dylib (127) <1F4E0C2D-9A82-3E3F-B546-1F23A3B180B5> /usr/lib/system/libsystem_coreservices.dylib
       0x18c325000 -        0x18c336fff  libz.1.dylib (76) <5EA0F5F6-7974-3DF8-9862-CE916C5EC980> /usr/lib/libz.1.dylib
       0x18c337000 -        0x18c364fff  libsystem_m.dylib (3186.40.2) <129930A8-F06B-3AD4-BA84-21549591F87A> /usr/lib/system/libsystem_m.dylib
       0x18c366000 -        0x18c36bfff  libmacho.dylib (973.4) <29AD4E0E-F6A4-313F-AFA3-825CA94917BD> /usr/lib/system/libmacho.dylib
       0x18c388000 -        0x18c395fff  libcommonCrypto.dylib (60178.40.2) <FEDF1785-B89A-3EFB-B95E-467645AC6113> /usr/lib/system/libcommonCrypto.dylib
       0x18c396000 -        0x18c3a0fff  libunwind.dylib (200.10) <21A28401-C508-38BE-A7CF-C2A56AB3C311> /usr/lib/system/libunwind.dylib
       0x18c3a1000 -        0x18c3a8fff  liboah.dylib (203.13.2) <F36DDACF-B46B-3813-8ADE-A275209588BF> /usr/lib/liboah.dylib
       0x18c3a9000 -        0x18c3b1fff  libcopyfile.dylib (173.40.2) <8AE5EFE8-BBA5-380B-9165-D350CD7EA3CE> /usr/lib/system/libcopyfile.dylib
       0x18c3b2000 -        0x18c3b5fff  libcompiler_rt.dylib (102.2) <39A3467E-CBED-3C4A-B0BC-39C0093842E9> /usr/lib/system/libcompiler_rt.dylib
       0x18c3b6000 -        0x18c3b8fff  libsystem_collections.dylib (1439.40.11) <5EEC397D-2CAA-39D1-8B82-6370E633FDC9> /usr/lib/system/libsystem_collections.dylib
       0x18c3b9000 -        0x18c3bbfff  libsystem_secinit.dylib (87.60.1) <04EF7D20-ABBD-3DB1-B990-278887044735> /usr/lib/system/libsystem_secinit.dylib
       0x18c3bc000 -        0x18c3befff  libremovefile.dylib (49.40.3) <8FAF9121-D546-3319-B366-1C50BAF59FE8> /usr/lib/system/libremovefile.dylib
       0x18c3bf000 -        0x18c3bffff  libkeymgr.dylib (31) <3EF55D83-6DD4-376B-8C0B-5B12CD0D3D94> /usr/lib/system/libkeymgr.dylib
       0x18c3c0000 -        0x18c3c8fff  libsystem_dnssd.dylib (1310.60.4) <E498E2D5-BD16-3458-AF9C-B4EE888935CB> /usr/lib/system/libsystem_dnssd.dylib
       0x18c3c9000 -        0x18c3cefff  libcache.dylib (83) <BF1D536B-540F-374E-BA7B-EB2429F334CD> /usr/lib/system/libcache.dylib
       0x18c3cf000 -        0x18c3d0fff  libSystem.B.dylib (1292.60.1) <03EDCD03-5B2F-353E-BD06-6313B8279E9C> /usr/lib/libSystem.B.dylib
       0x18c3d1000 -        0x18c3d4fff  libfakelink.dylib (3) <B5AF719C-EC9A-3714-9E29-65FA0920BFE4> /usr/lib/libfakelink.dylib
       0x18c3d5000 -        0x18c3d5fff  com.apple.SoftLinking (1.0 - 1) <DD7C1F9C-6512-35D2-9391-450628D67E19> /System/Library/PrivateFrameworks/SoftLinking.framework/Versions/A/SoftLinking
       0x18c63a000 -        0x18c64bfff  libSparseBLAS.dylib (1336.40.1) <147B4C34-5369-39C6-99A3-559800DB28A5> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparseBLAS.dylib
       0x18c653000 -        0x18c66afff  libcompression.dylib (96.40.6) <A01701F6-D89C-3E89-B429-79DB81426F12> /usr/lib/libcompression.dylib
       0x18c66b000 -        0x18c66ffff  libQuadrature.dylib (7) <B2DD0691-70A9-3EE4-A5DC-D2FFFE71ECC5> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libQuadrature.dylib
       0x18c670000 -        0x18cb1afff  libLAPACK.dylib (1336.40.1) <E94DE514-61CA-3C60-B3D7-C9257223FDA5> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib
       0x18cb6d000 -        0x18cb85fff  liblzma.5.dylib (16) <2F09739A-498C-39D9-823E-BA62312F540E> /usr/lib/liblzma.5.dylib
       0x18ccb6000 -        0x18cd2afff  libvMisc.dylib (760.40.6) <48EB6D40-7B0D-3CB0-9F4D-1481ABB81222> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib
       0x18f7e1000 -        0x18f7e1fff  liblaunch.dylib (2038.40.38) <A42FB952-AEBC-335F-8336-751E963F09F4> /usr/lib/system/liblaunch.dylib
       0x18f7e4000 -        0x18f7f5fff  libffi.dylib (27) <EFF19129-E929-3E58-A6C4-16FB9F26120C> /usr/lib/libffi.dylib
       0x191ca4000 -        0x191ca4fff  libsystem_product_info_filter.dylib (8.40.1) <BF4F283D-1B0C-3A5A-8DAC-CFB3096CEDB4> /usr/lib/system/libsystem_product_info_filter.dylib
       0x191d7d000 -        0x191d7dfff  com.apple.Accelerate.vecLib (3.11 - vecLib 3.11) <7C0FF713-FC2B-3857-B278-119FF3DC693F> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib
       0x19205e000 -        0x19205efff  com.apple.Accelerate (1.11 - Accelerate 1.11) <C114DE30-B4F9-36A6-B7FC-AF43156C4401> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate

@glemaitre
Copy link
Member

@ogrisel did you face any similar issue?

@iRonJ In the meanwhile, could you install the compilers and libopemp using conda-forge instead of brew?

@ogrisel
Copy link
Member
ogrisel commented Jan 6, 2021

@iRonJ how did you install python3 with homebrew? With or without arch -x86_64?

Can you please report the output of the following command on your machine?

python3 -c "import platform; print(platform.platform())"

@ogrisel
Copy link
Member
ogrisel commented Jan 6, 2021

From the dump I see Code Type: ARM-64 (Native) so you installed python3 from homebrew without the arch -x86_64 option I guess.

  • Did you do the same for libomp?
  • How did you install numpy? From source? If so how did you install openblas, using homebrew?

For reference, I installed my own dev env using the macos/aarch64 from miniforge https://github.com/conda-forge/miniforge to install a native ARM64 python + numpy + scipy + cython + "compilers" conda-forge package. Once I activate this env, I can build scikit-learn in native mode without any problem.

@iRonJ
Copy link
Author
iRonJ commented Jan 7, 2021

@iRonJ how did you install python3 with homebrew? With or without arch -x86_64?

Can you please report the output of the following command on your machine?

python3 -c "import platform; print(platform.platform())"

(tfmac) bash-3.2$ python3 -c "import platform; print(platform.platform())"
macOS-11.1-arm64-arm-64bit

@iRonJ
Copy link
Author
iRonJ commented Jan 7, 2021

From the dump I see Code Type: ARM-64 (Native) so you installed python3 from homebrew without the arch -x86_64 option I guess.

  • Did you do the same for libomp?
  • How did you install numpy? From source? If so how did you install openblas, using homebrew?

For reference, I installed my own dev env using the macos/aarch64 from miniforge https://github.com/conda-forge/miniforge to install a native ARM64 python + numpy + scipy + cython + "compilers" conda-forge package. Once I activate this env, I can build scikit-learn in native mode without any problem.

libomp was installed via brew

I think my NumPy install is broken, it was compiled from source, then I compiled scipy from source, but I think the NumPy compile actually had some failed components but they weren't detected as a failure, and the build process either linked corrupted files, or silently skipped some needed files.

I'll try Conda, I didn't think their repos were updated for AS yet though

@ogrisel
Copy link
Member
ogrisel commented Jan 8, 2021

I'll try Conda, I didn't think their repos were updated for AS yet though

Note, that I used the conda-forge community distribution via the miniforge installer, not the default conda channel maintained by Anaconda Inc.

https://github.com/conda-forge/miniforge

@ogrisel
Copy link
Member
ogrisel commented Jan 8, 2021

Also note that homebrew in arm64 native mode is still considered experimental by the homebrew developers. They recommend installing homebrew in x86_64 mode via Rosetta2 emulation for the time being (using the arch -x86_64 prefix on the brew install commands).

So maybe the arm64 native package package of openblas and libgfortran from homebrew are not fully stable either.

Related issues:

So as long as the above upstream issues are not solved, I would recommend scikit-learn users on M1 hardware to use the miniforge distribution.

@ogrisel
Copy link
Member
ogrisel commented Jan 8, 2021

I opened #19137 to track progress for this. Let's close this issue to keep things simple.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants
0