LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Error build pango with cairo support (http://www.linuxquestions.org/questions/linux-software-2/error-build-pango-with-cairo-support-522277/)

tuanphan 01-24-2007 03:54 AM

Error build pango with cairo support
 
Hi all,

I am trying to build Pango with Cairo support on Linux (Fedora Core 4). I already built and installed Cairo in my machine. I also exported PKG_CONFIG_PATH variable to the package and config as below. As output code below, I think Pango already found where Cairo is but just after it tell that it can't find some function in the library. I don't understand why. I check by hand in the Cairo libray and these functions did exist.

Please save your time and have a look the code and give me an advise.

Thanks and best regards,
Tuan Phan


[root@localhost build_pango]# ../configure --prefix=/usr/local/tuanphan/pango --with-cairo --enable-cairo
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for native Win32... no
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for c++... c++
checking whether we are using the GNU C++ compiler... yes
checking whether c++ accepts -g... yes
checking dependency style of c++... gcc3
checking for a sed that does not truncate output... /bin/sed
checking for egrep... grep -E
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for /usr/bin/ld option to reload object files... -r
checking for BSD-compatible nm... /usr/bin/nm -B
checking whether ln -s works... yes
checking how to recognise dependent libraries... pass_all
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking dlfcn.h usability... yes
checking dlfcn.h presence... yes
checking for dlfcn.h... yes
checking how to run the C++ preprocessor... c++ -E
checking for g77... no
checking for f77... no
checking for xlf... no
checking for frt... no
checking for pgf77... no
checking for fort77... no
checking for fl32... no
checking for af77... no
checking for f90... no
checking for xlf90... no
checking for pgf90... no
checking for epcf90... no
checking for f95... f95
checking whether we are using the GNU Fortran 77 compiler... yes
checking whether f95 accepts -g... yes
checking the maximum length of command line arguments... 32768
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for objdir... .libs
checking for ar... ar
checking for ranlib... ranlib
checking for strip... strip
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC
checking if gcc PIC flag -fPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking whether the gcc linker (/usr/bin/ld) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating libtool
appending configuration tag "CXX" to libtool
checking for ld used by c++... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking whether the c++ linker (/usr/bin/ld) supports shared libraries... yes
checking for c++ option to produce PIC... -fPIC
checking if c++ PIC flag -fPIC works... yes
checking if c++ static flag -static works... yes
checking if c++ supports -c -o file.o... yes
checking whether the c++ linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
appending configuration tag "F77" to libtool
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for f95 option to produce PIC... -fPIC
checking if f95 PIC flag -fPIC works... yes
checking if f95 static flag -static works... yes
checking if f95 supports -c -o file.o... yes
checking whether the f95 linker (/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking for some Win32 platform... no
checking for perl5... no
checking for perl... perl
checking for X... libraries /usr/X11R6/lib, headers /usr/X11R6/include
checking for gethostbyname... yes
checking for connect... yes
checking for remove... yes
checking for shmat... yes
checking for IceConnectionNumber in -lICE... yes
checking pkg-config is at least version 0.9.0... yes
checking for FONTCONFIG... yes
checking for freetype-config... /usr/bin/freetype-config
checking for FT_Get_Next_Char in -lfreetype... yes
checking for XFT... checking Carbon/Carbon.h usability... no
checking Carbon/Carbon.h presence... no
checking for Carbon/Carbon.h... no
checking for CAIRO... yes
checking for cairo_surface_write_to_png in -lcairo... no
checking for cairo_ps_surface_create in -lcairo... no
checking for cairo_pdf_surface_create in -lcairo... no
checking for cairo_xlib_surface_create in -lcairo... no
checking for cairo_win32_scaled_font_select_font in -lcairo... no
checking for cairo_ft_scaled_font_lock_face in -lcairo... no
checking for cairo_atsui_font_face_create_for_atsu_font_id in -lcairo... no

checking for GLIB... yes
checking for LIBTHAI... checking modules to link statically...
checking dynamic modules to build... arabic-fc,arabic-lang,basic-fc,basic-win32,basic-x,basic-atsui,hangul-fc,hebrew-fc,indic-fc,indic-lang,khmer-fc,syriac-fc,thai-fc,tibetan-fc (those built into Pango will be excluded)
checking for flockfile... yes
checking for strtok_r... yes
checking Whether to write dependencies into .pc files... no
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for unistd.h... (cached) yes
configure: creating ./config.status
config.status: creating Makefile
config.status: creating pango/Makefile
config.status: creating pango/mini-fribidi/Makefile
config.status: creating pango/opentype/Makefile
config.status: creating pango/pango.rc
config.status: creating pango/pangoft2.rc
config.status: creating pango/pangowin32.rc
config.status: creating modules/Makefile
config.status: creating modules/arabic/Makefile
config.status: creating modules/basic/Makefile
config.status: creating modules/hangul/Makefile
config.status: creating modules/hebrew/Makefile
config.status: creating modules/indic/Makefile
config.status: creating modules/khmer/Makefile
config.status: creating modules/syriac/Makefile
config.status: creating modules/thai/Makefile
config.status: creating modules/tibetan/Makefile
config.status: creating examples/Makefile
config.status: creating docs/Makefile
config.status: creating docs/version.xml
config.status: creating tools/Makefile
config.status: creating tests/Makefile
config.status: creating pango.pc
config.status: creating pangox.pc
config.status: creating pangowin32.pc
config.status: creating pangoft2.pc
config.status: creating pangoxft.pc
config.status: creating pangocairo.pc
config.status: creating pango-uninstalled.pc
config.status: creating pangox-uninstalled.pc
config.status: creating pangowin32-uninstalled.pc
config.status: creating pangoft2-uninstalled.pc
config.status: creating pangoxft-uninstalled.pc
config.status: creating pangocairo-uninstalled.pc
config.status: creating pango-zip.sh
config.status: creating tests/runtests.sh
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing pango/module-defs.h commands
config.status: executing pango/module-defs-x.c commands
config.status: executing pango/module-defs-fc.c commands
config.status: executing pango/module-defs-win32.c commands
config.status: executing pango/module-defs-atsui.c commands
config.status: executing pango/module-defs-lang.c commands
config.status: executing pango/pango-features.h commands
config.status: creating pango/pango-features.h
config.status: pango/pango-features.h is unchanged

ryandesign 02-13-2007 05:54 PM

What versions of pango and cairo are you using? I'm using pango 1.15.6 and cairo 1.3.12.

Quote:

./configure --prefix=/usr/local/tuanphan/pango --with-cairo --enable-cairo
Running pango 1.15.6's ./configure --help, I don't see any options --with-cairo or --enable-cairo so I don't think those do anything for you. I think pango uses cairo if it's available, and if not, it doesn't.

Maybe you need to tell it where you installed cairo?

Code:

CFLAGS="-I/where/you/installed/cairo/include" \
LDFLAGS="-L/where/you/installed/cairo/lib" \
./configure --prefix=/usr/local/tuanphan/pango

I recently started having this problem too:

Quote:

checking for CAIRO... yes
checking for cairo_surface_write_to_png in -lcairo... no
checking for cairo_ps_surface_create in -lcairo... no
checking for cairo_pdf_surface_create in -lcairo... no
checking for cairo_xlib_surface_create in -lcairo... no
checking for cairo_win32_scaled_font_select_font in -lcairo... no
checking for cairo_ft_scaled_font_lock_face in -lcairo... no
checking for cairo_atsui_font_face_create_for_atsu_font_id in -lcairo... no
(which is why I searched for the error message on Google and ended up finding this discussion thread). I did not have this problem compiling pango "normally" on Mac OS X, but as soon as I started trying to make a universal binary (containing both Intel and PowerPC code), I got the above errors. I don't know why it's happening. I worked around it by creating a config.cache file in the root of the pango directory with the following contents:

Code:

ac_cv_lib_cairo_cairo_surface_write_to_png=yes
ac_cv_lib_cairo_cairo_ps_surface_create=yes
ac_cv_lib_cairo_cairo_pdf_surface_create=yes
ac_cv_lib_cairo_cairo_xlib_surface_create=yes
ac_cv_lib_cairo_cairo_win32_scaled_font_select_font=no
ac_cv_lib_cairo_cairo_ft_scaled_font_lock_face=yes
ac_cv_lib_cairo_cairo_atsui_font_face_create_for_atsu_font_id=no

These values are correct for me; you may need to change the answers to apply to your situation. To use this file, you ./configure pango with the --config-cache option.

If anyone knows why pango isn't finding the cairo functions which really are there, or a cleaner way to work around this without needing a config.cache file, please let us know.


All times are GMT -5. The time now is 10:15 PM.