After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 687980 - multiple definition of `SECMEM_pool_data_v1_0'
multiple definition of `SECMEM_pool_data_v1_0'
Status: RESOLVED FIXED
Product: gcr
Classification: Core
Component: General
3.6.x
Other OpenBSD
: Normal major
: ---
Assigned To: GNOME keyring maintainer(s)
GNOME keyring maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-11-09 11:46 UTC by Antoine Jacoutot
Modified: 2019-02-22 11:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gck: Remove duplicate defined symbol (806 bytes, patch)
2012-11-09 13:07 UTC, Stef Walter
committed Details | Review

Description Antoine Jacoutot 2012-11-09 11:46:18 UTC
Hi.

When compiling gcr on OpenBSD I end up with the following error:

libtool: link: cc -o .libs/test-gck-attributes -pthread -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -O2 -pipe -Wall -g -Wno-strict-aliasing -Wno-sign-compare test-gck-attributes.o /export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/gck/.libs/libgck-testable.a /export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/egg/.libs/libegg-test.a /export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/egg/.libs/libegg-hex.a -L.libs -lmock-test-module -lgio-2.0 -lgmodule-2.0 -lz -lgobject-2.0 -lgthread-2.0 -lffi -lglib-2.0 -lpcre -lintl -liconv -lp11-kit -lpthread -Wl,-rpath-link,/usr/local/lib
/export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/gck/.libs/libgck-testable.a(gck-misc.o)(.data.rel+0x0): In function `_gck_stringize_rv':
/export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/gck/gck-misc.c:132: multiple definition of `SECMEM_pool_data_v1_0'
test-gck-attributes.o(.data.rel+0x0):/export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/gck/tests/test-gck-attributes.c:34: first defined here
/export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/gck/.libs/libgck-testable.a(egg-secure-memory.o)(.text+0x13d9): In function `egg_secure_strdup_full':
/export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/egg/egg-secure-memory.c:1325: 
Error while executing cc -o .libs/test-gck-attributes -pthread -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -O2 -pipe -Wall -g -Wno-strict-aliasing -Wno-sign-compare test-gck-attributes.o /export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/gck/.libs/libgck-testable.a /export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/egg/.libs/libegg-test.a /export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/egg/.libs/libegg-hex.a -L.libs -lmock-test-module -lgio-2.0 -lgmodule-2.0 -lz -lgobject-2.0 -lgthread-2.0 -lffi -lglib-2.0 -lpcre -lintl -liconv -lp11-kit -lpthread -Wl,-rpath-link,/usr/local/lib

Note that this does not happen when compiling with GNU libtool.
OpenBSD has its own libtool and we need to use it because GNU libtool
has no support for -export-symbols-regex on this OS.
Comment 1 Stef Walter 2012-11-09 13:07:30 UTC
Created attachment 228562 [details] [review]
gck: Remove duplicate defined symbol

Could you test this patch and see if it does the trick?
Comment 2 Antoine Jacoutot 2012-11-09 13:59:03 UTC
(In reply to comment #1)
> Created an attachment (id=228562) [details] [review]
> gck: Remove duplicate defined symbol
> 
> Could you test this patch and see if it does the trick?

Stef, that helps but it still fails at the same spot, this time because of gcr-memory.c:

/export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/gcr/.libs/libgcr-testable.a(libgcr_base_3_la-gcr-memory.o)(.data.rel+0x0):/export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/gcr/gcr-memory.c:28: first defined here

If I remove EGG_SECURE_DEFINE_GLIB_GLOBALS at gcr-memory.c:28, then it all builds fine. If you think that's the correct way to do it, please do commit :-)
Thanks.
Comment 3 Stef Walter 2012-11-09 17:06:44 UTC
Could you post more of the output?
Comment 4 Antoine Jacoutot 2012-11-09 17:27:09 UTC
cc -DHAVE_CONFIG_H -I. -I../.. -I../.. -I../.. -DSRCDIR="\"/export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/gcr/tests\"" -DGCR_API_SUBJECT_TO_CHANGE -DGCK_API_SUBJECT_TO_CHANGE -DGCR_COMPILATION -pthread -I/usr/local/include/gio-unix-2.0/ -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include/gtk-3.0 -I/usr/local/include/at-spi2-atk/2.0 -I/usr/local/include/gio-unix-2.0/ -I/usr/X11R6/include -I/usr/local/include/cairo -I/usr/local/include/pango-1.0 -I/usr/local/include/harfbuzz -I/usr/local/include/atk-1.0 -I/usr/X11R6/include/pixman-1 -I/usr/X11R6/include/freetype2 -I/usr/include/dev/pci/drm -I/usr/local/include/gdk-pixbuf-2.0 -I/usr/local/include/libpng -pthread -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -I/usr/local/include -I/usr/local/include/p11-kit-1  -I/usr/local/include   -Wall   -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes   -Wnested-externs -Wpointer-arith        -Wcast-align -Wsign-compare     -O2 -pipe -Wall -g -Wno-strict-aliasing -Wno-sign-compare -MT frob-certificate.o -MD -MP -MF .deps/frob-certificate.Tpo -c -o frob-certificate.o frob-certificate.c
mv -f .deps/frob-certificate.Tpo .deps/frob-certificate.Po
/usr/bin/libtool   --tag=CC   --mode=link cc  -Wall     -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes   -Wnested-externs -Wpointer-arith        -Wcast-align -Wsign-compare     -O2 -pipe -Wall -g -Wno-strict-aliasing -Wno-sign-compare  -L/usr/local/lib  -o frob-certificate frob-certificate.o ../../gcr/libgcr-testable.la ../../egg/libegg.la ../../gck/libgck-testable.la -L/usr/local/lib -L/usr/X11R6/lib -lgtk-3 -lgdk-3 -lpangocairo-1.0 -lpangoft2-1.0 -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lpixman-1 -lpthread-stubs -lfontconfig -lexpat -lfreetype -lGL -lpng -lz -lm -lxcb-shm -lxcb-render -lxcb -lXrender -lX11 -lgdk_pixbuf-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl -liconv -L/usr/local/lib -pthread -lgmodule-2.0 -lgthread-2.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lintl -liconv -L/usr/local/lib -lgcrypt -lgpg-error -lintl -R/usr/local/lib -liconv -L/usr/local/lib -lp11-kit 
libtool: link: cc -o .libs/frob-certificate -pthread -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -O2 -pipe -Wall -g -Wno-strict-aliasing -Wno-sign-compare frob-certificate.o /export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/gcr/.libs/libgcr-testable.a /export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/egg/.libs/libegg.a /export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/gck/.libs/libgck-testable.a -L.libs -lgck-1 -lgtk-3 -latk-bridge-2.0 -latspi -lSM -ldbus-1 -lICE -lgdk-3 -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lpangocairo-1.0 -lpangoft2-1.0 -lharfbuzz -licule -licuuc -licudata -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lpixman-1 -lfontconfig -lexpat -lfreetype -lGL -lXxf86vm -lXext -lXdamage -lXfixes -ldrm -lstdc++ -lxcb-shm -lpthread-stubs -lXau -lXdmcp -lxcb-render -lXrender -lxcb -lX11 -lgdk_pixbuf-2.0 -lpng -lm -lz -lffi -lgmodule-2.0 -lgthread-2.0 -lpcre -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lgcrypt -lgpg-error -lintl -liconv -lp11-kit -lpthread -Wl,-rpath,/usr/local/lib,-rpath-link,/usr/local/lib,-rpath-link,/usr/X11R6/lib
/export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/gck/.libs/libgck-testable.a(gck-misc.o)(.data.rel+0x0): In function `_gck_stringize_rv':
/export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/gck/gck-misc.c:132: multiple definition of `SECMEM_pool_data_v1_0'
/export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/gcr/.libs/libgcr-testable.a(libgcr_base_3_la-gcr-memory.o)(.data.rel+0x0):/export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/gcr/gcr-memory.c:28: first defined here
/export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/gcr/.libs/libgcr-testable.a(libegg_la-egg-secure-memory.o)(.text+0x13d9): In function `egg_secure_strdup_full':
collect2: ld returned 1 exit status
Error while executing cc -o .libs/frob-certificate -pthread -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -O2 -pipe -Wall -g -Wno-strict-aliasing -Wno-sign-compare frob-certificate.o /export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/gcr/.libs/libgcr-testable.a /export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/egg/.libs/libegg.a /export/data/ports/pobj/gcr-3.6.1/gcr-3.6.1/gck/.libs/libgck-testable.a -L.libs -lgck-1 -lgtk-3 -latk-bridge-2.0 -latspi -lSM -ldbus-1 -lICE -lgdk-3 -lXinerama -lXi -lXrandr -lXcursor -lXcomposite -lpangocairo-1.0 -lpangoft2-1.0 -lharfbuzz -licule -licuuc -licudata -lpango-1.0 -latk-1.0 -lcairo-gobject -lcairo -lpixman-1 -lfontconfig -lexpat -lfreetype -lGL -lXxf86vm -lXext -lXdamage -lXfixes -ldrm -lstdc++ -lxcb-shm -lpthread-stubs -lXau -lXdmcp -lxcb-render -lXrender -lxcb -lX11 -lgdk_pixbuf-2.0 -lpng -lm -lz -lffi -lgmodule-2.0 -lgthread-2.0 -lpcre -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lgcrypt -lgpg-error -lintl -liconv -lp11-kit -lpthread -Wl,-rpath,/usr/local/lib,-rpath-link,/usr/local/lib,-rpath-link,/usr/X11R6/lib
Comment 5 Stef Walter 2012-11-12 07:30:11 UTC
Comment on attachment 228562 [details] [review]
gck: Remove duplicate defined symbol

Attachment 228562 [details] pushed as aeae080 - gck: Remove duplicate defined symbol
Comment 6 Antoine Jacoutot 2012-11-12 07:42:08 UTC
Thanks Stef. What about the second similar issue?
Comment 7 Antoine Jacoutot 2013-01-12 07:41:14 UTC
(In reply to comment #6)
> Thanks Stef. What about the second similar issue?

Hi Stef.

I'm coming back to this bug since I'm still seeing the following when compiling with OpenBSD libtool:
gck/gck-misc.c:132: multiple definition of `SECMEM_pool_data_v1_0'

Removing EGG_SECURE_DEFINE_GLIB_GLOBALS from gcr/gcr-memory.c does the trick but I'm not sure this is correct...
Comment 8 Stef Walter 2013-02-12 06:12:49 UTC
Pushed patch to remove duplicate symbol in gcr.