Hi, Suzuki san.
a)
freetype-2.9.1 ... objs/.libs/libfreetype.so.6.16.1
freetype-2.9 ... objs/.libs/libfreetype.so.6.16.0
Is this what you need ?
b)
It may be caused in cc phase, but not in ld.
I once experienced the similar problem with "cc -fvisibility=hidden" on Oracle
cc.
For example, generating ftsystem.o
freetype-2.9.1:
libtool: compile: cc -m64 -I/tmp/freetype-2.9.1/objs -I./builds/unix
-I/tmp/freetype-2.9.1/include -c -g -fvisibility=hidden -I/usr/include/libpng14
"-DFT_CONFIG_CONFIG_H=<ftconfig.h>" -DFT2_BUILD_LIBRARY
"-DFT_CONFIG_MODULES_H=<ftmodule.h>" "-DFT_CONFIG_OPTIONS_H=<ftoption.h>"
builds/unix/ftsystem.c -KPIC -DPIC -o /tmp/freetype-2.9.1/objs/.libs/ftsystem.o
freetype-2.9:
libtool: compile: cc -m64 -I/tmp/freetype-2.9/objs -I./builds/unix
-I/tmp/freetype-2.9/include -c -g -I/usr/include/libpng14
"-DFT_CONFIG_CONFIG_H=<ftconfig.h>" -DFT2_BUILD_LIBRARY
"-DFT_CONFIG_MODULES_H=<ftmodule.h>" "-DFT_CONFIG_OPTIONS_H=<ftoption.h>"
builds/unix/ftsystem.c -KPIC -DPIC -o /tmp/freetype-2.9/objs/.libs/ftsystem.o
Tried to remove "-fvisibility=hidden", but failed with the following patch.
"-fvisibility=hidden" is still specified.
Where should I change to test it ?
=== From here, patch I tried ===
diff -ur ../freetype-2.9.1.orig/CMakeLists.txt ./CMakeLists.txt
--- ../freetype-2.9.1.orig/CMakeLists.txt 2018-05-01 19:45:45.000000000
+0000
+++ ./CMakeLists.txt 2018-05-03 17:28:12.766516654 +0000
@@ -337,7 +337,7 @@
set_target_properties(
freetype PROPERTIES
- C_VISIBILITY_PRESET hidden)
+ C_VISIBILITY_PRESET default)
target_compile_definitions(
freetype PRIVATE FT2_BUILD_LIBRARY)
diff -ur ../freetype-2.9.1.orig/builds/unix/configure ./builds/unix/configure
--- ../freetype-2.9.1.orig/builds/unix/configure 2018-05-02
06:34:47.000000000 +0000
+++ ./builds/unix/configure 2018-05-03 17:27:54.382195684 +0000
@@ -13416,7 +13416,9 @@
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fvisibility=hidden
compiler flag" >&5
$as_echo_n "checking for -fvisibility=hidden compiler flag... " >&6; }
orig_CFLAGS="${CFLAGS}"
+#ifndef __SUNPRO_C
CFLAGS="${CFLAGS} -fvisibility=hidden"
+#endif
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
diff -ur ../freetype-2.9.1.orig/builds/unix/configure.ac
./builds/unix/configure.ac
--- ../freetype-2.9.1.orig/builds/unix/configure.ac 2018-05-02
06:34:44.000000000 +0000
+++ ./builds/unix/configure.ac 2018-05-03 17:27:54.382907980 +0000
@@ -313,7 +313,9 @@
#
AC_MSG_CHECKING([for -fvisibility=hidden compiler flag])
orig_CFLAGS="${CFLAGS}"
+#ifndef __SUNPRO_C
CFLAGS="${CFLAGS} -fvisibility=hidden"
+#endif
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
AC_MSG_RESULT(yes),
CFLAGS="${orig_CFLAGS}"
diff -ur ../freetype-2.9.1.orig/builds/unix/configure.raw
./builds/unix/configure.raw
--- ../freetype-2.9.1.orig/builds/unix/configure.raw 2018-05-01
19:35:09.000000000 +0000
+++ ./builds/unix/configure.raw 2018-05-03 17:27:54.383361566 +0000
@@ -313,7 +313,9 @@
#
AC_MSG_CHECKING([for -fvisibility=hidden compiler flag])
orig_CFLAGS="${CFLAGS}"
+#ifndef __SUNPRO_C
CFLAGS="${CFLAGS} -fvisibility=hidden"
+#endif
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([],[])],
AC_MSG_RESULT(yes),
CFLAGS="${orig_CFLAGS}"
=== Untill here, patch I tried ===
Regards,
--- Kiyoshi
----- Original Message -----
>From: suzuki toshiya <[email protected]>
>To: Kiyoshi KANAZAWA <[email protected]>
>Cc: "[email protected]" <[email protected]>
>Date: 2018/5/3, Thu 15:59
>Subject: Re: [ft-devel] [freetype-2.9.1] FT_Init_FreeType is missing with cc
>on Solaris x64
>
>Dear Kanazawa-san,
>
>Thanks! It's my first experience to see Oracle's genuine
>binutils output.
>
>It seems that most symbols are not exposed; if you grep
>the nm_list, you can find FT_Init_FreeType, but its "Bind"
>attribute is LOCL (=local), not GLOB (=global).
>
>I'm afraid something goes wrong during when private symbols
>are hidden by linker script.
>
>In the case of gcc is used, GNU libtool invokes it to make
>shared library, like:
>gcc -shared -fPIC -DPIC <object file> -lz -lbz2 -lpng12 \
>-Wl,-soname -Wl,libfreetype.so.6 \
>-Wl,-version-script -Wl,/tmp/freetype2/objs/.libs/libfreetype.ver \
>-o libfreetype.so.6.6.1
>
>libfreetype.ver is a linker script, its contents is like:
>{ global:
>FTC_CMapCache_Lookup;
>FTC_CMapCache_New;
><snip>
>FT_Vector_Unit;
>TT_New_Context;
>TT_RunIns;
>local: *; };
>
>But, as you can see, this "linker script" technique is
>basically designed for GNU ld. I'm not sure what kind
>of technologies are available on Solaris. I guess
>GNU libtool fill this gap.
>
>Now the possibilities in my mind are 2:
>
>a) libfretype.ver (or something like that) is broken
>when you build freetype-2.9.1, but it is OK for freetype-2.9.
>
>b) your libfreetype.ver(s) are same between freetype-2.9
>and 2.9.1, but compiler or linker is invoked differently.
>
>==
>
>to check a), I have to ask you to compare objs/.libs/libfreetype.ver
>or something like that in freetype-2.9 and 2.9.1
>
>to check b), I have to ask you to take the command execution log
>for the building 2.9 and 2.9.1, and compare the command executed
>to make the shared library.
>
>If it's hard to see what I'm writing here, please let me
>know (or, if you prefer discussion in Japanese).
>
>Regards,
>mpsuzuki
>
>
>
>Kiyoshi KANAZAWA wrote:
>> Dear Suzuki san.
>>
>> % ./configure CC="cc -m64 -g3" CXX="CC -m64 -g3"
>> % make
>> % nm objs/.libs/libfreetype.so.6.16.1 > /tmp/nm_list
>>
>> nm_list is attached.
>>
>> Regards,
>>
>> --- Kiyoshi
>>
>> ----- Original Message -----
>> From: suzuki toshiya <[email protected]>
>> To: Kiyoshi KANAZAWA <[email protected]>
>> Cc: "[email protected]" <[email protected]>
>> Date: 2018/5/3, Thu 14:34
>> Subject: Re: [ft-devel] [freetype-2.9.1] FT_Init_FreeType is missing with cc
>> on Solaris x64
>>
>> Dear Kanazawa-san,
>>
>> I don't have same environment to reproduce the issue,
>> so I have to ask for more information (in my GNU/Linux
>> on amd64 + gcc, no such issue).
>>
>> Could you compile the library, with maximum debug symbols
>> (in the gcc case, "-ggdb -g3"), and execute "nm" to list
>> the symbols, and post the xz-compressed list?
>> In my case, the result is about 18kB, it would not not
>> harmful to this mailing list.
>>
>> Regards,
>> mpsuzuki
>>
>> Kiyoshi KANAZAWA wrote:
>>> Trying to install freetype-2.9.1 on Solaris x86/x64.
>>>
>>> With cc (Oracle's developerstudio12.6), FT_Init_FreeType seems to be missed
>>> from libfreetype.so.6.16.1.
>>>
>>> % ./configure CC="cc -m64" CXX="CC -m64"
>>> % make
>>> % make install
>>> % xclock
>>> ld.so.1: xclock: fatal: relocation error: file /usr/lib/64/libXft.so.2:
>>> symbol FT_Init_FreeType: referenced symbol not found
>>> Killed
>>>
>>>
>>> This does not happen in previous one, freetype-2.9 (with
>>> developerstudio12.6).
>>>
>>> But, this does not happen either in the latest one, freetype-2.9.1, when I
>>> use gcc 7.3.0.
>>>
>>>
>>> --- Kiyoshi
>>>
>>>
>>>
>>
>>
>>
>
>
>
>_______________________________________________
Freetype-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/freetype-devel