Opened 11 months ago

Last modified 10 months ago

#53338 assigned defect

ogre @1.7.3_4 fails on Sierra -- "invalid deployment target"

Reported by: starthal (Stephen Albert) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.5
Keywords: Cc:
Port: ogre

Description

Mac OS X Sierra 10.12.2; XCode 8.2.1

End of build log:

:info:build [  1%] Building CXX object OgreMain/CMakeFiles/OgreMain.dir/src/OgreAutoParamDataSource.cpp.o
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3/OgreMain && /usr/bin/clang++   -DBOOST_ALL_NO_LIB -DFREEIMAGE_LIB -DOGRE_NONCLIENT_BUILD -D_MT -D_USRDLL -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3/OgreMain/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3/OgreMain/include/OSX -I/opt/local/include -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/opt/freetype/include/freetype2 -I/opt/local/include/OIS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3 -I//System/Library/Frameworks/Carbon.framework/Headers -F//System/Library/Frameworks -I//System/Library/Frameworks/Cocoa.framework/Headers -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3/OgreMain/src/nedmalloc  -pipe -Os -stdlib=libc++ -DNDEBUG -arch x86_64 -mmacosx-version-min=10.5   -pthread -o CMakeFiles/OgreMain.dir/src/OgreArchiveManager.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3/OgreMain/src/OgreArchiveManager.cpp
:info:build [  1%] Building CXX object OgreMain/CMakeFiles/OgreMain.dir/src/OgreAxisAlignedBox.cpp.o
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3/OgreMain && /usr/bin/clang++   -DBOOST_ALL_NO_LIB -DFREEIMAGE_LIB -DOGRE_NONCLIENT_BUILD -D_MT -D_USRDLL -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3/OgreMain/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3/OgreMain/include/OSX -I/opt/local/include -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/opt/freetype/include/freetype2 -I/opt/local/include/OIS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3 -I//System/Library/Frameworks/Carbon.framework/Headers -F//System/Library/Frameworks -I//System/Library/Frameworks/Cocoa.framework/Headers -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3/OgreMain/src/nedmalloc  -pipe -Os -stdlib=libc++ -DNDEBUG -arch x86_64 -mmacosx-version-min=10.5   -pthread -o CMakeFiles/OgreMain.dir/src/OgreAutoParamDataSource.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3/OgreMain/src/OgreAutoParamDataSource.cpp
:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3/OgreMain && /usr/bin/clang++   -DBOOST_ALL_NO_LIB -DFREEIMAGE_LIB -DOGRE_NONCLIENT_BUILD -D_MT -D_USRDLL -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3/OgreMain/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3/include -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3/OgreMain/include/OSX -I/opt/local/include -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/opt/freetype/include/freetype2 -I/opt/local/include/OIS -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3 -I//System/Library/Frameworks/Carbon.framework/Headers -F//System/Library/Frameworks -I//System/Library/Frameworks/Cocoa.framework/Headers -I/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3/OgreMain/src/nedmalloc  -pipe -Os -stdlib=libc++ -DNDEBUG -arch x86_64 -mmacosx-version-min=10.5   -pthread -o CMakeFiles/OgreMain.dir/src/OgreAxisAlignedBox.cpp.o -c /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3/OgreMain/src/OgreAxisAlignedBox.cpp
:info:build clangclang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
:info:build clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
:info:build clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
:info:build clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
:info:build clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
:info:build : error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
:info:build make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreArchiveManager.cpp.o] Error 1
:info:build make[2]: *** Waiting for unfinished jobs....
:info:build make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAnimationTrack.cpp.o] Error 1
:info:build make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAlignedAllocator.cpp.o] Error 1
:info:build clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
:info:build make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAnimation.cpp.o] Error 1
:info:build make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAnimationState.cpp.o] Error 1
:info:build make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAnimable.cpp.o] Error 1
:info:build make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAutoParamDataSource.cpp.o] Error 1
:info:build clang: error: invalid deployment target for -stdlib=libc++ (requires OS X 10.7 or later)
:info:build make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAxisAlignedBox.cpp.o] Error 1
:info:build make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3'
:info:build make[1]: *** [OgreMain/CMakeFiles/OgreMain.dir/all] Error 2
:info:build make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3'
:info:build make: *** [all] Error 2
:info:build make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3'
:info:build Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3" && /usr/bin/make -j8 -w all VERBOSE=ON 
:info:build Exit code: 2
:error:build org.macports.build for port ogre returned: command execution failed
:debug:build Error code: CHILDSTATUS 81658 2
:debug:build Backtrace: command execution failed

I think there is a target dependency somewhere that isn't expecting 10.12.

