-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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
Mac install update scripts #1765
base: master
Are you sure you want to change the base?
Mac install update scripts #1765
Conversation
Thanks, will take a look at this next week after my conference deadline too! |
Hi @ananay22, Thanks for the PR, we will review it! Before being able to do so, could you please make sure there are no conflicting files? We can't review or merge it if there are merge conflicts. Thanks! |
@ananay22 Is this for the CPU compilation in OSX? |
Hi @ananay22! I haven't been able to get python API installed on macOS Catalina.
|
Hi all, I am currently on macOSX Mojave, and I pulled the latest master from openpose. I attempted to compile the default CPU version on OSX. The only issue I had was with the vecLib path which for some reason the existing patch is not working anymore. (Possibly as the caffe target may have changed). https://gist.github.com/soulslicer/b31ca993fb63ce7880986c1131a1bbb4 This is the patch that should fix that vecLib issue. |
Thank you @soulslicer for your suggested patch. It has successfully allowed me to build the python API successfully for the first time! It along with the suggestion from #1740 was what finally got the python API working! |
Does anyone else have tips for the installation of OpenPose on MacOS? I'm on Big Sur. |
I am still facing this issue of src/tcmalloc.cc:333] Attempt to free invalid pointer 0x7fbbd9f09dc0 Applying this fixes in this commit did not really solve my issue as I thin the caffe as of July 14 is still not good enough to work with BigSur |
oh man I forgot about this will update the PR although im p sure its outdated by now. The main issue that I had is that caffe had some dependencies that are broken on mac (some tcmalloc stuff that I am not the best person to discuss with). The fix was to rebuild caffe from source (using the same github link that the OpenPose provides to their version of caffe, and not the official caffe link) and remove the LevelDB requirements (Im not 100% sure about that library name, but its the one that requires tcmalloc). Then there was the issue with the vecLib headers, which are provided by XCode. You have to install xcode and when you search in your developer folder for vecLib, you'll have to put that in your path in the cmake. NOTE: This repo does not have any changes in actual code, I'd just changed the documentation. You just have to follow the additional steps. Last time I compiled openpose on macOS BigSur, it worked perfectly. I haven't kept track on this library (great tool thought, just wasn't right for my application), so I am not sure if my fixes in the installation guide are still accurate. I will experiment and revert. But if you are ok with the version this repo was forked from, just following the steps in the modified installation and prerequisites files should work. Again really sorry on not keeping track of this, but if you have any questions just send a message here, I'll try and respond over the next few days as I experiment with this. |
@jalpanchal Caffe was not the issue per se, it was one of its optional dependencies, leveldb that had the issue. |
@camrynfriedman I think the biggest issue is making sure cmake is able to find vecLib, and last I remember, it's find_veclib macro was not doing that properly. I'm not sure if the leveldb/ tcmalloc issue comes for every macOS build or not, but that is another one to look out for, as that happens on runtime and not compiletime |
Thank you for the quick response. @ananay22 TO clarify a few things, you mentioned you have no issues on Big Sur. Was it with the version this was forked from or a recent master/main of openpose ? AFAIK the caffe with the openpose does not work and I see multiple posts about it and that's why the suggestion for using the brew caffe exists. Can the brew Caffe version be modified to reomve the issues with leveldd and vecLib ? |
Oh okay so, this was not recent, which is why I need to recheck this PR before actually asking for the merge. But I remember having all those issues with caffe, and the thing is its very hard to fix those as they aren't that well documented. I think you can modify the brew caffe installation rb file, but I would recommend using the github repo that the openpose developers provide, for the simple reason that I experimented with modifying / patching the brew build for a while, and either ran into a whole bunch of make issues or a whole bunch of runtime issues. And, from what I remember, the official caffe library is slightly different from the one provided. If you do go through with it, and your issue is the tcmalloc thing, then you should disable the leveldb dependency in the brew rb file. You can see how to edit a brew formula here: https://stackoverflow.com/a/3949908 |
So just tested fresh builds, most issues seem to be fixed! The tcmalloc error did not show up on 2 different systems. This was however, with the CMU_Perceptual_Computing_Lab Caffe fork, and not the official / brew version. But for now, this fork is not helpful, the latest version seems to be working fine. Sorry that I forgot about this PR, but most issues seem to have resolved themselves! |
This is interesting. I get the tcmalloc error only when I use the brew's caffe version. Nothing I did could resolve this. Thank you for your inputs though. I finally got the OpenPose built and working using the provided Caffe using the steps by : https://medium.com/@alok.gandhi2002/build-openpose-with-without-gpu-support-for-macos-catalina-10-15-6-8fb936c9ab05 |
Yeah. Brew built caffe with levels and hence the tcmalloc error. The website makes you build caffe from the same source as openpose's documentation. I'm assuming they've also stopped building it with levels, hence no error |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This version updates the docs for the proper installation on macOS systems.
caffe
cannot be built asvecLib
cannot be found:The current patch relies on brew's
caffe
bottle.This is not a good approach.
On top of that, homebrew built
caffe
withleveldb
, and as this issue highlights,leveldb
causes an issue withtcmalloc
that causes the runtimeAttempt to free Invalid Pointer
error.This version specifies the correct
vecLib_INCLUDE_DIRS
in the pre-requisites documentation. Rather than not buildcaffe
from scratch and rely on homebrew, this version fixes thecaffe
build process.Furthermore, it also shows to users how to build
caffe
withoutleveldb
, which prevents thetcmalloc
issue.