Hi Lyxers, it’s a long overdue task I had on my ToDo list: the update of my system to latest OS X - El Capitan.
It’s accompanied by an update of many components including the development tools, the compiler, the IDE, etc. The situation after doing so is as follows: 1. The build with autotools succeeds with a modification of my own build utility to take care for the new 10.11 SDK 2. The build with cmake is broken in two different ways 2a) build of 2.1.5dev branch fails with many errors like this /Users/stephan/git/lyx/src/Color.h:64:6: Reference to 'string' is ambiguous /Users/stephan/git/lyx/src/mathed/InsetMathAMSArray.cpp:13:10: In file included from /Users/stephan/git/lyx/src/mathed/InsetMathAMSArray.cpp:13: /Users/stephan/git/lyx/src/mathed/InsetMathAMSArray.h:15:10: In file included from /Users/stephan/git/lyx/src/mathed/InsetMathAMSArray.h:15: /Users/stephan/git/lyx/src/mathed/InsetMathGrid.h:15:10: In file included from /Users/stephan/git/lyx/src/mathed/InsetMathGrid.h:15: /Users/stephan/git/lyx/src/mathed/InsetMathNest.h:15:10: In file included from /Users/stephan/git/lyx/src/mathed/InsetMathNest.h:15: /Users/stephan/git/lyx/src/mathed/InsetMath.h:18:10: In file included from /Users/stephan/git/lyx/src/mathed/InsetMath.h:18: /Users/stephan/git/lyx/src/insets/Inset.h:20:10: In file included from /Users/stephan/git/lyx/src/insets/Inset.h:20: /Users/stephan/git/lyx/src/insets/InsetLayout.h:17:10: In file included from /Users/stephan/git/lyx/src/insets/InsetLayout.h:17: /Users/stephan/git/lyx/src/FontInfo.h:18:10: In file included from /Users/stephan/git/lyx/src/FontInfo.h:18: /Users/stephan/git/lyx/src/support/strfwd.h:49:65: Candidate found by name lookup is 'std::string' /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/iosfwd:194:65: Candidate found by name lookup is 'std::__1::string‘ 2b) build of 2.2.0dev master fails with linker errors like this Undefined symbols for architecture x86_64: "boost::re_detail::get_mem_block()", referenced from: boost::re_detail::save_state_init::save_state_init(boost::re_detail::saved_state**, boost::re_detail::saved_state**) in LayoutFile.o The cmake output is as follows: -- TOP_SRC_DIR = /Users/stephan/git/lyx -- -- Building out-of-source -- The C compiler identification is AppleClang 7.0.2.7000181 -- The CXX compiler identification is AppleClang 7.0.2.7000181 -- Check for working C compiler using: Xcode -- Check for working C compiler using: Xcode -- 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 using: Xcode -- Check for working CXX compiler using: Xcode -- works -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Detecting CXX compile features -- Detecting CXX compile features - done -- -- Using GCC version 4.2.1 -- Found Qt-Version 5.4.2 -- Looking for magic_file -- Looking for magic_file - found -- Looking for magic_open -- Looking for magic_open - found -- Looking for magic_load -- Looking for magic_load - found -- Looking for magic_close -- Looking for magic_close - found -- Looking for magic_error -- Looking for magic_error - found -- Found ASPELL: /Users/Shared/LyX/utilities/lib/libaspell.dylib -- Building with USE_ASPELL -- Found ENCHANT: /Users/Shared/LyX/utilities/lib/libenchant.dylib -- Building with USE_ENCHANT -- Found HUNSPELL: /Users/Shared/LyX/utilities/lib/libhunspell.dylib -- Building with USE_HUNSPELL -- Looking for iconv -- Looking for iconv - not found -- Found iconv library: /opt/local/lib/libiconv.dylib -- Found Z: /opt/local/lib/libz.dylib -- -- ----- PACKAGE : LyX -- ----- PACKAGE_VERSION : 2.2.0dev -- ----- PROGRAM_SUFFIX : -- ----- LYX_DATE : 2015-11-27 -- ----- LYX_DIR_VER : LYX_DIR_22x -- ----- LYX_USERDIR_VER : LYX_USERDIR_22x -- ----- LYX_ABS_TOP_SRCDIR : /Users/stephan/git/lyx -- ----- LYX_ABS_INSTALLED_DATADIR : /usr/local/lyx2.2 -- ----- LYX_ABS_INSTALLED_LOCALEDIR : /usr/local/lyx2.2/locale -- ----- LYX_INSTALL_SUFFIX : 2.2 -- -- 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 -- Looking for include file aspell.h -- Looking for include file aspell.h - not found -- Looking for include file aspell/aspell.h -- Looking for include file aspell/aspell.h - not found -- Looking for include file limits.h -- Looking for include file limits.h - found -- Looking for include file locale.h -- Looking for include file locale.h - found -- Looking for include file stdlib.h -- Looking for include file stdlib.h - found -- Looking for include file sys/stat.h -- Looking for include file sys/stat.h - found -- Looking for include file sys/time.h -- Looking for include file sys/time.h - found -- Looking for include file sys/utime.h -- Looking for include file sys/utime.h - not found -- Looking for include file sys/socket.h -- Looking for include file sys/socket.h - found -- Looking for include file unistd.h -- Looking for include file unistd.h - found -- Looking for include file inttypes.h -- Looking for include file inttypes.h - found -- Looking for include file utime.h -- Looking for include file utime.h - found -- Looking for include file string.h -- Looking for include file string.h - found -- Looking for include file argz.h -- Looking for include file argz.h - not found -- Looking for C++ include regex -- Looking for C++ include regex - found -- Looking for alloca -- Looking for alloca - not found -- Looking for __argz_count -- Looking for __argz_count - not found -- Looking for __argz_next -- Looking for __argz_next - not found -- Looking for __argz_stringify -- Looking for __argz_stringify - not found -- Looking for chmod -- Looking for chmod - found -- Looking for close -- Looking for close - found -- Looking for _close -- Looking for _close - not found -- Looking for dcgettext -- Looking for dcgettext - not found -- Looking for fcntl -- Looking for fcntl - found -- Looking for fork -- Looking for fork - found -- Looking for __fsetlocking -- Looking for __fsetlocking - not found -- Looking for getcwd -- Looking for getcwd - found -- Looking for getegid -- Looking for getegid - found -- Looking for getgid -- Looking for getgid - found -- Looking for getpid -- Looking for getpid - found -- Looking for _getpid -- Looking for _getpid - not found -- Looking for gettext -- Looking for gettext - not found -- Looking for getuid -- Looking for getuid - found -- Looking for lstat -- Looking for lstat - found -- Looking for lockf -- Looking for lockf - found -- Looking for mempcpy -- Looking for mempcpy - not found -- Looking for mkdir -- Looking for mkdir - found -- Looking for _mkdir -- Looking for _mkdir - not found -- Looking for mkfifo -- Looking for mkfifo - found -- Looking for open -- Looking for open - found -- Looking for _open -- Looking for _open - not found -- Looking for pclose -- Looking for pclose - found -- Looking for _pclose -- Looking for _pclose - not found -- Looking for popen -- Looking for popen - found -- Looking for _popen -- Looking for _popen - not found -- Looking for putenv -- Looking for putenv - found -- Looking for readlink -- Looking for readlink - found -- Looking for setenv -- Looking for setenv - found -- Looking for setlocale -- Looking for setlocale - found -- Looking for strcasecmp -- Looking for strcasecmp - found -- Looking for stpcpy -- Looking for stpcpy - found -- Looking for strdup -- Looking for strdup - found -- Looking for strerror -- Looking for strerror - found -- Looking for strtoul -- Looking for strtoul - found -- Looking for tsearch -- Looking for tsearch - found -- Looking for unsetenv -- Looking for unsetenv - found -- Looking for wcslen -- Looking for wcslen - found -- Looking for alloca -- Looking for alloca - not found -- Looking for asprintf -- Looking for asprintf - found -- Looking for wprintf -- Looking for wprintf - not found -- Looking for snprintf -- Looking for snprintf - found -- Looking for printf -- Looking for printf - found -- Looking for pid_t -- Looking for pid_t - not found -- Looking for intmax_t -- Looking for intmax_t - not found -- Looking for uintmax_t -- Looking for uintmax_t - not found -- Looking for LC_MESSAGES -- Looking for LC_MESSAGES - found -- Check size of intmax_t -- Check size of intmax_t - done -- Check size of long double -- Check size of long double - done -- Check size of long long -- Check size of long long - done -- Check size of wchar_t -- Check size of wchar_t - done -- Check size of wint_t -- Check size of wint_t - failed -- Performing Test HAVE_ICONV_CONST -- Performing Test HAVE_ICONV_CONST - Failed -- Performing Test SIZEOF_WCHAR_T_IS_2 -- Performing Test SIZEOF_WCHAR_T_IS_2 - Failed -- Performing Test SIZEOF_WCHAR_T_IS_4 -- Performing Test SIZEOF_WCHAR_T_IS_4 - Success -- Performing Test LYX_CALLSTACK_PRINTING -- Performing Test LYX_CALLSTACK_PRINTING - Success -- Performing Test lyx_cv_lib_stdcxx -- Performing Test lyx_cv_lib_stdcxx - Failed -- Performing Test USE_GLIBCXX_CXX11_ABI -- Performing Test USE_GLIBCXX_CXX11_ABI - Failed -- Performing Test lyx_cv_prog_clang -- Performing Test lyx_cv_prog_clang - Success -- Mac LinkBack support -- doxygen not found, ==> no doxygen creation -- Found Perl: /opt/local/bin/perl (found version "5.16.3") -- Reading list suspiciousTests -- Reading list ignoredTests -- Reading list suspendedTests -- Reading list unreliableTests -- Handling export dir /Users/stephan/git/lyx/autotests/export -- Handling export dir /Users/stephan/git/lyx/lib/doc -- Handling export dir /Users/stephan/git/lyx/lib/examples -- Handling export dir /Users/stephan/git/lyx/lib/templates -- Handling export dir /Users/stephan/git/lyx/autotests/mathmacros -- -- Build params, switch LYX_* options by -DLYX_*=ON or OFF, LYX_* combos by -DLYX_*=value: -- -- LYX_CPACK = OFF : Use the CPack management (Implies LYX_INSTALL option) -- LYX_LOCALVERSIONING = ON : Add version info to created package name (only used if LYX_CPACK option set) -- LYX_INSTALL = OFF : Build install projects/rules (implies a bunch of other options) -- LYX_NLS = ON : Enable Native Language Support (NLS) -- LYX_REQUIRE_SPELLCHECK = OFF : Abort if no spellchecker available -- LYX_ASPELL = ON : Require aspell -- LYX_ENCHANT = OFF : Require Enchant -- LYX_HUNSPELL = ON : Require Hunspell -- LYX_DEVEL_VERSION = ON : Build developer version -- LYX_RELEASE = OFF : Build release version, build debug when disabled -- LYX_DEBUG = ON : Enforce debug build -- LYX_NO_OPTIMIZE = OFF : Don't use any optimization/debug flags -- LYX_PACKAGE_SUFFIX = OFF : Use version suffix for packaging -- LYX_PCH = OFF : Use precompiled headers -- LYX_MERGE_FILES = OFF : Merge source files into one compilation unit -- LYX_MERGE_REBUILD = OFF : Rebuild generated files from merged files build -- LYX_QUIET = OFF : Don't generate verbose makefiles -- LYX_INSTALL_PREFIX = OFF : Install path for LyX -- LYX_BUNDLE = OFF : Build bundle (experimental) -- LYX_ENABLE_URLTESTS = OFF : Enable for URL tests -- LYX_ENABLE_EXPORT_TESTS = ON : Enable for export tests -- LYX_ASAN = OFF : Use address sanitizer -- LYX_USE_QT = QT5 : Use Qt version as frontend (QT4 QT5) -- LYX_3RDPARTY_BUILD = OFF : Build 3rdparty libs -- LYX_DMG = OFF : Build as Mac bundle, needed for .dmg (experimental) -- LYX_COCOA = OFF : Use Cocoa on Mac -- -- CMake command with options is available in shell script -- '/Users/stephan/git/lyx-build/cmake/2.2.0dev/run_cmake.sh' -- -- Building Native Language Support (LYX_NLS is set), used libraries: -- -- * iconv -- - include: /opt/local/include -- - library: /opt/local/lib/libiconv.dylib -- * zlib -- - include: /opt/local/include -- - library: /opt/local/lib/libz.dylib -- -- -- Configuring done -- Generating done -- Build files have been written to: /Users/stephan/git/lyx-build/cmake/2.2.0dev I’ve put a diagnostic message in CMakeLists.txt at line 714 to print the value of Lyx_Boost_Libraries and got: -- Boost-libs = boost_signals;boost_regex The compiler is a recent clang from Apple. $ clang++ -v Apple LLVM version 7.0.2 (clang-700.1.81) Target: x86_64-apple-darwin15.2.0 Thread model: posix The linker call is: $ /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.11.sdk -L/Users/stephan/git/lyx-build/cmake/2.2.0dev/bin/Debug -L/Users/stephan/git/lyx-build/cmake/2.2.0dev/lib/Debug/Debug -L/Users/stephan/git/lyx-build/cmake/2.2.0dev/lib/Debug -L/Users/Shared/LyX/utilities/lib/Debug -L/Users/Shared/LyX/utilities/lib -L/opt/local/lib/Debug -L/opt/local/lib -F/Users/stephan/git/lyx-build/cmake/2.2.0dev/bin/Debug -F/Users/Shared/LyX/qt-5.4.2-frameworks-cocoa-x86_64/lib -filelist /Users/stephan/git/lyx-build/cmake/2.2.0dev/src/tex2lyx/LyX.build/Debug/tex2lyx.build/Objects-normal/x86_64/tex2lyx.LinkFileList -mmacosx-version-min=10.11 -Wl,-search_paths_first -Wl,-headerpad_max_install_names /Users/stephan/git/lyx-build/cmake/2.2.0dev/lib/Debug/libsupport.a /Users/stephan/git/lyx-build/cmake/2.2.0dev/lib/Debug/libboost_signals.a /Users/stephan/git/lyx-build/cmake/2.2.0dev/lib/Debug/libboost_regex.a /opt/local/lib/libiconv.dylib /Users/Shared/LyX/utilities/lib/libmagic.dylib -framework AppKit /Users/Shared/LyX/qt-5.4.2-frameworks-cocoa-x86_64/lib/QtGui.framework/QtGui /Users/Shared/LyX/qt-5.4.2-frameworks-cocoa-x86_64/lib/QtCore.framework/QtCore /opt/local/lib/libz.dylib -lobjc -framework CoreFoundation -framework AppKit -Xlinker -dependency_info -Xlinker /Users/stephan/git/lyx-build/cmake/2.2.0dev/src/tex2lyx/LyX.build/Debug/tex2lyx.build/Objects-normal/x86_64/tex2lyx_dependency_info.dat -o /Users/stephan/git/lyx-build/cmake/2.2.0dev/bin/Debug/tex2lyx The libboost_regex.a contains a method get_mem_block with different signature from the request in LayoutFile.o. $ nm -g lyx-build/cmake/2.2.0dev/lib/Debug/libboost_regex.a|grep get_mem_block U __ZN5boost16re_detail_10600013get_mem_blockEv U __ZN5boost16re_detail_10600013get_mem_blockEv warning: nm: no name list 0000000000000270 T __ZN5boost16re_detail_10600013get_mem_blockEv $ nm lyx-build/cmake/2.2.0dev/src/tex2lyx/LyX.build/Debug/tex2lyx.build/Objects-normal/x86_64/LayoutFile.o|grep get_mem_block U __ZN5boost9re_detail13get_mem_blockEv Is there something wrong with the handling of the compiler switches? Can some Unix + cmake expert tell me what to try next to solve these issues? Is there any hope for 2.1.x to get a working build on Mac OS X 10.11? A happy new year to all. Stephan