bugCompact Disc Input and Control Library - Bugs: bug #26808, Multiple definitions of cddb_opts

 
 

bug #26808: Multiple definitions of cddb_opts

Submitter:  -*- <_74148>
Submitted:  Mon 15 Jun 2009 01:09:37 PM UTC
   
 
Category:  compilation Severity:  5 - Average
Item Group:  libcdio Status:  Fixed
Privacy:  Public Assigned to:  rocky
Open/Closed:  Closed
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 15 Jun 2009 01:37:46 PM UTC, comment #1: 

Thanks! Patch should now be committed, but please doublecheck to make sure.

Rocky Bernstein <rocky>
Group administrator
Mon 15 Jun 2009 01:09:37 PM UTC, original submission:  

When building libcdio in MinGW/MSys environment ld.exe complains:

/bin/sh ../libtool --tag=CC   --mode=link gcc  -g -O2 -Wall -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -Wunused -Wpointer-arith -Wwrite-strings -Wnested-externs -Wno-sign-compare  -no-undefined -L/usr/local/lib -o cd-info.exe cd-info.o cddb.o util.o getopt.o getopt1.o ../lib/iso9660/libiso9660.la ../lib/driver/libcdio.la -Lc:/msys/local/lib -lcddb -liconv    -liconv -lm -lwinmm -mwindows
gcc -g -O2 -Wall -Wchar-subscripts -Wmissing-prototypes -Wmissing-declarations -Wunused -Wpointer-arith -Wwrite-strings -Wnested-externs -Wno-sign-compare -o .libs/cd-info.exe cd-info.o cddb.o util.o getopt.o getopt1.o -mwindows  -L/usr/local/lib ../lib/iso9660/.libs/libiso9660.dll.a /d/src/libcdio-0.81/lib/driver/.libs/libcdio.dll.a ../lib/driver/.libs/libcdio.dll.a -Lc:/msys/local/lib /usr/local/lib/libcddb.dll.a -lws2_32 -lregex -liconv -lwinmm  -L/usr/local/lib
Info: resolving _cdio_loglevel_default by linking to __imp__cdio_loglevel_default (auto-import)
Info: resolving _track_format2str by linking to __imp__track_format2str (auto-import)
Info: resolving _discmode2str by linking to __imp__discmode2str (auto-importcddb.o: In function `init_cddb':
d:\src\libcdio-0.81\src/cddb.c:75: multiple definition of `cddb_opts'
cd-info.o:d:\src\libcdio-0.81\src/cd-info.c:383: first defined here

My guess is that the problem lies in the fact that cddb_opts is a variable declared in cddb.h and then included in two different object files (one - from cddb.c and another - from cd-info.c).

How to fix: see the patch attached.

P.S. configure tests for S_ISSOCK and S_ISLNK do not fail in this environment (they should, since both macros are not defined), at least with GCC 4.4.0. It seems that gcc considers "return S_ISLNK(0);" to be implicit declaration of IS_LNK() (if you try to compile it with -Wall, you'll see the warning) and doesn't think it an error, thus passing the test. Same for S_ISSOCK. As a result i had to hack config.sub to remove HAVE_S_ISLNK and HAVE_S_ISSOCK.

-*- <_74148>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by rocky (Posted a comment)
  • -email is unavailable- added by _74148 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-06-15 rocky StatusNone Fixed
        Assigned toNone rocky
        Open/ClosedOpen Closed
    2009-06-15 _74148 Attached File- Added 0001-Fixed-multiple-definitions-of-cddb_opts.patch, #18273

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code