szip deleted from homebrew
Closed this issue · 8 comments
I have downloaded the latest release (lrose-core-20220222) and was trying to install it on my Mac (macOS Monterey version 12.3.1) with Homebrew (version as follows),
'''
Homebrew 3.4.7
Homebrew/homebrew-core (git revision ad269549441; last commit 2022-04-21)
Homebrew/homebrew-cask (git revision de798451a6; last commit 2022-04-21)
'''
However, the installation was stopped by the following error,
'''
Warning: No available formula with the name "szip" (dependency of lrose-core). Did you mean snzip, sip, zip or ship?
szip was deleted from homebrew/core in commit cc40821a6d7:
szip: remove
Closes https://github.com/Homebrew/homebrew-core/issues/98261.
Signed-off-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
To show the formula before removal, run:
git -C "$(brew --repo homebrew/core)" show cc40821a6d7^:Formula/szip.rb
If you still use this formula, consider creating your own tap:
https://docs.brew.sh/How-to-Create-and-Maintain-a-Tap
'''
It seems like the "szip" that lrose depends on was removed in the recent issue of Homebrew, and the missing formula will stop the whole installation of the latest lrose-core.
Is "szip" required for the installation? And is there an alternative way to bypass this missing package?
Thank you so much for your help!
--
Best Regards,
Hungjui Yu 尤虹叡
Substituting libaec for szip in the lrose-core.rb leads to build errors. We probably need to swap some library names as described here
https://github.com/erget/libaec/blob/cmake-install-instructions/README.SZIP
//Path to a library.
HDF5_C_LIBRARY_sz:FILEPATH=/usr/local/opt/szip/lib/libsz.dylib
//Path to a library.
HDF5_C_LIBRARY_z:FILEPATH=/usr/lib/libz.dylib
Tried building from source without libszip and it builds fine, except titan had some build errors. Building on older mac, with python2 installed.
Tried modifying the lrose-core.rb formula to remove the dependence on szip, worked alright, but error with python command in build scripts.
The python error is related to Apple removing the system python in macOS 12.3, https://stackoverflow.com/questions/60298514/how-to-reinstall-python2-from-homebrew.
Tried to make an alias python="python3", but this didn't seem to work when I was testing in CircleCI. I then tried to make a symlink for python to python3 and this finally seemed to work.
So, two issues here: szip no longer installed by brew, and MacOS not installing python2 any longer, but the lrose-core build scripts use python, which defaults to python2.
The fix to install lrose-core is to build from source, without libszip, and making a symlink for python to python3.
building from source causes this error when building the apps:
Makefile:6: /build/make_include/lrose_make_macros: No such file or directory
Makefile:34: /build/make_include/lrose_make_recursive_dir_targets: No such file or directory
make: *** No rule to make target `/build/make_include/lrose_make_recursive_dir_targets'. Stop.
It looks like we may have a working brew formula file with a few fixes in the python3 branch of lrose-core. Download and install the lrose-core.rb file from here:
https://github.com/NCAR/lrose-release-test/releases/tag/20220514
Hi @leavesntwigs,
I want to say that I installed lrose-core by using the above link. However, it doesn't recognize lrose command even after rebooting the Mac. I want to ask if I have to add any path variable?
This has been finally resolved in the latest cmake-based builds for the mac, using homebrew.
The szip library is no longer a dependency on the mac.