Re: Please help testing/debugging math/openblas (and variants) on Darwin

Brian Callahan <[email protected]>
Newsgroups gmane.os.netbsd.devel.packages
Message-ID <[email protected]>
On 2/28/26 3:50 AM, Jonathan Perkin wrote:
> * On 2026-02-28 at 08:33 GMT, Dr. Thomas Orgis wrote:
>
>> https://releng.netbsd.org/bulktracker/pkg/80553270
>> https://reports.pkgci.org/Darwin/14.5/arm64/20260227.1002/openblas-0.3.31/build.log 
>>
>>
>> ld: library 'gfortran' not found
>> ld: library 'gfortran' not found
>> clang: error: linker command failed with exit code 1 (use -v to see 
>> invocation)
>> clang: error: linker command failed with exit code 1 (use -v to see 
>> invocation)
>
> I'm not very familiar with fortran, but it feels wrong that it's 
> calling clang here.  clang doesn't support fortran, so we pull in 
> gfortran on macOS.  This works fine for many other packages that use 
> fortran.
>
> My builds are a bit different because I have my own gcc package for 
> this which fixes a lot of the issues with the pkgsrc version, but that 
> shouldn't affect things - it's the same infrastructure.
>

Built fine for me on

Darwin Brians-MBP-2 22.6.0 Darwin Kernel Version 22.6.0: Tue Jul 15 
08:22:28 PDT 2025; root:xnu-8796.141.3.713.2~2/RELEASE_X86_64 x86_64

It's not wrong for clang to be called there; in fact it's necessary. At 
that time, clang is compiling a C module and linking all in one 
invocation, and libgfortran happens to be one of the libraries needed. 
You just need to add the path to the library to LDFLAGS (for me, it's 
-L/opt/pkg/gcc12/lib).

However, it fails to install with this error:

=> Checking file-check results for openblas-0.3.31
ERROR: ************************************************************
ERROR: The following files are in 
/Users/briancallahan/pkgsrc/math/openblas/work/.destdir/opt/pkg but not 
in the PLIST:
ERROR: 
  /Users/briancallahan/pkgsrc/math/openblas/work/.destdir/opt/pkg/lib/libopenblas..0.dylib
*** Error code 1

Stop.
bmake[1]: stopped making "install" in 
/Users/briancallahan/pkgsrc/math/openblas
*** Error code 1

Stop.
bmake: stopped making "install clean" in 
/Users/briancallahan/pkgsrc/math/openblas


I have no idea why I've generated something that doesn't match the 
PLIST, so I'll leave that for someone else.

~Brian
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.