[webkit-gtk] webkit-gtk-2.4.2 build failure: multiple definition of read, readlink, getcwd, etc.

Leonardo Taccari iamleot at gmail.com
Sat May 17 13:33:19 PDT 2014


Hello to the entire webkit-gtk community!
I am a NetBSD[0] user and a pkgsrc[1] user and maintainer...
Our www/webkit-gtk[2] in pkgsrc is a bit outdated and so I am trying to
update it altough the building failes, here the interesting parts of the
log:

[...]
CXX      DerivedSources/WebCore/libWebCoreSVG_la-JSSVGViewSpec.lo
GEN      DerivedSources/WebCore/JSSVGVKernElement.h
CXX      DerivedSources/WebCore/libWebCoreSVG_la-JSSVGVKernElement.lo
GEN      DerivedSources/WebCore/JSSVGZoomAndPan.h
CXX      DerivedSources/WebCore/libWebCoreSVG_la-JSSVGZoomAndPan.lo
GEN      DerivedSources/WebCore/JSSVGZoomEvent.h
CXX      DerivedSources/WebCore/libWebCoreSVG_la-JSSVGZoomEvent.lo
CXXLD    libWebCoreSVG.la
CXXLD    libwebkitgtk-1.0.la
./.libs/libWebCore.a(libWebCore_la-GResourceBundle.o): In function `read':
GResourceBundle.c:(.text+0x0): multiple definition of `read'
./.libs/libPlatformGtk.a(libPlatformGtk_la-GtkVersioning.o):GtkVersioning.c:(.text+0x0): first defined here
./.libs/libWebCore.a(libWebCore_la-GResourceBundle.o): In function `readlink':
GResourceBundle.c:(.text+0x40): multiple definition of `readlink'
./.libs/libPlatformGtk.a(libPlatformGtk_la-GtkVersioning.o):GtkVersioning.c:(.text+0x40): first defined here
./.libs/libWebCore.a(libWebCore_la-GResourceBundle.o): In function `getcwd':
GResourceBundle.c:(.text+0x80): multiple definition of `getcwd'
./.libs/libPlatformGtk.a(libPlatformGtk_la-GtkVersioning.o):GtkVersioning.c:(.text+0x80): first defined here
./.libs/libWebCoreGtk.a(libWebCoreGtk_la-gtk2xtbin.o): In function `read':
gtk2xtbin.c:(.text+0x890): multiple definition of `read'
./.libs/libPlatformGtk.a(libPlatformGtk_la-GtkVersioning.o):GtkVersioning.c:(.text+0x0): first defined here
./.libs/libWebCoreGtk.a(libWebCoreGtk_la-gtk2xtbin.o): In function `readlink':
gtk2xtbin.c:(.text+0x8d0): multiple definition of `readlink'
./.libs/libPlatformGtk.a(libPlatformGtk_la-GtkVersioning.o):GtkVersioning.c:(.text+0x40): first defined here
./.libs/libWebCoreGtk.a(libWebCoreGtk_la-gtk2xtbin.o): In function `getcwd':
gtk2xtbin.c:(.text+0x910): multiple definition of `getcwd'
./.libs/libPlatformGtk.a(libPlatformGtk_la-GtkVersioning.o):GtkVersioning.c:(.text+0x80): first defined here
./.libs/libWebCoreGtk.a(libWebCoreGtk_la-gtk2xtbin.o): In function `gets':
gtk2xtbin.c:(.text+0x940): multiple definition of `gets'
./.libs/libPlatformGtk.a(libPlatformGtk_la-GtkVersioning.o):GtkVersioning.c:(.text+0xb0): first defined here
./.libs/libWebCoreGtk.a(libWebCoreGtk_la-gtk2xtbin.o): In function `fgets':
gtk2xtbin.c:(.text+0x970): multiple definition of `fgets'
./.libs/libPlatformGtk.a(libPlatformGtk_la-GtkVersioning.o):GtkVersioning.c:(.text+0xe0): first defined here
collect2: error: ld returned 1 exit status
GNUmakefile:40295: recipe for target 'libwebkitgtk-1.0.la' failed
gmake[1]: *** [libwebkitgtk-1.0.la] Error 1
gmake[1]: Leaving directory '/tmp/pkgsrc/wip/webkit-gtk/work/webkitgtk-2.4.2'
GNUmakefile:25678: recipe for target 'all' failed
gmake: *** [all] Error 2
*** Error code 2

Stop.
make: stopped in /usr/pkgsrc/wip/webkit-gtk
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/wip/webkit-gtk
[...]

I am building webkit-gtk with gcc-4.8 under NetBSD/i386 6.1.4.
Using grep(1) in the source code does not help (I am not able to find any
redefinition as pointed by ld).

You can find the wip package (the one I am trying to build) here:

 http://pkgsrc-wip.cvs.sourceforge.net/viewvc/pkgsrc-wip/wip/webkit-gtk/

Webkit is build passing the following configure arguments:

 --with-target=x11
 --with-font-backend=freetype
 --disable-geolocation
 --with-gtk=2.0
 --disable-webkit2

More information about gcc:

 $ /usr/pkg/gcc48/bin/gcc -v
 Using built-in specs.
 COLLECT_GCC=/usr/pkg/gcc48/bin/gcc
 COLLECT_LTO_WRAPPER=/usr/pkg/gcc48/libexec/gcc/i486--netbsdelf/4.8.2/lto-wrapper
 Target: i486--netbsdelf
 Configured with: ../gcc-4.8.2/configure --enable-languages='c obj-c++
 objc fortran c++' --enable-shared --enable-long-long
 --with-local-prefix=/usr/pkg/gcc48 --enable-libssp
 --enable-threads=posix --with-boot-ldflags='-static-libstdc++
 -static-libgcc -Wl,-R/usr/pkg/lib ' --with-gnu-ld --with-ld=/usr/bin/ld
 --with-gnu-as --with-as=/usr/bin/as --with-arch=i486 --with-tune=i486
 --enable-nls --with-libiconv-prefix=/usr --with-gmp=/usr/pkg
 --with-mpc=/usr/pkg --with-mpfr=/usr/pkg --with-cloog=/usr/pkg
 --enable-cloog-backend=isl --enable-__cxa_atexit
 --with-gxx-include-dir=/usr/pkg/gcc48/include/c++/
 --prefix=/usr/pkg/gcc48 --build=i486--netbsdelf --host=i486--netbsdelf
 --infodir=/usr/pkg/gcc48/info --mandir=/usr/pkg/gcc48/man
 Thread model: posix
 gcc version 4.8.2 (GCC)

Anyone has this or similar problems?
I would like to help fixing it in order to finally update webkit-gtk in
pkgsrc.


 [0]: http://www.netbsd.org/
 [1]: http://www.pkgsrc.org/
 [2]: http://pkgsrc.se/www/webkit-gtk


Thank you very much in advance!
Ciao,
L.


More information about the webkit-gtk mailing list