rayTest hitFraction inverted again?

Hey all,

I updated to the latest SVN today, and I noticed the rayTest hitFraction value got inverted on my Linux 64-bit machine. I did notice it said “external libraries” were updated. I went on to test the rayTest function on other operating systems, and noticed the Linux & Windows rayTest behavior was the same, but it was different on Mac OSX. I thought this problem was resolved awhile back when we got the native bullet libaries to compile correctly… were the bullet libraries built again, but one of them fail?

Yep, native bullet build is broken again.

Since I rely on it quite a bit, is there anything I can do to help like I did last time? Is there a workaround I can use in the meantime?

EDIT: This is my workaround for now:

[java]FlipRayTest = System.getProperty(“os.name”).contains(“Mac”);[/java] :stuck_out_tongue:

I don’t know, its not the same workaround as last time and actually I am not really interested in looking into fixing it so it can be broken a few weeks later again. Before we don’t have a separate build server or a VM doing this I won’t invest even the 15 minutes I’d need to get all info you need, sorry. Ask @sbook.
The content of this post is meant to be read as a straight information or question without an implicit dismissive stance or interest in having the other party feel offended unless there’s emotes that hint otherwise or there’s an increased use of exclamation marks and all-capital words.

After some odd behavior, I realized it isn’t rayTest’s hitFraction that is inverted, it is the start / end arguments for the actual rayTest function. Swapping the start / end points, and not messing with the getHitFraction() value, gives proper results. I’m hoping this helps debug the issue & I’m still hoping for a resolution to the native bullet builds :slight_smile:

I thought you knew that. Its correct in code, just that the binary is off. Nothing to debug on that side :slight_smile:

I knew something was inaccurate with the binaries, but now I know it is the start / end arguments, not the getHitFraction() result.

It doesn’t look like @sbook is responding to this open issue… what can we do to resolve this? What can I do? I know we need to build the binaries for Windows, Linux & OSX… I remember last time I was having trouble, I was only building for Windows & Linux…

You can’t do anything because you cannot access our server and I won’t do anything serious until native bullet is due for release so I guess it doesn’t amount to much… So you can only build the binaries yourself according to the readme.

Hi @phr00t, sorry for not getting in here sooner. Didn’t get an email from your first mention, but for the one from this morning (A separate issue that Erlend and I are going to be investigating).

So, yes, @normen is right in that it seems each time we update the web server (which we need to do), something breaks. Unfortunately, the current hardware does not have enough RAM to keep a VM running for builds as well as the web server.

There needs to be a conversation on resources between a few of us as we either need a server upgrade or a separate build machine (If you’d like to be a part of this conversation, please PM me and I can share details on what we have, what we need, our current usage, etc)

So, I was getting stuck in the build process here:

[java][exec] /usr/lib/libGL.so
[exec] GLUT NOT FOUND not found, trying to use MINGW glut32
[exec] ’Win64usingGlut/glut64.lib’
[exec] GLUT NOT FOUND
[exec] — Detecting CXX compiler ABI info – done
[exec] — Found OpenGL: /usr/lib/libGL.so
[exec] — WARNING: you are using the obsolete ’GLU’ package, please use ’OpenGL’ instead
[exec] — Could NOT find GLUT (missing: GLUT_glut_LIBRARY)
[exec] CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
[exec] Please set them or make sure they are set and tested correctly in the CMake files:
[exec] OPENGL_glu_LIBRARY (ADVANCED)[/java]

… and I fixed it by modifying the bullet’s CMakeLists.txt file to this:

[java]IF (OPENGL_FOUND)
MESSAGE(“OPENGL FOUND”)
MESSAGE(${OPENGL_LIBRARIES})
ELSE (OPENGL_FOUND)
MESSAGE(“OPENGL NOT FOUND”)
SET(OPENGL_gl_LIBRARY opengl32)
# moved this below
#SET(OPENGL_glu_LIBRARY glu32)
ENDIF (OPENGL_FOUND)

making sure this gets set since it says it isn’t found

SET(OPENGL_glu_LIBRARY glu32)[/java]

On to the next error I’m sure to get :stuck_out_tongue:

Stuck on the -fpermissive thing… I forget how I added that argument before…? Anyone know how / remember?

[java]-nativelib-linux-64:
[echo] Building 64 bit Linux version of native bullet
[cc] Starting dependency analysis for 36 files.
[cc] 36 files are up to date.
[cc] 0 files to be recompiled from dependency analysis.
[cc] 1 total files to be compiled.
[cc] g++ -c -fPIC -I/usr/lib/jvm/java-7-openjdk-amd64/include -I/usr/lib/jvm/java-7-openjdk-amd64/include/linux -I/home/phr00t/jme3src/bullet-2.81-rev2613/src /home/phr00t/jme3src/engine/src/bullet-native/com_jme3_bullet_PhysicsSpace.cpp
[cc] /home/phr00t/jme3src/engine/src/bullet-native/com_jme3_bullet_PhysicsSpace.cpp: In member function ‘virtual btScalar Java_com_jme3_bullet_PhysicsSpace_rayTest_1native(JNIEnv*, jobject, jobject, jobject, jlong, jobject)::AllRayResultCallback::addSingleResult(btCollisionWorld::LocalRayResult&, bool)’:
[cc] /home/phr00t/jme3src/engine/src/bullet-native/com_jme3_bullet_PhysicsSpace.cpp:451:146: error: invalid conversion from ‘const btCollisionObject*’ to ‘btCollisionObject*’ [-fpermissive]
[cc] In file included from /home/phr00t/jme3src/engine/src/bullet-native/com_jme3_bullet_PhysicsSpace.cpp:34:0:
[cc] /home/phr00t/jme3src/engine/src/bullet-native/jmeBulletUtil.h:48:17: error: initializing argument 6 of ‘static void jmeBulletUtil::addResult(JNIEnv*, jobject, btVector3, btVector3, btScalar, btCollisionObject*)’ [-fpermissive]

BUILD FAILED
/home/phr00t/jme3src/engine/build.xml:10: The following error occurred while executing this line:
/home/phr00t/jme3src/engine/nbproject/build-bullet-natives.xml:337: g++ failed with return code 1
[/java]

Mingw build To fix the mingw / cmake issue with building bullet-natives for windows: Change in /usr/share/cmake-2.8/Modules/Platform/Linux-GNU.cmake … this line: set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS “rdynamic”) … to set(CMAKE_SHARED_LIBRARY_LINK_${lang}_FLAGS “”) … which was suggested here: http://www.cmake.org/Bug/view.php?id=5833

Yup, I already did that for another error. However, I now need to add -fpermissive to the compilation command… not sure how to do that… trying to figure it out, but was curious if anyone knew how to do it already.

Finally found it and got passed that error by modifying the build-bullet-natives.xml target file here (adding compilerarg -fpermissive line):

http://pastebin.com/TQA0FEUa

Now I get this error:

[java] [cc] /usr/bin/ld: error: cannot find -lBulletMultiThreaded
[cc] collect2: error: ld returned 1 exit status

BUILD FAILED
/home/phr00t/jme3src/engine/build.xml:10: The following error occurred while executing this line:
/home/phr00t/jme3src/engine/nbproject/build-bullet-natives.xml:337: gcc failed with return code 1[/java]

Where can I find that library? Shouldn’t it already be included somewhere…?

Was able to find the libBulletMultiThreaded.so file from this package:

https://www.archlinux.org/packages/community/x86_64/bullet/

…put it in my /usr/lib directory… on to the next error :stuck_out_tongue:

EDIT: Got some more errors… needed to add the same -fpermissive line in other targets…

Now I need the mingw libaries libBulletMultiThreaded.lib/dll for v2.81… gah, having trouble finding those :frowning:

EDIT: I posted a request here:

http://www.bulletphysics.org/Bullet/phpBB3/viewtopic.php?f=9&t=8963

… for more help :frowning: