Open gaolibj opened 6 years ago
@jdekonin I know you've done a bunch of set up on AIX. Any suggestions on where to get freetype on AIX?
@gaolibj Have you looked at the detailed build instructions for AIX: https://github.com/eclipse/openj9/blob/master/buildenv/Build_Instructions_V8.md#aix ?
In particular, the list of packages to install via yum, which includes freetype: https://github.com/eclipse/openj9/blob/master/buildenv/aix/jdk8/yum_install_aix-ppc64.txt
I didn't know those instructions existed within openj9. They look close for sure. I've used and updated the AdoptOpenJDK ansible scripts for generating the internal and external AIX instances.
https://github.com/AdoptOpenJDK/openjdk-infrastructure/blob/master/ansible/playbooks/aix.yml
As you stated above, freetype comes via yum install.
We should probably link our build pages to the Adopt ansible scripts so that anyone can run the scripts if they want to setup a machine.
I follow the detailed build instructions for AIX : https://github.com/eclipse/openj9/blob/master/buildenv/Build_Instructions_V8.md#aix Yum shell doesn't work on my system. I install required packages one by one, including freetype. But the strange thing is that there is no libfreetype.so.
Following is the status of these two freetype packages. bash-4.4$ rpm -qa | grep freetype freetype2-2.6.3-1.ppc freetype2-devel-2.6.3-1.ppc
bash-4.4$ rpm -ql reetype2-2.6.3-1.ppc /opt/freeware/doc/freetype2-2.6.3 /opt/freeware/doc/freetype2-2.6.3/ChangeLog /opt/freeware/doc/freetype2-2.6.3/README /opt/freeware/lib/libfreetype.a /usr/lib/libfreetype.a
Can I know which package include libfreetype.so and where did you get the correct packages? I get package from https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/freetype2/
For 'lilykao' update, switch to another profile by mistake :-(
Is that the freetype
package or the freetype-devel
package? Sometimes there are differences in what's included in each.
Both packages are installed.
@jdekonin Any other ideas?
Any update? Just want to know which package include libfreetype.so and where did you get the correct packages? I get package from https://public.dhe.ibm.com/aix/freeSoftware/aixtoolbox/RPMS/ppc/freetype2/
I don't think you need libfreetype.so, it's just a poor error message in one of the OpenJDK scripts that assumes that libraries on AIX are shared objects with a .so suffix.
Did you install pkg-config and is it working? Try running pkg-config --exists --print-errors freetype2
. If that prints an error and returns non-zero then that's likely the problem. If it prints nothing (and returns 0) something else is wrong.
There is likely a package dependency missing or the wrong version for a package. I found this same problem with freetype and as @ymanton suggests pkg-config won't find it even though rpm says its installed. Yum gets the dependencies and correct versions for free, I don't believe I ever had it working via the rpm installer.
What problems were you having installing yum?
@jdekonin The yum issue I meant is command " yum shell yum_install_aix-ppc64.txt" at https://github.com/eclipse/openj9/blob/master/buildenv/aix/jdk10/yum_install_aix-ppc64.txt
Actually, I install the freetype by command 'yum install freetype2-2.6.3-1.ppc' and 'yum install install freetype2-devel-2.6.3-1.ppc" and only check the file list with rpm.
Anything wrong? Is there libfreetype.so on your working AIX system? or as @ymanton said it's just a poor error message in one of the OpenJDK scripts?
I found this error when running configure script. Is it obsolete ?
bash configure --with-freemarker-jar=/
https://github.com/eclipse/openj9/blob/master/buildenv/Build_Instructions_V10.md#aix
@ymanton Command 'pkg-config --exists --print-errors freetype2' prints nothing (and returns 0) . Is the configure scrip obsolete ? If so, where I can find the latest steps to set up an AIX machine? Thanks.
I think this is likely what you are hitting. The freetype package is actually being installed into /opt/freeware/lib
, so pkg-config needs to be told alternative locations because I think if you add --debug
you'll find that pkg-config is looking in /opt/freeware/lib64
.
Try export PKG_CONFIG_PATH=/opt/freeware/lib64/pkgconfig:/opt/freeware/lib/pkgconfig
and rerun the configure step.
The latest steps to setup an AIX machine are at AdoptOpenJDK/infrastructure:ansible/playbooks/aix.yml
I finally just tried this myself and it worked fine. In addition to what @jdekonin said, if your pkg-config knows that freetype2 is installed, have a look in your build/aix-ppc64-normal-server-release/config.log
file (search for freetype) to see what's wrong. Here's the output from mine:
configure:33882: checking for FREETYPE
configure:33889: $PKG_CONFIG --exists --print-errors "freetype2"
configure:33892: $? = 0
configure:33905: $PKG_CONFIG --exists --print-errors "freetype2"
configure:33908: $? = 0
configure:33943: result: yes
configure:33960: checking for freetype
configure:33962: result: yes (using pkg-config)
configure:36346: checking if we can compile and link with freetype
configure:36371: /opt/IBM/xlC/13.1.3/bin/xlC_r -o conftest -q64 -I/opt/freeware/include/freetype2 -q64 conftest.cpp -L/opt/freeware/lib -lfreetype >&5
configure:36371: $? = 0
configure:36373: result: yes
configure:36432: checking if we should bundle freetype
configure:36437: result: no
The configure script asks pkg-config for how to build against and link with freetype, so you can try the following commands:
$ pkg-config --libs freetype2
-L/opt/freeware/lib -lfreetype
$ pkg-config --cflags freetype2
-I/opt/freeware/include/freetype
Does this still need to be open?
I follow the full set of build instructions at OpenJ9 Build website.
Found error when running the configure script .
Actually, I have installed the freetype packages listed in yum_install_aix-ppc64.txt. But there is no libfreetype.so created.
Also tried to install freetype(not freetype2) on mac and the dynamic library is created successfully. Unfortunately, I haven't found freetype package for AIX 7.1. https://www.ibm.com/developerworks/aix/library/aix-toolbox/alpha.html
checking for gethostbyname... yes checking for connect... yes checking for remove... yes checking for shmat... yes checking for IceConnectionNumber in -lICE... yes checking for X11/extensions/shape.h... yes checking for X11/extensions/Xrender.h... yes checking for X11/extensions/XTest.h... yes checking for X11/Intrinsic.h... yes checking if XlinearGradient is defined in Xrender.h... yes checking for cups headers... yes checking fontconfig/fontconfig.h usability... yes checking fontconfig/fontconfig.h presence... yes checking for fontconfig/fontconfig.h... yes checking for FREETYPE... no configure: Found freetype include files at /usr/include/freetype2 using well-known location configure: Could not find /usr/lib/libfreetype.so. Ignoring location. configure: Found freetype include files at /usr/include/freetype2 using well-known location configure: Could not find /usr/lib/ppc64-linux-gnu/libfreetype.so. Ignoring location. configure: error: Could not find freetype! You might be able to fix this by running 'sudo yum install freetype-devel'.