X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 	tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <4A3AABA4.2010709@gmail.com>
Date: Thu, 18 Jun 2009 22:03:32 +0100
From: Dave Korn <dave.korn.cygwin@googlemail.com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: help? compile error cygwin 1.7, multiple definition
References: <4A3A9687.6050602@gmail.com> <4A3AA270.6090103@cygwin.com>
In-Reply-To: <4A3AA270.6090103@cygwin.com>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Larry Hall (Cygwin) wrote:
> Ian Kelling wrote:

>> /usr/bin/g++ -g -O2 -o src/mpd.exe  src_mpd-input_stream.o (... about
>> a page of other .o files ....) -Wl,--enable-auto-import -lm  -lFLAC
>> -lm -lgthread-2.0 -lglib-2.0 -lintl -liconv
>>
>> I added "-Wl,--enable-auto-import" which removes some other messages
>> which don't seem to be the primary problem. Here is the output:
>>
>> src_mpd-file_input_plugin.o: In function `g_bit_nth_lsf':
>> /usr/include/glib-2.0/glib/gutils.h:277: multiple definition of
>> `_g_bit_nth_lsf'
>> src_mpd-input_stream.o:/usr/include/glib-2.0/glib/gutils.h:277: first
>> defined here
>> src_mpd-file_input_plugin.o: In function `g_bit_nth_msf':
>> /usr/include/glib-2.0/glib/gutils.h:290: multiple definition of
>> `_g_bit_nth_msf'
>> src_mpd-input_stream.o:/usr/include/glib-2.0/glib/gutils.h:290: first
>> defined here
> 
> This sounds allot like this bug to me:
> 
> <https://bugzilla.redhat.com/show_bug.cgi?id=428865>
> 
> Since Cygwin's glib2 is only at 2.10.3, you'll either need to wait for
> an update of this package or build a newer one yourself.

  Hack: in /usr/include/glib-2.0/glib/gutils.h, at this point:

    99  #elif defined (__GNUC__)
   100  #  define G_INLINE_FUNC extern inline
   101  #elif defined (G_CAN_INLINE)

delete 'extern' from line 100.  (Then rebuild from clean.)

    cheers,
      DaveK


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

