본문 바로가기
Research/Tools

qt embedded compile시 libpng관련 에러

by sunnyan 2009. 11. 30.
728x90

 

증상

 

[root@localhost qt-embedded-linux-opensource-src-4.5.3]# ./myconfig.sh

This is the Qt for Embedded Linux Open Source Edition.

You are licensed to use this software under the terms of
the Lesser GNU General Public License (LGPL) versions 2.1.
You are also licensed to use this software under the terms of
the GNU General Public License (GPL) versions 3.

Type '3' to view the GNU General Public License version 3.
Type 'L' to view the Lesser GNU General Public License version 2.1.
Type 'yes' to accept this license offer.
Type 'no' to decline this license offer.

Do you accept the terms of either license? yes

Creating qmake. Please wait...
gmake: `first'를 위해 할 일이 없습니다
rm -f endiantest.o
rm -f *~ core *.core
rm -f endiantest
rm -f Makefile

Building on:   qws/linux-x86-g++
Building for:  qws/linux-mipsel-g++
Architecture:  mips
Host architecture: i386

Build ............... libs examples demos docs translations
Configuration .......  cross_compile debug shared dll embedded largefile stl precompile_header exceptions_off  minimal-config small-config medium-config large-config full-config qt3support accessibility embedded reduce_exports ipv6 clock-gettime clock-monotonic mremap getaddrinfo ipv6ifname inotify png freetype zlib svg webkit scripttools debug
Debug ............... yes
Qt 3 compatibility .. yes
QtDBus module ....... no
QtScriptTools module  yes
QtXmlPatterns module  no
Phonon module ....... no
SVG module .......... yes
WebKit module ....... yes
STL support ......... yes
PCH support ......... yes
MMX/3DNOW/SSE/SSE2..  no/no/no/no
IPv6 support ........ yes
IPv6 ifname support . yes
getaddrinfo support . yes
getifaddrs support .. no
Accessibility ....... yes
NIS support ......... no
CUPS support ........ no
Iconv support ....... no
Glib support ........ no
GStreamer support ... no
Large File support .. yes
GIF support ......... plugin
TIFF support ........ plugin (qt)
JPEG support ........ plugin (qt)
PNG support ......... yes (qt)
MNG support ......... plugin (qt)
zlib support ........ yes
Session management .. no
Embedded support .... mips
Freetype2 support ... auto (yes)
Graphics (qt) ....... linuxfb multiscreen
Graphics (plugin) ...
Decorations (qt) .... styled windows default
Decorations (plugin) 
Keyboard driver (qt). tty usb
Keyboard driver (plugin)
Mouse driver (qt) ... pc linuxtp linuxtp
Mouse driver (plugin)
OpenGL support ...... no
SQLite support ...... plugin (qt)
OpenSSL support ..... no

Finding project files. Please wait...
Reading /root/project/tools/qt-embedded-linux-opensource-src-4.5.3/src/tools/bootstrap/bootstrap.pro
Reading /root/project/tools/qt-embedded-linux-opensource-src-4.5.3/src/tools/moc/moc.pro
Reading /root/project/tools/qt-embedded-linux-opensource-src-4.5.3/src/tools/rcc/rcc.pro

-------------------------------------------------------------------------

myconfig.sh 는 ./configure를 실행하는 스크립트 이고, 옵션을 가지고 있다. 내용은 아래와 같다.

 

#!/bin/sh

CC=mipsel-linux-gcc
LD=mipsel-linux-ld
AR=mipsel-linux-ar

./configure    
-opensource    
-embedded mips    
-little-endian    
-xplatform qws/linux-mipsel-g++
-shared     
-no-cups     
-depths 32     
-debug      
-qt-mouse-linuxtp   
-no-opengl     
-no-mmx     
-no-3dnow    
-no-sse     
-no-sse2     
-qt-kbd-usb    
-qt-zlib     
-qt-gif     
-qt-libpng     
-qt-libjpeg    
-qt-libmng     
-no-webkit    
#-no-qvfb
#-confirm-license
#-L /root/project/whs-1000/refsw/6.5/nexus/bin -R libpgl.so -R libnexus.so                                                     

 


아래는 make를 실행했을때 에러이다.

 

mipsel-linux-g++ -c -include .pch/debug-shared-emb-mips/QtGui -pipe -mips32 -fno-exceptions -g -fvisibility=hidden -fvisibility-inlines-hidden -Wall -W -D_REENTRANT -fPIC -DQT_SHARED -DQT_BUILD_GUI_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT3_SUPPORT -DQT_MOC_COMPAT -DPNG_NO_ASSEMBLER_CODE -DQT_RASTER_IMAGEENGINE -DQT_RASTER_PAINTENGINE -DQT_NO_FONTCONFIG -DFT2_BUILD_LIBRARY -DFT_CONFIG_OPTION_SYSTEM_ZLIB -DQT_NO_OPENTYPE -DQT_NO_STYLE_MAC -DQT_NO_STYLE_WINDOWSVISTA -DQT_NO_STYLE_WINDOWSXP -DQT_NO_STYLE_GTK -DQT_NO_STYLE_WINDOWSCE -DQT_NO_STYLE_WINDOWSMOBILE -DQ_INTERNAL_QAPP_SRC -DQT_NETWORK_LIB -DQT_CORE_LIB -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/qws/linux-mipsel-g++ -I. -I../../include/QtCore -I../../include/QtNetwork -I../../include -I../../include/QtGui -I.rcc/debug-shared-emb-mips -I../3rdparty/libpng -I../3rdparty/zlib -I../3rdparty/freetype/src -I../3rdparty/freetype/include -I../3rdparty/freetype/builds/unix -I../3rdparty/harfbuzz/src -Idialogs -I.moc/debug-shared-emb-mips -I.uic/debug-shared-emb-mips -o .obj/debug-shared-emb-mips/qpnghandler.o image/qpnghandler.cpp
In file included from ../3rdparty/libpng/png.h:444,
                 from image/qpnghandler.cpp:53:
../3rdparty/libpng/pngconf.h:329: error: expected constructor, destructor, or type conversion before '.' token
../3rdparty/libpng/pngconf.h:330: error: '__dont__' does not name a type
make[1]: *** [.obj/debug-shared-emb-mips/qpnghandler.o] 오류 1
make[1]: Leaving directory `/root/project/tools/qt-embedded-linux-opensource-src-4.5.3/src/gui'
make: *** [sub-gui-make_default-ordered] 오류 2

[root@localhost qt-embedded-linux-opensource-src-4.5.3]#

원인

 

아직 모름


Workaround


http://forum.soft32.com/linux/conflict-ftstdlib-freetype-library-pngconf-ftopict439998.html


Florian Erfurth

External


Since: Jan 09, 2007
Posts: 6



(Msg. 1) Posted: Thu Nov 08, 2007 9:57 am
Post subject: conflict between ftstdlib.h (freetype-library) and pngconf.h
Archived from groups: comp>os>linux>development>apps (more info?)


Hi everybody,
I implemented freetype support in my application. Unfortunatelly I've got a
problem with these two files, which are included.

Both include-file try to includes setjmp.h. Because ftstdlib.h already
include setjmp.h I've got a compile error at the following line:
#include <png.h>

png.h includes pngconf.h which tries to include setjmp.h. I get following
error:
| /usr/include/pngconf.h:317: error: expected constructor, destructor, or
type conversion before "." token
| /usr/include/pngconf.h:318: error: "__dont__" does not name a type

If I look into pngconf.h:
| # ifdef __linux__
| # ifdef _BSD_SOURCE
| # define PNG_SAVE_BSD_SOURCE
| # undef _BSD_SOURCE
| # endif
| # ifdef _SETJMP_H
| /* If you encounter a compiler error here, see the explanation
| * near the end of INSTALL.
| */
| __png.h__ already includes setjmp.h;
| __dont__ include it again.;
| # endif
| # endif /* __linux__ */
|
| /* include setjmp.h for error handling */
| # include <setjmp.h>

Do anyone of you have a idea how to work around such problem? I read the
INSTALL file. There are two suggestion:
1. comment out following two lines:
| __png.h__ already includes setjmp.h;
| __dont__ include it again.;
2. use cexcept interface but I don't understand that.

Thank you!
Floh
Back to top

 


http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=56759


Debian Bug report logs - #56759
libpng2-dev: parse errors in pngconf.h

Package: libpng2-dev; Maintainer for libpng2-dev is (unknown);

Reported by: gautier <gautier@email.enst.fr>

Date: Tue, 1 Feb 2000 00:03:01 UTC

Severity: fixed

Done: Philippe Troin <phil@fifi.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Philippe Troin <phil@fifi.org>:
Bug#56759; Package libpng2-dev. Full text and rfc822 format available.

Acknowledgement sent to gautier <gautier@email.enst.fr>:
New Bug report received and forwarded. Copy sent to Philippe Troin <phil@fifi.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: gautier <gautier@email.enst.fr>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libpng2-dev: parse errors in pngconf.h
Date: Tue, 1 Feb 2000 00:55:21 +0100
Package: libpng2-dev
Version: N/A; reported 2000-02-01
Severity: important

I was trying to build the last ImageMagick (5.1.1) (It is not yet a debian package, you can get it at http://www.wizards.dupont.com/cristy/ImageMagick.html) and i had many errors about pngconf.h and png.h. Here are the firsts:

/bin/sh ../libtool --mode=compile gcc -DHAVE_CONFIG_H -I../ -I.. -D_REENTRANT -D_FILE_OFFSET_BITS=64 -I/usr/local/include -I/usr/X11R6/include -O -c png.c
gcc -DHAVE_CONFIG_H -I../ -I.. -D_REENTRANT -D_FILE_OFFSET_BITS=64 -I/usr/local/include -I/usr/X11R6/include -O -c png.c -o png.o
In file included from /usr/local/include/png.h:208,
from png.c:58:
/usr/local/include/pngconf.h:123: parse error before `.'
/usr/local/include/pngconf.h:631: parse error before `*'
/usr/local/include/pngconf.h:631: warning: data definition has no type or storage class
/usr/local/include/pngconf.h:641: parse error before `*'
/usr/local/include/pngconf.h:641: warning: data definition has no type or storage class
/usr/local/include/png.h:351: parse error before `png_uint_32'

etc...

For the first error, i understand why: there are this strange lines in pngconf.h:

#ifdef _SETJMP_H
__png.h__ already includes setjmp.h
__dont__ include it again
#endif


Well this is weird.... It's obviously incorrect but I don't even guess
what the correct code could be

For the others errrors, i don't know


I tried with the debian packages installed, and then i tried with the
upstream tarball: all the same! So this should be fowarded upstream....

But now: how could anyone compile anything using libpng!?? (but
actually, it seems there was no packages depending on this lib in my
system)

A+


-- System Information
Debian Release: potato
Architecture: i386
Kernel: Linux droopy 2.2.14 #1 mer jan 19 02:24:27 CET 2000 i586

--
Fabrice Gautier <gautier@email.enst.fr>
----
There are two sides to every divorce: yours and the shithead's.


Information forwarded to debian-bugs-dist@lists.debian.org, Philippe Troin <phil@fifi.org>:
Bug#56759; Package libpng2-dev. Full text and rfc822 format available.

Acknowledgement sent to Josip Rodin <jrodin@public.srce.hr>:
Extra info received and forwarded to list. Copy sent to Philippe Troin <phil@fifi.org>. Full text and rfc822 format available.

Message #10 received at 56759@bugs.debian.org (full text, mbox):

From: Josip Rodin <jrodin@public.srce.hr>
To: gautier <gautier@email.enst.fr>, 56759@bugs.debian.org
Cc: control@bugs.debian.org
Subject: Re: libpng2-dev: parse errors in pngconf.h
Date: Tue, 1 Feb 2000 14:10:53 +0100
severity 56759 fixed
thanks

Hi,

> Package: libpng2-dev
> Severity: important
>
> I was trying to build the last ImageMagick (5.1.1) (It is not yet a debian
> package

This can't be of important severity, then.

> In file included from /usr/local/include/png.h:208,
> from png.c:58:
> /usr/local/include/pngconf.h:123: parse error before `.'
> /usr/local/include/pngconf.h:631: parse error before `*'
> /usr/local/include/pngconf.h:631: warning: data definition has no type or storage class
> /usr/local/include/pngconf.h:641: parse error before `*'
> /usr/local/include/pngconf.h:641: warning: data definition has no type or storage class
> /usr/local/include/png.h:351: parse error before `png_uint_32'

First of all, this references /usr/local/include/. Debian packages don't put
any files in /usr/local, ever. But...

> #ifdef _SETJMP_H
> __png.h__ already includes setjmp.h
> __dont__ include it again
> #endif

... this exists in our /usr/include/pngconf.h file, too.

The intention is actually quite clear (to me): you may not have any files
that #include setjmp.h file. Probably, that "png.c" file or any of the local
files it #include's does that, and it's apparently illegal.

Maybe it should have been marked with #error, that wouldn't print parse
errors but the exact message, but the point has been made, anyway.

Maintainer, please close this bug. Or correct me if I'm wrong <blush> :)

--
enJoy -*/*- don't even try to pronounce my first name


Severity set to `fixed'. Request was from Josip Rodin <jrodin@public.srce.hr> to control@bugs.debian.org. Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org, Philippe Troin <phil@fifi.org>:
Bug#56759; Package libpng2-dev. Full text and rfc822 format available.

Acknowledgement sent to Fabrice Gautier <gautier@email.enst.fr>:
Extra info received and forwarded to list. Copy sent to Philippe Troin <phil@fifi.org>. Full text and rfc822 format available.

Message #17 received at 56759@bugs.debian.org (full text, mbox):

From: Fabrice Gautier <gautier@email.enst.fr>
To: Josip Rodin <jrodin@public.srce.hr>
Cc: 56759@bugs.debian.org
Subject: Re: libpng2-dev: parse errors in pngconf.h
Date: Wed, 2 Feb 2000 04:52:44 +0100
On Tue, Feb 01, 2000 at 02:10:53PM +0100, Josip Rodin wrote:
> severity 56759 fixed
> thanks

I don't think so!
(but as i'm not a debian developer and you are .....)

Let's me explain what i think about this:

> Hi,
>
> > Package: libpng2-dev
> > Severity: important
> >
> > I was trying to build the last ImageMagick (5.1.1) (It is not yet a debian
> > package
>
> This can't be of important severity, then.

ImageMagick 5.1.1 is not in Debian but libpng2-dev is, and i think
this is a libpng2-dev bug not an ImageMagic bug. And if ImageMagick is
still 4.8 in Debian it may be because the Maintener didn't succeded in
compiling 5.1.1 (du to this bug) ... maybe... anyway it seems that libmagick is only used by ImageMagick (at least for me)

>
> > In file included from /usr/local/include/png.h:208,
> > from png.c:58:
> > /usr/local/include/pngconf.h:123: parse error before `.'
> > /usr/local/include/pngconf.h:631: parse error before `*'
> > /usr/local/include/pngconf.h:631: warning: data definition has no type or storage class
> > /usr/local/include/pngconf.h:641: parse error before `*'
> > /usr/local/include/pngconf.h:641: warning: data definition has no type or storage class
> > /usr/local/include/png.h:351: parse error before `png_uint_32'
>
> First of all, this references /usr/local/include/. Debian packages don't put
> any files in /usr/local, ever. But...

... but i said that i've tried both the debian packages and upstream
tarball that i compiled myself. Both have the bug (so this is may be
an upstream bug)

>
> > #ifdef _SETJMP_H
> > __png.h__ already includes setjmp.h
> > __dont__ include it again
> > #endif
>
> ... this exists in our /usr/include/pngconf.h file, too.
>
> The intention is actually quite clear (to me): you may not have any files
> that #include setjmp.h file. Probably, that "png.c" file or any of the local
> files it #include's does that, and it's apparently illegal.

This doesn't make any sense to me! Just a few line after this #ifdef
there is an #include <setjmp.h>. And AFAIK this is not a special
setjmp.h for libpng. ... This doesn't make sense at all ....


> Maybe it should have been marked with #error, that wouldn't print parse
> errors but the exact message, but the point has been made, anyway.

Yes, at the very least, this should use #error, and this is what it
does in libpng0g-dev. But this is not my point ...

> Maintainer, please close this bug. Or correct me if I'm wrong <blush> :)

I'm not the Maintener but i still think you're wrong :-)

First there is a fix : just comment out the #ifdef .... #endif clause
in pngconf.h and it seems to works. At least i compiled ImageMagick
5.1.1 without any errors (and for the moment it runs fine). I don't
see any side effect that this fix could introduce.

And, Two, in the libpng doc (/usr/doc/libpng2-dev/libong.txt.gz) says
that pngconf.h is the place to do specific compiler configuration. So
let's say this is not a bug but a "configuration" that i would like to
see in the debian package!


A+

--
Fabrice Gautier <gautier@email.enst.fr>
----
Wait! You have not been prepared!
-- Mr. Atoz, "Tomorrow is Yesterday", stardate 3113.2


Reply sent to Philippe Troin <phil@fifi.org>:
You have taken responsibility. Full text and rfc822 format available.

Notification sent to gautier <gautier@email.enst.fr>:
Bug acknowledged by developer. Full text and rfc822 format available.

Message #22 received at 56759-close@bugs.debian.org (full text, mbox):

From: Philippe Troin <phil@fifi.org>
To: 56759-close@bugs.debian.org
Subject: Bug#56759: fixed in libpng 1.0.5-1
Date: 29 Feb 2000 11:58:01 -0000
We believe that the bug you reported is fixed in the latest version of
libpng, which has been installed in the Debian FTP archive:
libpng_1.0.5.orig.tar.gz
to dists/potato/main/source/libs/libpng_1.0.5.orig.tar.gz
replacing libpng_1.0.5.orig.tar.gz
libpng_1.0.5.orig.tar.gz
to dists/woody/main/source/libs/libpng_1.0.5.orig.tar.gz
replacing libpng_1.0.5.orig.tar.gz
libpng_1.0.5-1.diff.gz
to dists/potato/main/source/libs/libpng_1.0.5-1.diff.gz
replacing libpng_1.0.5-0.1.diff.gz
libpng_1.0.5-1.diff.gz
to dists/woody/main/source/libs/libpng_1.0.5-1.diff.gz
replacing libpng_1.0.5-0.1.diff.gz
libpng2-dev_1.0.5-1_i386.deb
to dists/potato/main/binary-i386/graphics/libpng2-dev_1.0.5-1.deb
replacing libpng2-dev_1.0.5-0.1.deb
libpng2-dev_1.0.5-1_i386.deb
to dists/woody/main/binary-i386/graphics/libpng2-dev_1.0.5-1.deb
replacing libpng2-dev_1.0.5-0.1.deb
libpng_1.0.5-1.dsc
to dists/potato/main/source/libs/libpng_1.0.5-1.dsc
replacing libpng_1.0.5-0.1.dsc
libpng_1.0.5-1.dsc
to dists/woody/main/source/libs/libpng_1.0.5-1.dsc
replacing libpng_1.0.5-0.1.dsc
libpng2_1.0.5-1_i386.deb
to dists/potato/main/binary-i386/libs/libpng2_1.0.5-1.deb
replacing libpng2_1.0.5-0.1.deb
libpng2_1.0.5-1_i386.deb
to dists/woody/main/binary-i386/libs/libpng2_1.0.5-1.deb
replacing libpng2_1.0.5-0.1.deb

Note that this package is not part of the released stable Debian
distribution. It may have dependencies on other unreleased software,
or other instabilities. Please take care if you wish to install it.
The update will eventually make its way into the next released Debian
distribution.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed. If you
have further comments please address them to 56759@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Philippe Troin <phil@fifi.org> (supplier of updated libpng package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.6
Date: Mon, 28 Feb 2000 13:53:22 -0800
Source: libpng
Binary: libpng2 libpng2-dev
Architecture: source i386
Version: 1.0.5-1
Distribution: frozen unstable
Urgency: low
Maintainer: Philippe Troin <phil@fifi.org>
Description:
libpng2 - PNG library - runtime
libpng2-dev - PNG library - development
Closes: 48244 48246 56759
Changes:
libpng (1.0.5-1) frozen unstable; urgency=low
.
* Maintainer upload (closes: #48244, #48246).
* Added some extra explanations for the setjmp.h mess (closes: #56759),
see pngconf.h for details.
Files:
51e08d7947a1aa51d5b582b83cdd6fd7 571 libs optional libpng_1.0.5-1.dsc
e8edc8c1ad4cb613f20563acd9112702 299401 libs optional libpng_1.0.5.orig.tar.gz
6a6715493ef31e805d5ff0fc09cddac9 7108 libs optional libpng_1.0.5-1.diff.gz
964efbb4e25be247c51c56d783309a32 93522 libs optional libpng2_1.0.5-1_i386.deb
06a928eb2002a7da50746f73331ccedf 174258 graphics optional libpng2-dev_1.0.5-1_i386.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.0 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iEYEARECAAYFAji68owACgkQMrxzW26vf4fNqgCeKYBbLd/G8kE87QCKadO74NRf
BU8AnA85jBsN9tuYl+O4ovo7sWgwZ979
=Davy
-----END PGP SIGNATURE-----



Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#56759; Package libpng2-dev. Full text and rfc822 format available.

Acknowledgement sent to Philippe Troin <phil@fifi.org>:
Extra info received and forwarded to list. Full text and rfc822 format available.

Message #27 received at 56759@bugs.debian.org (full text, mbox):

From: Philippe Troin <phil@fifi.org>
To: Fabrice Gautier <gautier@email.enst.fr>
Cc: 56759@bugs.debian.org, Josip Rodin <jrodin@public.srce.hr>
Subject: Re: Bug#56759: libpng2-dev: parse errors in pngconf.h
Date: 29 Feb 2000 12:05:15 -0800
Fabrice Gautier <gautier@email.enst.fr> writes:

> On Tue, Feb 01, 2000 at 02:10:53PM +0100, Josip Rodin wrote:
> ImageMagick 5.1.1 is not in Debian but libpng2-dev is, and i think
> this is a libpng2-dev bug not an ImageMagic bug. And if ImageMagick is
> still 4.8 in Debian it may be because the Maintener didn't succeded in
> compiling 5.1.1 (du to this bug) ... maybe... anyway it seems that libmagick is only used by ImageMagick (at least for me)

FYI, the setjmp.h magic in pngconf.h is here because there are two
setjmp/longjmp on Linux depending or not you use BSD compatibility
(without BSD compatibility, setjmp/longjmp does not preserve the
signal mask, with BSD compatibility, they preserve and restore the
signal mask (you can get this behavior with sigsetjmp/siglongjmp if
you do not use BSD compat.)).

The struct jmpbuf they use are different and calling the BSD-longjmp
following a non-BSD setjmp will give strange results (like screwing up
the signal mask) and/or crash.

Since PNG uses setjmp/longjmp, they force the inclusion of longjmp.h and
force non-BSD mode.

Hence the header magic.

I replaced the syntactic error text with an #error directive and added
a comment explaining basically what I've tried to explain above.

For practical use, if you get the #error message, then moving <png.h>
before <longjmp.h> should make things work.

Phil.


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Dec 4 01:50:19 2009; Machine Name: busoni.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.

 


http://brneurosci.org/imal-manual/node29.html

next up previous contents index
Next: Command-line options Up: Installation instructions Previous: Compiling with Lesstif   Contents   Index


If you have problems compiling the program

Here are some tips that have been found helpful in compiling imal on some systems. For normal Unix systems, these steps should not be necessary.
  • In makefile, try substituting ``CC=g++'' for ``CC=gcc''.
  • If a problem occurs with xmtnimage16.cc, make sure libjpeg.a is somewhere on your system. In one case it was necessary to copy some of the libjpeg include files (jconfig.h, jdct.h, jerror.h, jinclude.h, jmemsys.h, jmorecfg.h, jpegint.h, jpeglib.h, and jversion.h) to the imal source directory or in /usr/include/gr.
  • Add /usr/X11R6/LessTif/Motif1.2/lib to /etc/ld.so.conf and type ``/sbin/ldconfig''. (This solved a problem on one machine that could not load libXm.so.1).
  • Check to make sure the files in /usr/X11R6/include/Xm are the correct version. Don't mix Motif 1.x files with 2.x libraries or vice versa.
  • If problems are encountered with calculator.l or calculator.y, try substituting bison and flex for yacc and lex respectively.
  • If you have an unusual CPU and the program compiles successfully but cannot read TIFF files, it may be caused by incorrect determination of the byte order. Each compiler seems to have a different way of indicating the byte order. Posix-compliant systems are supposed to have a file called bytesex.h or endian.h. If these files are not present, make may get the byte order wrong. To fix this, add either #define LITTLE_ENDIAN or #undef LITTLE_ENDIAN after the line #define MAXWINDOWS 10 in xmtnimage.h to force the correct byte order and run 'make clean' and 'make' again.
  • Don't edit y.tab.c or y.tab.cc. These are created automatically from calculator.y.

More compiling problems and solutions

  • Problem:
    In file included from xmtnimage.cc:11:
    xmtnimagec.h:9: Xbae/Matrix.h: No such file or directory
  • Solution:
    Xbae installation did not occur correctly. Manually copy libXbae.a to /usr/X11R6/lib and copy *.h to /usr/X11R6/include/Xbae.

  • Problem: grep: /Xm/Xm.h: No such file or directory
    ./configure: test: -ge: unary operator expected
  • Solution: Motif is not installed correctly; or paths to Motif are incorrect. This occurs on SuSE linux with Lesstif. Should say: found after looking for
    /usr/X11R6/include/Xm/Xm.h
    ...
    looking for /usr/openwin/share/include/Xm/Xm.h

  • Problem: In file included from xmtnimage.cc:10: xmtnimage.h:79: bytesex.h: No such file or directory
  • Solution:
    This should not occur. Delete config.cache and rerun ./configure.

  • Problem:
    gcc: installation problem, cannot exec `cc1plus': No such file or directory
  • Solution:
    gpp / g++ must be installed; egcs or gcc alone are not sufficient to compile C++ programs.

  • Problem:
    /usr/X11R6/lib/libXbae.a(Matrix.o)(.data+0xb7c):
    undefined reference to `XmeFromHorizontalPixels'
  • Solution: Motif is not installed correctly. This message will also occur during compilation of libXbae. Reinstall Motif and recompile and reinstall libXbae.a.

  • Problem:
    imal: loadlocale.c:220: _nl_load_locale: Assertion `idx % __alignof__ (u_int32_t) == 0' failed.
  • Solution: export LC_ALL=POSIX

  • Problem:
    /usr/local/include/pngconf.h:326: error: expected constructor,
    destructor, or type conversion before ?.? token /usr/local/include/pngconf.h:327: error: ?__dont__? does not name a type
  • Solution: Your libpng library is not installed correctly. Whenever you install libpng, it's necessary to delete lines 326 and 327 from pngconf.h. That is, the lines containing:
             __pngconf.h__ already includes setjmp.h;
    __dont__ include it again.;


next up previous contents index
Next: Command-line options Up: Installation instructions Previous: Compiling with Lesstif   Contents   Index
root 2009-09-05

 


http://www.be.kernel.org/bugs.debian.org/bts-spool-archive/73/273473.report

Received: (at submit) by bugs.debian.org; 26 Sep 2004 11:24:57 +0000
From matijs@mvz.xs4all.nl Sun Sep 26 04:24:57 2004
Return-path: <matijs@mvz.xs4all.nl>
Received: from smtp-vbr7.xs4all.nl [194.109.24.27]
by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
id 1CBX9F-00054i-00; Sun, 26 Sep 2004 04:24:57 -0700
Received: from pomme (mvz.xs4all.nl [80.126.4.68])
by smtp-vbr7.xs4all.nl (8.12.11/8.12.11) with ESMTP id i8QBOtnS053389;
Sun, 26 Sep 2004 13:24:55 +0200 (CEST)
(envelope-from matijs@mvz.xs4all.nl)
Received: from matijs by pomme with local (Exim 3.36 #1 (Debian))
id 1CBX9D-0007YC-00; Sun, 26 Sep 2004 13:24:55 +0200
Content-Type: multipart/mixed; boundary="===============1091547483=="
MIME-Version: 1.0
From: Matijs van Zuijlen <Matijs.van.Zuijlen@xs4all.nl>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: libpng12-dev: please port explanation of setjmp error from libpng10-dev
X-Mailer: reportbug 2.99.3
Date: Sun, 26 Sep 2004 13:24:55 +0200
Message-Id: <E1CBX9D-0007YC-00@pomme>
Sender: Matijs van Zuijlen <matijs@mvz.xs4all.nl>
X-Virus-Scanned: by XS4ALL Virus Scanner
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25
(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE
autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level:

This is a multi-part MIME message sent by reportbug.

--===============1091547483==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: libpng12-dev
Version: 1.2.5.0-7
Severity: wishlist
Tags: patch

While compiling something today, I got the error:

In file included from /usr/include/png.h:332,
from xmtnimage65.cc:17:
/usr/include/pngconf.h:255: error: syntax error before `.' token
/usr/include/pngconf.h:256: error: parse error before `again'

Inside pngconf.h, there is some terse text on the reason for this.

After some googling, it turns out that libpng10-dev includes a much clearer
text. It also uses #error, instead of just causing a syntax error, and it
tells me how to solve the problem.

Could you please 'port' this to libpng12-dev? I've added a patch.

-- System Information:
Debian Release: 3.1
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: powerpc (ppc)
Kernel: Linux 2.6.8-powerpc
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8

Versions of packages libpng12-dev depends on:
ii libpng12-0 1.2.5.0-7 PNG library - runtime
ii zlib1g-dev 1:1.2.1.2-1 compression library - development

-- no debconf information

--===============1091547483==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="libpng12.patch"

--- pngconf.h.orig 2004-09-26 13:18:56.937333416 +0200
+++ pngconf.h 2004-09-26 13:20:19.492282512 +0200
@@ -252,8 +252,13 @@
# undef _BSD_SOURCE
# endif
# ifdef _SETJMP_H
- __png.h__ already includes setjmp.h;
- __dont__ include it again.;
+/* Explanation added by debian maintainer Philippe Troin <phil@fifi.org>.
+ There are two versions of setjmp, depending wether or not we compile for
+ BSD. They are incompatible and can cause crashes. The PNG people force
+ here a unique behavior for setjmp. It fou get the error below,
+ then include <png.h> before <setjmp.h>.
+*/
+#error png.h already includes setjmp.h with some additional fixup.
# endif
# endif /* __linux__ */


--===============1091547483==--

 



728x90

'Research > Tools' 카테고리의 다른 글

qt embedded 4.6 configure option  (0) 2009.12.29
CFE setenv  (0) 2009.12.22
uclinux-rootfs  (0) 2009.12.17
svn: Unrecognized URL scheme for 'http://.......'  (0) 2009.12.03
SVN: Store password unencrypted (yes/no)?  (6) 2009.12.03