In a 64 bits systems, it fails if I try to compile a configure test with:
$ gcc -m32 -o conftest -L/usr/lib/i386-linux-gnu/ conftest.c -lfreetype
/usr/bin/ld: cannot find -lfreetype
collect2: ld returned 1 exit status
but it is successful if I do:
$ gcc -m32 -o conftest conftest.c /usr/lib/i386-linux-gnu/libfreetype.so.6
Why can’t ld find 32bit libfreetype.so.6 in the first case?
There’s a difference between the runtime and development system. The linker is looking for
libfreetype.soand is not finding it. The program at runtime is looking forlibfreetype.so.6and finds it.You should install the FreeType development package.
Before going to that much effort, though, you can validate this hypothesis by first checking that
libfreetype.sodoes not exist in/usr/lib/i386-linux-gnu, and then by using root privileges to do:and then retrying the first command line.
If that works, then remove the symlink just created and then install the FreeType development package.