From f7c50fca34df0b5d393ffab0da09bce19ddfba64 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Tue, 14 Jul 2015 18:28:29 +0200 Subject: Include Khronos derived glcorearb.h before cl_gl.h, avoiding typedef mismatch w/ APPLE's GL LLVM's clang reports a typedef mismatch of GLintptr and GLsizeiptr between the Khronos derived glcorearb.h (from JOGL) and APPLE's gltypes.h when producing 32bit builds. +++ In file included from /usr/local/projects/jogamp/jocl/build-macosx-java6/gensrc/native/jocl/CLAbstractImpl_JNI.c:15: /usr/local/projects/jogamp/jogl/make/stub_includes/opengl/GL/glcorearb.h:604:19: error: typedef redefinition with different types ('ptrdiff_t' (aka 'int') vs 'intptr_t' (aka 'long')) typedef ptrdiff_t GLintptr; ^ /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/System/Library/Frameworks/OpenGL.framework/Headers/gltypes.h:51:18: note: previous definition is here typedef intptr_t GLintptr; +++ I.e. Khronos uses ptrdiff_t (aka 'int' on 32bit), where APPLE uses intptr_t (aka 'long' on 32bit). On OSX 32bit both ('int' and 'long') have the same sizeof value, i.e. 4 bytes, see below, hence the ABI is compatible! However, clang produces a typedef mismatch. Fix includes the Khronos derived (JOGL) glcorearb.h before cl_gl.h, hence favors the former 'canonical' definition. +++ OSX 10.10 32bit: sizeof int: 4 sizeof long: 4 sizeof long long: 8 sizeof intptr_t: 4 sizeof uintptr_t: 4 sizeof ptrdiff_t: 4 sizeof size_t: 4 sizeof float: 4 sizeof double: 8 sizeof long double: 16 OSX 10.10 64bit: sizeof int: 4 sizeof long: 8 sizeof long long: 8 sizeof intptr_t: 8 sizeof uintptr_t: 8 sizeof ptrdiff_t: 8 sizeof size_t: 8 sizeof float: 4 sizeof double: 8 sizeof long double: 16 --- make/scripts/make.jocl.all.macosx.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'make/scripts/make.jocl.all.macosx.sh') diff --git a/make/scripts/make.jocl.all.macosx.sh b/make/scripts/make.jocl.all.macosx.sh index 20f65b92..88e6bfe2 100755 --- a/make/scripts/make.jocl.all.macosx.sh +++ b/make/scripts/make.jocl.all.macosx.sh @@ -6,7 +6,8 @@ if [ -e /opt-share/etc/profile.ant ] ; then . /opt-share/etc/profile.ant fi -JAVA_HOME=`/usr/libexec/java_home -version 1.7` +JAVA_HOME=`/usr/libexec/java_home -version 1.8` +#JAVA_HOME=`/usr/libexec/java_home -version 1.6` PATH=$JAVA_HOME/bin:$PATH export JAVA_HOME PATH @@ -16,9 +17,6 @@ export SOURCE_LEVEL=1.6 export TARGET_LEVEL=1.6 export TARGET_RT_JAR=/opt-share/jre1.6.0_30/lib/rt.jar -export GLUEGEN_PROPERTIES_FILE="../../gluegen/make/lib/gluegen-clang.properties" -# or -Dgcc.compat.compiler=clang - #export JOGAMP_JAR_CODEBASE="Codebase: *.jogamp.org" export JOGAMP_JAR_CODEBASE="Codebase: *.goethel.localnet" -- cgit v1.2.3