Re: shared module chain under linux
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: shared module chain under linux
- From: Dimiter 'malkia' Stanev <malkia@...>
- Date: 2012年2月23日 12:00:35 -0800
I might be talking nonsense here (I'm also dealing with multi-platform
dll/so/dylib issues occasionally), but shouldn't Worker.so somehow
directly refer, or has implicit dynamic linking to core.so?
Wouldn't be worse if use GLOBAL, then you can't have the same symbol
exported by two different shared libs (and that's okay for most of the
cases, but how would plugins work, usually they have one entry point,
and most of the time it's the same symbol name)?
On 2/23/2012 5:45 AM, Gaspard Bucher wrote:
Hi there,
I am porting lubyk to Linux and I am stuck with undefined symbols. Here
is my scenario:
lib/lubyk/core.so contains the symbols for TimeRef class, including (nm
output):
00004734 T _ZN5lubyk7TimeRef7elapsedEv
000046a0 T _ZN5lubyk7TimeRefC1Ev
000046a0 T _ZN5lubyk7TimeRefC2Ev
00004704 T _ZN5lubyk7TimeRefD1Ev
00004704 T _ZN5lubyk7TimeRefD2Ev
lib/lubyk/Worker.so uses the TimeRef class.
Doing this fails under Linux but works in Mac OS X:
> require 'lubyk.core'
Loaded again lubyk.core.
---> 0.001955 ---- Here I try to use TimeRef from
lua_open_lubyk_core and it works fine.
> require 'lubyk.Worker'
error loading module 'lubyk.Worker' from file
'/home/gaspard/git/lubyk/deploy/linux/lib/lubyk/Worker.so':
/home/gaspard/git/lubyk/deploy/linux/lib/lubyk/Worker.so: undefined
symbol: _ZN5lubyk7TimeRef7elapsedEv
I am clueless: it seems the loaded Worker.so does not find an already
used symbol in the active binary...
Any idea ?
Gaspard