Full log attached.

Attachments (3)

port-install-ogre.log (149.8 KB) - added by starthal (Stephen Albert) 11 months ago.
Full build log
patch-CMakeLists_modified.txt.diff (2.3 KB) - added by starthal (Stephen Albert) 11 months ago.
Modified patch with minimum version set to 10.7
port-install-ogre-after-modified-patch.log (1.0 MB) - added by starthal (Stephen Albert) 11 months ago.
The build log after modifying the patch.

Download all attachments as: .zip

Change History (10)

Changed 11 months ago by starthal (Stephen Albert)

Full build log

comment:1 Changed 11 months ago by jmroot (Joshua Root)

The problem is the -mmacosx-version-min=10.5, which the build system must be adding itself somewhere.

comment:2 Changed 11 months ago by starthal (Stephen Albert)

EDIT: Ignore this. I was building without applying the MacPorts patches.

CMakeLists.txt:

... 
elseif (APPLE AND NOT OGRE_BUILD_PLATFORM_IPHONE)

  # Set 10.5 as the base SDK by default
  set(XCODE_ATTRIBUTE_SDKROOT macosx)
  set(CMAKE_OSX_SYSROOT macosx)
  set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)

  if (NOT CMAKE_OSX_ARCHITECTURES)
    set(CMAKE_OSX_ARCHITECTURES $(ARCHS_STANDARD_32_64_BIT))
  endif()

  # Make sure that the OpenGL render system is selected for non-iPhone Apple builds
  set(OGRE_BUILD_RENDERSYSTEM_GL TRUE)
  set(OGRE_BUILD_RENDERSYSTEM_GLES FALSE)
endif ()
...

But if I just try to replace this with 10.7, CMake succeeds, but something bad happens to the architecture specification:

> make VERBOSE=1
/opt/local/bin/cmake -H/Users/salbert/builds/ogre_src_v1-7-3 -B/Users/salbert/builds/ogre_src_v1-7-3 --check-build-system CMakeFiles/Makefile.cmake 0
/opt/local/bin/cmake -E cmake_progress_start /Users/salbert/builds/ogre_src_v1-7-3/CMakeFiles /Users/salbert/builds/ogre_src_v1-7-3/CMakeFiles/progress.marks
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f CMakeFiles/Makefile2 all
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f OgreMain/CMakeFiles/OgreMain.dir/build.make OgreMain/CMakeFiles/OgreMain.dir/depend
cd /Users/salbert/builds/ogre_src_v1-7-3 && /opt/local/bin/cmake -E cmake_depends "Unix Makefiles" /Users/salbert/builds/ogre_src_v1-7-3 /Users/salbert/builds/ogre_src_v1-7-3/OgreMain /Users/salbert/builds/ogre_src_v1-7-3 /Users/salbert/builds/ogre_src_v1-7-3/OgreMain /Users/salbert/builds/ogre_src_v1-7-3/OgreMain/CMakeFiles/OgreMain.dir/DependInfo.cmake --color=
Dependee "/Users/salbert/builds/ogre_src_v1-7-3/OgreMain/CMakeFiles/OgreMain.dir/DependInfo.cmake" is newer than depender "/Users/salbert/builds/ogre_src_v1-7-3/OgreMain/CMakeFiles/OgreMain.dir/depend.internal".
Dependee "/Users/salbert/builds/ogre_src_v1-7-3/OgreMain/CMakeFiles/CMakeDirectoryInformation.cmake" is newer than depender "/Users/salbert/builds/ogre_src_v1-7-3/OgreMain/CMakeFiles/OgreMain.dir/depend.internal".
Scanning dependencies of target OgreMain
/Applications/Xcode.app/Contents/Developer/usr/bin/make -f OgreMain/CMakeFiles/OgreMain.dir/build.make OgreMain/CMakeFiles/OgreMain.dir/build
[  0%] Building CXX object OgreMain/CMakeFiles/OgreMain.dir/src/OgreAlignedAllocator.cpp.o
cd /Users/salbert/builds/ogre_src_v1-7-3/OgreMain && /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++   -DBOOST_ALL_NO_LIB -DFREEIMAGE_LIB -DOGRE_NONCLIENT_BUILD -DOgreMain_EXPORTS -D_MT -D_USRDLL -I/Users/salbert/builds/ogre_src_v1-7-3/OgreMain/include -I/Users/salbert/builds/ogre_src_v1-7-3/include -I/Users/salbert/builds/ogre_src_v1-7-3/OgreMain/include/OSX -I/usr/local/include -I/usr/local/include/freetype2 -I/usr/local/opt/freetype/include/freetype2 -I/opt/local/include/OIS -I/opt/local/include -I/Users/salbert/builds/ogre_src_v1-7-3 -I/usr/X11R6/include -I/System/Library/Frameworks/Carbon.framework/Headers -I/System/Library/Frameworks/Cocoa.framework/Headers -I/Users/salbert/builds/ogre_src_v1-7-3/OgreMain/src/nedmalloc  -O2 -g -DNDEBUG -arch  -isysroot macosx -mmacosx-version-min=10.7 -fPIC   -pthread -o CMakeFiles/OgreMain.dir/src/OgreAlignedAllocator.cpp.o -c /Users/salbert/builds/ogre_src_v1-7-3/OgreMain/src/OgreAlignedAllocator.cpp
clang: error: no such file or directory: 'macosx'
clang: error: invalid arch name '-arch -isysroot'
make[2]: *** [OgreMain/CMakeFiles/OgreMain.dir/src/OgreAlignedAllocator.cpp.o] Error 1
make[1]: *** [OgreMain/CMakeFiles/OgreMain.dir/all] Error 2
make: *** [all] Error 2

