/ Forums
New To The Forum? Click Here To Read The How To Guide. -- Developers Click Here.

SDK 1.5 samples build issues?

artem.lisiyartem.lisiy Posts: 1
Virtual Boy (or Girl)
I'm trying to build one of the sample projects included with mobile SDK 1.5, but i'm getting build errors, apparently, when building the dependent libs (see the build log outtake). As i understand, this is caused by some files missing standard library including declarations, has anyone ever had such problems? Any advice is much appreciated.

[armeabi-v7a] Compile++ arm  : vrappframework <= SurfaceTexture.cpp
[armeabi-v7a] Compile++ arm  : vrappframework <= VrCommon.cpp
make: Leaving directory `/Users/artem/XCprojects/ovr_sdk_mobile_1.5.0/VrAppFramework/Projects/Android'
jni/../../../Src/PackageFiles.cpp:176:20: error: use of undeclared identifier 'read'
                                        const int r = read( fd, buffer, length );
                                                      ^
jni/../../../Src/PackageFiles.cpp:177:6: error: use of undeclared identifier 'close'
                                        close( fd );
                                        ^
jni/../../../Src/PackageFiles.cpp:191:4: error: use of undeclared identifier 'close'
                        close( fd );
                        ^
jni/../../../Src/PackageFiles.cpp:234:18: error: use of undeclared identifier 'write'
                        const int r = write( fd, buffer, length );
                                      ^
jni/../../../Src/PackageFiles.cpp:235:4: error: use of undeclared identifier 'close'
                        close( fd );
                        ^
5 errors generated.
make: *** [obj/local/armeabi-v7a/objs/vrappframework/__/__/__/Src/PackageFiles.o] Error 1
make: *** Waiting for unfinished jobs....
jni/../../../Src/VrCommon.cpp:229:11: error: use of undeclared identifier 'W_OK'
                mode |= W_OK;
                        ^
jni/../../../Src/VrCommon.cpp:233:11: error: use of undeclared identifier 'R_OK'
                mode |= R_OK;
                        ^
jni/../../../Src/VrCommon.cpp:238:11: error: use of undeclared identifier 'X_OK'
                mode |= X_OK;
                        ^
jni/../../../Src/VrCommon.cpp:240:9: error: use of undeclared identifier 'access'
        return access( s.ToCStr(), mode ) == 0;
               ^
4 errors generated.
make: *** [obj/local/armeabi-v7a/objs/vrappframework/__/__/__/Src/VrCommon.o] Error 1

FAILURE: Build failed with an exception.

Answers

  • heathtechheathtech Posts: 3
    Virtual Boy (or Girl)
    I'm facing the same issue when trying to compile a new, blank project from the VrTemplate.
  • InnerExodusInnerExodus Posts: 60 Oculus Staff
    Hi,

    Welcome to the Oculus Forums.

    Do you have an up to date version of Android Studios/Android SDK Tools and JDK installed?

    Also, do you mind walking through the steps that you're taking to encounter this issue? I double checked and was able to perform a clean install of the sample apps to my S8, however I used to install_to_phone.py batch file in the main directory of the SDK. 
  • heathtechheathtech Posts: 3
    Virtual Boy (or Girl)
    edited June 22
    Not sure about OP's case, but I have jdk1.8.0 and got the latest Android SDK with the download of Android Studio. I also have the latest Android NDK.  The install_to_phone.py works for me as far as getting the sample apk's to my phone, but that's not really relevant since it doesn't compile the samples before uploading.

    Steps to reproduce:
    1. Open command prompt in root mobile sdk folder.
    2. Run command "VrSamples\Native\VrTemplate\make_new_project.bat TestProject TestCompany"
    3. Run command "cd ..\TestProject\Projects\Android"
    4. Copy my osig file to assets (not necessary to reproduce issue)
    5. Run command "build.bat"
    After running the build.bat file, the output is similar to the OP's output log.

    *Edit: missed moving to project resulting directory in step 3; command has been edited.
  • heathtechheathtech Posts: 3
    Virtual Boy (or Girl)
    So, my colleague was able to compile the 1.5.0 mobile sdk without any issue.  Upon comparing environments, it turns out that NDK 12b builds the project without errors, but using the latest NDK 15 causes the errors.
  • InnerExodusInnerExodus Posts: 60 Oculus Staff
    Thanks for bringing this to our attention. We are looking into this, and I'll update this thread when I have any information to share.

Sign In or Register to comment.