Skip to content
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

brew tap ros/deps fails because gfortran.rb uses MacOS.prefer_64_bit? directive #36

Open
toyoxx opened this issue Feb 6, 2019 · 15 comments

Comments

@toyoxx
Copy link

toyoxx commented Feb 6, 2019

I'm trying to install ROS on MacOS, and apparently the directive MacOS.prefer_64_bit? was deprecated, and now it's not available anymore.

According to this issue on the dart-lang repo, this directive has been replaced by Hardware::CPU.is_64_bit?. Is there any way to update the formula so we can tap the repo on current versions of Homebrew?

@kshitijgoel007
Copy link

Bump. same issue

@kshitijgoel007
Copy link

@toyoxx were you able to get this running?

@jcorredorc
Copy link

same issue

@nagakiran
Copy link

You can clone this repo and can update the formula.

Have cloned this repo and updated the deprecated API.
https://github.com/nagakiran/homebrew-deps

Now you can do,
$ brew tap nagakiran/deps

@lluma
Copy link

lluma commented Jun 26, 2019

Below it is solved via https://github.com/nagakiran/homebrew-deps
First, I go to the directory for homebrew taps, and clone the repo.

cd /usr/local/Homebrew/Library/Taps
git clone https://github.com/nagakiran/homebrew-deps.git

Then, make a new directory named ros, and move all items in repo to it.

mkdir ros
mv nagakiran/homebrew-deps ros/

Finally, you might run ./install or brew tap ros/deps successfully.

@OPusG5
Copy link

OPusG5 commented Mar 14, 2020

Below it is solved via https://github.com/nagakiran/homebrew-deps
First, I go to the directory for homebrew taps, and clone the repo.

cd /usr/local/Homebrew/Library/Taps
git clone https://github.com/nagakiran/homebrew-deps.git

Then, make a new directory named ros, and move all items in repo to it.

mkdir ros
mv nagakiran/homebrew-deps ros/

Finally, you might run ./install or brew tap ros/deps successfully.

Tapping ros/deps
Cloning into '/usr/local/Homebrew/Library/Taps/ros/homebrew-deps'...
remote: Enumerating objects: 104, done.
remote: Total 104 (delta 0), reused 0 (delta 0), pack-reused 104
Receiving objects: 100% (104/104), 27.19 KiB | 1.13 MiB/s, done.
Resolving deltas: 100% (47/47), done.
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/ros/homebrew-deps/gfortran.rb
gfortran: undefined method `prefer_64_bit?' for OS::Mac:Module
Error: Cannot tap ros/deps: invalid syntax in tap!

Any ideas?

@cybertoast
Copy link

cybertoast commented May 19, 2020

@OPusG5 - it seems like a step was missed based on your output:

cd /usr/local/Homebrew/Library/Taps
git clone https://github.com/nagakiran/homebrew-deps.git
mkdir ros
mv homebrew-deps ros/
brew tap top/deps

Seems to work.

@RedHoodedWraith
Copy link

git clone https://github.com/nagakiran/homebrew-deps.git

@cybertoast Different person here. I've tried brew tag top/deps but I keep getting the following error: Error: Unknown command: tag

Thinking it might be a typo, I've tried brew tap tops/deps but I keep getting prompted to log into GitHub. Is this meant to happen?

If it helps, I am in the directoy /usr/local/Homebrew/Library/Taps and I am running MacOS Catalina 10.15.6

@cybertoast
Copy link

Hi Rowan, totally my typo, it should be brew tap top/deps.
But this is really weird. When I wrote my comment above it worked. Now it does not. I'm not sure what's happening, and the top/deps Tap seems to have gone missing :(
I'm going to have to revisit the installation steps and see what's going on, but for now assume that the steps no longer work! My apologies for the inconvenience!

@lukelu520
Copy link

lukelu520 commented Oct 1, 2020

Hi Rowan, totally my typo, it should be brew tap top/deps.
But this is really weird. When I wrote my comment above it worked. Now it does not. I'm not sure what's happening, and the top/deps Tap seems to have gone missing :(
I'm going to have to revisit the installation steps and see what's going on, but for now assume that the steps no longer work! My apologies for the inconvenience!

Should it be brew tap ros/deps instead of top/deps ?

@bromeara
Copy link

I am currently on macOS 10.15.7 with brew Homebrew 2.5.6-100-ga6ee5b7.
I had encountered the following two errors(Three technically but two are the same).

Error: Invalid formula: /usr/local/Homebrew/Library/Taps/ros/homebrew-deps/gtest.rb gtest: Calling a Formula#patches definition is disabled! Use 'patch do' block calls instead.
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/ros/homebrew-deps/pyassimp.rb pyassimp: Calling a Formula#patches definition is disabled! Use 'patch do' block calls instead.
This was fixed with the update brew syntax for patch blocks patch :DATA.

The second bug was what this thread is about.
Error: Invalid formula: /usr/local/Homebrew/Library/Taps/ros/homebrew-deps/gfortran.rb gfortran: undefined method prefer_64_bit?' for OS::Mac:Module
Error: Cannot tap ros/deps: invalid syntax in tap!`
However reading through the source code I saw these lines

# Note: The reason for providing our own gfortran is that upstream
# homebrew merged gfortran with gcc, gcc has causes issues with
# the default c/c++ compiler and is thus keg-only. If this
# situation ever changes, we can remove gfortran from our tap.

And on my system, the version at top of comment, running brew info gcc shows that gcc is no longer keg only however I have no way of validating which version that became true in. But for my branch, I went ahead and deleted that file because of that and using the other available fixes gave me a new error.
Warning: Calling BuildOptions#include? is deprecated! There is no replacement.

So if anyone else needs this they can give my version a try and also skip also of the copying stuff with the following.
brew tap ros/deps https://github.com/bromeara/homebrew-deps

I am moving on to trying to install noetic on the mac to avoid the pain of installing old python 2.7 libraries that pip doesnt have anymore.

@mattkanwisher
Copy link

Any reason why it's taking a year to merge this in? There are 2 PRs that fix this

@olzhas
Copy link

olzhas commented Apr 7, 2021

Any reason why it's taking a year to merge this in? There are 2 PRs that fix this

the issue is still not resolved.

@bromeara
Copy link

bromeara commented Apr 7, 2021

Any reason why it's taking a year to merge this in? There are 2 PRs that fix this

I think the larger issue at hand might be that newer versions of mac have different levels of deprecation of the things that are causing errors and this repo doesn't really seem to have a form of version management because some things people reported fixed their issues did not work for me. This is an experimental repo targeted at ROS melodic which is out of support now mainly due to the deprecation of Python 2.7. I don't see any info on a homebrew install for Noetic but I think at this point we are on our own. If someone's fork works for you it's easy to add it to brew, just as easy as adding this keg in fact.

Unless @olzhas you are a reviewer that would be able to approve a pull request? Because then I would be willing to run my solution through the tests and get a review from you. This just seems like a dead repo.

@AMNLima
Copy link

AMNLima commented Nov 12, 2021

@cybertoast got it right, except for the last line
cd /usr/local/Homebrew/Library/Taps
git clone https://github.com/nagakiran/homebrew-deps.git
mkdir ros
mv homebrew-deps ros/
brew tap ros/deps

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

No branches or pull requests