Opened 8 years ago

Closed 3 years ago

#53338 closed defect (fixed)

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: ierofant (Андрей Корнилов)
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 (4)

port-install-ogre.log (149.8 KB) - added by starthal (Stephen Albert) 8 years ago.
Full build log
patch-CMakeLists_modified.txt.diff (2.3 KB) - added by starthal (Stephen Albert) 8 years 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) 8 years ago.
The build log after modifying the patch.
ogre-Portfile-20170102 (3.9 KB) - added by kencu (Ken) 7 years ago.
still a work in progress but getting closer

Download all attachments as: .zip

Change History (16)

Changed 8 years ago by starthal (Stephen Albert)

Attachment: port-install-ogre.log added

Full build log

comment:1 Changed 8 years 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 8 years 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 8 years ago by starthal (Stephen Albert) (previous) (diff)

comment:3 Changed 8 years 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 8 years ago by starthal (Stephen Albert)

Modified patch with minimum version set to 10.7

Changed 8 years ago by starthal (Stephen Albert)

The build log after modifying the patch.

comment:4 Changed 8 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: marin.saric@… removed
Owner: set to marin.saric@…
Status: newassigned

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 8 years 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 8 years ago by starthal (Stephen Albert)

It looks like this is the same issue as #38624, and that this version of ogre is way out-of-date, and that the port is abandoned (#53341).

Last edited 7 years ago by ryandesign (Ryan Carsten Schmidt) (previous) (diff)

comment:7 Changed 8 years ago by kurthindenburg (Kurt Hindenburg)

Owner: changed from marin.saric@… to macports-tickets@…

comment:8 Changed 7 years ago by mf2k (Frank Schima)

Cc: ierofant added

Has duplicate #55625.

comment:9 Changed 7 years ago by kencu (Ken)

ogre's cmake build script hardcodes the deployment target to 10.5. So that errors out on newer OS's that try to use -stdlib=libc++.

open CMakeLists.txt and comment that out, and the build proceeds for quite a while:

  # 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)

However, not so easy. Later on, the build errors out because an old Xcode command, pbxcp is no longer available after Xcode 4.4.

You might be able to fix that, if it's important enough. Here's a link to some instructions that apparently work aroud that issue

<http://www.cocoabuilder.com/archive/xcode/319936-pbxcp-vanished-in-xcode-4-4.html>

Whether that will get 'er done, or whether there is more grief to come, is not yet known.

For now, I suppose this port should be marked as building only with Xcode 4.3 or earlier, or alternatively deleted from MacPorts.

comment:10 Changed 7 years ago by kencu (Ken)

I see there appears to be much newer version of ogre, 1.10.11, released 2 days ago. <https://github.com/OGRECave/ogre>.

Last edited 7 years ago by kencu (Ken) (previous) (diff)

comment:11 Changed 7 years ago by kencu (Ken)

I have started on a new Portfile for this. I would appreciate any input from someone who actually uses this software, however.

Last edited 7 years ago by kencu (Ken) (previous) (diff)

Changed 7 years ago by kencu (Ken)

Attachment: ogre-Portfile-20170102 added

still a work in progress but getting closer

comment:12 Changed 3 years ago by catap (Kirill A. Korinsky)

Resolution: fixed
Status: assignedclosed

In 26967e90ad84d82f58f95fb8a65a41512c9035b1/macports-ports (master):

ogre: update to 13.0.1

This port is technically rewritten from scratch.

I've also used as close as possible to mainstream way to build it, which
includes moving to dynamic linking.

Closes: #53338
Closes: #38624
Closes: #37734
Closes: #34502
See: #47197

Note: See TracTickets for help on using tickets.