Problem building libsrvg-2.26.0

"Dalton, Tom" <[email protected]> Wed, 5 Aug 2009 14:48:48 +0200
Newsgroups gmane.comp.gnome.lib.librsvg.devel
Message-ID <B793AFABDBBE4C4EA18E8C772297745F01D6EA8B@derum205.emea.corp.eds.com>
Hi,

I'm having trouble getting the library to build. I have most of the
dependencies built but not 'installed' on my system, but I use the
environment variables PKG_CONFIG_PATH, LD_LIBRARY_FLAGS, CFLAGS and
LDFLAGS at configure and build time to get the right libraries. This
approach has worked for everything I've built so far, from libxml up to
wxWidgets.

Configuration of librsvg works ok, but when building, it looks like it's
going ok, but then it gets to rsvg-convert and it falls over, seemingly
because it's picking up the wrong version of freetype - specifically,
the build tries to link (output split onto multiple lines for clarity):

Libtool: link:
Gcc
-I(a load of my locally-built package includes)
-I/path/to/my/local/freetype/include/freetype2
-I(more locally-built includes)
-o .libs/rsvg-convert
rsvg-convert.o
-pthread
-L(a load of my locally-built package libs)
-L/path/to/my/local/freetype/lib -lfreetype /usr/lib/libfreetype.so 
-L(more locally-built libs)
/path/to/my/local/glib/lib/libgthread-2.0.so
-lrt
-L(more locally-built libs)
-L/usr/X11R6/lib
./.libs/librsvg-2.so
(more locally-built libs).so
-lpthread
(more locally-built libs).so
-lXrender
-lSM
-lICE
-lX11
(more locally-built libs).so
/usr/lib/libfreetype.so
/usr/lib/libexpat.so
(path/to/my/locally/built/freetype).so
-lz
(more locally-built libs).so
-ldl
(more locally-built libs).so
-lm
-pthread
-Wl,-rpath
-Wl,(local lib dir)
(above 2 lines repeated for my local libraries, including my local
freetype)

(/path/to/my/local/cairo/lib).so: undefined reference to
`FT_GlyphSlot_Embolden'
Collect2: ld returned 1 exit status
Make[2]: *** [rsvg-convert] Error 1


So it seems that something is grabbing /usr/lib/libfreetype.so before
grabbing my locally built version. I'm not sure why or at what stage
this occurs - I'm a bit new when it comes to libtool, but it seems that:

1. After extraction, the only file containing the word 'freetype' is the
configure script, and that's just using pkg-config to find freetype2
2. After configuration, the word freetype only occurs in the same files
as above, plus all the Makefiles
3. After the failed build, librsvg-2.so.26.0 has been built and exists
in the .libs dir, and running ldd on it looks ok.
3.1 Examination of the lines of the build output, comparing the links
that work (e.g. linking librsvg-2.so.26.0 and linking rsvg-convert),
it's definitely the freetype system lib vs freetype local lib. But at
this stage I get stuck - I don't know what's causing the addition of
"/usr/lib/libfreetype.so" to the link.

Hopefully someone has experienced this issue before?

Any help gratefully received!

Tom Dalton

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july

_______________________________________________
Librsvg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/librsvg-devel