Bug 136626 - WEbKitGTK 2.5.3 - undefined references on build
Summary: WEbKitGTK 2.5.3 - undefined references on build
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKitGTK (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Linux
: P2 Major
Assignee: Nobody
Depends on:
Reported: 2014-09-08 06:09 PDT by Dominique Leuenberger
Modified: 2017-03-11 11:04 PST (History)
5 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Dominique Leuenberger 2014-09-08 06:09:45 PDT
While building webkitgtk 2.5.3, the build on openSUSE aborts with:

[ 4158s] /home/abuild/rpmbuild/BUILD/webkitgtk-2.5.3/Source/WebKit2/WebProcess/gtk/WebGtkInjectedBundleMain.cpp:34: undefined reference to `WebKit::WebGtkExtensionManager::shared()'
[ 4158s] /home/abuild/rpmbuild/BUILD/webkitgtk-2.5.3/Source/WebKit2/WebProcess/gtk/WebGtkInjectedBundleMain.cpp:34: undefined reference to `WebKit::WebGtkExtensionManager::initializ
e(OpaqueWKBundle const*, void const*)'
[ 4158s] collect2: error: ld returned 1 exit status
Comment 1 Alberto Garcia 2014-09-10 04:34:26 PDT
What's the architecture? x86? amd64? What are the build (cmake) options that you are using?
Comment 2 Dominique Leuenberger 2014-09-10 13:23:18 PDT
I saw this on i586 and x86_64

the standard %cmake macro used on openSUSE expands to:

    /usr/bin/cmake .. \
        -DCMAKE_INSTALL_LIBDIR:PATH=/usr/lib64 \
        -DINCLUDE_INSTALL_DIR:PATH=/usr/include \
        -DLIB_INSTALL_DIR:PATH=/usr/lib64 \
        -DSHARE_INSTALL_PREFIX:PATH=/usr/share \
        -DCMAKE_BUILD_TYPE=None \
        -DCMAKE_C_FLAGS="${CFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables} -DNDEBUG" \
        -DCMAKE_CXX_FLAGS="${CXXFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables} -DNDEBUG" \
        -DCMAKE_Fortran_FLAGS="${FFLAGS:--O2 -g -m64 -fmessage-length=0 -D_FORTIFY_SOURCE=2 -fstack-protector -funwind-tables -fasynchronous-unwind-tables} -DNDEBUG" \
        -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" \
        -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" \
        -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,--no-undefined -Wl,-z,now" \
%if "lib64" == "lib64" 
        -DLIB_SUFFIX=64 \
        -DCMAKE_MODULES_INSTALL_DIR=/usr/share/cmake/Modules \

for now I worke around it by overwriting 
  -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now" \
  -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now" \
  -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now"

Comment 3 Carlos Garcia Campos 2014-09-10 23:57:00 PDT
Could it be that it's not using the symbols file? There should be something like -Wl,--version-script,${CMAKE_MODULE_PATH}/gtksymbols.filter
Comment 4 Alberto Garcia 2014-12-08 03:31:11 PST
(In reply to comment #2)
> for now I worke around it by overwriting
>   -DCMAKE_EXE_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now" \
>   -DCMAKE_MODULE_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now" \
>   -DCMAKE_SHARED_LINKER_FLAGS="-Wl,--as-needed -Wl,-z,now"
> )

I can build 2.6.x without any of these, check if you have the version script somewhere in the command-line that fails, I have this: