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)
Change History (16)
Changed 8 years ago by starthal (Stephen Albert)
Attachment: | port-install-ogre.log added |
---|
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.
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)
Attachment: | patch-CMakeLists_modified.txt.diff added |
---|
Modified patch with minimum version set to 10.7
Changed 8 years ago by starthal (Stephen Albert)
Attachment: | port-install-ogre-after-modified-patch.log added |
---|
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: | new → 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 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)
comment:7 Changed 8 years ago by kurthindenburg (Kurt Hindenburg)
Owner: | changed from marin.saric@… to macports-tickets@… |
---|
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>.
comment:11 Changed 7 years ago by kencu (Ken)
This Portfile is a start on building the current version. It builds all the way through to completion on highsierra without intervention, without any of the build issues of the old version currently in MacPorts.
It needs some work -- it needs to use more or all of MacPorts' dependencies instead of building so many of it's own dependencies. That could be configurable via some further configure.args. Also, the destrooting is messed up -- needs to be completely rethought, it appears. But if you use this portfile and sudo port -v build
it, you'll be close.
# -*- mode: tcl; indent-tabs-mode: nil; tab-width: 4; c-basic-offset: 4 -*- PortSystem 1.0 PortGroup cmake 1.1 PortGroup github 1.0 github.setup OGRECave ogre 1.10.11 v checksums rmd160 65596930faa4e0be118c65664af0f67eebfdd8a9 \ sha256 4d75eece04c9b9bb57e937cfc18af0b95aa0b492ceb7d54bcc1967222f083cac license MIT categories graphics maintainers nomaintainer description Object-Oriented Graphics Rendering Engine long_description OGRE (Object-Oriented Graphics Rendering Engine) is a \ scene-oriented, flexible 3D engine written in \ C++ designed to make it easier and more intuitive \ for developers to produce applications utilising \ hardware-accelerated 3D graphics. The class \ library abstracts all the details of using the \ underlying system libraries like Direct3D and \ OpenGL and provides an interface based on world \ objects and other intuitive classes. homepage http://www.ogre3d.org/ platforms darwin supported_archs x86_64 depends_build-append port:doxygen path:bin/dot:graphviz depends_lib-append port:libzzip port:zlib port:bzip2 port:freeimage \ port:freetype port:boost port:ois configure.args-append \ -DOGRE_BUILD_TOOLS=TRUE \ -DOGRE_BUILD_SAMPLES=TRUE \ -DOGRE_INSTALL_DOCS=TRUE \ -DOGRE_INSTALL_SAMPLES=TRUE \ -DOGRE_INSTALL_SAMPLES_SOURCE=TRUE \ -DOGRE_INSTALL_TOOLS=TRUE
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: | assigned → closed |
Full build log