Hi,

I am attempting to build OSG for iOS 4.3 using the latest source from trunk.  
My build environment is CMake 2.8.5 on Mac OS X 10.7 Lion, with all OSG 
dependencies installed via MacPorts.

My CMake build environment works for other projects, ex. OGRE for iOS.

To build OSG, I am using CMake like this:


Code:
cmake -G Xcode \
-D OSG_BUILD_PLATFORM_IPHONE:BOOL=ON \
-D CMAKE_CXX_FLAGS:STRING="-ftree-vectorize -fvisibility-inlines-hidden 
-mno-thumb -arch armv6 -pipe -no-cpp-precomp -miphoneos-version-min=3.1 
-mno-thumb" \
-D BUILD_OSG_APPLICATIONS:BOOL=OFF \
-D OSG_BUILD_FRAMEWORKS:BOOL=OFF \
-D OSG_WINDOWING_SYSTEM:STRING=IOS \
-D OSG_BUILD_PLATFORM_IPHONE:BOOL=ON \
-D CMAKE_OSX_ARCHITECTURES:STRING="armv6;armv7" \
-D 
CMAKE_OSX_SYSROOT:STRING=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk
 \
-D OSG_GL1_AVAILABLE:BOOL=OFF \
-D OSG_GL2_AVAILABLE:BOOL=OFF \
-D OSG_GLES1_AVAILABLE:BOOL=ON \
-D OSG_GL_DISPLAYLISTS_AVAILABLE:BOOL=OFF \
-D OSG_GL_FIXED_FUNCTION_AVAILABLE:BOOL=ON \
-D OSG_GL_LIBRARY_STATIC:BOOL=OFF \
-D OSG_GL_MATRICES_AVAILABLE:BOOL=ON \
-D OSG_GL_VERTEX_ARRAY_FUNCS_AVAILABLE:BOOL=ON \
-D OSG_GL_VERTEX_FUNCS_AVAILABLE:BOOL=OFF \
-D DYNAMIC_OPENSCENEGRAPH:BOOL=OFF \
-D DYNAMIC_OPENTHREADS:BOOL=OFF \
my\path\to\OSG



CMake fails with the following CMakeError.log:


Code:
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" 
failed.
Compiler: /usr/bin/g++ 
Build flags: 
-ftree-vectorize;-fvisibility-inlines-hidden;-mno-thumb;-arch;armv6;-pipe;-no-cpp-precomp;-miphoneos-version-min=3.1;-mno-thumb
Id flags: -c

The output was:
255
llvm-g++-4.2: error trying to exec 
'/usr/bin/../llvm-gcc-4.2/bin/arm-apple-darwin11-llvm-g++-4.2': execvp: No such 
file or directory


Determining if the C compiler works failed with the following output:
Change Dir: /Users/Joe/SDKs/OpenSceneGraph/trunk/build/iOS/CMakeFiles/CMakeTmp

Run Build Command:/Applications/CMake\ 2.8-5.app/Contents/bin/cmakexbuild 
-project CMAKE_TRY_COMPILE.xcodeproj build -target cmTryCompileExec 
-configuration Debug
** BUILD FAILED **


The following build commands failed:
        Check dependencies
(1 failure)
=== BUILD NATIVE TARGET cmTryCompileExec OF PROJECT CMAKE_TRY_COMPILE WITH 
CONFIGURATION Debug ===
Check dependencies
target specifies product type 'com.apple.product-type.tool', but there's no 
such product type for the 'iphoneos' platform



As the log indicates, CMake is looking for:


Code:
/usr/llvm-gcc-4.2/bin/arm-apple-darwin11-llvm-g++-4.2



which does not exist.  (Also, iOS 4.3 corresponds to Darwin 10, not Darwin 11.) 
 For comparison, note that the following does exist:


Code:
/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/arm-apple-darwin10-llvm-g++-4.2



I tried using a symlink to trick CMake into using the latter file.  However, in 
that case, CMake fails with the following CMakeError.log:


Code:

Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" 
failed.
Compiler: /usr/bin/g++ 
Build flags: 
-ftree-vectorize;-fvisibility-inlines-hidden;-mno-thumb;-arch;armv6;-pipe;-no-cpp-precomp;-miphoneos-version-min=3.1;-mno-thumb
Id flags: 

The output was:
1
ld: library not found for -lcrt1.3.1.o
collect2: ld returned 1 exit status


Determining if the C compiler works failed with the following output:
Change Dir: /Users/Joe/SDKs/OpenSceneGraph/trunk/build/iOS/CMakeFiles/CMakeTmp

Run Build Command:/Applications/CMake\ 2.8-5.app/Contents/bin/cmakexbuild 
-project CMAKE_TRY_COMPILE.xcodeproj build -target cmTryCompileExec 
-configuration Debug
** BUILD FAILED **


The following build commands failed:
        Check dependencies
(1 failure)
=== BUILD NATIVE TARGET cmTryCompileExec OF PROJECT CMAKE_TRY_COMPILE WITH 
CONFIGURATION Debug ===
Check dependencies
target specifies product type 'com.apple.product-type.tool', but there's no 
such product type for the 'iphoneos' platform



Please advise.

Thanks very much,

Joe[/code]

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=42085#42085





_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to