It looks like the arch argument was supposed to be -arch $(ARCHS_STANDARD_32_64_BIT), so I don't know what happened to ARCHS_STANDARD_32_64_BIT.

I am pulling the source tarball out and trying to build it on its own, so I don't know if that's causing my problem.

Last edited 11 months ago by starthal (Stephen Albert) (previous) (diff)

comment:3 Changed 11 months ago by starthal (Stephen Albert)

After setting the minimum version to 10.7 in the patch file (modified patch attached), I tried again (build log also attached).

Now it fails on

:info:build cd /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3/OgreMain && /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp -exclude .DS_Store -exclude .hg -exclude 'CMakeLists.txt' -resolve-src-symlinks /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3/OgreMain/include/Threading/* /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_graphics_ogre/ogre/work/ogre_src_v1-7-3/lib//Ogre.framework/Headers/Threading/
:info:build /bin/sh: /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp: No such file or directory

If I understand correctly, /Developer was used by old versions of XCode (< 4.3) but it's no longer included.

From OgreMain/CMakeLists.txt:

...
if (APPLE)
  if (NOT OGRE_BUILD_PLATFORM_IPHONE)
  ...
    add_custom_command(TARGET OgreMain POST_BUILD
      COMMAND mkdir ARGS -p ${OGRE_BINARY_DIR}/lib/$(CONFIGURATION)/Ogre.framework/Headers/Threading
	  COMMAND /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp ARGS -exclude .DS_Store -exclude .hg -exclude 'CMakeLists.txt' -resolve-src-symlinks ${OGRE_SOURCE_DIR}/OgreMain/include/Threading/* ${OGRE_BINARY_DIR}/lib/$(CONFIGURATION)/Ogre.framework/Headers/Threading/
      COMMAND mkdir ARGS -p ${OGRE_BINARY_DIR}/lib/$(CONFIGURATION)/Ogre.framework/Headers/OSX
      COMMAND /Developer/Library/PrivateFrameworks/DevToolsCore.framework/Resources/pbxcp ARGS -exclude .DS_Store -exclude .hg -exclude 'CMakeLists.txt' -resolve-src-symlinks ${OGRE_SOURCE_DIR}/OgreMain/include/OSX/*.h ${OGRE_BINARY_DIR}/lib/$(CONFIGURATION)/Ogre.framework/Headers/OSX/	
	)
  ...

Those commands are in the original tarball, not patched in. Are they necessary?

Changed 11 months ago by starthal (Stephen Albert)

Modified patch with minimum version set to 10.7

Changed 11 months ago by starthal (Stephen Albert)

The build log after modifying the patch.

comment:4 Changed 11 months ago by ryandesign (Ryan Schmidt)

  • Cc marin.saric@… removed
  • Owner set to marin.saric@…
  • Status changed from new to assigned

Surely, changing the minimum deployment target to 10.7 will cause the port to fail to build on 10.6 and earlier.

comment:5 Changed 11 months ago by starthal (Stephen Albert)

Sorry, I didn't mean to imply that was the proper course of action. I'm just trying to debug the issue. I don't really understand MacPorts or CMake yet.

comment:6 Changed 11 months ago by starthal (Stephen Albert)

It looks like this is the same issue as https://trac.macports.org/ticket/38624, and that this version of ogre is way out-of-date, and that the port is abandoned (https://trac.macports.org/ticket/53341).

comment:7 Changed 10 months ago by kurthindenburg (Kurt Hindenburg)

  • Owner changed from marin.saric@… to macports-tickets@…
Note: See TracTickets for help on using tickets.