From mint-bounce@lists.fishpool.fi  Tue Jun 22 08:09:42 2010
To: =?UTF-8?Q?Vincent_Rivi=C3=A8re?= <vincent.riviere@freesbee.fr>
Subject: [MiNT] Multiple definition errors (was: Error in SDL-1.2.13-1.m68kmint.rpm)
MIME-Version: 1.0
Date: Tue, 22 Jun 2010 14:07:18 +0200
From: m0n0 <ole@monochrom.net>
Cc: mint <mint@lists.fishpool.fi>
Reply-To: ole@monochrom.net
In-Reply-To: <4C1F22DE.9090109@freesbee.fr>
References: <c1f8aa1ebbbe7fbc295d64cb692653bb-EhVcX1lFRQVaRwYcDTpQCEFddQZLVF5dQUBFBDBTXF5bVkYJXl5oBlY6XF1YRkUEW1hQQg==-webmailer2@server02.webmailer.hosteurope.de> <4C1F22DE.9090109@freesbee.fr>
Message-ID: <7fd069e5bacb6b016b0610033b01d5eb-EhVcX1lFRQVaRwYcDTpQCEFddQZLVF5dQUBFBDBTXF5bVkYJX1xoAFddMl5dRkIAX1JdQ1A=-webmailer2@server02.webmailer.hosteurope.de>
X-Sender: ole@monochrom.net
User-Agent: Host Europe Webmailer/2.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=UTF-8
X-HE-Access: Yes
X-bounce-key: webpack.hosteurope.de;ole@monochrom.net;1277208438;190778f0;
X-ecartis-version: Ecartis v1.0.0
Sender: mint-bounce@lists.fishpool.fi
Errors-to: mint-bounce@lists.fishpool.fi
X-original-sender: ole@monochrom.net
Precedence: bulk
List-help: <mailto:ecartis@lists.fishpool.fi?Subject=help>
List-unsubscribe: <mailto:mint-request@lists.fishpool.fi?Subject=unsubscribe>
List-Id: <mint.lists.fishpool.fi>
X-List-ID: <mint.lists.fishpool.fi>
List-subscribe: <mailto:mint-request@lists.fishpool.fi?Subject=subscribe>
List-owner: <mailto:tjhukkan@fishpool.fi>
List-post: <mailto:mint@lists.fishpool.fi>


Am Montag, den 21.06.2010, 10:29 +0200 schrieb Vincent Rivière
>> I think SDL-1.2.12-1 RPM Contains an error in the sdl.pc pkg-config
>> file.
>> 
>> It defines the following linker flags: -lSDL  -lgem -lldg -lgem
> 
> You didn't say what the error is...
> 
> The fact -lgem appears twice ?

Ok, than this seems to be no failure. But I inspected the multiple
definition error a bit further. 
It's actually caused by the -Wl,--whole-archive flag. If I change it to
-Wl,--whole-archive it links OK, but then the lib is not working anymore. 

Details:

when linking netsurf:

The errors (no more...!):

/usr/lib//libgem.a(vq_calibrate.o):vq_calibrate.o:(.text+0x0): multiple
definition of `_vq_calibrate'
/usr/lib//libgem.a(vq_calibrate.o):vq_calibrate.o:(.text+0x0): first
defined here


    this does not work (above mentioned errors occur):
    LDFLAGS += -Wl,--whole-archive $(shell $(PKG_CONFIG) --libs libnsfb)
-Wl,--no-whole-archive 
    LDFLAGS += -lm
    
    this does link, but runtime error occurs (the lib says : sdl backend
not available)
    LDFLAGS += -Wl,--no-whole-archive $(shell $(PKG_CONFIG) --libs
libnsfb) -Wl,--no-whole-archive 
    LDFLAGS += -lm
    
    info:
    $(shell $(PKG_CONFIG) --libs libnsfb) expands to:
    -L/usr/local/lib -lnsfb -lSDL -lldg -lgem
    
    this is partial content of sdl.pc:
    Libs: -L${libdir}  -lSDL -lgem -lldg -lgem    
    
    if I change it to: 
    Libs: -L${libdir}  -lSDL -lldg
    
    and pass -lgem manually: 
    LDFLAGS += -lgem -lm
    
    everything works fine ( lib has sdl backend, no linker errors)  
    
Greets,
Ole


