TheHubbit / PyInventor

3D Graphics in Python with Open Inventor
http://thehubbit.github.io/PyInventor
BSD 3-Clause "New" or "Revised" License
16 stars 8 forks source link

Issue with installation on Mac #3

Closed mmcauliffe closed 9 years ago

mmcauliffe commented 9 years ago

I'm trying to install PyInventor on MacOSX, and I'm running into an issue during compiling:

src/PySceneManager.cpp:726:18: error: cannot initialize a parameter of type 'void ' with an rvalue of type 'const char ' in.setBuffer(bgScene.getString(), bgScen... ^~~~~~~ /Library/Frameworks/Inventor.framework/Resources/include/Inventor/SoInput.h:78:33: note: passing argument to parameter 'bufpointer' here virtual void setBuffer(void * bufpointer, size_t bufsize);

It looks like it's related to the version of Coin, I have it working on Ubuntu 14.04 which has libcoin80, but it doesn't work on Ubuntu 12.04 (libcoin60). Installing from Coin3D's bitbucket repo gives libcoin60 on mac, it seems. I haven't tried using macports to install Coin, since I have qt5-mac installed through there and macports has qt4-mac as a dependency for coin, so they conflict. Taking a look at the portfile, it looks like it's pulling from the same bitbucket repo.

Do you have any ideas for other things I could try?

TheHubbit commented 9 years ago

Michael, Thanks for reporting this issue. Strangely I did not even get a compiler warning here despite building on Mac as well. I added some casts for the parameter of the setBuffer call. Could you please let me know if this fixes the problem on your side?

Thanks, Thomas

mmcauliffe commented 9 years ago

Thanks for the quick response! PySceneManager compiles just fine now, but I'm getting some different errors now in PyScene object. Here's the log: http://pastebin.com/r442hvcp

Cheers, Michael

TheHubbit commented 9 years ago

I just took a look. You seem to be using a very old version of the Coin library. SoForeignFileKit::convert() and SbMatrix::setValue(const float * pMat) have been added in January 2009. Can you try building a newer version of Coin on your Mac? There is no need for MacPorts in order to build Coin. Just clone the repo and call ./configure followed by sudo make install (looks like you already have command line tools for Xcode). Alternatively you could build Coin using CMake by checking out the CMake branch. Note that this will not install the library and headers in the Framework directory but to /usr/local. In that case you need to set the environment variable COINDIR=/usr/local before building PyInventor. Hope this helps!

mmcauliffe commented 9 years ago

Yup, building Coin from source fixed it, thanks so much for your help!