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

libfreetype loading 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: Mon Nov 26, 2007 6:49 am    Post subject: libfreetype loading on linux Reply with quote

I use derelictFT which will load the freetype library on linux. The library it tries to load is: libfreetype.so

On debian and red-hat releases no such file name exists when the freetype2 package is installed rather they are called libfreetype.so.6 instead.


Code:

user@vm-fruitbat:/mnt/svn/gltest$ ./test
Exception: Failed to load shared library Failed to load shared library libfreetype.so


If, however, I install libfreetype-dev it works becuase a symlink from libfreetype.so to libfreetype.so.6 is created.

Infact libfreetype.so.6 is a sysmlink to libfreetype.so.6.3.16 on my system. Which leads me to think that derlict should be loading libfreetype.so.6 (for version 2) instead of libfreetype.so


Code:

root@vm-fruitbat:/usr/lib# ls -l *freetype*
-rw-r--r-- 1 root root 535106 2007-09-21 01:11 libfreetype.a
-rw-r--r-- 1 root root    820 2007-09-21 01:11 libfreetype.la
lrwxrwxrwx 1 root root     21 2007-11-26 12:34 libfreetype.so -> libfreetype.so.6.3.16 *** ONLY WITH libfreetype-dev ****
lrwxrwxrwx 1 root root     21 2007-10-22 12:33 libfreetype.so.6 -> libfreetype.so.6.3.16
-rw-r--r-- 1 root root 452396 2007-09-21 01:11 libfreetype.so.6.3.16



Presumably a released application should not require libfreetype6-dev

Code:

user@vm-fruitbat:~$ aptitude search libfreetype
i   libfreetype6                                - FreeType 2 font engine, shared library files
p   libfreetype6-dev                            - FreeType 2 font engine, development files
Back to top
View user's profile Send private message
aldacron



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

PostPosted: Mon Nov 26, 2007 8:09 pm    Post subject: Reply with quote

I really despise Linux shared library naming conventions. The Derelict loader's support for loading libraries by multiple names exists precisely because of this. It's just plain silly.

Anyway, thanks for reporting this. I'll update the freetype loader so that it tries to load the so.6 first.
_________________
The One With D | The One With Aldacron | D Bits
Back to top
View user's profile Send private message Send e-mail
aldacron



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

PostPosted: Mon Nov 26, 2007 8:22 pm    Post subject: Reply with quote

The fix is in the trunk.
_________________
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: Tue Nov 27, 2007 3:22 pm    Post subject: Reply with quote

Excelent, thanks!.

I don't fully understand the naming conventions and so I don't know what to make of them yet.
Back to top
View user's profile Send private message
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