OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: ld necessary? (was Re: help on compile/link flags)

From: patrick keshishian (pkeshishgmail.com)
Date: Wed Aug 11 2010 - 17:59:55 CDT


On Wed, Aug 11, 2010 at 6:54 AM, Edwin Eyan Moragas <eyanyndy.org> wrote:
> Hi David,
>
> CCing misc
>
> On Wed, Aug 11, 2010 at 9:50 PM, David Coppa <dcoppagmail.com> wrote:
>> On Wed, Aug 11, 2010 at 3:42 PM, Edwin Eyan Moragas <eyanyndy.org> wrote:
>>>> i'm trying to compile picoLisp on obsd 4.7.
>>>>
>>>> as suggest i passed an absolute path to dlopen(). dlerror() says
>>>> "File not found".
>>>
>>> i am stupid. the buffer used for the param to dlopen() was truncated.
>>> expanding it and passing the full absolute path, dlerror() returns
>>> "Cannot load specified object".
>>>
>>> clues, pointers?
>>
>> You can help us by posting the code that does the dlopen()
>
> if (!(h = dlopen("/home/eyan/src/lib/ht", RTLD_LAZY |
> RTLD_GLOBAL)) || !(h = dlsym(h,p))) {
> printf("%s\n", dlerror());
> printf("%s\n", buf);
> return NO;
> }

That error indicates that dependent libs of that lib aren't able to get
loaded.

Try setting LD_DEBUG and see if that helps trace down the problem.

--patrick