KeckCAVES / Vrui

C++ software development toolkit for highly interactive virtual reality applications
GNU General Public License v2.0
75 stars 36 forks source link

Build fails on OS X 10.9 #2

Closed Ylannl closed 10 years ago

Ylannl commented 10 years ago

I just tried to install LidarViewer on my OS X 10.9 machine using hombrew. This does not work due to compile errors in Vrui (version 2.7-001-1). So I tried the latest source, and that resulted in the same 2 errors:

Comm/SerialPort.cpp:142:15: error: no member named 'pselect' in namespace 'Misc'
        return Misc::pselect(&readFds,0,0,0)>=0&&readFds.isSet(fd);
               ~~~~~~^
Comm/SerialPort.cpp:153:15: error: no member named 'pselect' in namespace 'Misc'
        return Misc::pselect(&readFds,0,0,timeout)>=0&&readFds.isSet(fd);
               ~~~~~~^
2 errors generated.
make: *** [o/g++-3.g0.O3/Comm/SerialPort.o] Error 1
melanopsis commented 10 years ago

Please try the latest the version (3.1) which includes fixes for the compilation issues on OS X. Homebrew formulas have also been updated...

Best

Ylannl commented 10 years ago

Thanks! Compilation issues seem to be fixed. However, when I run make, it terminates with

...
Compiling VRDeviceDaemon/VRDevice.cpp...
Compiling VRDeviceDaemon/VRCalibrator.cpp...
Compiling VRDeviceDaemon/VRDeviceManager.cpp...
Compiling VRDeviceDaemon/VRDeviceServer.cpp...
Compiling VRDeviceDaemon/VRDeviceDaemon.cpp...
mkdir: bin/.: No such file or directory
make: *** [bin/VRDeviceDaemon] Error 1

That is probably a minor issue, but I'm not sure how to fix it.

Ylannl commented 10 years ago

Doing mkdir bin in the Vrui root directory fixes it. Thanks again, great software!

melanopsis commented 10 years ago

Thank you for reporting back, I will look into the issue you described. In that regard, did you use homebrew or compile the code yourself? (Edit: my bad, you already mentioned that you had run make)

Ylannl commented 10 years ago

I compiled the code myself. Unfortunately, homebrew (I edited the Vrui brew-file to create the bin dir) still fails due to a problem with libtiff:

 $ brew install vrui
==> Cloning https://github.com/KeckCAVES/Vrui.git
Updating /Library/Caches/Homebrew/vrui--git
==> Checking out revision v3.1-001
==> mkdir bin
==> make INSTALLDIR=/usr/local/Cellar/vrui/3.1-001-1 DOCINSTALLDIR=/usr/local/Cellar/vrui/3.1-001-1/share/doc/vrui ETCIN
==> make INSTALLDIR=/usr/local/Cellar/vrui/3.1-001-1 DOCINSTALLDIR=/usr/local/Cellar/vrui/3.1-001-1/share/doc/vrui ETCIN
Error: vrui dependency libtiff was built with the following
C++ standard library: libc++ (from clang)

This is incompatible with the standard library being used
to build vrui: libstdc++ (from clang)

Please reinstall libtiff using a compatible compiler.
hint: Check https://github.com/Homebrew/homebrew/wiki/C++-Standard-Libraries

I have tried to recompile homebrew's libtiff with the --c++11 flag, but that didn't help. As stated I have succeeded to compile Vrui (and also LidarViewer) without homebrew. But, and I can't tell whether this is related to the same issue, the software appears to be less stable, since I am experiencing more crashes than before (OS X 10.8 and Vrui 2.7) while using LidarViewer. For instance: changing the slider of the z-coloring option now always results in a crash. Forget that, I can't reproduce it. There are occasional crashes though:

Cache sizes: 4670 memory nodes, 1170 GPU nodes
libc++abi.dylib: terminating with uncaught exception of type IO::File::Error: IO::StandardFile: Fatal error 22 while reading from file
Abort trap: 6

But maybe that is a LidarViewer issue and not Vrui specific.

I hope that helps. Please let me know if I can assist you any further.

melanopsis commented 10 years ago

Thank you for your input, it's really valuable. For the homebrew libtiff issue, could you please update homebrew first brew update then brew reinstall -v libtiff ?

LidarViewer crashes might be due to a corrupt project file. Does this happen with a particular project or all of them? Could you regenerate/reprocess a problematic project to see if that makes things more stable?

I am trying to get a hold of a Maverick based system (10.8 seems to be fine so far) to check all of these issues (especially the Vrui bin issue). I will let you know...

Ylannl commented 10 years ago

This is the verbose output of reinstalling libtiff: http://pastebin.com/b5ph61Vz

About the LidarViewer Issue: indeed, things are more stable after regenerating the project files. Thanks

melanopsis commented 10 years ago

I can confirm that the build fails on OS X 10.9 (Maverick) due to the inability to create the bin directory under the Vrui root directory. I have already notified the developer of this issue.

Thank you for the libtiff output, it seems that the issue was a homebrew glitch.

I am glad to hear that LidarViewer runs stably now.

Thanks again for all your help.

melanopsis commented 10 years ago

This has been fixed in Vrui-3.1-002.