Opened 14 months ago
Last modified 12 months ago
#68402 assigned defect
OpenBLAS @0.3.24: failed to destroot
Reported by: | karo11 | Owned by: | NicosPavlov |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | sonoma | Cc: | michaelld (Michael Dickens), catap (Kirill A. Korinsky), Dave-Allured (Dave Allured) |
Port: | OpenBLAS |
Description
Trial to build under MacOS Sonoma 14.0
Attachments (3)
Change History (16)
Changed 14 months ago by karo11
comment:1 Changed 14 months ago by reneeotten (Renee Otten)
Cc: | michaelld catap added |
---|---|
Keywords: | Build error "not a Mach-O file" removed |
Owner: | set to NicosPavlov |
Priority: | High → Normal |
Status: | new → assigned |
Summary: | OpenBLAS failed to destroot → OpenBLAS: failed to destroot |
comment:2 Changed 14 months ago by ryandesign (Ryan Carsten Schmidt)
Keywords: | sonoma added |
---|---|
Summary: | OpenBLAS: failed to destroot → OpenBLAS @0.3.24: failed to destroot |
The error in the log is:
error: /Library/Developer/CommandLineTools/usr/bin/install_name_tool: input file: .../libopenblas-r1.dylib is not a Mach-O file
I don't see anything obviously wrong where that dylib is created:
/Volumes/mbkaroSD2/opt/local/var/macports/build/_Volumes_mbkaroSD2_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_OpenBLAS/OpenBLAS/work/compwrap/fc/opt/local/bin/gfortran-mp-13 -m64 -Os -O3 -m128bit-long-double -Wall -frecursive -fno-optimize-sibling-calls -m64 -fPIC -msse3 -mssse3 -msse4.1 -O3 -m128bit-long-double -Wall -frecursive -fno-optimize-sibling-calls -m64 -fPIC -msse3 -mssse3 -msse4.1 -L/opt/local/lib -Wl,-headerpad_max_install_names -Wl,-rpath,/opt/local/lib/libgcc -Wl,-syslibroot,/Library/Developer/CommandLineTools/SDKs/MacOSX14.sdk -all_load -headerpad_max_install_names -install_name "/Volumes/mbkaroSD2/opt/local/var/macports/build/_Volumes_mbkaroSD2_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_OpenBLAS/OpenBLAS/work/OpenBLAS-0.3.24/exports/../libopenblas.1.dylib" -dynamiclib -o ../libopenblas-r1.dylib ../libopenblas-r1.a -Wl,-exported_symbols_list,osx.def -L/Volumes/mbkaroSD2/opt/local/bin/../lib/gcc13/gcc/x86_64-apple-darwin23/13.2.0 -L/Volumes/mbkaroSD2/opt/local/bin/../lib/gcc13/gcc -L/opt/local/lib -L/Volumes/mbkaroSD2/opt/local/bin/../lib/gcc13/gcc/x86_64-apple-darwin23/13.2.0/../../.. -lgfortran -lquadmath -lSystem ld: warning: duplicate -rpath '/opt/local/lib/libgcc' ignored
Warnings should be harmless so the problem is probably something else.
Can you find the file libopenblas-r1.dylib in the work directory and tell us what type of file it is?
find $(port work OpenBLAS) -name libopenblas-r1.dylib -print0 | xargs -0 file
comment:3 Changed 14 months ago by karo11
$ find $(port work OpenBLAS) -name libopenblas-r1.dylib -print0 | xargs -0 file /Volumes/mbkaroSD2/opt/local/var/macports/build/_Volumes_mbkaroSD2_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_OpenBLAS/OpenBLAS/work/destroot/opt/local/lib/libopenblas-r1.dylib: data /Volumes/mbkaroSD2/opt/local/var/macports/build/_Volumes_mbkaroSD2_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_OpenBLAS/OpenBLAS/work/OpenBLAS-0.3.24/libopenblas-r1.dylib: Mach-O 64-bit dynamically linked shared library x86_64
comment:4 Changed 14 months ago by karo11
Perhaps add. info?
otool -L /Volumes/mbkaroSD2/opt/local/var/macports/build/_Volumes_mbkaroSD2_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_OpenBLAS/OpenBLAS/work/OpenBLAS-0.3.24/libopenblas-r1.dylib /Volumes/mbkaroSD2/opt/local/var/macports/build/_Volumes_mbkaroSD2_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_OpenBLAS/OpenBLAS/work/OpenBLAS-0.3.24/libopenblas-r1.dylib: /Volumes/mbkaroSD2/opt/local/var/macports/build/_Volumes_mbkaroSD2_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_OpenBLAS/OpenBLAS/work/OpenBLAS-0.3.24/exports/../libopenblas.1.dylib (compatibility version 0.0.0, current version 0.0.0) @rpath/libgfortran.5.dylib (compatibility version 6.0.0, current version 6.0.0) @rpath/libquadmath.0.dylib (compatibility version 1.0.0, current version 1.0.0) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1336.0.0) @rpath/libgcc_s.1.1.dylib (compatibility version 1.0.0, current version 1.1.0)
comment:5 Changed 14 months ago by ryandesign (Ryan Carsten Schmidt)
Ok, so a proper Mach-O dylib was built, but for some reason what ended up in the destroot is not a Mach-O dylib but "data". What kind of data?
I wonder how the dylib is being copied to the destroot, because that seems like where the problem might be. Unfortunately the log only says:
Copying the shared library to /Volumes/mbkaroSD2/opt/local/var/macports/build/_Volumes_mbkaroSD2_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_OpenBLAS/OpenBLAS/work/destroot/opt/local/lib
without showing us the exact commands that were used to do so.
comment:6 Changed 14 months ago by karo11
I have tried a different, better said, a reduced PATH using only system bin folder and macports bin folder. There was no difference, still the error. But the last trial delivered a different one. I'll add the log file
:error:destroot Failed to destroot OpenBLAS: ln: /Volumes/mbkaroSD2/opt/local/var/macports/build/_Volumes_mbkaroSD2_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_OpenBLAS/OpenBLAS/work/destroot/opt/local/include/lapacke.h: File exists :debug:destroot Error code: NONE :debug:destroot Backtrace: ln: /Volumes/mbkaroSD2/opt/local/var/macports/build/_Volumes_mbkaroSD2_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_OpenBLAS/OpenBLAS/work/destroot/opt/local/include/lapacke.h: File exists :debug:destroot while executing :debug:destroot "$post $targetname" :error:destroot See /opt/local/var/macports/logs/_Volumes_mbkaroSD2_opt_local_var_macports_sources_rsync.macports.org_macports_release_tarballs_ports_math_OpenBLAS/OpenBLAS/main.log for details.
comment:7 Changed 14 months ago by kencu (Ken)
FWIW, it works for me on an M1 Mac:
% port -v installed openblas The following ports are currently installed: OpenBLAS @0.3.24_0+gcc13+lapack (active) requested_variants='' platform='darwin 23' archs='arm64' date='2023-10-13T07:36:40-0700'
You're building it on Intel it appears.
comment:8 Changed 14 months ago by karo11
Yes, building on my intel MacBook under MacOS Sonoma.
I'll add another build log with
port -v install openblas
Changed 14 months ago by karo11
Attachment: | main.3.log added |
---|
comment:9 Changed 13 months ago by karo11
The error has disappeared!
I had /opt/local linked to another disk. I copied /opt/local from the external disk to the main disk. Here the build error did not appear anymore.
I assume the generated long filenames (see the attached log files) during build led to the error!
Unluckily, now an error appears in port SuiteSparse_CHOLMOD. Since I used OpenCore Legacy Patcher to install MacOS Sonoma I am not sure about the source of the problem.
comment:10 Changed 13 months ago by jmroot (Joshua Root)
Also fails this way on the buildbot: https://build.macports.org/builders/ports-14_x86_64-builder/builds/291/steps/install-port/logs/stdio
comment:11 Changed 13 months ago by karo11
At least it seems not to be an error by OpenCore Legacy Patcher...
comment:12 Changed 12 months ago by ryandesign (Ryan Carsten Schmidt)
That buildbot worker is also using OpenCore Legacy Patcher. But I doubt that's related.
comment:13 Changed 12 months ago by Dave-Allured (Dave Allured)
Cc: | Dave-Allured added |
---|
Build log of OpenBLAS