pangolin icon indicating copy to clipboard operation
pangolin copied to clipboard

Can anyone compile this for Mac OS Big Sur?

Open kir486680 opened this issue 5 years ago • 10 comments

kir486680 avatar Dec 21 '20 10:12 kir486680

I just compiled it on macOS Big Sur 11.0.1 with Xcode Version 12.3 (12C33) You need to fix a minor issue before you could compile it.

src/display/device/PangolinNSGLView.mm

and replace all _window with self.window

keefo avatar Jan 02 '21 23:01 keefo

PR https://github.com/uoip/pangolin/pull/36

keefo avatar Jan 02 '21 23:01 keefo

@keefo thanks for your solution. However, I run into a new issue

include/pangolin/display/attach.h:33:10: fatal error: 
      'GL/glew.h' file not found
#include <GL/glew.h>

I installed glew with brew but it seems like pangolin cant find it.

kir486680 avatar Jan 05 '21 15:01 kir486680

I encounter the same issue as well. I feel like it was some environmental issues. I was able to build it out by replacing include line: #include <GL/glew.h> with an absolute path like this #include <absolutepath_to_/GL/glew.h>

However, this is just a temporary solution that I used. I don't recommend others doing the same.

Later, I did uninstall some packages including python3 and reinstall them through brew. After some mingling around. I was able to rebuild the pangolin without replacing the include line above.

keefo avatar Jan 06 '21 03:01 keefo

Try this: https://github.com/markoelez/Pangolin/blob/master/README.md#building

Build works on Big Sur.

markoelez avatar May 26 '21 05:05 markoelez

not working on Big Sur 11.3.1

iamkrs9 avatar May 27 '21 00:05 iamkrs9

@iamkrs9 what error are you getting? I am running Big Sur 11.3.1 as well and the build works fine.

Screen Shot 2021-05-26 at 10 36 32 PM

markoelez avatar May 27 '21 05:05 markoelez

This is what happened: I got pybind11 with brew but it showed some error after the came .. command which was the following:

CMake Error at /usr/local/share/cmake/pybind11/pybind11Common.cmake:173 (if): if given arguments:

"14" "IN_LIST" "supported_standards"

Unknown arguments specified Call Stack (most recent call first): /usr/local/share/cmake/pybind11/pybind11Config.cmake:249 (include) python/CMakeLists.txt:3 (find_package)

So I deleted the below chunk of code from /usr/local/share/cmake/pybind11/pybind11Common.cmake file:

if(PYBIND11_CPP_STANDARD) string(REGEX MATCH [[..$]] VAL "${PYBIND11_CPP_STANDARD}") if(CMAKE_CXX_STANDARD) if(NOT CMAKE_CXX_STANDARD STREQUAL VAL) message(WARNING "CMAKE_CXX_STANDARD=${CMAKE_CXX_STANDARD} does not match " "PYBIND11_CPP_STANDARD=${PYBIND11_CPP_STANDARD}, " "please remove PYBIND11_CPP_STANDARD from your cache") endif() else() set(supported_standards 11 14 17 20) if("${VAL}" IN_LIST supported_standards) message(WARNING "USE -DCMAKE_CXX_STANDARD=${VAL} instead of PYBIND11_CPP_STANDARD") set(CMAKE_CXX_STANDARD ${VAL} CACHE STRING "From PYBIND11_CPP_STANDARD") else() message(FATAL_ERROR "PYBIND11_CPP_STANDARD should be replaced with CMAKE_CXX_STANDARD " "(last two chars: ${VAL} not understood as a valid CXX std)") endif() endif() endif()

It compiled after that but could not be imported so I compiled it again after placing the folder in venv/lib/python/site-packages

I can import it now and the program works but the HelloPangolin.py turns up with just a red screen and there is a warning in Pycharm that says "Parameter 'params' unfilled " for the CreateWindowAndBind function.

Screen Shot 2021-05-27 at 8 28 39 AM

iamkrs9 avatar May 27 '21 15:05 iamkrs9

Finally got it working for Macos Monterey and Python 3.7 ! see my fork: https://github.com/JackWBoynton/pangolin

JackWBoynton avatar Mar 18 '22 16:03 JackWBoynton

I also have an alternative install script here: https://github.com/markoelez/minislam/blob/master/install_pangolin.sh, might be helpful for someone

markoelez avatar Mar 21 '22 19:03 markoelez