Skip to content
This repository has been archived by the owner on Jul 10, 2021. It is now read-only.

Build Instructions #33

Open
Feneric opened this issue Aug 4, 2014 · 5 comments
Open

Build Instructions #33

Feneric opened this issue Aug 4, 2014 · 5 comments

Comments

@Feneric
Copy link

Feneric commented Aug 4, 2014

Are there any special build instructions? The naïve "cake CMakeLists.txt;make" hasn't worked for me in any environment I've tried it on yet (Mac OS X 10.9.4 64 bit, Mac OS X 10.6.8 32 bit, Ubuntu Linux 14.04 64 bit). There seem to be some constants that need to be tagged as "long long" in 32 bit environments to compile properly; I've made the changes and verified that the compilations then work in both 64 and 32 bit environments, but I've yet to be able to test a full build. As for the errors themselves, they're different sorts of things in different environments, and before I go too deep down the rabbit hole I wanted to check to see if there was anything obvious I could be missing.

Is there anything I should be looking out for?

@jherico
Copy link
Owner

jherico commented Aug 4, 2014

What branch are you working with?
Can you include a pastebin link to an error log?
On Aug 4, 2014 8:54 AM, "Eric W. Brown" [email protected] wrote:

Are there any special build instructions? The naïve "cake
CMakeLists.txt;make" hasn't worked for me in any environment I've tried it
on yet (Mac OS X 10.9.4 64 bit, Mac OS X 10.6.8 32 bit, Ubuntu Linux 14.04
64 bit). There seem to be some constants that need to be tagged as "long
long" in 32 bit environments to compile properly; I've made the changes and
verified that the compilations then work in both 64 and 32 bit
environments, but I've yet to be able to test a full build. As for the
errors themselves, they're different sorts of things in different
environments, and before I go too deep down the rabbit hole I wanted to
check to see if there was anything obvious I could be missing.

Is there anything I should be looking out for?


Reply to this email directly or view it on GitHub
#33.

@Feneric
Copy link
Author

Feneric commented Aug 4, 2014

I'm just trying to build the stable branch with the end goal of trying out the sample Python scripts. Mac OS X 10.6.8 32-bit is the most convenient system for me to hook the Rift up to, but I've also got access to a current Mac OS X 10.9.4 64-bit system and a couple of Linux boxes.

It's different sorts of errors in the different environments, and nothing seemingly insurmountable, but silly looking stuff that makes me think I may be missing something.

For Mac OS X 64-bit:

In file included from /Users/eric/Projects/OculusSDK/Samples/CommonSrc/Platform/../Render/Render_GL_Device.h:29:
/Users/eric/Projects/OculusSDK/3rdParty/glew/include/GL/glew.h:90:2: error: gltypes.h included before glew.h
#error gltypes.h included before glew.h
 ^
/Users/eric/Projects/OculusSDK/3rdParty/glew/include/GL/glew.h:5631:22: error: typedef redefinition with different
      types ('unsigned int' vs 'void *')
typedef unsigned int GLhandleARB;
                     ^
/System/Library/Frameworks/OpenGL.framework/Headers/gltypes.h:65:15: note: previous definition is here
typedef void *GLhandleARB;
              ^
2 errors generated.
make[2]: *** [Samples/CommonSrc/CMakeFiles/CommonSrc.dir/Platform/OSX_Platform.mm.o] Error 1
make[1]: *** [Samples/CommonSrc/CMakeFiles/CommonSrc.dir/all] Error 2
make: *** [all] Error 2

For Ubuntu Linux 64-bit:

Linking CXX executable ../../output/OculusWorldDemo
../../output/libCommonSrc.a(Linux_Platform.cpp.o): In function `OVR::Platform::Linux::PlatformCore::determineScreenOffset(int, int*, int*)':
Linux_Platform.cpp:(.text+0xea9): undefined reference to `XineramaQueryScreens'
../../output/libCommonSrc.a(Linux_Platform.cpp.o): In function `OVR::Platform::Linux::PlatformCore::GetDisplayCount()':
Linux_Platform.cpp:(.text+0x17c2): undefined reference to `XineramaQueryScreens'
collect2: error: ld returned 1 exit status
make[2]: *** [output/OculusWorldDemo] Error 1
make[1]: *** [Samples/OculusWorldDemo/CMakeFiles/OculusWorldDemo.dir/all] Error 2
make: *** [all] Error 2

(Please note that libxinerama-dev and libxxf86vm-dev are both installed.)

For Mac OS X 32-bit it doesn't get nearly as far as the other two:

Scanning dependencies of target OculusVR
[  1%] Building CXX object LibOVR/CMakeFiles/OculusVR.dir/Src/Kernel/OVR_Alg.cpp.o
cc1plus: error: unrecognized command line option "-std=gnu++0x"
make[2]: *** [LibOVR/CMakeFiles/OculusVR.dir/Src/Kernel/OVR_Alg.cpp.o] Error 1
make[1]: *** [LibOVR/CMakeFiles/OculusVR.dir/all] Error 2
make: *** [all] Error 2

My guess is that there are a handful of prerequisites / assumptions about the build environment that I'm missing, or there's a more complex sequence that needs to be carried out to perform a full build.

@jherico
Copy link
Owner

jherico commented Aug 4, 2014

For ubuntu error, I've updated the CMake file to include the Xinerama library for the sample code.

For the OSX 64 bit error, I'll have to take a look when I get home, however you should note that it's only failing in the sample code, not in building the main OVR_C library. You can disable the building of the samples by calling cmake with a -DOCULUS_BUILD_SAMPLES=OFF argument.

For the 32 bit build, I'm confused as to why the -std=gnu++0x argument is being added since the cmake file should only be using it in the case where you're using a GNU compiler, in which case it should work. However, the use of C++11 in the code isn't extensive so I've removed it and the parameter.

@jherico
Copy link
Owner

jherico commented Aug 4, 2014

You should bear in mind that the Python scripts haven't been tested against the current build of the SDK in stable. The https://github.com/jherico/python-ovrsdk repository includes the binaries against which the python code was built and tested.

@Feneric
Copy link
Author

Feneric commented Aug 5, 2014

Thanks. With your changes, Linux 64-bit builds now without any problems, and the 32-bit Mac OS X build is definitely helped. Adding in the minor changes I made to flag the constants as long longs (I'll submit these back) and disabling the samples builds on both 64- and 32-bit Mac OS X are now working too. The samples failure on 32-bit Mac OS X spews a lot of output, but appears to be right in the same neighborhood as the samples failure is with the 64-bit Mac OS X. I wouldn't be surprised if fixing one would fix the other, too.

Good to know on python-ovrsdk. It doesn't look like there are any 32-bit options there for Linux or Mac, though.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants