Re: Cross compiling ARM sysroot
Steven Descheemaeker <[email protected]>
| Newsgroups | gmane.comp.video.graphicsmagick.help |
|---|---|
| Message-ID | <1431940123.26473.26.camel@pco026> |
Francesco Aru schreef op do 14-05-2015 om 10:15 [+0200]:
> On 13/05/2015 16:46, Bob Friesenhahn wrote:
> > On Wed, 13 May 2015, Steven Descheemaeker wrote:
> > > I looked into the toolchain sysroot and there is a freetype-config
> > > executable. But the executable only has 1 line of code : "exit 1". The
> > > path is correctly set in the toolchain environment script from my
> > > toolchain so that might be the problem that freetype is not build
> > > correctly? Or is it possible that this only does exit 1?
> > The 'exit 1' definitely does not cut it. I wonder how such a file
> > could have been produced?
> >
> > This is the normal expected form of the output:
> >
> > % freetype-config --cflags
> > -I/usr/include/freetype2
> >
> > % freetype-config --libs
> > -L/usr/lib/x86_64-linux-gnu -lfreetype -lz -lpng12
> >
> > The 'sysroot' value is known by the compiler so these sort of options
> > can still work when cross-compiling.
> >
> > > I looked into your cross-compile solutions, and in my toolchain there is
> > > also a script for config site. There are a lot of vars in that file, but
> > > not specific for GM. I configured GM in cross-compile env and looked
> > > into the cache file, but I have no idea what is right/wrong (since I
> > > have a site config in the toolchain directory). You have any idea which
> > > vars are correct for freetype/ghostscript, or if there is a sysroot
> > > variable ?
> > There is no sysroot variable. Some things might need to be learned
> > via trial/error.
> >
> > It may be that some GraphicsMagick configure script tests are not
> > properly saving/using cache variables. I will look into that.
> >
> > Bob
>
> Below the Yocto 1.4 GraphicsMagick recipe and the patch I use.
> Hope this helps.
>
>
> /* recipe graphicsmagick_1.3.21.bb */
>
> DESCRIPTION = "GraphicsMagick is an image convertion tools"
> SECTION = "console/utils"
> LICENSE = "GraphicsMagick"
> LIC_FILES_CHKSUM =
> "file://Copyright.txt;md5=4a6c2bb033f63e159cb036de999593a6"
> DEPENDS = "fontconfig freetype"
>
> PR = "r1"
>
> SRC_URI =
> "ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-${PV}.tar.gz \
> file://configure_freetype2.patch \
> "
> SRC_URI[md5sum] = "331b365619874c402567dbc8f6f6065d"
> SRC_URI[sha256sum] =
> "84ddfa0c1b5bf47db8d7d2937d4ac2fdce5e45acfd7d8a5e6a2387162312c394"
>
> S = "${WORKDIR}/GraphicsMagick-${PV}"
>
> inherit autotools binconfig pkgconfig
>
> EXTRA_OECONF = "--program-prefix= --enable-shared --disable-static
> --without-x --without-perl --disable-openmp --without-magick-plus-plus
> --disable-largefile --without-jbig --without-webp --without-xml
> --without-bzlib --without-jpeg --without-jp2 --without-tiff
> --without-png --without-zlib"
>
>
> FILES_${PN} += "${libdir}/GraphicsMagick-${PV}/modules/*/*.so \
> ${libdir}/GraphicsMagick-${PV}/modules/*/*.la \
> ${libdir}/GraphicsMagick-${PV}/modules/filters \
> ${libdir}/GraphicsMagick-${PV}/modules/coders \
> ${libdir}/GraphicsMagick-${PV}/config/ \
> ${datadir}/GraphicsMagick-${PV}"
>
> FILES_${PN}-dev += "${libdir}/GraphicsMagick-${PV}/modules/*/*.a"
>
> FILES_${PN}-dbg += "${libdir}/GraphicsMagick-${PV}/modules/*/.debug/*"
>
> BBCLASSEXTEND = "native"
>
> LEAD_SONAME = "libGraphicsMagick.so.*"
>
> do_configure_prepend() {
> export ac_cv_sys_file_offset_bits=yes
> }
>
>
> /* patch configure_freetype2.patch */
>
> diff -uNr GraphicsMagick-1.3.21/orig/configure.ac
> GraphicsMagick-1.3.21/configure.ac
> --- GraphicsMagick-1.3.21.orig/configure.ac 2015-01-16
> 15:00:11.452315111 +0100
> +++ GraphicsMagick-1.3.21.orig/configure.ac 2015-01-16
> 15:03:21.544792189 +0100
> @@ -2277,8 +2277,10 @@ if test "$with_freetype" != 'no'; then
> if test -n "$freetype_config"; then
> freetype_prefix=`${freetype_config} --prefix`
> freetype_exec_prefix=`${freetype_config} --exec-prefix`
> - LDFLAGS="$LDFLAGS -L${freetype_exec_prefix}/lib"
> - CPPFLAGS="$CPPFLAGS -I${freetype_prefix}/include/freetype2"
> + # LDFLAGS="$LDFLAGS -L${freetype_exec_prefix}/lib"
> + LDFLAGS="$LDFLAGS -L${lt_sysroot}/usr/lib"
> + # CPPFLAGS="$CPPFLAGS -I${freetype_prefix}/include/freetype2"
> + CPPFLAGS="$CPPFLAGS -I${lt_sysroot}/usr/include/freetype2 -I
> ${lt_sysroot}/usr/include"
> fi
>
> dnl First see if there is a library
>
>
> Francesco Aru
> www.dwave.it
> DWave Studio Associato di Ingegneria
> P.le Castagnara, 17 - 35010 - Cadoneghe (PD) - ITALY
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________ Graphicsmagick-help mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/graphicsmagick-help
I tried your recipe (was not that different from mine except the
freetype2 patch), and now it works! The only thing I had to change was
to enable png and jpeg library (since my application works with those 2
file types).
I really appreciate you shared your recipe !
kind regards
--
Steven Descheemaeker
Software developer
Limotec BVBA
Bosstraat 21
8570 Vichte
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y