[Webkit-unassigned] [Bug 152640] New: [CMake GTK OSX] webkit-gtk 2.11.2 fails to link libllvmForJSC.dylib on OS X due to bad link-line: ld: unknown option: --version-script=

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Jan 1 14:41:33 PST 2016


https://bugs.webkit.org/show_bug.cgi?id=152640

            Bug ID: 152640
           Summary: [CMake GTK OSX] webkit-gtk 2.11.2 fails to link
                    libllvmForJSC.dylib on OS X due to bad link-line: ld:
                    unknown option: --version-script=
    Classification: Unclassified
           Product: WebKit
           Version: Safari 9
          Hardware: Unspecified
                OS: Unspecified
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: WebKit Gtk
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: jeremyhu at apple.com
                CC: bugs-noreply at webkitgtk.org

I'm trying to build webkit-gtk 2.11.2 on OS X (the last version we had working was 2.4.9, before the move to cmake).  We are configuring as follows:

cmake -DCMAKE_INSTALL_PREFIX=/opt/local -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_INSTALL_RPATH=/opt/local/lib -DCMAKE_INSTALL_NAME_DIR=/opt/local/lib -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DCMAKE_MODULE_PATH=/opt/local/share/cmake/Modules -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev -DPORT=GTK -DENABLE_X11_TARGET=ON -DENABLE_QUARTZ_TARGET=OFF -DLLVM_CONFIG_EXE=/opt/local/bin/llvm-config-mp-3.7 -DENABLE_VIDEO=ON -DCMAKE_C_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_CXX_FLAGS_RELEASE="-DNDEBUG" -DCMAKE_OSX_ARCHITECTURES="x86_64" -DCMAKE_OSX_DEPLOYMENT_TARGET="10.11" -DCMAKE_OSX_SYSROOT="/"

The build then fails at:

[  1%] Linking CXX shared library ../../lib/libllvmForJSC.dylib
cd /opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_www_webkit-gtk-devel/webkit-gtk-devel/work/webkitgtk-2.11.2/Source/JavaScriptCore && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/llvmForJSC.dir/link.txt --verbose=1
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++  -pipe -O0 -g3 -ftemplate-depth=256 -Wno-c++11-extensions -stdlib=libc++  -std=c++11 -Qunused-arguments -std=c++11 -Qunused-arguments -DNDEBUG -fno-exceptions -fno-strict-aliasing -fno-rtti -fno-exceptions -fno-strict-aliasing -fno-rtti -arch x86_64 -mmacosx-version-min=10.11 -dynamiclib -Wl,-headerpad_max_install_names  -L/opt/local/lib -Wl,-headerpad_max_install_names -o ../../lib/libllvmForJSC.dylib -install_name /opt/local/lib/libllvmForJSC.dylib CMakeFiles/llvmForJSC.dir/llvm/library/LLVMAnchor.cpp.o CMakeFiles/llvmForJSC.dir/llvm/library/LLVMExports.cpp.o CMakeFiles/llvmForJSC.dir/llvm/library/LLVMOverrides.cpp.o /opt/local/libexec/llvm-3.7/lib/libLLVMLTO.a /opt/local/libexec/llvm-3.7/lib/libLLVMObjCARCOpts.a /opt/local/libexec/llvm-3.7/lib/libLLVMLinker.a /opt/local/libexec/llvm-3.7/lib/libLLVMBitWriter.a /opt/local/libexec/llvm-3.7/lib/libLLVMIRReader.a /opt/local/libexec/llvm-3.7/l
ld: unknown option: --version-script=/opt/local/var/macports/build/_Volumes_Home_jeremy_src_macports_trunk_dports_www_webkit-gtk-devel/webkit-gtk-devel/work/webkitgtk-2.11.2/Source/JavaScriptCore/llvm/library/libllvmForJSC.version
clang: error: linker command failed with exit code 1 (use -v to see invocation)

---

There are two uses of --version-script in the tree.  The first one in Source/cmake/OptionsGTK.cmake looks to correctly guarded:

    if (NOT CMAKE_SYSTEM_NAME MATCHES "Darwin")
        set(WebKit2_VERSION_SCRIPT "-Wl,--version-script,${CMAKE_MODULE_PATH}/gtksymbols.filter")
    endif ()

There is another in Source/JavaScriptCore/CMakeLists.txt which is not correct:
    target_link_libraries(llvmForJSC ${LLVM_STATIC_LIBRARIES} ${LLVM_SYSTEM_LIBRARIES} -Wl,--version-script=${JAVASCRIPTCORE_DIR}/llvm/library/libllvmForJSC.version)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160101/499e40a6/attachment.html>


More information about the webkit-unassigned mailing list