optimizers / homebrew-cutest

Homebrew's CUTEst Tap
GNU Lesser General Public License v3.0
3 stars 4 forks source link

CUTEst installation issue, file not found #82

Closed frankecurtis closed 2 months ago

frankecurtis commented 2 months ago

I'm having issues installing cutest.

Macbook Pro running macOS 14.5 (23F79). I have updated Xcode 15.4 (15F31d) command line tools. I'm using Homebrew 4.3.7. The command

brew install cutest --without-single

leads to the following error:

==> Fetching optimizers/cutest/cutest ==> Downloading https://github.com/ralna/CUTEst/archive/refs/tags/v2.1.0.tar.gz Already downloaded: /Users/frankecurtis/Library/Caches/Homebrew/downloads/7338c3fd131e4e9e4b5e9a3624ed8242d33e6f02d3a1aa51ae7ddb1371469ffd--CUTEst-2.1.0.tar.gz ==> Installing cutest from optimizers/cutest ==> Patching ==> ./install_cutest < cutest.input ==> gfortran -fPIC -shared -Wl,-all_load libcutest.a -o libcutest_double.dylib -Wl,-undefined -Wl,dynamic_lookup -headerpad_max_install_names Last 15 lines from /Users/frankecurtis/Library/Logs/Homebrew/cutest/02.gfortran:

gfortran -fPIC -shared -Wl,-all_load libcutest.a

-o libcutest_double.dylib -Wl,-undefined -Wl,dynamic_lookup -headerpad_max_install_names

ld: file not found: collect2: error: ld returned 1 exit status

Not sure if it's something to do with my configuration or cutest itself. Note: I'm using the new default shell (zsh), although I'm not sure if that matters here. Thanks!

jfowkes commented 2 months ago

I can confirm that I'm also seeing this error now. Very strange as it was working fine a few weeks ago when this homebrew formula was updated, so no idea what has suddenly changed to make it fail in this way. Possibly the new macOS linker?

dpo commented 2 months ago

Hi @frankecurtis. Sorry for the delay. I just tried on my Mac, and it worked. I’m also using macOS 14.5 with the latest command-line tools. Could you share the contents of /Users/frankecurtis/Library/Logs/Homebrew/cutest/02.gfortran (maybe in the form of a gist)? Does brew doctor report anything? I’m also using zsh, but I don’t think it’s relevant here.

frankecurtis commented 2 months ago

Thanks, @dpo . brew doctor doesn't report any issues. ("Your system is ready to brew.") Here is the log you asked about. Do you see any red flags? cutest.txt

dpo commented 2 months ago

There’s not much in the log file, actually. Would you by any chance have environment variables that point to another CUTEst installation? If not, I’ll simply rebuild the bottles to see if that solves the issue. I’ll open a PR now.

dpo commented 2 months ago

@frankecurtis @jfowkes Please give it another try and let me know if the new bottles fix the issue.

jfowkes commented 2 months ago

Hi @dpo, still failing for me unfortunately. It looks like there's no bottle for brew install cutest --without-single and it's trying to build from source:

==> Fetching optimizers/cutest/cutest
==> Downloading https://github.com/ralna/CUTEst/archive/refs/tags/v2.1.0.tar.gz
==> Downloading from https://codeload.github.com/ralna/CUTEst/tar.gz/refs/tags/v2.1.0==> Installing cutest from optimizers/cutest
==> Installing dependencies for optimizers/cutest/cutest: optimizers/cutest/archdefs, optimizers/cutest/gsl@1 and optimizers/cutest/sifdecode
==> Installing optimizers/cutest/cutest dependency: optimizers/cutest/archdefs
==> Pouring archdefs-2.2.8.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/archdefs/2.2.8: 81 files, 84.8KB
==> Installing optimizers/cutest/cutest dependency: optimizers/cutest/gsl@1
==> Pouring gsl
🍺  /opt/homebrew/Cellar/gsl@1/1.16_3: 249 files, 7.4MB
==> Installing optimizers/cutest/cutest dependency: optimizers/cutest/sifdecode
==> Pouring sifdecode-2.4.2.arm64_sonoma.bottle.tar.gz
🍺  /opt/homebrew/Cellar/sifdecode/2.4.2: 564 files, 4.8MB
==> Installing optimizers/cutest/cutest --without-single
==> Patching
==> ./install_cutest < cutest.input
==> gfortran -fPIC -shared -Wl,-all_load libcutest.a  -o libcutest_double.dylib 
Last 15 lines from /Users/runner/Library/Logs/Homebrew/cutest/02.gfortran:
gfortran
-fPIC
-shared
-Wl,-all_load
libcutest.a
-o
libcutest_double.dylib
-Wl,-undefined
-Wl,dynamic_lookup
-headerpad_max_install_names
ld: file not found: 
collect2: error: ld returned 1 exit status
If reporting this issue please do so at (not Homebrew/brew or Homebrew/homebrew-core):
  https://github.com/optimizers/homebrew-cutest/issues
These open issues may also help:
CUTEst installation issue, file not found https://github.com/optimizers/homebrew-cutest/issues/82
Error: Process completed with exit code 1.

I would still expect the source build to succeed through...

dpo commented 2 months ago

There’s no botte because it’s a non-default build, so it’s expected that it would build from source. I’ll try again when I’m at my computer.

dpo commented 2 months ago

Should be fixed now. 🤞