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 720415 - multiple definition of `__gmpn_sub_n'
multiple definition of `__gmpn_sub_n'
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: packages
git master
Other All
: Normal critical
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2013-12-13 18:49 UTC by Kyle
Modified: 2014-02-03 17:16 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Kyle 2013-12-13 18:49:31 UTC
I'm trying to cross-compile GStreamer with Cerbero (http://cgit.freedesktop.org/gstreamer/sdk/cerbero)

I'm compiling on Debian 64-bit for Windows 32-bit. I get the following error during compiling nettle:
i686-w64-mingw32-gcc -Wall -g -O2 -DWINVER=0x0501 -ggdb3 -Wno-pointer-sign -Wall -W   -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes   -Wpointer-arith -Wbad-function-cast -Wnested-externs -L.. -L/home/kyle/software/cerbero/builds/win32/2013.12.13/lib  ecc-modinv-test.o testutils.o ../nettle-internal.o -lhogweed -lnettle -lgmp  -o ecc-modinv-test.exe
/home/kyle/software/cerbero/builds/win32/2013.12.13/lib/libgmp.a(sub_n.o):/home/kyle/cerbero/sources/windows_x86/gmp-5.0.5/mpn/tmp-sub_n.s:82: multiple definition of `__gmpn_sub_n'
../libhogweed.dll.a(d000129.o):(.text+0x0): first defined here

I would be happy to provide further information if needed.
Comment 1 Kyle 2014-02-03 05:45:22 UTC
The library name is the main issue. It is possible to create a link to a .dll file with ln -s, but the link name needs to be in the format gmp.lib, and not libgmp.lib.

Renaming the lib to gmp.lib solves the issue.

For more information about linking dll files: https://sourceware.org/binutils/docs/ld/WIN32.html#index-direct-linking-to-a-dll-700


This all might be because Cerbero is not running gen_library_file for the recipe gmp. For most other recipes there are xxx.lib files for each, generated with gen_library_file.

I see two solutions:
  1. Have Cerbero generate the lib file using gendef and dlltool and discard the link that make install creates
  2. Patch gmp to create a gmp.lib link to libgmp-10.dll, NOT libgmp.lib
Comment 2 Kyle 2014-02-03 06:00:26 UTC
I apologize for the above post, it somehow made it onto the wrong bug.

This bug can be marked as resolved, because I cannot reproduce it with the latest Cerbero.