FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

DevilID library loading incorrect on linux

 
Post new topic   Reply to topic     Forum Index -> Derelict
View previous topic :: View next topic  
Author Message
Squall



Joined: 22 Oct 2007
Posts: 24

PostPosted: Wed May 21, 2008 9:41 am    Post subject: DevilID library loading incorrect on linux Reply with quote

derelict tries to load libIL.so on linux, which isn't present unless you have the development package installed -- even though the "release" package of devil is installed.

for example on ubuntu:
user@pandora:~$ aptitude search devil
i libdevil-dev - Cross-platform image loading and manipulation toolkit
i libdevil1c2 - DevIL image manipulation toolkit runtime support
user@pandora:~$ dpkg -S libIL.so
libdevil-dev: /usr/lib/libIL.so <-- Only in dev
libdevil1c2: /usr/lib/libIL.so.1.0.0
libdevil1c2: /usr/lib/libIL.so.1
user@pandora:~$


This is a similar problem to a previous post I made: "libfreetype loading on linux"


I don't know what the solution to this is properly.

Why does derelict dynamically load all the libraries it uses by the way?
Back to top
View user's profile Send private message
h3r3tic



Joined: 30 Mar 2004
Posts: 261
Location: Torun, Poland

PostPosted: Wed May 21, 2008 2:55 pm    Post subject: Reply with quote

Uh, I guess some lib names might be added to the IL loaders, but the long-term solution would probably be to have search path and library name wildcard matching...

Perhaps something similar to what I've done in Dog?
http://team0xf.com:8080/dog/file/1bdd270a6b3c/LoaderCommon.d
e.g.
Code:
appendLibSearchPaths(`.`, ``, `/usr/lib`, `/usr/local/lib`);
appendLibNames(`libGL.so`, `libGL.so.1.*`, `libGL.so.*`);
appendGluLibNames(`libGLU.so`, `libGLU.so.1.*`, `libGLU.so.*`);
Back to top
View user's profile Send private message MSN Messenger
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Wed May 21, 2008 6:30 pm    Post subject: Re: DevilID library loading incorrect on linux Reply with quote

Squall wrote:
Why does derelict dynamically load all the libraries it uses by the way?


You can find the answer to that on the index page of the docs. The short answer is that it allows more control over what do to if a shared lib isn't present on the user's system. FYI, the option to statically link with shared libraries will be available for most Derelict packages in future.
_________________
The One With D | The One With Aldacron | D Bits
Back to top
View user's profile Send private message Send e-mail
Squall



Joined: 22 Oct 2007
Posts: 24

PostPosted: Thu May 22, 2008 3:26 am    Post subject: Reply with quote

Thanks aldacron

Since static linking might be on the cards, presumably dynamic linking done via the standard dynamic loader would also be included? (as opposed to the current dlopen method)

In the mean time I can find ways round this, probably creating a local symlink and useing LD_LIBRARY_PATH or some such.
Back to top
View user's profile Send private message
aldacron



Joined: 05 May 2004
Posts: 1322
Location: Seoul, South Korea

PostPosted: Thu May 22, 2008 5:37 am    Post subject: Reply with quote

Squall wrote:

Since static linking might be on the cards, presumably dynamic linking done via the standard dynamic loader would also be included? (as opposed to the current dlopen method)


Well, that's essentially what I mean. I'm a Windows type, so I think in terms of statically linking to an import library rather than linking directly to a shared library as on Linux (though MingW supports passing DLLs on the command line in place of import libraries these days). But at the heart of it, it doesn't matter in D. The interface for linking with static and shared libraries is the same. So both will be supported. You can see this with the current DerelictFT trunk.
_________________
The One With D | The One With Aldacron | D Bits
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> Derelict All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group