Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build failure on macOS 10.14 Xcode 10.2 #1144

Closed
glennra opened this issue Mar 26, 2019 · 5 comments
Closed

Build failure on macOS 10.14 Xcode 10.2 #1144

glennra opened this issue Mar 26, 2019 · 5 comments

Comments

@glennra
Copy link
Contributor

glennra commented Mar 26, 2019

System Information

  • Ogre Version: :1.11.6:
  • Operating System / Platform: :macOS 10.14.3:
  • RenderSystem: ❔

Detailled description

OgreMain builds without errors but anything trying to link to it has errors like this:

Ld /Users/glenn/rp/ogre-1-11-build/bin/Debug/VRMLConverter normal x86_64 (in target: VRMLConverter)
cd /Users/glenn/rp/src/InRow/dep/ogre-1-11
export MACOSX_DEPLOYMENT_TARGET=10.14
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -L/Users/glenn/rp/ogre-1-11-build/bin/Debug -F/Users/glenn/rp/ogre-1-11-build/bin/Debug -filelist /Users/glenn/rp/ogre-1-11-build/Tools/VRMLConverter/OGRE.build/Debug/VRMLConverter.build/Objects-normal/x86_64/VRMLConverter.LinkFileList -mmacosx-version-min=10.14 -Xlinker -object_path_lto -Xlinker /Users/glenn/rp/ogre-1-11-build/Tools/VRMLConverter/OGRE.build/Debug/VRMLConverter.build/Objects-normal/x86_64/VRMLConverter_lto.o -Xlinker -no_deduplicate -stdlib=libc++ -framework Carbon -framework Cocoa -Wl,-search_paths_first -Wl,-headerpad_max_install_names /Users/glenn/rp/ogre-1-11-build/lib/macosx/Debug/Ogre.framework/Versions/1.11.6/Ogre -Xlinker -dependency_info -Xlinker /Users/glenn/rp/ogre-1-11-build/Tools/VRMLConverter/OGRE.build/Debug/VRMLConverter.build/Objects-normal/x86_64/VRMLConverter_dependency_info.dat -o /Users/glenn/rp/ogre-1-11-build/bin/Debug/VRMLConverter

Undefined symbols for architecture x86_64:
"Ogre::LogManager::logMessage(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, Ogre::LogMessageLevel, bool)", referenced from:
_main in VRML2mesh.o
Ogre::LogManager::logMessage(Ogre::LogMessageLevel, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, bool) in VRML2mesh.o
parseShape(Ogre::Mesh*, vrmllib::Shape const*, Ogre::Matrix4) in VRML2mesh.o
parseMaterial(vrmllib::Appearance const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in VRML2mesh.o
"Ogre::LogManager::logWarning(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, bool)", referenced from:
parseShape(Ogre::Mesh*, vrmllib::Shape const*, Ogre::Matrix4) in VRML2mesh.o
"Ogre::LogManager::getSingleton()", referenced from:
parseShape(Ogre::Mesh*, vrmllib::Shape const*, Ogre::Matrix4) in VRML2mesh.o
parseMaterial(vrmllib::Appearance const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in VRML2mesh.o
"Ogre::LogManager::createLog(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, bool, bool, bool)", referenced from:
_main in VRML2mesh.o

The linker errors always seem to involve std::__1::basic_string<char, std::__1::char_traits so it looks to me like a libc++ compatibility issue, however the compile commands all have -stdlib=libc++ .

@paroj
Copy link
Member

paroj commented Mar 26, 2019

duplicate of #894. Its trying to link x86_64 against i386

@paroj paroj closed this as completed Mar 26, 2019
@glennra
Copy link
Contributor Author

glennra commented Mar 26, 2019

Its trying to link x86_64 against i386

I've set CMAKE_OSX_ARCHITECTURES to x86_64 and the ld commands all have -arch x86_64. I don't see any evidence of that.

@paroj
Copy link
Member

paroj commented Mar 26, 2019

it is imperative which -arch is specified during compilation. Did you pass CMAKE_OSX_ARCHITECTURES before configure? You must invoke cmake via command line instead of using the gui for this. If not, try again with a clean build folder.

Meanwhile I am tracking a 10.14 build here: #1145

@paroj
Copy link
Member

paroj commented Mar 27, 2019

also try enabling GL3+ enabled (yeah the build scripts are arcane)

@glennra
Copy link
Contributor Author

glennra commented Mar 27, 2019

It builds using the makefile generator. The issue must be with Xcode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants