[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [ft] Linking against freetype in Linux
From: |
Kris |
Subject: |
Re: [ft] Linking against freetype in Linux |
Date: |
Thu, 27 Jun 2019 16:36:26 +0100 |
User-agent: |
Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 |
On 26/06/2019 22:59, Lawrence D'Oliveiro wrote:
On Wed, 26 Jun 2019 22:28:19 +0100, Kris wrote:
16892 stat("/usr/lib/gcc/x86_64-linux-gnu/8/libfreetype.so",
0x7ffeecb07830) = -1 ENOENT (No such file or directory)
Why is that "/8/” in the path? That’s not where it is on my Debian
Unstable system:
ldo@theon:~> ls -l /usr/lib/x86_64-linux-gnu/libfreetype.*
-rw-r--r-- 1 root root 1055516 Nov 22 2018
/usr/lib/x86_64-linux-gnu/libfreetype.a
lrwxrwxrwx 1 root root 21 Nov 22 2018
/usr/lib/x86_64-linux-gnu/libfreetype.so -> libfreetype.so.6.16.1
lrwxrwxrwx 1 root root 21 Nov 22 2018
/usr/lib/x86_64-linux-gnu/libfreetype.so.6 -> libfreetype.so.6.16.1
-rw-r--r-- 1 root root 763816 Nov 22 2018
/usr/lib/x86_64-linux-gnu/libfreetype.so.6.16.1
The unversioned symlink (and .a file) comes from the -dev package, while
the actual versioned library comes from the runtime package.
Just for fun, would you like to try a simple Python script?
import ctypes as ct
ft = ct.cdll.LoadLibrary("libfreetype.so.6")
hasattr(ft, "FT_Init_FreeType")
prints out
True
on my system.
Doesn't print anything on mine. And to check it was running, I put
print("Before")
and
print("After")
around that last line, to make sure. :)
Using that strace command, and explicitly adding the library path to the
command line ("-L/usr/lib/x86_64-linux-gnu") gives me the following
lines at the linker stage:
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/libfreetype.so", O_RDONLY) = 7
openat(AT_FDCWD, "/usr/lib/x86_64-linux-gnu/libfreetype.so", O_RDONLY) = 8
These lines DON'T report "ENOENT (No such file or directory)", so with
that plus the results of the Python script, suggest that the linker is
opening the libfreetype.so file OK, but then failing to find the symbol
within it!
Feels like that .so file can't be trusted ... unless it's some
incompatibility like a 32-bit/64-bit issue? (Just guessing at this point.)
Maybe I should start compiling my own Freetype libraries?
Might try a different Linux distro, too.
Cheers everyone!
Kris.
- [ft] Linking against freetype in Linux, Kris, 2019/06/26
- Re: [ft] Linking against freetype in Linux, Lawrence D'Oliveiro, 2019/06/26
- Re: [ft] Linking against freetype in Linux, armin, 2019/06/26
- Re: [ft] Linking against freetype in Linux, Kris, 2019/06/26
- Re: [ft] Linking against freetype in Linux, Nelson H. F. Beebe, 2019/06/26
- Re: [ft] Linking against freetype in Linux, Kris, 2019/06/26
- Re: [ft] Linking against freetype in Linux, Lawrence D'Oliveiro, 2019/06/26
- Re: [ft] Linking against freetype in Linux,
Kris <=
- Re: [ft] Linking against freetype in Linux, Lawrence D'Oliveiro, 2019/06/27
- Re: [ft] Linking against freetype in Linux, Kris, 2019/06/28