[poppler] Cross compiling to arm problem

Islam Hassan iah.vector at gmail.com
Sat Jun 23 01:20:41 PDT 2012


Based on your previous male, first, the line containing the error was
truncated because it's too long, it was supposed to be in line 425 (I
noticed that I mistyped it to 435 in a previous mail). Here it its:

libtool: link: arm-linux-g++  -fPIC -DPIC -shared -nostdlib
/home/islamhassan/Development/
Tools/embeddedLinux/crosstool-ng/arm-s5pv210-linux_2.6.35.7-glibc/arm-unknown-linux-gnueabi/sysroot/usr/lib/crti.o
/home/islamhassan/Development/Tools/embeddedLinux/crosstool-ng/arm-s5pv210-linux_2.6.35.7-glibc/lib/gcc/arm-unknown-linux-gnueabi/4.4.3/crtbeginS.o
.libs/SplashOutputDev.o .libs/JPXStream.o .libs/Annot.o .libs/Array.o
.libs/BuiltinFont.o .libs/BuiltinFontTables.o .libs/CachedFile.o
.libs/Catalog.o .libs/CharCodeToUnicode.o .libs/CMap.o .libs/DateInfo.o
.libs/Decrypt.o .libs/Dict.o .libs/Error.o .libs/FileSpec.o
.libs/FontEncodingTables.o .libs/Form.o .libs/FontInfo.o .libs/Function.o
.libs/Gfx.o .libs/GfxFont.o .libs/GfxState.o .libs/GlobalParams.o
.libs/Hints.o .libs/JArithmeticDecoder.o .libs/JBIG2Stream.o .libs/Lexer.o
.libs/Linearization.o .libs/Link.o .libs/LocalPDFDocBuilder.o .libs/Movie.o
.libs/NameToCharCode.o .libs/Object.o .libs/OptionalContent.o
.libs/Outline.o .libs/OutputDev.o .libs/Page.o .libs/PageTransition.o
.libs/Parser.o .libs/PDFDoc.o .libs/PDFDocEncoding.o .libs/PDFDocFactory.o
.libs/PopplerCache.o .libs/ProfileData.o .libs/PreScanOutputDev.o
.libs/PSTokenizer.o .libs/Rendition.o .libs/StdinCachedFile.o
.libs/StdinPDFDocBuilder.o .libs/Stream.o .libs/strtok_r.o
.libs/UnicodeMap.o .libs/UnicodeTypeTable.o .libs/ViewerPreferences.o
.libs/XRef.o .libs/PSOutputDev.o .libs/TextOutputDev.o
.libs/PageLabelInfo.o .libs/SecurityHandler.o .libs/Sound.o
.libs/XpdfPluginAPI.o  -Wl,--whole-archive ../goo/.libs/libgoo.a
../fofi/.libs/libfofi.a ../splash/.libs/libsplash.a -Wl,--no-whole-archive
-Wl,-rpath
-Wl,/home/islamhassan/Development/Tools/embeddedLinux/crosstool-ng/arm-s5pv210-linux_2.6.35.7-glibc/arm-unknown-linux-gnueabi/lib
-Wl,-rpath
-Wl,/home/islamhassan/Development/Tools/embeddedLinux/crosstool-ng/arm-s5pv210-linux_2.6.35.7-glibc/arm-unknown-linux-gnueabi/lib
-L/home/islamhassan/Development/embedded_linux/buildroot-2012.02/output/staging/usr/lib,-L/home/islamhassan/Development/embedded_linux/buildroot-2012.02/output/staging/lib
-lfreetype -lfontconfig
-L/home/islamhassan/Development/Tools/embeddedLinux/crosstool-ng/arm-s5pv210-linux_2.6.35.7-glibc/lib/gcc/arm-unknown-linux-gnueabi/4.4.3
-L/home/islamhassan/Development/Tools/embeddedLinux/crosstool-ng/arm-s5pv210-linux_2.6.35.7-glibc/lib/gcc/arm-unknown-linux-gnueabi/4.4.3/../../../../arm-unknown-linux-gnueabi/lib
-L/home/islamhassan/Development/Tools/embeddedLinux/crosstool-ng/arm-s5pv210-linux_2.6.35.7-glibc/arm-unknown-linux-gnueabi/sysroot/lib
-L/home/islamhassan/Development/Tools/embeddedLinux/crosstool-ng/arm-s5pv210-linux_2.6.35.7-glibc/arm-unknown-linux-gnueabi/sysroot/usr/lib
/home/islamhassan/Development/Tools/embeddedLinux/crosstool-ng/arm-s5pv210-linux_2.6.35.7-glibc/arm-unknown-linux-gnueabi/lib/libstdc++.so
-lm -lc -lgcc_s
/home/islamhassan/Development/Tools/embeddedLinux/crosstool-ng/arm-s5pv210-linux_2.6.35.7-glibc/lib/gcc/arm-unknown-linux-gnueabi/4.4.3/crtendS.o
/home/islamhassan/Development/Tools/embeddedLinux/crosstool-ng/arm-s5pv210-linux_2.6.35.7-glibc/arm-unknown-linux-gnueabi/sysroot/usr/lib/crtn.o
-O2 -pthread   -pthread -Wl,-soname -Wl,libpoppler.so.26 -o
.libs/libpoppler.so.26.0.0
/home/islamhassan/Development/Tools/embeddedLinux/crosstool-ng/arm-s5pv210-linux_2.6.35.7-glibc/lib/gcc/arm-unknown-linux-gnueabi/4.4.3/../../../../arm-unknown-linux-gnueabi/bin/ld:
cannot find -lfreetype

When I used the space separated LDFLAGS, configure gave me this error:

checking whether the C compiler works... no
configure: error: in `/home/islamhassan/
Development/embedded_linux/poppler/poppler-0.20.1':
configure: error: C compiler cannot create executables
See `config.log' for more details

but It didn't clarify the cause, I tried it now with sudo and the
configuration completed.

Third, I checked the config.log and you were right, configure used
"-I/usr/include/freetype2" so I added

FREETYPE_LIBS=-L/home/islamhassan/Development/embedded_linux/buildroot-2012.02/output/staging/usr/lib
FEETYPE_CFLAGS=-I/home/islamhassan/Development/embedded_linux/buildroot-2012.02/output/staging/usr/include/freetype2/freetype

So now this is how this the configure command looks like:

sudo ./configure --build=x86_64-pc-linux-gnu --host=arm-linux
--disable-libpng --disable-cairo-output --disable-poppler-glib
--disable-cms
CPPFLAGS=-I/home/islamhassan/Development/embedded_linux/buildroot-2012.02/output/staging/usr/include
LDFLAGS="-L/home/islamhassan/Development/embedded_linux/buildroot-2012.02/output/staging/usr/lib
-L/home/islamhassan/Development/embedded_linux/buildroot-2012.02/output/staging/lib"
CFLAGS=-I/home/islamhassan/Development/embedded_linux/buildroot-2012.02/output/staging/usr/include
PKG_CONFIG_LIBDIR=/home/islamhassan/Development/embedded_linux/buildroot-2012.02/output/staging/usr/lib/pkgconfig/
FREETYPE_LIBS=-L/home/islamhassan/Development/embedded_linux/buildroot-2012.02/output/staging/usr/lib
FREETYPE_CFLAGS=-I/home/islamhassan/Development/embedded_linux/buildroot-2012.02/output/staging/usr/include/freetype2/freetype

and this is the error I get now when I use make:

Making all in splash
make[2]: Entering directory
`/home/islamhassan/Development/embedded_linux/poppler/poppler-0.20.1/splash'
  CXX    Splash.lo
  CXX    SplashBitmap.lo
SplashBitmap.cc: In member function 'SplashError
SplashBitmap::writeAlphaPGMFile(char*)':
SplashBitmap.cc:252:38: warning: ignoring return value of 'size_t
fwrite(const void*, size_t, size_t, FILE*)', declared with attribute
warn_unused_result [-Wunused-result]
SplashBitmap.cc: In member function 'SplashError
SplashBitmap::writePNMFile(FILE*)':
SplashBitmap.cc:186:31: warning: ignoring return value of 'size_t
fwrite(const void*, size_t, size_t, FILE*)', declared with attribute
warn_unused_result [-Wunused-result]
SplashBitmap.cc:195:35: warning: ignoring return value of 'size_t
fwrite(const void*, size_t, size_t, FILE*)', declared with attribute
warn_unused_result [-Wunused-result]
  CXX    SplashClip.lo
  CXX    SplashFTFont.lo
In file included from SplashFTFont.cc:33:0:
/home/islamhassan/Development/embedded_linux/buildroot-2012.02/output/staging/usr/include/ft2build.h:56:38:
fatal error: freetype/config/ftheader.h: No such file or directory
compilation terminated.
make[2]: *** [SplashFTFont.lo] Error 1
make[2]: Leaving directory
`/home/islamhassan/Development/embedded_linux/poppler/poppler-0.20.1/splash'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory
`/home/islamhassan/Development/embedded_linux/poppler/poppler-0.20.1'
make: *** [all] Error 2

I couldn't attach the 'make V=1' log because it's truncated like the last
time so here's the last part of it:

libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I.. -I../poppler -I.. -I../goo
-I/home/islamhassan/Development/embedded_linux/buildroot-2012.02/output/staging/usr/include/freetype2/freetype
-I/home/islamhassan/Development/embedded_linux/buildroot-2012.02/output/staging/usr/include
-Wall -Woverloaded-virtual -Wnon-virtual-dtor -Wcast-align -fno-exceptions
-fno-check-new -fno-common -g -O2 -ansi -MT SplashFTFont.lo -MD -MP -MF
.deps/SplashFTFont.Tpo -c SplashFTFont.cc  -fPIC -DPIC -o
.libs/SplashFTFont.o
In file included from SplashFTFont.cc:33:0:
/home/islamhassan/Development/embedded_linux/buildroot-2012.02/output/staging/usr/include/ft2build.h:56:38:
fatal error: freetype/config/ftheader.h: No such file or directory
compilation terminated.
make[2]: *** [SplashFTFont.lo] Error 1

It says that "freetype/config/ftheader.h" doesn't exist. I checked it and
it's in ".../staging/usr/include/freetype2/freetype/config"

On Sat, Jun 23, 2012 at 3:33 AM, suzuki toshiya
<mpsuzuki at hiroshima-u.ac.jp>wrote:

> The CFLAGS that Islam given had used correctly.
>
> However, to use FreeType2 header file (not library, please be careful),
> giving the top directory like "/xxx/include" does not match with FreeType2
> convention. "/xxx/include/freetype2" should be used.
>
> The CFLAGS for FreeType2 is set by freetype2.pc (via pkg-config), or
> freetype-config, or, setting FREETYPE_CFLAGS and _LIBS. Please find
> configure --help output.
>
> If the freetype2 header files for host system is included, and,
> its version or configuration is different from the freetype2 for
> target, some incompatibility issues between header file / library
> file may occur. It should be avoided.
>
> BTW, looking the options that Islam gave, I'm afraid there was wrongly
> comma-separated options, like,
> -L/home/islamhassan/**Development/embedded_linux/**
> buildroot-2012.02/output/**staging/usr/lib,-L/home/**
> islamhassan/Development/**embedded_linux/buildroot-2012.**
> 02/output/staging/lib
> I suppose it should be separated by the space.
>
> Regards,
> mpsuzuki
>
>> On Sat, Jun 23, 2012 at 1:13 AM, suzuki toshiya
>> <mpsuzuki at hiroshima-u.ac.jp>**wrote:
>>
>>  Excuse me, does this file include the error message?
>>> I could not find the line saying "cannot find -lfreetype".
>>>
>>> In addition, I want to see you config.log again,
>>> Apparently freetype2 for host (x86-64) is tried to be used,
>>> as you can find "-I/usr/include/freetype2".
>>>
>>> Regards,
>>> mpsuzuki
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20120623/8e6cb329/attachment-0001.html>


More information about the poppler mailing list