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

Building fails on MacOS Mojave due to linker errors #894

Closed
MichaelVoelkel opened this issue Oct 11, 2018 · 22 comments
Closed

Building fails on MacOS Mojave due to linker errors #894

MichaelVoelkel opened this issue Oct 11, 2018 · 22 comments

Comments

@MichaelVoelkel
Copy link

MichaelVoelkel commented Oct 11, 2018

System Information

  • Ogre Version: 1.11.2 stable (from source)
  • Operating System / Platform: macOS 10.14 (Mojave)
  • RenderSystem: OpenGL (looking at the linker error, at least)

Detailled description

I downloaded the latest source today, ran cmake -GXcode .. in a build subdirectory. Changing the architecture to x86_64, I built the project. Compiling apparently runs through, but I get linker errors afterwards.

Below is the complete log of the linking errors.

Ogre.log

Ld build/lib/macosx/RelWithDebInfo/RenderSystem_GL.framework/Versions/1.11.2/RenderSystem_GL normal x86_64
    cd /Users/michael/Code/Game/ogre
    export MACOSX_DEPLOYMENT_TARGET=10.14
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -L/Users/michael/Code/Game/ogre/build/lib/macosx/RelWithDebInfo -F/Users/michael/Code/Game/ogre/build/lib/macosx/RelWithDebInfo -filelist /Users/michael/Code/Game/ogre/build/RenderSystems/GL/OGRE.build/RelWithDebInfo/RenderSystem_GL.build/Objects-normal/x86_64/RenderSystem_GL.LinkFileList -install_name @executable_path/../Frameworks/RenderSystem_GL.framework/Versions/1.11.2/RenderSystem_GL -Xlinker -rpath -Xlinker /Users/michael/Code/Game/ogre/build/sdk/lib -mmacosx-version-min=10.14 -Xlinker -object_path_lto -Xlinker /Users/michael/Code/Game/ogre/build/RenderSystems/GL/OGRE.build/RelWithDebInfo/RenderSystem_GL.build/Objects-normal/x86_64/RenderSystem_GL_lto.o -stdlib=libc++ -framework Cocoa -framework Carbon -framework OpenGL -framework AGL /Users/michael/Code/Game/ogre/build/lib/macosx/RelWithDebInfo/libOgreGLSupport.a -framework OpenGL /Users/michael/Code/Game/ogre/build/lib/macosx/RelWithDebInfo/Ogre.framework/Versions/1.11.2/Ogre -current_version 1.11.2 -Xlinker -dependency_info -Xlinker /Users/michael/Code/Game/ogre/build/RenderSystems/GL/OGRE.build/RelWithDebInfo/RenderSystem_GL.build/Objects-normal/x86_64/RenderSystem_GL_dependency_info.dat -o /Users/michael/Code/Game/ogre/build/lib/macosx/RelWithDebInfo/RenderSystem_GL.framework/Versions/1.11.2/RenderSystem_GL
Undefined symbols for architecture x86_64:
  "Ogre::GpuProgram::setSyntaxCode(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:

  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Showing first 200 notices only
Showing first 200 errors only

** BUILD FAILED **


The following build commands failed:
	Ld build/lib/macosx/RelWithDebInfo/RenderSystem_GL.framework/Versions/1.11.2/RenderSystem_GL normal x86_64
(1 failure)
@paroj
Copy link
Member

paroj commented Oct 11, 2018

can you try triggereing the build (from the build folder) as:

cmake --build . -- ONLY_ACTIVE_ARCH=YES

@MichaelVoelkel
Copy link
Author

MichaelVoelkel commented Oct 11, 2018

Done, I recreated the whole build folder, still no success, the exact same errors apply.

Maybe, the CMake (without --build) output is interesting: (although, I have not used Xcode here)

-- The C compiler identification is AppleClang 10.0.0.10001145
-- The CXX compiler identification is AppleClang 10.0.0.10001145
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Configuring OGRE 1.11.2
-- Check size of void*
-- Check size of void* - done
-- Performing Test OGRE_GCC_HAS_SSE
-- Performing Test OGRE_GCC_HAS_SSE - Success
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
2018-10-11 16:16:11.493 xcodebuild[82382:7304949] WARNING: Failed to load plugin at path: "/Users/michael/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XVim2.xcplugin", skipping. Error: Error Domain=NSCocoaErrorDomain Code=3587 "dlopen_preflight(/Users/michael/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XVim2.xcplugin/Contents/MacOS/XVim2): no suitable image found.  Did find:
	/Users/michael/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XVim2.xcplugin/Contents/MacOS/XVim2: code signature in (/Users/michael/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XVim2.xcplugin/Contents/MacOS/XVim2) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
	/Users/michael/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XVim2.xcplugin/Contents/MacOS/XVim2: stat() failed with errno=1" UserInfo={NSLocalizedFailureReason=The bundle is damaged or missing necessary resources., NSLocalizedRecoverySuggestion=Try reinstalling the bundle., NSFilePath=/Users/michael/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XVim2.xcplugin/Contents/MacOS/XVim2, NSDebugDescription=dlopen_preflight(/Users/michael/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XVim2.xcplugin/Contents/MacOS/XVim2): no suitable image found.  Did find:
	/Users/michael/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XVim2.xcplugin/Contents/MacOS/XVim2: code signature in (/Users/michael/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XVim2.xcplugin/Contents/MacOS/XVim2) not valid for use in process using Library Validation: mapped file has no cdhash, completely unsigned? Code has to be at least ad-hoc signed.
	/Users/michael/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XVim2.xcplugin/Contents/MacOS/XVim2: stat() failed with errno=1, NSBundlePath=/Users/michael/Library/Application Support/Developer/Shared/Xcode/Plug-ins/XVim2.xcplugin, NSLocalizedDescription=The bundle “XVim2” couldn’t be loaded because it is damaged or missing necessary resources.}
-- Search path: /Users/michael/Code/Game/ogre/build/Dependencies;/Users/michael/Code/Game/ogre/Dependencies;/Users/michael/Code/Game/ogre/build/../Dependencies;/Users/michael/Code/Game/ogre/../Dependencies
-- Building ZZIPlib
-- The C compiler identification is AppleClang 10.0.0.10001145
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for include file byteswap.h
-- Looking for include file byteswap.h - not found
-- Looking for include file direct.h
-- Looking for include file direct.h - not found
-- Looking for include file dirent.h
-- Looking for include file dirent.h - found
-- Looking for include file dlfcn.h
-- Looking for include file dlfcn.h - found
-- Looking for include file fnmatch.h
-- Looking for include file fnmatch.h - found
-- Looking for include file inttypes.h
-- Looking for include file inttypes.h - found
-- Looking for include file io.h
-- Looking for include file io.h - not found
-- Looking for include file memory.h
-- Looking for include file memory.h - found
-- Looking for include file ndir.h
-- Looking for include file ndir.h - not found
-- Looking for include file stdint.h
-- Looking for include file stdint.h - found
-- Looking for include file stdlib.h
-- Looking for include file stdlib.h - found
-- Looking for strcasecmp
-- Looking for strcasecmp - found
-- Looking for include file strings.h
-- Looking for include file strings.h - found
-- Looking for include file string.h
-- Looking for include file string.h - found
-- Looking for strndup
-- Looking for strndup - found
-- Looking for include file sys/dir.h
-- Looking for include file sys/dir.h - found
-- Looking for include file sys/int_types.h
-- Looking for include file sys/int_types.h - not found
-- Looking for include file sys/mman.h
-- Looking for include file sys/mman.h - found
-- Looking for include file sys/ndir.h
-- Looking for include file sys/ndir.h - not found
-- Looking for include file sys/param.h
-- Looking for include file sys/param.h - found
-- Looking for include file sys/stat.h
-- Looking for include file sys/stat.h - found
-- Looking for include file sys/types.h
-- Looking for include file sys/types.h - found
-- Looking for include file unistd.h
-- Looking for include file unistd.h - found
-- Looking for include file winbase.h
-- Looking for include file winbase.h - not found
-- Looking for include file windows.h
-- Looking for include file windows.h - not found
-- Looking for include file winnt.h
-- Looking for include file winnt.h - not found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of int
-- Check size of int - done
-- Check size of long
-- Check size of long - done
-- Check size of short
-- Check size of short - done
-- Looking for 4 include files stdlib.h, ..., float.h
-- Looking for 4 include files stdlib.h, ..., float.h - found
-- Check if the system is big endian
-- Searching 16 bit integer
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
CMake Warning (dev) at CMakeLists.txt:54 (find_package):
  Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables.
  Run "cmake --help-policy CMP0074" for policy details.  Use the cmake_policy
  command to set the policy and suppress this warning.

  CMake variable ZLIB_ROOT is set to:

    /Users/michael/Code/Game/ogre/build/Dependencies

  For compatibility, CMake is ignoring the variable.
This warning is for project developers.  Use -Wno-dev to suppress it.

-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.11") 
-- Configuring done
CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake
  --help-policy CMP0042" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  MACOSX_RPATH is not specified for the following targets:

   zzip
   zzipfseeko
   zzipmmapped

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /Users/michael/Code/Game/ogre/build/ZZIPlib-master
Scanning dependencies of target zzipfseeko
[  5%] Building C object CMakeFiles/zzipfseeko.dir/zzip/fseeko.c.o
[ 11%] Building C object CMakeFiles/zzipfseeko.dir/zzip/fetch.c.o
[ 17%] Linking C shared library libzzipfseeko.dylib
[ 17%] Built target zzipfseeko
Scanning dependencies of target zzip
[ 23%] Building C object CMakeFiles/zzip.dir/zzip/dir.c.o
[ 29%] Building C object CMakeFiles/zzip.dir/zzip/err.c.o
[ 35%] Building C object CMakeFiles/zzip.dir/zzip/file.c.o
[ 41%] Building C object CMakeFiles/zzip.dir/zzip/info.c.o
[ 47%] Building C object CMakeFiles/zzip.dir/zzip/plugin.c.o
[ 52%] Building C object CMakeFiles/zzip.dir/zzip/stat.c.o
[ 58%] Building C object CMakeFiles/zzip.dir/zzip/write.c.o
[ 64%] Building C object CMakeFiles/zzip.dir/zzip/zip.c.o
[ 70%] Building C object CMakeFiles/zzip.dir/zzip/fetch.c.o
[ 76%] Linking C shared library libzzip.dylib
[ 76%] Built target zzip
Scanning dependencies of target zzipmmapped
[ 82%] Building C object CMakeFiles/zzipmmapped.dir/zzip/mmapped.c.o
[ 88%] Building C object CMakeFiles/zzipmmapped.dir/zzip/memdisk.c.o
/Users/michael/Code/Game/ogre/build/ZZIPlib-master/zzip/memdisk.c:200:36: warning: comparison of distinct pointer types ('char *' and 'zzip_byte_t *' (aka 'unsigned char *')) [-Wcompare-distinct-pointer-types]
        if (ext1 && ((ptr1 + ext1) < disk->endbuf))
                     ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~
/Users/michael/Code/Game/ogre/build/ZZIPlib-master/zzip/memdisk.c:209:36: warning: comparison of distinct pointer types ('char *' and 'zzip_byte_t *' (aka 'unsigned char *')) [-Wcompare-distinct-pointer-types]
        if (ext2 && ((ptr2 + ext2) < disk->endbuf))
                     ~~~~~~~~~~~~~ ^ ~~~~~~~~~~~~
2 warnings generated.
[ 94%] Building C object CMakeFiles/zzipmmapped.dir/zzip/fetch.c.o
[100%] Linking C shared library libzzipmmapped.dylib
[100%] Built target zzipmmapped
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/zzip/zzip.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/zzip/types.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/zzip/conf.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/zzip/_msvc.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/zzip/plugin.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/zzip/fetch.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/zzip/_config.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/lib/libzzip.dylib
-- Building freetype
-- The C compiler identification is AppleClang 10.0.0.10001145
-- The CXX compiler identification is AppleClang 10.0.0.10001145
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building with ZLIB
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2") 
-- Checking for module 'harfbuzz>=0.9.7'
--   No package 'harfbuzz' found
-- Creating directory /Users/michael/Code/Game/ogre/build/freetype-2.9/objs/include/freetype/config
-- Creating file /Users/michael/Code/Game/ogre/build/freetype-2.9/objs/include/freetype/config/ftconfig.h
-- Looking for unistd.h
-- Looking for unistd.h - found
-- Looking for fcntl.h
-- Looking for fcntl.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Creating file /Users/michael/Code/Game/ogre/build/freetype-2.9/objs/include/freetype/config/ftoption.h
-- Configuring done
-- Generating done
CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default.  Run "cmake
  --help-policy CMP0042" for policy details.  Use the cmake_policy command to
  set the policy and suppress this warning.

  MACOSX_RPATH is not specified for the following targets:

   freetype

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Build files have been written to: /Users/michael/Code/Game/ogre/build/freetype-2.9/objs
Scanning dependencies of target freetype
[  2%] Building C object CMakeFiles/freetype.dir/src/autofit/autofit.c.o
[  4%] Building C object CMakeFiles/freetype.dir/src/base/ftbase.c.o
[  6%] Building C object CMakeFiles/freetype.dir/src/base/ftbbox.c.o
[  9%] Building C object CMakeFiles/freetype.dir/src/base/ftbdf.c.o
[ 11%] Building C object CMakeFiles/freetype.dir/src/base/ftbitmap.c.o
[ 13%] Building C object CMakeFiles/freetype.dir/src/base/ftcid.c.o
[ 16%] Building C object CMakeFiles/freetype.dir/src/base/ftfntfmt.c.o
[ 18%] Building C object CMakeFiles/freetype.dir/src/base/ftfstype.c.o
[ 20%] Building C object CMakeFiles/freetype.dir/src/base/ftgasp.c.o
[ 23%] Building C object CMakeFiles/freetype.dir/src/base/ftglyph.c.o
[ 25%] Building C object CMakeFiles/freetype.dir/src/base/ftgxval.c.o
[ 27%] Building C object CMakeFiles/freetype.dir/src/base/ftinit.c.o
[ 30%] Building C object CMakeFiles/freetype.dir/src/base/ftlcdfil.c.o
[ 32%] Building C object CMakeFiles/freetype.dir/src/base/ftmm.c.o
[ 34%] Building C object CMakeFiles/freetype.dir/src/base/ftotval.c.o
[ 37%] Building C object CMakeFiles/freetype.dir/src/base/ftpatent.c.o
[ 39%] Building C object CMakeFiles/freetype.dir/src/base/ftpfr.c.o
[ 41%] Building C object CMakeFiles/freetype.dir/src/base/ftstroke.c.o
[ 44%] Building C object CMakeFiles/freetype.dir/src/base/ftsynth.c.o
[ 46%] Building C object CMakeFiles/freetype.dir/src/base/ftsystem.c.o
[ 48%] Building C object CMakeFiles/freetype.dir/src/base/fttype1.c.o
[ 51%] Building C object CMakeFiles/freetype.dir/src/base/ftwinfnt.c.o
[ 53%] Building C object CMakeFiles/freetype.dir/src/bdf/bdf.c.o
[ 55%] Building C object CMakeFiles/freetype.dir/src/bzip2/ftbzip2.c.o
[ 58%] Building C object CMakeFiles/freetype.dir/src/cache/ftcache.c.o
[ 60%] Building C object CMakeFiles/freetype.dir/src/cff/cff.c.o
[ 62%] Building C object CMakeFiles/freetype.dir/src/cid/type1cid.c.o
[ 65%] Building C object CMakeFiles/freetype.dir/src/gzip/ftgzip.c.o
[ 67%] Building C object CMakeFiles/freetype.dir/src/lzw/ftlzw.c.o
[ 69%] Building C object CMakeFiles/freetype.dir/src/pcf/pcf.c.o
[ 72%] Building C object CMakeFiles/freetype.dir/src/pfr/pfr.c.o
[ 74%] Building C object CMakeFiles/freetype.dir/src/psaux/psaux.c.o
[ 76%] Building C object CMakeFiles/freetype.dir/src/pshinter/pshinter.c.o
[ 79%] Building C object CMakeFiles/freetype.dir/src/psnames/psnames.c.o
[ 81%] Building C object CMakeFiles/freetype.dir/src/raster/raster.c.o
[ 83%] Building C object CMakeFiles/freetype.dir/src/sfnt/sfnt.c.o
[ 86%] Building C object CMakeFiles/freetype.dir/src/smooth/smooth.c.o
[ 88%] Building C object CMakeFiles/freetype.dir/src/truetype/truetype.c.o
[ 90%] Building C object CMakeFiles/freetype.dir/src/type1/type1.c.o
[ 93%] Building C object CMakeFiles/freetype.dir/src/type42/type42.c.o
[ 95%] Building C object CMakeFiles/freetype.dir/src/winfonts/winfnt.c.o
[ 97%] Building C object CMakeFiles/freetype.dir/src/base/ftdebug.c.o
[100%] Linking C shared library libfreetype.dylib
[100%] Built target freetype
Install the project...
-- Install configuration: "RelWithDebInfo"
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftsnames.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftwinfnt.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftsizes.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/fttypes.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftparams.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftmm.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/config
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/config/ftstdlib.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/config/ftheader.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/config/ftmodule.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftmodapi.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftbzip2.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/fttrigon.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftbbox.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftgzip.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftdriver.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftoutln.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftadvanc.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftsynth.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/fterrors.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftgasp.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftstroke.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftcache.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftotval.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/freetype.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftincrem.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftfntfmt.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/fterrdef.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ttnameid.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftpfr.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftgxval.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftchapters.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/tttags.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftlzw.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftsystem.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/t1tables.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftimage.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/tttables.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftcid.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftglyph.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftmoderr.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftbitmap.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftlist.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftmac.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftlcdfil.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftbdf.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/ftrender.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/ft2build.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/config/ftconfig.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/include/freetype2/freetype/config/ftoption.h
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/lib/libfreetype.2.9.0.dylib
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/lib/libfreetype.2.9.dylib
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/lib/libfreetype.dylib
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/lib/cmake/freetype/freetype-config.cmake
-- Installing: /Users/michael/Code/Game/ogre/build/Dependencies/lib/cmake/freetype/freetype-config-relwithdebinfo.cmake
-- Found ZLIB: /usr/lib/libz.dylib (found version "1.2.11") 
-- Looking for ZZip...
-- Found PkgConfig: /usr/local/bin/pkg-config (found version "0.29.2") 
-- Checking for module 'zziplib'
--   Found zziplib, version 0.13.69
-- Found ZZip: /Users/michael/Code/Game/ogre/build/Dependencies/lib/libzzip.dylib
-- Looking for FreeImage...
-- Checking for module 'freeimage'
--   No package 'freeimage' found
-- Could not locate FreeImage
-- Found Freetype: /Users/michael/Code/Game/ogre/build/Dependencies/lib/libfreetype.dylib (found version "2.9.0") 
-- Found OpenGL: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework   
-- Looking for Cg...
-- Cg_PREFIX_PATH changed.
-- Checking for module 'Cg'
--   No package 'Cg' found
-- Could not locate Cg
-- Found PythonInterp: /anaconda3/bin/python (found version "3.6.5") 
-- Found PythonLibs: /anaconda3/lib/libpython3.6m.dylib (found version "3.6.5") 
-- Found SDL2: /usr/local/lib/libSDL2main.a;/usr/local/lib/libSDL2.dylib;-framework Cocoa  
-- Could NOT find Doxygen (missing: DOXYGEN_EXECUTABLE) 
-- Looking for Softimage...
-- Softimage_PREFIX_PATH changed.
-- Could not locate Softimage
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Success
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY
-- Performing Test COMPILER_HAS_HIDDEN_INLINE_VISIBILITY - Success
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR
-- Performing Test COMPILER_HAS_DEPRECATED_ATTR - Success
-- Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR) (Required is at least version "3.0.8")
CMake Warning at Components/Python/CMakeLists.txt:7 (message):
  Python Component disabled because SWIG or Python was not found


-- Could NOT find SWIG (missing: SWIG_EXECUTABLE SWIG_DIR) (Required is at least version "3.0.8")
-- Found JNI: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/JavaVM.framework  
CMake Warning at Components/Java/CMakeLists.txt:17 (message):
  Java Component disabled because SWIG or Java was not found


-- 
-----------------------------------------------------------------------------
-- The following external packages were located on your system.
-- This installation will have the extra features provided by these packages.
+ zlib
+ zziplib
+ freetype
+ OpenGL
+ OpenGL ES 2.x
+ Python
+ SDL2
-----------------------------------------------------------------------------
-- The following OPTIONAL packages could NOT be located on your system.
-- Consider installing them to enable more features from this software.
+ freeimage: Support for commonly used graphics image formats <http://freeimage.sourceforge.net>
+ cg: C for graphics shader language <http://developer.nvidia.com/object/cg_toolkit.html>
+ OpenEXR: Load High dynamic range images <http://www.openexr.com/>
+ Doxygen: Tool for building API documentation <http://doxygen.org>
+ Softimage: Softimage SDK needed for building XSIExporter <FALSE>
-----------------------------------------------------------------------------

-- 
----------------------------------------------------------------------------
  FEATURE SUMMARY
----------------------------------------------------------------------------

Building components:
  + Bites
  + HLMS [BETA]
  + MeshLodGenerator
  + Overlay
  + Paging
  + Property
  + RTShader System
  + RTShader System Core Shaders
  + RTShader System Extensions Shaders
  + Terrain
  + Volume
Building plugins:
  + BSP scene manager
  + Octree scene manager
  + STBI codec (generic)
  + Portal connected zone scene manager
  + Particle FX
Building rendersystems:
  + OpenGL
  + OpenGL 3+
Building executables:
  + Samples
  + Tools
Building core features:
  + Mesh Lod
  + DDS image codec (.dds)
  + ETC image codec (.pkm, .ktx) 
  + ZIP archives

Build type:                      shared
Thread safety:                   none
ResourceManager behaviour:       strict
Use double precision:            disabled
Nodes inherit transform:         disabled
Assert mode:                     release exceptions

----------------------------------------------------------------------------

-- Configuring done
CMake Warning (dev):
  Policy CMP0068 is not set: RPATH settings on macOS do not affect
  install_name.  Run "cmake --help-policy CMP0068" for policy details.  Use
  the cmake_policy command to set the policy and suppress this warning.

  For compatibility with older versions of CMake, the install_name fields for
  the following targets are still affected by RPATH settings:

   Codec_STBI
   DefaultSamples
   OgreBites
   OgreHLMS
   OgreMain
   OgreMeshLodGenerator
   OgreOverlay
   OgrePaging
   OgreProperty
   OgreRTShaderSystem
   OgreTerrain
   OgreVolume
   Plugin_BSPSceneManager
   Plugin_OctreeSceneManager
   Plugin_OctreeZone
   Plugin_PCZSceneManager
   Plugin_ParticleFX
   RenderSystem_GL
   RenderSystem_GL3Plus

This warning is for project developers.  Use -Wno-dev to suppress it.

-- Generating done
-- Build files have been written to: /Users/michael/Code/Game/ogre/build

@paroj
Copy link
Member

paroj commented Oct 11, 2018

can you try to disable the GL rendersystem (and use GL3+)? I just noticed that our builders do not test GL on OSX.

@MichaelVoelkel
Copy link
Author

MichaelVoelkel commented Oct 11, 2018

Yes, of course. In the cmake output, OpenGL is not in the list of rendering systems anymore, OpenGL 3+ is now the only one, although Cmake says that -D OGRE_BUILD_RENDERSYSTEM_GL3plus=1 has been ignored. I assume that this is standard.

(By the way, I have also tried to build without Xcode, just using Cmake. This works and confirms the Xcode issue.)

But same issues: (need to say that I had the official download version and not the Github version before, so now I again use the Github version)

Ld build/lib/macosx/Debug/OgreProperty.framework/Versions/1.11.3/OgreProperty normal x86_64
    cd /Users/michael/Code/Game/ogre
    export MACOSX_DEPLOYMENT_TARGET=10.14
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -L/Users/michael/Code/Game/ogre/build/lib/macosx/Debug -F/Users/michael/Code/Game/ogre/build/lib/macosx/Debug -filelist /Users/michael/Code/Game/ogre/build/Components/Property/OGRE.build/Debug/OgreProperty.build/Objects-normal/x86_64/OgreProperty.LinkFileList -install_name @executable_path/../Frameworks/OgreProperty.framework/Versions/1.11.3/OgreProperty -Xlinker -rpath -Xlinker /Users/michael/Code/Game/ogre/build/sdk/lib -mmacosx-version-min=10.14 -Xlinker -object_path_lto -Xlinker /Users/michael/Code/Game/ogre/build/Components/Property/OGRE.build/Debug/OgreProperty.build/Objects-normal/x86_64/OgreProperty_lto.o -Xlinker -no_deduplicate -stdlib=libc++ /Users/michael/Code/Game/ogre/build/lib/macosx/Debug/Ogre.framework/Versions/1.11.3/Ogre -compatibility_version 1.11.3 -current_version 1.11.3 -Xlinker -dependency_info -Xlinker /Users/michael/Code/Game/ogre/build/Components/Property/OGRE.build/Debug/OgreProperty.build/Objects-normal/x86_64/OgreProperty_dependency_info.dat -o /Users/michael/Code/Game/ogre/build/lib/macosx/Debug/OgreProperty.framework/Versions/1.11.3/OgreProperty
Undefined symbols for architecture x86_64:
  "Ogre::Exception::Exception(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*, char const*, long)", referenced from:
      Ogre::ExceptionFactory::_throwException(Ogre::Exception::ExceptionCodes, int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*, long) in OgreProperty.o
  "Ogre::Exception::Exception(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*, char const*, long)", referenced from:
      Ogre::IOException::IOException(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*, long) in OgreProperty.o
      Ogre::InvalidStateException::InvalidStateException(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*, long) in OgreProperty.o
      Ogre::InvalidParametersException::InvalidParametersException(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*, long) in OgreProperty.o
      Ogre::RenderingAPIException::RenderingAPIException(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*, long) in OgreProperty.o
      Ogre::ItemIdentityException::ItemIdentityException(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*, long) in OgreProperty.o
      Ogre::FileNotFoundException::FileNotFoundException(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*, long) in OgreProperty.o
      Ogre::InternalErrorException::InternalErrorException(int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*, long) in OgreProperty.o
      ...
  "Ogre::Exception::getFullDescription() const", referenced from:
      vtable for Ogre::IOException in OgreProperty.o
      vtable for Ogre::InvalidStateException in OgreProperty.o
      vtable for Ogre::InvalidParametersException in OgreProperty.o
      vtable for Ogre::RenderingAPIException in OgreProperty.o
      vtable for Ogre::ItemIdentityException in OgreProperty.o
      vtable for Ogre::FileNotFoundException in OgreProperty.o
      vtable for Ogre::InternalErrorException in OgreProperty.o
      ...
  "typeinfo for Ogre::Exception", referenced from:
      Ogre::ExceptionFactory::_throwException(Ogre::Exception::ExceptionCodes, int, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, char const*, long) in OgreProperty.o
      typeinfo for Ogre::IOException in OgreProperty.o
      typeinfo for Ogre::InvalidStateException in OgreProperty.o
      typeinfo for Ogre::InvalidParametersException in OgreProperty.o
      typeinfo for Ogre::RenderingAPIException in OgreProperty.o
      typeinfo for Ogre::ItemIdentityException in OgreProperty.o
      typeinfo for Ogre::FileNotFoundException in OgreProperty.o
      ...
  "vtable for Ogre::Exception", referenced from:
      Ogre::Exception::~Exception() in OgreProperty.o
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@paroj
Copy link
Member

paroj commented Oct 11, 2018

I suspect that it somehow tries to link the 64bit target using 32bit libraries, but I have no idea why..

@MichaelVoelkel
Copy link
Author

Related but without answer, might be some Xcode bug: https://forums.developer.apple.com/thread/108726

@paroj
Copy link
Member

paroj commented Oct 11, 2018

our CI builds using xcode10 though. Can you try commenting this line out:
https://github.com/OGRECave/ogre/blob/master/CMake/Utils/OgreConfigTargets.cmake#L174

(and doing a clean rebuild)

@MichaelVoelkel
Copy link
Author

MichaelVoelkel commented Oct 11, 2018

This does not change much, still the same error of type:

Ld build/lib/macosx/Debug/RenderSystem_GL3Plus.framework/Versions/1.11.3/RenderSystem_GL3Plus normal x86_64
    cd /Users/michael/Code/Game/ogre
    export MACOSX_DEPLOYMENT_TARGET=10.14
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -L/Users/michael/Code/Game/ogre/build/lib/macosx/Debug -F/Users/michael/Code/Game/ogre/build/lib/macosx/Debug -filelist /Users/michael/Code/Game/ogre/build/RenderSystems/GL3Plus/OGRE.build/Debug/RenderSystem_GL3Plus.build/Objects-normal/x86_64/RenderSystem_GL3Plus.LinkFileList -install_name @executable_path/../Frameworks/RenderSystem_GL3Plus.framework/Versions/1.11.3/RenderSystem_GL3Plus -Xlinker -rpath -Xlinker /Users/michael/Code/Game/ogre/build/sdk/lib -mmacosx-version-min=10.14 -Xlinker -object_path_lto -Xlinker /Users/michael/Code/Game/ogre/build/RenderSystems/GL3Plus/OGRE.build/Debug/RenderSystem_GL3Plus.build/Objects-normal/x86_64/RenderSystem_GL3Plus_lto.o -Xlinker -no_deduplicate -stdlib=libc++ -framework Cocoa -framework OpenGL /Users/michael/Code/Game/ogre/build/lib/macosx/Debug/libOgreGLSupport.a -framework OpenGL /Users/michael/Code/Game/ogre/build/lib/macosx/Debug/Ogre.framework/Versions/1.11.3/Ogre -current_version 1.11.3 -Xlinker -dependency_info -Xlinker /Users/michael/Code/Game/ogre/build/RenderSystems/GL3Plus/OGRE.build/Debug/RenderSystem_GL3Plus.build/Objects-normal/x86_64/RenderSystem_GL3Plus_dependency_info.dat -o /Users/michael/Code/Game/ogre/build/lib/macosx/Debug/RenderSystem_GL3Plus.framework/Versions/1.11.3/RenderSystem_GL3Plus
Undefined symbols for architecture x86_64:
  "Ogre::GpuProgram::setSyntaxCode(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      Ogre::GLSLShaderManager::createImpl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, Ogre::ManualResourceLoader*, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > const*) in OgreGLSLShaderManager.o
      Ogre::GLSLShaderManager::createImpl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, Ogre::ManualResourceLoader*, Ogre::GpuProgramType, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in OgreGLSLShaderManager.o

.......

So, to summarize, to reproduce this, I type the following:

Being in the core directory, first, if build exists already:

rm -rf build

Then:

mkdir build
cd build
cmake -D OGRE_BUILD_RENDERSYSTEM_GL=0 -GXcode ..
cmake --build . -- ONLY_ACTIVE_ARCH=YES

, which builds in debug.

Xcode is in version 10.0 (10A255), by the way. But this seems to be the first and only non-beta release version, anyway.

My cmake version is 3.12.2, if this could make some difference.

But if this works with your system, I have no clue... maybe, some library dependencies that change something? This is something external to OGRE...

@paroj
Copy link
Member

paroj commented Oct 11, 2018

It is not exactly my system, but rather our CI server. You can take a look here:
https://travis-ci.org/OGRECave/ogre/jobs/440326977

maybe you see so something different besides it being OSX 10.13.6

@MichaelVoelkel
Copy link
Author

MichaelVoelkel commented Oct 12, 2018

