-
Notifications
You must be signed in to change notification settings - Fork 13.7k
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
latest tbb is causing make px4_sitl gazebo
failed
#17644
Comments
@tenggyut thanks for reporting this. Do you have a suggestion how to fix this? |
currently, my workaround is link tbb@2020 include dir in /usr/local/include with a different name, like tbb2020. And change the best solutioin that I can think of right now is maintain a copy of tbb2020 header files in this repo and change Qt6 will also break the |
We'll have to wait for OSRF to fix their homebrew bottles. |
Same issue here, Tried @tenggyut's work around but didnt work for me :/ |
The fix for this (on a Mac and for the time being) is to remove the symlink for tbb so: rm /usr/local/include/tbb Then add a new symlink to tbb@2020_u3: ln -s /usr/local/Cellar/tbb@2020_u3/2020_U3/include/tbb /usr/local/include/tbb Then sitl gazebo runs fine |
In file included from /Users/jony4/dev/drone/PX4-Autopilot/Tools/sitl_gazebo/include/gazebo_user_camera_plugin.h:46: |
@jony4 that’s a different issue. One I’ve seen lately actually which iirc is quasi build environment specific (more to do with which version of dependencies the scripts install, hence the quasi). What version of PX4 are you trying to build? There actually are some issues with the current versions of the toolchain setup and stable release (1.11.3) but not beta and master (1.12.0), reverting to older versions of dependencies fixes it but must be done manually (and depending on your os version, aren’t really possible). |
thanks for your tips! I change the px4's version to v1.11.3 and had a new error message: make px4_sitl gazebo
|
I could archive the same result with following commands: brew unlink tbb
brew link tbb@2020 |
Yes. Does the same thing. |
This is due to your Apple Clang version. Mostly likely you’re using something relatively new (Apple Clang 12.0-12.0.5). That will generate an error on PX4 1.11.3. On PX4 1.12.x it works fine. If you want to do sitl on 1.11.x on a Mac you need to use Apple clang version 11 which means you’ll need a Mac OS operating system around 10.15.3 and Command line tools for xcode 11.3. I tested this today for good measure and can confirm. It may be possible for PX4 1.11.x to work with the newest Apple clang for sitl but I haven’t been able to get it to work ever. I suppose you could always use docker but that would be much much slower if you are doing any dev work you want to see on gazebo given the time to compile via docker, etc. |
Document current use of tbb@2020 for make px4_sitl gazebo as noted in PX4/PX4-Autopilot#17644
* Update dev_env_mac.md Document current use of tbb@2020 for make px4_sitl gazebo as noted in PX4/PX4-Autopilot#17644 * Subedit to my taste Co-authored-by: Hamish Willee <[email protected]>
Thanks @hamishwillee I think you can close this one now :-) |
PX4/PX4-Autopilot#17644 has been closed, so this can be removed as stated in the note.
@julianoes @richtong So to workaround all this stuff we added the following commands to the instructions here: http://docs.px4.io/master/en/dev_setup/dev_env_mac.html#gazebo-simulation
The note says that the commands should be removed when the issue is fixed. Is it actually fixed? Or do these commands need to remain in the docs forever? |
building for macOS (using macOS Ventura) I get : |
Without the workaround and just using |
Thanks, so I guess "not fixed" |
I haven't seen this problem in years 😄, probably since I'm using a decent developer platform. |
I encounter same problem, did you fix it ? |
I also have this problem now. I haven't found a fix, but just to get more info out there from "brew edit tbb@2020" it says it is disabled recently: disable! date: "2023-02-07", because: :unsupported |
Right. So we're relying on an old version of tbb on macOS. Who wants to dig why that's a dependency and why it can't be updated? I'm happy to merge PRs but I can't do the archeology work myself without a Mac on my desk. |
I ended up fixing it locally. I first removed any tbb related stuff (I don't think it actually matters, maybe just skip the brew install tbb stuff). Then, when I ran "make px4_sitl jmavsim" as per the isntructions, I was getting a bunch of errors related to -Wstrict-prototypes. So, I followed the errors and added in the voids, and commented out one variable that was assigned but not used, related to -Wassigned-but-not-used error. It now seems like it works (at least for building and running the jmavsim stuff). It ended up only being a few items. I apparently can’t attach a file with txt extension, so here is the pasted patch:
Copy and paste that to a file called diff.patch. Then run: git apply patchfile.patch It should build then (hopefully!). I now think this is not really related to the tbb as I initially thought, I think this code is just old and was originally compiled with gcc version 8 or 9. Now, the newer versions are stricter on forcing warnings to errors. So, the tbb dependency may not be needed. |
Workaround: I actually found out that you can just comment out the "disable" line in the brew files. Do the following for the workaround:
|
@bousborne thanks for the note! Would it be possible to fix this with a PR? I'm not quite sure where the edit is required that you mention. |
@julianoes, no problem! I created a pull request for the "tbb@2020 not installing" problem here: PX4/PX4-user_guide#2617 That is actually a something that needs to be done in the setup, so that pull request went to the PX4-user_guide repo. |
Thanks @bousborne, I guess we can now close this issue. |
@julianoes @bousborne thank you for chasing this but looks like issue is still present. Even after commenting the line like you mentioned, it still fails with the same error. Maybe there is another check somewhere? anyone else still seeing this error?
|
@shivam5594, ah, dang! I don't think there is another check anywhere, but I could definitely be wrong. This fix was in an area I don't work with often (mac brew stuff, cmake stuff, and "sed regex" line manipulation are all areas I can only limp my way through), so there is definitely a chance I missed something or did something wrong. As far as another place that checks this, I currently have no idea where to look if that is the issue. But for now, to check if my "sed" comment is working, can you run:
This will open the "formula script" that brew uses when installed tbb@2020 and such. Can you look for the section that looks like:
What does your section look like? It will originally have that last line that starts with "disable!" uncommented. The sed command is supposed to comment it out. Was yours commented out after running sed? If not, can you first try the sed command again to see if it works correctly? If it still doesn't work, can you copy and paste that section here so I can see what the sed command actually did so I can try to fix it? Then, you can just manually comment that line (brew edit tbb@2020 opens it up in whichever cli editor you have set in your environment). Once it is commented out, continue the commands and let me know if it works or if there is still an issue! If it doesn't work after manually making the comment... I'm not sure where to check and will have to do some more research to see how mac brew actually works. |
@bousborne ditto!
and it still fails with
|
@shivam5594 try installing it like this: HOMEBREW_NO_INSTALL_FROM_API=1 brew install tbb@2020 |
@shivam5594 Did @ch-greams suggestion work? I think this is trying to install without fetching the latest from the developers pushes, but rather from local versions to the homebrew site (or something along those lines). If that doesn't work, if any tbb was installed in the past, homebrew can sometimes keep a local cache of the homebrew formula, and will automatically used the cached version instead of the front facing version you edited. Therefore, try to clear the homebrew cache, and reinstall like this:
|
@ch-greams thanks for that. brew linking worked 👍 BUT make px4_sitl gazebo is still failing. cc: @bousborne |
Warning: No available formula with the name "tbb@2020". ~ brew unlink tbb
Error: No such keg: /usr/local/Cellar/tbb
➜ ~ sed -i.bak '/disable! date:/s/^/ /; /disable! date:/s/./#/3' $(brew --prefix)/Library/Taps/homebrew/homebrew-core/Formula/[email protected]
sed: /usr/local/Library/Taps/homebrew/homebrew-core/Formula/[email protected]: No such file or directory
➜ ~ brew install tbb@2020
==> Downloading https://formulae.brew.sh/api/formula.jws.json
################################################################################### 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
################################################################################### 100.0%
Warning: No available formula with the name "tbb@2020".
==> Searching for similarly named formulae and casks...
Error: No formulae or casks found for tbb@2020.
➜ ~ brew link tbb@2020
Error: No such keg: /usr/local/Cellar/tbb@2020
➜ ~ sed -i.bak '/disable! date:/s/^/ /; /disable! date:/s/./#/3' $(brew --prefix)/Library/Taps/homebrew/homebrew-core/Formula/[email protected]
sed: /usr/local/Library/Taps/homebrew/homebrew-core/Formula/[email protected]: No such file or directory
➜ ~ rm -rf $(brew --cache)/tbb@2020--*
zsh: no matches found: /Users/mch/Library/Caches/Homebrew/tbb@2020--*
➜ ~ HOMEBREW_NO_INSTALL_FROM_API=1 brew install tbb@2020
Running `brew update --auto-update`...
==> Tapping homebrew/core
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core'...
remote: Enumerating objects: 1888230, done.
remote: Counting objects: 100% (1404/1404), done.
remote: Compressing objects: 100% (574/574), done.
remote: Total 1888230 (delta 984), reused 1177 (delta 830), pack-reused 1886826
Receiving objects: 100% (1888230/1888230), 715.28 MiB | 3.63 MiB/s, done.
Resolving deltas: 100% (1344441/1344441), done.
Tapped 3 commands and 7022 formulae (7,370 files, 784.5MB).
==> Tapping homebrew/cask
Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-cask'...
remote: Enumerating objects: 897531, done.
remote: Counting objects: 100% (2082/2082), done.
remote: Compressing objects: 100% (850/850), done.
remote: Total 897531 (delta 1416), reused 1884 (delta 1231), pack-reused 895449
Receiving objects: 100% (897531/897531), 364.87 MiB | 3.52 MiB/s, done.
Resolving deltas: 100% (647163/647163), done.
Tapped 4397 casks (4,472 files, 393MB).
Warning: No available formula with the name "tbb@2020".
==> Searching for similarly named formulae and casks...
Error: No formulae or casks found for tbb@2020.
➜ ~ brew install tbb@2020
==> Downloading https://formulae.brew.sh/api/formula.jws.json
-=O=# # # #
==> Downloading https://formulae.brew.sh/api/cask.jws.json
-=#=-# # #
Warning: No available formula with the name "tbb@2020".
==> Searching for similarly named formulae and casks...
Error: No formulae or casks found for tbb@2020.
➜ ~ brew unlink tbb
Error: No such keg: /usr/local/Cellar/tbb
➜ ~ brew edit tbb@2020
Warning: edit is a developer command, so Homebrew's
developer mode has been automatically turned on.
To turn developer mode off, run:
brew developer off
Usage: brew edit [options] [formula|cask|tap ...]
Open a formula, cask or tap in the editor set by EDITOR or
HOMEBREW_EDITOR, or open the Homebrew repository for editing if no argument is
provided.
--formula, --formulae Treat all named arguments as formulae.
--cask, --casks Treat all named arguments as casks.
--print-path Print the file path to be edited, without
opening an editor.
-d, --debug Display any debugging information.
-q, --quiet Make some output more quiet.
-v, --verbose Make some output more verbose.
-h, --help Show this message.
Error: Invalid usage: tbb@2020 doesn't exist on disk.
Run brew create --set-name tbb@2020 $URL to create a new formula!
➜ ~ HOMEBREW_NO_INSTALL_FROM_API=1 brew install tbb@2020
Running `brew update --auto-update`...
Warning: No available formula with the name "tbb@2020".
==> Searching for similarly named formulae and casks...
Error: No formulae or casks found for tbb@2020.
➜ ~ brew update
Already up-to-date.
➜ ~ brewupgrade
zsh: command not found: brewupgrade
➜ ~ brew upgrade
➜ ~ brew doctor
Your system is ready to brew.
➜ ~ sed -i.bak '/disable! date:/s/^/ /; /disable! date:/s/./#/3' $(brew --prefix)/Library/Taps/homebrew/homebrew-core/Formula/[email protected]
sed: /usr/local/Library/Taps/homebrew/homebrew-core/Formula/[email protected]: No such file or directory
➜ ~ |
I also have same problem on Apple Silicon M1 Max with X86 build Homebrew |
Describe the bug
the newest tbb has removed
tbb::task
api, gazebo11 homebrew bottle depends on tbb@2020 as a workaround, butmake px4_sitl gazebo
still use header file in/usr/local/include/tbb
which is the latest tbb.To Reproduce
brew tap PX4/px4
brew install px4-dev
python3 -m pip install --user pyserial empy toml numpy pandas jinja2 pyyaml pyros-genmsg packaging
brew install --cask xquartz
brew install px4-sim-gazebo
Expected behavior
Additional context
homebrew related issue #issue1477
The text was updated successfully, but these errors were encountered: