Monday, December 10, 2012

libQtGui.so: undefined reference to `FcFreeTypeQueryFace'

RedHat64 + qt sdk-offline-linux-x86_64 +FcFreeTypeQueryFace+Building application yields libQtGui.so: undefined reference to `FcFreeTypeQueryFace'

Cause for compiling the sources.

When my office have blocked access to internet for all RedHat workstations ,i could not download packages,and it was not possible to download from the PC side as well,because of the company security policies.so i had to download it from somewhere, get it,and compile in the workstation.


I started with invoking Qt_SDK_Lin64_offline_v1_1_2_en.run file for installing the SDK like this and got this error,
./Qt_SDK_Lin64_offline_v1_1_2_en.run: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by ./Qt_SDK_Lin64_offline_v1_1_2_en.run)



so i started compiling gcc4.3.2 and its dependent sources(mpfr-2.4.2.tar,gmp-4.3.2.tar,mpc-0.8.1.tar)
-----------------------------------------------------------------------------------------------------
1.mpfr-2.4.2.tar
mkdir mpfrbuild ; cd mpfrbuild ; ../mpfr-2.4.2/./configure --prefix=$PWD ;make -j8 && make install

2.gmp-4.3.2.tar
mkdir gmpbuild ; cd gmpbuild ; ../gmp-4.3.2/./configure --prefix=$PWD ;make -j8 && make install


3.mpc-0.8.1.tar
mkdir mpcbuild ; cd mpcbuild ; ../mpc-0.8.1/./configure --with-gmp-lib=/gmpbuild/lib --with-gmp-include=/gmpbuild/include --with-mpfr-include=/mpfrbuild/include --with-mpfr-lib=/mpfrbuild/lib --with-mpc-include=/mpcbuild/include --with-mpc-lib=/mpcbuild/lib --prefix=$PWD ;make -j8 && make install


4 Configuring and compiling the GCC 4.6.3
------------------------------------------

mkdir gcc463build ; cd gcc463build ; ../gcc-4.6.3/./configure --with-gmp-lib=/gmpbuild/lib --with-gmp-include=/gmpbuild/include --with-mpfr-include=/mpfrbuild/include --with-mpfr-lib=/mpfrbuild/lib --with-mpc-include=/mpcbuild/include --with-mpc-lib=/mpcbuild/lib --enable-languages=c,c++  --prefix=$PWD ;make -j8 && make install



Errors when compiling GCC sources
-------------------------------------
checking for suffix of object files... configure: error: in `../x86_64-unknown-linux-gnu/libgcc':
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

By adding mpc,mpfr,gmp Library paths to the LD_LIBRARY_PATH the make continues

to do
-----
for this error libQtGui.so: undefined reference to `FcFreeTypeQueryFace'


Download fontconfig-2.4.2.tar.gz+  make;make install
and  setenv /PATH/TO/THE/LIBRARY:$LD_LIBRARY_PATH
or  LIBS += -L/PATH/TO/fontconfig-2.4.2/lib in the .pro or CMakeLists.txt

more comments and information is available at http://theitdepartment.wordpress.com/2009/03/15/centos-qt-fcfreetypequeryface/

No comments:

Post a Comment