You do not seem to use the Xcode generator, do you? Without generator, it works for me as well. But then, no xcodeproj files and no SampleBrowser app bundle are generated (the latter according to your official guide: https://ogrecave.github.io/ogre/api/latest/building-ogre.html )

I'm starting to think, this is a CMake issue with the Xcode10-generator. They officially do not support Xcode10 anyways and clearly have issues with the generator: https://gitlab.kitware.com/cmake/cmake/issues/18088

I probably can work without this app bundle for now and will build that way.

@paroj
Copy link
Member

paroj commented Oct 12, 2018

the xcode generator is specified here:
https://github.com/OGRECave/ogre/blob/master/ci-build.cmake#L28

another difference is that the CI server is using the older cmake 3.11.3

@MichaelVoelkel
Copy link
Author

Hmm, ok, however, no xcodeproj files are created, when I use cmake -P ci-build.cmake.

@momadacoding
Copy link

same error here 😢

Ld Build/bin/Debug/VRMLConverter normal x86_64
cd /Users/liuhao/dev/ogre
export MACOSX_DEPLOYMENT_TARGET=10.13
/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/liuhao/dev/ogre/Build/bin/Debug -F/Users/liuhao/dev/ogre/Build/bin/Debug -filelist /Users/liuhao/dev/ogre/Build/Tools/VRMLConverter/OGRE.build/Debug/VRMLConverter.build/Objects-normal/x86_64/VRMLConverter.LinkFileList -mmacosx-version-min=10.13 -Xlinker -object_path_lto -Xlinker /Users/liuhao/dev/ogre/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/liuhao/dev/ogre/Build/lib/macosx/Debug/Ogre.framework/Versions/1.11.3/Ogre -Xlinker -dependency_info -Xlinker /Users/liuhao/dev/ogre/Build/Tools/VRMLConverter/OGRE.build/Debug/VRMLConverter.build/Objects-normal/x86_64/VRMLConverter_dependency_info.dat -o /Users/liuhao/dev/ogre/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
"Ogre::LogManager::LogManager()", referenced from:
_main in VRML2mesh.o
"Ogre::LogManager::~LogManager()", referenced from:
_main in VRML2mesh.o
"Ogre::VectorBase<3, float>::UNIT_SCALE", referenced from:
Ogre::AxisAlignedBox::AxisAlignedBox(Ogre::AxisAlignedBox const&) in VRML2mesh.o
"Ogre::VectorBase<3, float>::ZERO", referenced from:
Ogre::AxisAlignedBox::AxisAlignedBox(Ogre::AxisAlignedBox const&) in VRML2mesh.o
"Ogre::VertexData::VertexData(Ogre::HardwareBufferManagerBase*)", referenced from:
copyToSubMesh(Ogre::SubMesh*, std::__1::vector<triangle, std::__1::allocator > const&, std::__1::vector<vertex, std::__1::allocator > const&, vrmllib::Shape const*, Ogre::Matrix4 const&) in VRML2mesh.o
"Ogre::ColourValue::White", referenced from:
parseMaterial(vrmllib::Appearance const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in VRML2mesh.o
"Ogre::MeshManager::create(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, bool, Ogre::ManualResourceLoader*, std::__1::map<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > > > const*)", referenced from:
_main in VRML2mesh.o
"Ogre::MeshManager::MeshManager()", referenced from:
_main in VRML2mesh.o
"Ogre::MeshManager::~MeshManager()", referenced from:
_main in VRML2mesh.o
"Ogre::VertexElement::getTypeSize(Ogre::VertexElementType)", referenced from:
copyToSubMesh(Ogre::SubMesh*, std::__1::vector<triangle, std::__1::allocator > const&, std::__1::vector<vertex, std::__1::allocator > const&, vrmllib::Shape const*, Ogre::Matrix4 const&) in VRML2mesh.o
"Ogre::MeshSerializer::exportMesh(Ogre::Mesh const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, Ogre::Serializer::Endian)", referenced from:
_main in VRML2mesh.o
"Ogre::MeshSerializer::MeshSerializer()", referenced from:
_main in VRML2mesh.o
"Ogre::MeshSerializer::~MeshSerializer()", referenced from:
_main in VRML2mesh.o
"Ogre::MaterialManager::initialise()", referenced from:
_main in VRML2mesh.o
"Ogre::MaterialManager::getSingleton()", referenced from:
parseMaterial(vrmllib::Appearance const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in VRML2mesh.o
"Ogre::MaterialManager::create(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, bool, Ogre::ManualResourceLoader*, std::__1::map<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > > > > const*)", referenced from:
parseMaterial(vrmllib::Appearance const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in VRML2mesh.o
"Ogre::MaterialManager::getByName(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)", referenced from:
parseMaterial(vrmllib::Appearance const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in VRML2mesh.o
"Ogre::MaterialManager::MaterialManager()", referenced from:
_main in VRML2mesh.o
"Ogre::MaterialManager::~MaterialManager()", referenced from:
_main in VRML2mesh.o
"Ogre::TextureUnitState::_getLocalSampler()", referenced from:
Ogre::TextureUnitState::setTextureAddressingMode(Ogre::TextureAddressingMode) in VRML2mesh.o
"Ogre::VertexDeclaration::addElement(unsigned short, unsigned long, Ogre::VertexElementType, Ogre::VertexElementSemantic, unsigned short)", referenced from:
copyToSubMesh(Ogre::SubMesh*, std::__1::vector<triangle, std::__1::allocator > const&, std::__1::vector<vertex, std::__1::allocator > const&, vrmllib::Shape const*, Ogre::Matrix4 const&) in VRML2mesh.o
"Ogre::LodStrategyManager::LodStrategyManager()", referenced from:
_main in VRML2mesh.o
"Ogre::LodStrategyManager::~LodStrategyManager()", referenced from:
_main in VRML2mesh.o
"Ogre::MaterialSerializer::exportQueued(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, bool, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)", referenced from:
_main in VRML2mesh.o
"Ogre::MaterialSerializer::queueForExport(Ogre::SharedPtrOgre::Material const&, bool, bool, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)", referenced from:
_main in VRML2mesh.o
"Ogre::MaterialSerializer::MaterialSerializer()", referenced from:
_main in VRML2mesh.o
"Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME", referenced from:
_main in VRML2mesh.o
parseMaterial(vrmllib::Appearance const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in VRML2mesh.o
"Ogre::ResourceGroupManager::AUTODETECT_RESOURCE_GROUP_NAME", referenced from:
parseShape(Ogre::Mesh*, vrmllib::Shape const*, Ogre::Matrix4) in VRML2mesh.o
"Ogre::ResourceGroupManager::ResourceGroupManager()", referenced from:
_main in VRML2mesh.o
"Ogre::ResourceGroupManager::~ResourceGroupManager()", referenced from:
_main in VRML2mesh.o
"Ogre::HardwareBufferManager::getSingleton()", referenced from:
copyToSubMesh(Ogre::SubMesh*, std::__1::vector<triangle, std::__1::allocator > const&, std::__1::vector<vertex, std::__1::allocator > const&, vrmllib::Shape const*, Ogre::Matrix4 const&) in VRML2mesh.o
"Ogre::HardwareBufferManager::HardwareBufferManager()", referenced from:
Ogre::DefaultHardwareBufferManager::DefaultHardwareBufferManager() in VRML2mesh.o
"Ogre::HardwareBufferManager::~HardwareBufferManager()", referenced from:
Ogre::DefaultHardwareBufferManager::DefaultHardwareBufferManager() in VRML2mesh.o
Ogre::DefaultHardwareBufferManager::~DefaultHardwareBufferManager() in VRML2mesh.o
"Ogre::HardwareBufferManagerBase::makeBufferCopy(Ogre::SharedPtrOgre::HardwareVertexBuffer const&, Ogre::HardwareBuffer::Usage, bool)", referenced from:
vtable for Ogre::DefaultHardwareBufferManager in VRML2mesh.o
"Ogre::HardwareBufferManagerBase::destroyAllBindings()", referenced from:
vtable for Ogre::DefaultHardwareBufferManager in VRML2mesh.o
"Ogre::HardwareBufferManagerBase::destroyAllDeclarations()", referenced from:
vtable for Ogre::DefaultHardwareBufferManager in VRML2mesh.o
"Ogre::HardwareBufferManagerBase::createVertexDeclarationImpl()", referenced from:
vtable for Ogre::DefaultHardwareBufferManager in VRML2mesh.o
"Ogre::HardwareBufferManagerBase::destroyVertexDeclarationImpl(Ogre::VertexDeclaration*)", referenced from:
vtable for Ogre::DefaultHardwareBufferManager in VRML2mesh.o
"Ogre::HardwareBufferManagerBase::createVertexBufferBindingImpl()", referenced from:
vtable for Ogre::DefaultHardwareBufferManager in VRML2mesh.o
"Ogre::HardwareBufferManagerBase::destroyVertexBufferBindingImpl(Ogre::VertexBufferBinding*)", referenced from:
vtable for Ogre::DefaultHardwareBufferManager in VRML2mesh.o
"Ogre::HardwareBufferManagerBase::registerVertexBufferSourceAndCopy(Ogre::SharedPtrOgre::HardwareVertexBuffer const&, Ogre::SharedPtrOgre::HardwareVertexBuffer const&)", referenced from:
vtable for Ogre::DefaultHardwareBufferManager in VRML2mesh.o
"Ogre::DefaultHardwareBufferManagerBase::DefaultHardwareBufferManagerBase()", referenced from:
Ogre::DefaultHardwareBufferManager::DefaultHardwareBufferManager() in VRML2mesh.o
"Ogre::Math::Math(unsigned int)", referenced from:
_main in VRML2mesh.o
"Ogre::Math::~Math()", referenced from:
_main in VRML2mesh.o
"Ogre::Mesh::_setBounds(Ogre::AxisAlignedBox const&, bool)", referenced from:
parseShape(Ogre::Mesh*, vrmllib::Shape const*, Ogre::Matrix4) in VRML2mesh.o
"Ogre::Mesh::createSubMesh(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)", referenced from:
parseShape(Ogre::Mesh*, vrmllib::Shape const*, Ogre::Matrix4) in VRML2mesh.o
"Ogre::Mesh::createSubMesh()", referenced from:
parseShape(Ogre::Mesh*, vrmllib::Shape const*, Ogre::Matrix4) in VRML2mesh.o
"Ogre::Pass::setAmbient(Ogre::ColourValue const&)", referenced from:
parseMaterial(vrmllib::Appearance const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in VRML2mesh.o
"Ogre::Pass::setDiffuse(Ogre::ColourValue const&)", referenced from:
parseMaterial(vrmllib::Appearance const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in VRML2mesh.o
"Ogre::Pass::setSpecular(Ogre::ColourValue const&)", referenced from:
parseMaterial(vrmllib::Appearance const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in VRML2mesh.o
"Ogre::Pass::setShininess(float)", referenced from:
parseMaterial(vrmllib::Appearance const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in VRML2mesh.o
"Ogre::Pass::setLightingEnabled(bool)", referenced from:
parseMaterial(vrmllib::Appearance const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in VRML2mesh.o
"Ogre::Pass::setSelfIllumination(Ogre::ColourValue const&)", referenced from:
parseMaterial(vrmllib::Appearance const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in VRML2mesh.o
"Ogre::Pass::createTextureUnitState(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, unsigned short)", referenced from:
parseMaterial(vrmllib::Appearance const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in VRML2mesh.o
"Ogre::Matrix3::FromAngleAxis(Ogre::Vector<3, float> const&, Ogre::Radian const&)", referenced from:
parseNode(Ogre::Mesh*, vrmllib::node const*, Ogre::Matrix4) in VRML2mesh.o
rotMat(vrmllib::rot, bool) in VRML2mesh.o
"Ogre::Matrix4::IDENTITY", referenced from:
parseFile(Ogre::Mesh*, vrmllib::file const&) in VRML2mesh.o
parseNode(Ogre::Mesh*, vrmllib::node const*, Ogre::Matrix4) in VRML2mesh.o
rotMat(vrmllib::rot, bool) in VRML2mesh.o
"Ogre::Sampler::setAddressingMode(Ogre::Sampler::UVWAddressingMode const&)", referenced from:
Ogre::Sampler::setAddressingMode(Ogre::TextureAddressingMode) in VRML2mesh.o
"Ogre::SubMesh::setMaterialName(std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&)", referenced from:
parseShape(Ogre::Mesh*, vrmllib::Shape const*, Ogre::Matrix4) in VRML2mesh.o
"Ogre::Material::createTechnique()", referenced from:
parseMaterial(vrmllib::Appearance const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in VRML2mesh.o
"Ogre::Technique::createPass()", referenced from:
parseMaterial(vrmllib::Appearance const*, std::__1::basic_string<char, std::__1::char_traits, std::__1::allocator > const&) in VRML2mesh.o
"Ogre::ColourValue::getAsABGR() const", referenced from:
copyToSubMesh(Ogre::SubMesh*, std::__1::vector<triangle, std::__1::allocator > const&, std::__1::vector<vertex, std::__1::allocator > const&, vrmllib::Shape const*, Ogre::Matrix4 const&) in VRML2mesh.o
"Ogre::Mesh::getBounds() const", referenced from:
parseShape(Ogre::Mesh*, vrmllib::Shape const*, Ogre::Matrix4) in VRML2mesh.o
"Ogre::Matrix3::Inverse(float) const", referenced from:
Ogre::Matrix3::inverse() const in VRML2mesh.o
"Ogre::Matrix3::Transpose() const", referenced from:
Ogre::Matrix3::transpose() const in VRML2mesh.o
"typeinfo for Ogre::HardwareBufferManager", referenced from:
typeinfo for Ogre::DefaultHardwareBufferManager in VRML2mesh.o
"typeinfo for Ogre::Exception", referenced from:
GCC_except_table4 in VRML2mesh.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@momadacoding
Copy link

also when generate a makefile build tree and build with cmake command cmake --build . --config release , the linker complains

ld: framework not found Cg
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [lib/macosx/Plugin_CgProgramManager.framework/Versions/1.11.3/Plugin_CgProgramManager] Error 1
make[1]: *** [PlugIns/CgProgramManager/CMakeFiles/Plugin_CgProgramManager.dir/all] Error 2
make: *** [all] Error 2

@jackhub
Copy link

jackhub commented Oct 22, 2018

Same error, build failed on macOS. Please take a look...

@paroj
Copy link
Member

paroj commented Oct 22, 2018

I currently dont have access to macOS Mojave, so this might take a while. Downgrading to Xcode9 should be a workaround according to the internet.

@paroj
Copy link
Member

paroj commented Oct 24, 2018

ok, can you look out for (CMake)

Performing Test COMPILER_HAS_HIDDEN_VISIBILITY - Failed

and (compilation)

-fvisibility=hidden

if you find both, then the problem is that the export headers are not properly written

@paroj
Copy link
Member

paroj commented Oct 24, 2018

setting CMAKE_OSX_ARCHITECTURES=x86_64 should fix this

@greenermoose
Copy link

I've got MacOS High Sierra 10.13.6
Getting same errors.
I downgraded to Xcode 9.4. Didn't solve issue.
I am seeing:

Ld build_xcode/lib/macosx/RelWithDebInfo/RenderSystem_GL.framework/Versions/1.12.0/RenderSystem_GL normal x86_64
    cd /Users/fred/Code/ogre
    export MACOSX_DEPLOYMENT_TARGET=10.13
    /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch x86_64 -dynamiclib -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -L/Users/fred/Code/ogre/build_xcode/lib/macosx/RelWithDebInfo -F/Users/fred/Code/ogre/build_xcode/lib/macosx/RelWithDebInfo -filelist /Users/fred/Code/ogre/build_xcode/RenderSystems/GL/OGRE.build/RelWithDebInfo/RenderSystem_GL.build/Objects-normal/x86_64/RenderSystem_GL.LinkFileList -install_name @executable_path/../Frameworks/RenderSystem_GL.framework/Versions/1.12.0/RenderSystem_GL -Xlinker -rpath -Xlinker /Users/fred/Code/ogre/build_xcode/sdk/lib -mmacosx-version-min=10.13 -Xlinker -object_path_lto -Xlinker /Users/fred/Code/ogre/build_xcode/RenderSystems/GL/OGRE.build/RelWithDebInfo/RenderSystem_GL.build/Objects-normal/x86_64/RenderSystem_GL_lto.o -stdlib=libc++ -framework Cocoa -framework Carbon -framework OpenGL -framework AGL /Users/fred/Code/ogre/build_xcode/lib/macosx/RelWithDebInfo/libOgreGLSupport.a -framework OpenGL /Users/fred/Code/ogre/build_xcode/lib/macosx/RelWithDebInfo/Ogre.framework/Versions/1.12.0/Ogre -current_version 1.12.0 -Xlinker -dependency_info -Xlinker /Users/fred/Code/ogre/build_xcode/RenderSystems/GL/OGRE.build/RelWithDebInfo/RenderSystem_GL.build/Objects-normal/x86_64/RenderSystem_GL_dependency_info.dat -o /Users/fred/Code/ogre/build_xcode/lib/macosx/RelWithDebInfo/RenderSystem_GL.framework/Versions/1.12.0/RenderSystem_GL
Undefined symbols for architecture x86_64:
  "Ogre::GpuProgram::setSyntaxCode(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)", referenced from:
      Ogre::GLGpuProgramManager::createImpl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, Ogre::ManualResourceLoader*, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > > const*) in OgreGLGpuProgramManager.o
      Ogre::GLGpuProgramManager::createImpl(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, Ogre::ManualResourceLoader*, Ogre::GpuProgramType, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in OgreGLGpuProgramManager.o
      Ogre::createGLArbGpuProgram(Ogre::ResourceManager*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, Ogre::ManualResourceLoader*, Ogre::GpuProgramType, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in OgreGLRenderSystem.o
      Ogre::createGLGpuNvparseProgram(Ogre::ResourceManager*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, Ogre::ManualResourceLoader*, Ogre::GpuProgramType, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in OgreGLRenderSystem.o
      Ogre::createGL_ATI_FS_GpuProgram(Ogre::ResourceManager*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, unsigned long long, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, bool, Ogre::ManualResourceLoader*, Ogre::GpuProgramType, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) in OgreGLRenderSystem.o
  "Ogre::GpuProgram::createParameters()", referenced from:
      vtable for Ogre::GLSL::GLSLGpuProgram in OgreGLSLGpuProgram.o
      vtable for Ogre::GLGpuNvparseProgram in OgreGLGpuNvparseProgram.o
      vtable for Ogre::GLGpuProgram in OgreGLGpuProgram.o
      vtable for Ogre::GLArbGpuProgram in OgreGLGpuProgram.o
      vtable for Ogre::ATI_FS_GLGpuProgram in ATI_FS_GLGpuProgram.o
  "Ogre::GpuProgram::getDefaultParameters()", referenced from:
      vtable for Ogre::GLSL::GLSLGpuProgram in OgreGLSLGpuProgram.o
      vtable for Ogre::GLSL::GLSLProgram in OgreGLSLProgram.o
      vtable for Ogre::GLGpuNvparseProgram in OgreGLGpuNvparseProgram.o
      vtable for Ogre::GLGpuProgram in OgreGLGpuProgram.o
      vtable for Ogre::GLArbGpuProgram in OgreGLGpuProgram.o
      vtable for Ogre::ATI_FS_GLGpuProgram in ATI_FS_GLGpuProgram.o
      vtable for Ogre::GLSLShaderCommon in libOgreGLSupport.a(OgreGLSLShaderCommon.o)
      ...
  NOTE: a missing vtable usually means the first non-inline virtual member function has no definition.
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Showing first 200 notices only
Showing first 200 errors only

** BUILD FAILED **

The following build commands failed:
	Ld build_xcode/lib/macosx/RelWithDebInfo/RenderSystem_GL.framework/Versions/1.12.0/RenderSystem_GL normal x86_64
(1 failure)

@greenermoose
Copy link

I finally got ogre to build on macOS High Sierra 10.13.6 with Xcode 10.1.

I'm just a weekend coder, so I'm not sure exactly what got things working, but I think a combination of these edits to CMakeLists.txt did the trick:

#include(CheckTypeSize)
#CHECK_TYPE_SIZE("void*" OGRE_PTR_SIZE BUILTIN_TYPES_ONLY)
#if (OGRE_PTR_SIZE EQUAL 8)
#  set(OGRE_PLATFORM_X64 TRUE)
#else ()
#  set(OGRE_PLATFORM_X64 FALSE)
#endif ()

# compile for 64bit system
set(OGRE_PLATFORM_X64 TRUE)

and

-        set(CMAKE_OSX_ARCHITECTURES "${ARCHS_STANDARD_32_64_BIT}")
+  #      set(CMAKE_OSX_ARCHITECTURES "${ARCHS_STANDARD_32_64_BIT}")
+	      set(CMAKE_OSX_ARCHITECTURES "${ARCHS_STANDARD_64_BIT}")
      else()
-        set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD_32_64_BIT)")
+  #      set(CMAKE_OSX_ARCHITECTURES "$(ARCHS_STANDARD_32_64_BIT)")
+	      set(CMAKE_OSX_ARCHITECTURES "${ARCHS_STANDARD_64_BIT}")

Then I changed these to get a working application:

option(OGRE_STATIC "Static build" TRUE)
option(OGRE_ENABLE_PRECOMPILED_HEADERS "Use precompiled headers to speed up build" FALSE)

Hope this helps the next person trying to get ogre to compile on a recent macOS!

@FTD2012
Copy link

FTD2012 commented Feb 14, 2019

Finally works with greenermoosel. Appreciate.

@paroj
Copy link
Member

paroj commented Mar 19, 2020

fixed in master

@paroj paroj closed this as completed Mar 19, 2020
@paroj paroj unpinned this issue Mar 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants