LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   cross compile "poppler-0.10.7" error (https://www.linuxquestions.org/questions/linux-newbie-8/cross-compile-poppler-0-10-7-error-732643/)

jeazh 06-13-2009 02:16 AM

cross compile "poppler-0.10.7" error
 
In my project, I need a share library of poppler.but when I cross compile it I get a error like this.

the crosstools is gcc-3.4.6-glibc-2.3.6

the command I used is :
./configure --host=arm-linux

the PATH of my crosstools is :

/usr/local/gcc-3.4.6-glibc-2.3.6/
I have used crosstool to compile a freetype2 and install it to the this path /usr/local/gcc-3.4.6-glibc-2.3.6/arm-linux/.

libtool: compile: arm-linux-g++ -DHAVE_CONFIG_H -I. -I.. -I../poppler -I.. -I../goo -I/usr/include/freetype2 -Wall -Wno-write-strings -g -O2 -MT SplashClip.lo -MD -MP -MF .deps/SplashClip.Tpo -c SplashClip.cc -fPIC -DPIC -o .libs/SplashClip.o
libtool: compile: arm-linux-g++ -DHAVE_CONFIG_H -I. -I.. -I../poppler -I.. -I../goo -I/usr/include/freetype2 -Wall -Wno-write-strings -g -O2 -MT SplashClip.lo -MD -MP -MF .deps/SplashClip.Tpo -c SplashClip.cc -o SplashClip.o >/dev/null 2>&1
mv -f .deps/SplashClip.Tpo .deps/SplashClip.Plo
/bin/sh ../libtool --tag=CXX --mode=compile arm-linux-g++ -DHAVE_CONFIG_H -I. -I.. -I../poppler -I.. -I../goo -I/usr/include/freetype2 -Wall -Wno-write-strings -g -O2 -MT SplashFTFont.lo -MD -MP -MF .deps/SplashFTFont.Tpo -c -o SplashFTFont.lo SplashFTFont.cc
libtool: compile: arm-linux-g++ -DHAVE_CONFIG_H -I. -I.. -I../poppler -I.. -I../goo -I/usr/include/freetype2 -Wall -Wno-write-strings -g -O2 -MT SplashFTFont.lo -MD -MP -MF .deps/SplashFTFont.Tpo -c SplashFTFont.cc -fPIC -DPIC -o .libs/SplashFTFont.o
In file included from /usr/include/freetype2/freetype/freetype.h:33,
from /usr/include/freetype2/freetype/ftoutln.h:25,
from SplashFTFont.cc:31:
/usr/include/freetype2/freetype/config/ftconfig.h:2:32: multiarch-dispatch.h: No such file or directory
In file included from /usr/include/freetype2/freetype/freetype.h:35,
from /usr/include/freetype2/freetype/ftoutln.h:25,
from SplashFTFont.cc:31:
/usr/include/freetype2/freetype/fttypes.h:176: error: `FT_UInt32' does not name a type
/usr/include/freetype2/freetype/fttypes.h:337: error: `ft_ptrdiff_t' does not name a type
In file included from /usr/include/freetype2/freetype/ftoutln.h:25,
from SplashFTFont.cc:31:
/usr/include/freetype2/freetype/freetype.h:650: error: `FT_UInt32' was not declared in this scope
/usr/include/freetype2/freetype/freetype.h:650: error: a function call cannot appear in a constant-expression
/usr/include/freetype2/freetype/freetype.h:650: error: `FT_UInt32' was not declared in this scope
/usr/include/freetype2/freetype/freetype.h:650: error: a function call cannot appear in a constant-expression
/usr/include/freetype2/freetype/freetype.h:650: error: `FT_UInt32' was not declared in this scope
/usr/include/freetype2/freetype/freetype.h:650: error: a function call cannot appear in a constant-expression
/usr/include/freetype2/freetype/freetype.h:650: error: `FT_UInt32' was not declared in this scope
/usr/include/freetype2/freetype/freetype.h:650: error: a function call cannot appear in a constant-expression
/usr/include/freetype2/freetype/freetype.h:650: error: enumerator value for `FT_ENCODING_NONE' not integer constant
/usr/include/freetype2/freetype/freetype.h:652: error: `FT_UInt32' was not declared in this scope
/usr/include/freetype2/freetype/freetype.h:652: error: a function call cannot appear in a constant-expression
/usr/include/freetype2/freetype/freetype.h:652: error: `FT_UInt32' was not declared in this scope
/usr/include/freetype2/freetype/freetype.h:652: error: a function call cannot appear in a constant-expression
/usr/include/freetype2/freetype/freetype.h:652: error: `FT_UInt32' was not declared in this scope
/usr/include/freetype2/freetype/freetype.h:652: error: a function call cannot appear in a constant-expression
/usr/include/freetype2/freetype/freetype.h:652: error: `FT_UInt32' was not declared in this scope
/usr/include/freetype2/freetype/freetype.h:652: error: a function call cannot appear in a constant-expression
/usr/include/freetype2/freetype/freetype.h:652: error: enumerator value for `FT_ENCODING_MS_SYMBOL' not integer constant
/usr/include/freetype2/freetype/freetype.h:653: error: `FT_UInt32' was not declared in this scope
/usr/include/freetype2/freetype/freetype.h:653: error: a function call cannot appear in a constant-expression
/usr/include/freetype2/freetype/freetype.h:653: error: `FT_UInt32' was not declared in this scope
/usr/include/freetype2/freetype/freetype.h:653: error: a function call cannot appear in a constant-expression
/usr/include/freetype2/freetype/freetype.h:653: error: `FT_UInt32' was not declared in this scope
/usr/include/freetype2/freetype/freetype.h:653: error: a function call cannot appear in a constant-expression
/usr/include/freetype2/freetype/freetype.h:653: error: `FT_UInt32' was not declared in this scope
/usr/include/freetype2/freetype/freetype.h:653: error: a function call cannot appear in a constant-expression
/usr/include/freetype2/freetype/freetype.h:653: error: enumerator value for `FT_ENCODING_UNICODE' not integer constant
/usr/include/freetype2/freetype/freetype.h:655: error: `FT_UInt32' was not declared in this scope
/usr/include/freetype2/freetype/freetype.h:655: error: a function call cannot appear in a constant-expression
/usr/include/freetype2/freetype/freetype.h:655: error: `FT_UInt32' was not declared in this scope
/usr/include/freetype2/freetype/freetype.h:655: error: a function call cannot appear in a constant-expression
/usr/include/freetype2/freetype/freetype.h:655: error: `FT_UInt32' was not declared in this scope
/usr/include/freetype2/freetype/freetype.h:655: error: a function call cannot appear in a constant-expression
/usr/include/freetype2/freetype/freetype.h:655: error: `FT_UInt32' was not declared in this scope
/usr/include/freetype2/freetype/freetype.h:655: error: a function call cannot appear in a constant-expression
/usr/include/freetype2/freetype/freetype.h:655: error: enumerator value for `FT_ENCODING_SJIS' not integer constant
/usr/include/freetype2/freetype/freetype.h:656: error: `FT_UInt32' was not declared in this scope
/usr/include/freetype2/freetype/freetype.h:656: error: a function call cannot appear in a constant-expression
/usr/include/freetype2/freetype/freetype.h:656: error: `FT_UInt32' was not declared in this scope
/usr/include/freetype2/freetype/freetype.h:656: error: a function call cannot appear in a constant-expression
/usr/include/freetype2/freetype/freetype.h:656: error: `FT_UInt32' was not declared in this scope
/usr/include/freetype2/freetype/freetype.h:656: error: a function call cannot appear in a constant-expression
/usr/include/freetype2/freetype/freetype.h:656: error: `FT_UInt32' was not declared in this scope
/usr/include/freetype2/freetype/freetype.h:656: error: a function call cannot appear in a constant-expression
/usr/include/freetype2/freetype/freetype.h:656: error: enumerator value for `FT_ENCODING_GB2312' not integer constant
/usr/include/freetype2/freetype/freetype.h:657: error: `FT_UInt32' was not declared in this scope
/usr/include/freetype2/freetype/freetype.h:657: error: a function call cannot appear in a constant-expression
/usr/include/freetype2/freetype/freetype.h:657: error: `FT_UInt32' was not declared in this scope
/usr/include/freetype2/freetype/freetype.h:657: error: a function call cannot appear in a constant-expression
/usr/include/freetype2/freetype/freetype.h:657: error: `FT_UInt32' was not declared in this scope
/usr/include/freetype2/freetype/freetype.h:657: error: a function call cannot appear in a constant-expression
/usr/include/freetype2/freetype/freetype.h:657: error: `FT_UInt32' was not declared in this scope
/usr/include/freetype2/freetype/freetype.h:657: error: a function call cannot appear in a constant-expression
/usr/include/freetype2/freetype/freetype.h:657: error: enumerator value for `FT_ENCODING_BIG5' not integer constant

knudfl 06-13-2009 12:43 PM

Generally about cross compiling :
Files from /usr/include/ should probably not be used :
( using headers may be harmless with the right version.)

To cross compile e.g. 'freetype-2.3.9' , you will have to
do './configure -- without-zlib --<other-options> '
Freetype has an internal zlib, which then will be used.
Quote:

In file included from /usr/include/freetype2/freetype/freetype.h:33,
from /usr/include/freetype2/freetype/ftoutln.h:25,.....
../usr/include/freetype2/freetype/config/ftconfig.h:2:32: multiarch-dispatch.h:..
In the above quotation from your compilation you are not using
the 'freetype' in /usr/local/gcc-3.4.6-glibc-2.3.6/arm-linux/ .?

So please do this as the first command, when cross compiling :
'export PATH=$PATH:/usr/local/gcc-3.4.6-glibc-2.3.6/arm-linux/lib
( if that is the correct path to e.g. libfreetype.so ).

This new path is temporary, closing the terminal will reset the
path to ' /lib:/usr/lib:/usr/local/lib ' ( + other libs in the
system path.)
.....
.....
'./configure : please also do './configure --help'
to see e.g. --disable-abiword-output --disable-utils etc. etc.)

.....
Example configure to avoid the 'multiarch-dispatch.h' header :
( multiarch-utils is : ".. utilities to dispatch binaries and
include files during RPM package build." )

./configure --disable-splash-output --disable-option-checking --disable-multiarch-dispatch --disable-gdk --disable-poppler-qt --disable-poppler-qt4 --disable-gtk-test --disable-cairo-output --disable-poppler-glib --disable-multiarch

( It is always a good idea to run a test compile on the host,
so see, what happens. The above works on pslos2009 with the
'multiarch-dispatch.h' header moved away. )
.....
Other dependencies : libpoppler will link against libxml2, libfontconfig, libjpeg,
libopenjpeg . ( libxml2 + libfontconfig is a must. )
The used libs : to be cross compiled too.
.....
Example libpoppler for arm
http://packages.debian.org/squeeze/libpoppler4
http://packages.debian.org/lenny/libpoppler3
http://packages.debian.org/lenny/libpoppler1
http://packages.debian.org/etch/libpoppler0c2
.....

jeazh 06-14-2009 10:52 AM

I have solved the problem!
 
I have solved the problem!
just add the --with-freetype-config=/opt/gcc-3.4.6-glibc-2.3.6/arm-linux/bin/freetype-config when configure the source


All times are GMT -5. The time now is 06:54 PM.