LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices



Reply
 
Search this Thread
Old 06-13-2009, 03:16 AM   #1
jeazh
LQ Newbie
 
Registered: May 2009
Posts: 7

Rep: Reputation: 1
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
 
Old 06-13-2009, 01:43 PM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2014.08, Slack14.1 DebWheezy, +50+ other Linux OS, for test only.
Posts: 14,278

Rep: Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664Reputation: 2664
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
.....

Last edited by knudfl; 06-13-2009 at 03:40 PM.
 
Old 06-14-2009, 11:52 AM   #3
jeazh
LQ Newbie
 
Registered: May 2009
Posts: 7

Original Poster
Rep: Reputation: 1
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
 
  


Reply

Tags
crosscompile


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Wine compile error: "C compiler cannot create executables" yoav_by Linux - Software 4 04-03-2011 06:23 PM
"error: C compiler cannot create executables" when I try to compile gcc4.3.2 in/tools spencer8ab Linux From Scratch 4 05-13-2009 12:20 PM
E17 compile error edje cannot find "brushed.png" inkysplat Linux - Software 1 01-06-2006 01:48 AM
configure: error: Can't find "javac" in your PATH, when install/compile a program... JungMin Programming 5 12-07-2005 06:04 PM
configure: error: Can't find "javac" in your PATH, when install/compile a program... JungMin Linux - Software 4 12-06-2005 12:20 AM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration