You are not logged in.
Pages: 1
hi, i am trying to build a version of libungiff along the lines needed for fuzzyocr, see here:
https://secure.renaissoft.com/maia/wiki/FuzzyOCR23
According to that documentation libungif needs a patch which does work. My moded PKGBUILD looks like this:
# $Id: PKGBUILD,v 1.11 2005/11/09 11:40:50 jgc Exp $
# Maintainer: dorphell <dorphell>
# Committer: Judd Vinet <jvinet>
pkgname=libungif
pkgver=4.1.4
pkgrel=1
pkgdesc="A library for reading and writing gif images without LZW compression"
depends=('glibc')
url="http://sourceforge.net/projects/libungif/"
source=(http://dl.sourceforge.net/sourceforge/${pkgname}/${pkgname}-${pkgver}.tar.gz
http://users.own-hero.net/~decoder/fuzzyocr/giftext-segfault.patch)
md5sums=('efdfcf8e32e35740288a8c5625a70ccb' '028a7154a60b2a5e314bc9101d17fc77')
build() {
cd ${startdir}/src/${pkgname}-${pkgver}
cd util
patch -p0 < ${startdir}/src/giftext-segfault.patch
cd ${startdir}/src/${pkgname}-${pkgver}
./configure --prefix=/usr
make || return 1
make DESTDIR=${startdir}/pkg install
find ${startdir}/pkg -name '*.la' -exec rm {} ;
}
But when it gets to configure I get this at the end:
checking how to run the C preprocessor... /lib/cpp
configure: error: C preprocessor "/lib/cpp" fails sanity check
This means I can't build the patched version which is a problem as the unpatched version may segfault with makformed images as spammers are not nice people. (or words to that effect).
cpp is part of gcc 4.1.1-3
Any one got any thoughts?
Kind regards
Benedict White
Offline
can you maybe post the config.log?
[edit]
check your makepkg.conf for malicious cflags, since here it builds fine. on a base-only system btw.
[/edit]
I recognize that while theory and practice are, in theory, the same, they are, in practice, different. -Mark Mitchell
Offline
Yes I can, here it is:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by libungif configure 4.1.4, which was
generated by GNU Autoconf 2.59. Invocation command line was
$ ./configure --prefix=/usr
## --------- ##
## Platform. ##
## --------- ##
hostname = mailcleaner
uname -m = i686
uname -r = 2.6.18-ARCH
uname -s = Linux
uname -v = #1 SMP PREEMPT Fri Sep 22 12:13:37 CEST 2006
/usr/bin/uname -p = unknown
/bin/uname -X = unknown
/bin/arch = i686
/usr/bin/arch -k = unknown
/usr/convex/getsysinfo = unknown
hostinfo = unknown
/bin/machine = unknown
/usr/bin/oslevel = unknown
/bin/universe = unknown
PATH: /bin
PATH: /usr/bin
PATH: /sbin
PATH: /usr/sbin
PATH: /usr/X11R6/bin
PATH: /opt/bin
## ----------- ##
## Core tests. ##
## ----------- ##
configure:1557: checking for a BSD-compatible install
configure:1612: result: /bin/install -c
configure:1623: checking whether build environment is sane
configure:1666: result: yes
configure:1731: checking for gawk
configure:1747: found /bin/gawk
configure:1757: result: gawk
configure:1767: checking whether make sets $(MAKE)
configure:1787: result: yes
configure:2036: checking build system type
configure:2054: result: i686-pc-linux-gnu
configure:2062: checking host system type
configure:2076: result: i686-pc-linux-gnu
configure:2096: checking for style of include used by make
configure:2124: result: GNU
configure:2195: checking for gcc
configure:2211: found /usr/bin/gcc
configure:2221: result: gcc
configure:2465: checking for C compiler version
configure:2468: gcc --version </dev>&5
gcc (GCC) 4.1.1
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
configure:2471: $? = 0
configure:2473: gcc -v </dev>&5
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../gcc-4.1.1/configure --prefix=/usr --enable-shared --enable-languages=c,c++,objc --enable-threads=posix -$
Thread model: posix
gcc version 4.1.1
configure:2476: $? = 0
configure:2478: gcc -V </dev>&5
gcc: '-V' option must have argument
configure:2481: $? = 1
configure:2504: checking for C compiler default output file name
configure:2507: gcc -march=i686 -O2 -pipe conftest.c >&5
configure:2510: $? = 0
configure:2556: result: a.out
configure:2561: checking whether the C compiler works
configure:2567: ./a.out
configure:2570: $? = 0
configure:2587: result: yes
configure:2594: checking whether we are cross compiling
configure:2596: result: no
configure:2599: checking for suffix of executables
configure:2601: gcc -o conftest -march=i686 -O2 -pipe conftest.c >&5
configure:2604: $? = 0
configure:2629: result:
configure:2635: checking for suffix of object files
configure:2656: gcc -c -march=i686 -O2 -pipe conftest.c >&5
configure:2659: $? = 0
configure:2681: result: o
configure:2685: checking whether we are using the GNU C compiler
configure:2709: gcc -c -march=i686 -O2 -pipe conftest.c >&5
configure:2715: $? = 0
configure:2719: test -z
|| test ! -s conftest.err
configure:2722: $? = 0
configure:2725: test -s conftest.o
configure:2728: $? = 0
configure:2741: result: yes
configure:2747: checking whether gcc accepts -g
configure:2768: gcc -c -g conftest.c >&5
configure:2774: $? = 0
configure:2778: test -z
|| test ! -s conftest.err
configure:2781: $? = 0
configure:2784: test -s conftest.o
configure:2787: $? = 0
configure:2798: result: yes
configure:2815: checking for gcc option to accept ANSI C
configure:2885: gcc -c -march=i686 -O2 -pipe conftest.c >&5
configure:2891: $? = 0
configure:2895: test -z
|| test ! -s conftest.err
configure:2898: $? = 0
configure:2898: $? = 0
configure:2901: test -s conftest.o
configure:2904: $? = 0
configure:2922: result: none needed
configure:2940: gcc -c -march=i686 -O2 -pipe conftest.c >&5
conftest.c:2: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'me'
configure:2946: $? = 1
configure: failed program was:
| #ifndef __cplusplus
| choke me
| #endif
configure:3081: checking dependency style of gcc
configure:3171: result: gcc3
configure:3188: checking for a sed that does not truncate output
configure:3242: result: /bin/sed
configure:3245: checking for egrep
configure:3255: result: grep -E
configure:3271: checking for ld used by gcc
configure:3338: result: /usr/bin/ld
configure:3347: checking if the linker (/usr/bin/ld) is GNU ld
configure:3362: result: yes
configure:3367: checking for /usr/bin/ld option to reload object files
configure:3374: result: -r
configure:3392: checking for BSD-compatible nm
configure:3434: result: /usr/bin/nm -B
configure:3438: checking whether ln -s works
configure:3442: result: yes
configure:3449: checking how to recognise dependent libraries
configure:3621: result: pass_all
configure:3835: checking how to run the C preprocessor
configure:3870: gcc -E conftest.c
In file included from /usr/include/bits/posix1_lim.h:153,
from /usr/include/limits.h:145,
from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/limits.h:122,
from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/syslimits.h:7,
from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/limits.h:11,
from conftest.c:12:
/usr/include/bits/local_lim.h:36:26: error: linux/limits.h: No such file or directory
configure:3876: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "libungif"
| #define PACKAGE_TARNAME "libungif"
| #define PACKAGE_VERSION "4.1.4"
| #define PACKAGE_STRING "libungif 4.1.4"
| #define PACKAGE_BUGREPORT "abadger1999@sourceforge.net"
| #define PACKAGE "libungif"
| #define VERSION "4.1.4"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits>
| #else
| # include <assert>
| #endif
| Syntax error
configure:3870: gcc -E conftest.c
In file included from /usr/include/bits/posix1_lim.h:153,
from /usr/include/limits.h:145,
from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/limits.h:122,
from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/syslimits.h:7,
from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/limits.h:11,
from conftest.c:12:
/usr/include/bits/local_lim.h:36:26: error: linux/limits.h: No such file or directory
configure:3876: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "libungif"
| #define PACKAGE_TARNAME "libungif"
| #define PACKAGE_VERSION "4.1.4"
| #define PACKAGE_STRING "libungif 4.1.4"
| #define PACKAGE_BUGREPORT "abadger1999@sourceforge.net"
| #define PACKAGE "libungif"
| #define VERSION "4.1.4"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits>
| #else
| # include <assert>
| #endif
| Syntax error
configure:3870: gcc -E -traditional-cpp conftest.c
In file included from /usr/include/features.h:324,
from /usr/include/assert.h:37,
from conftest.c:15:
/usr/include/sys/cdefs.h:32: error: #error "You need a ISO C conforming compiler to use the glibc headers"
configure:3876: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "libungif"
| #define PACKAGE_TARNAME "libungif"
| #define PACKAGE_VERSION "4.1.4"
| #define PACKAGE_STRING "libungif 4.1.4"
| #define PACKAGE_BUGREPORT "abadger1999@sourceforge.net"
| #define PACKAGE "libungif"
| #define VERSION "4.1.4"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits>
| #else
| # include <assert>
| #endif
| Syntax error
configure:3870: gcc -E -traditional-cpp conftest.c
In file included from /usr/include/features.h:324,
from /usr/include/assert.h:37,
from conftest.c:15:
/usr/include/sys/cdefs.h:32: error: #error "You need a ISO C conforming compiler to use the glibc headers"
configure:3876: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "libungif"
| #define PACKAGE_TARNAME "libungif"
| #define PACKAGE_VERSION "4.1.4"
| #define PACKAGE_STRING "libungif 4.1.4"
| #define PACKAGE_BUGREPORT "abadger1999@sourceforge.net"
| #define PACKAGE "libungif"
| #define VERSION "4.1.4"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits>
| #else
| # include <assert>
| #endif
| Syntax error
configure:3870: /lib/cpp conftest.c
In file included from /usr/include/bits/posix1_lim.h:153,
from /usr/include/limits.h:145,
from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/limits.h:122,
from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/syslimits.h:7,
from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/limits.h:11,
from conftest.c:12:
/usr/include/bits/local_lim.h:36:26: error: linux/limits.h: No such file or directory
configure:3876: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "libungif"
| #define PACKAGE_TARNAME "libungif"
| #define PACKAGE_VERSION "4.1.4"
| #define PACKAGE_STRING "libungif 4.1.4"
| #define PACKAGE_BUGREPORT "abadger1999@sourceforge.net"
| #define PACKAGE "libungif"
| #define VERSION "4.1.4"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits>
| #else
| # include <assert>
| #endif
| Syntax error
configure:3870: /lib/cpp conftest.c
In file included from /usr/include/bits/posix1_lim.h:153,
from /usr/include/limits.h:145,
from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/limits.h:122,
from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/syslimits.h:7,
from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/limits.h:11,
from conftest.c:12:
/usr/include/bits/local_lim.h:36:26: error: linux/limits.h: No such file or directory
configure:3876: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "libungif"
| #define PACKAGE_TARNAME "libungif"
| #define PACKAGE_VERSION "4.1.4"
| #define PACKAGE_STRING "libungif 4.1.4"
| #define PACKAGE_BUGREPORT "abadger1999@sourceforge.net"
| #define PACKAGE "libungif"
| #define VERSION "4.1.4"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits>
| #else
| # include <assert>
| #endif
| Syntax error
configure:3953: result: /lib/cpp
configure:3977: /lib/cpp conftest.c
In file included from /usr/include/bits/posix1_lim.h:153,
from /usr/include/limits.h:145,
from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/limits.h:122,
from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/syslimits.h:7,
from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/limits.h:11,
from conftest.c:12:
/usr/include/bits/local_lim.h:36:26: error: linux/limits.h: No such file or directory
configure:3983: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "libungif"
| #define PACKAGE_TARNAME "libungif"
| #define PACKAGE_VERSION "4.1.4"
| #define PACKAGE_STRING "libungif 4.1.4"
| #define PACKAGE_BUGREPORT "abadger1999@sourceforge.net"
| #define PACKAGE "libungif"
| #define VERSION "4.1.4"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits>
| #else
| # include <assert>
| #endif
| Syntax error
configure:3977: /lib/cpp conftest.c
In file included from /usr/include/bits/posix1_lim.h:153,
from /usr/include/limits.h:145,
from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/limits.h:122,
from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/syslimits.h:7,
from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/limits.h:11,
from conftest.c:12:
/usr/include/bits/local_lim.h:36:26: error: linux/limits.h: No such file or directory
configure:3983: $? = 1
configure: failed program was:
| /* confdefs.h. */
|
| #define PACKAGE_NAME "libungif"
| #define PACKAGE_TARNAME "libungif"
| #define PACKAGE_VERSION "4.1.4"
| #define PACKAGE_STRING "libungif 4.1.4"
| #define PACKAGE_BUGREPORT "abadger1999@sourceforge.net"
| #define PACKAGE "libungif"
| #define VERSION "4.1.4"
| /* end confdefs.h. */
| #ifdef __STDC__
| # include <limits>
| #else
| # include <assert>
| #endif
| Syntax error
configure:4052: error: C preprocessor "/lib/cpp" fails sanity check
See `config.log' for more details.
## ---------------- ##
## Cache variables. ##
## ---------------- ##
ac_cv_build=i686-pc-linux-gnu
ac_cv_build_alias=i686-pc-linux-gnu
ac_cv_c_compiler_gnu=yes
ac_cv_env_CC_set=
ac_cv_env_CC_value=
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-march=i686 -O2 -pipe'
ac_cv_env_CPPFLAGS_set=
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_CXXCPP_set=
ac_cv_env_CXXCPP_value=
ac_cv_env_CXXFLAGS_set=set
ac_cv_env_CXXFLAGS_value='-march=i686 -O2 -pipe'
ac_cv_env_CXX_set=
ac_cv_env_CXX_value=
ac_cv_env_F77_set=
ac_cv_env_F77_value=
ac_cv_env_FFLAGS_set=
ac_cv_env_FFLAGS_value=
ac_cv_env_LDFLAGS_set=
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=
ac_cv_env_build_alias_value=
ac_cv_env_host_alias_set=
ac_cv_env_host_alias_value=
ac_cv_env_target_alias_set=
ac_cv_env_target_alias_value=
ac_cv_exeext=
ac_cv_host=i686-pc-linux-gnu
ac_cv_host_alias=i686-pc-linux-gnu
ac_cv_objext=o
ac_cv_path_install='/bin/install -c'
ac_cv_prog_AWK=gawk
ac_cv_prog_CPP=/lib/cpp
ac_cv_prog_ac_ct_CC=gcc
ac_cv_prog_cc_g=yes
ac_cv_prog_cc_stdc=
ac_cv_prog_egrep='grep -E'
ac_cv_prog_make_make_set=yes
am_cv_CC_dependencies_compiler_type=gcc3
lt_cv_deplibs_check_method=pass_all
lt_cv_file_magic_cmd='$MAGIC_CMD'
lt_cv_file_magic_test_file=
lt_cv_ld_reload_flag=-r
lt_cv_path_LD=/usr/bin/ld
lt_cv_path_NM='/usr/bin/nm -B'
lt_cv_path_SED=/bin/sed
lt_cv_prog_gnu_ld=yes
## ----------------- ##
## Output variables. ##
## ----------------- ##
ACLOCAL='${SHELL} /var/abs/lib/libungif/src/libungif-4.1.4/missing --run aclocal-1.9'
AMDEPBACKSLASH=''
AMDEP_FALSE='#'
AMDEP_TRUE=''
AMTAR='${SHELL} /var/abs/lib/libungif/src/libungif-4.1.4/missing --run tar'
AR=''
AUTOCONF='${SHELL} /var/abs/lib/libungif/src/libungif-4.1.4/missing --run autoconf'
AUTOHEADER='${SHELL} /var/abs/lib/libungif/src/libungif-4.1.4/missing --run autoheader'
AUTOMAKE='${SHELL} /var/abs/lib/libungif/src/libungif-4.1.4/missing --run automake-1.9'
AWK='gawk'
CC='gcc'
CCDEPMODE='depmode=gcc3'
CFLAGS='-march=i686 -O2 -pipe'
COMPILABLE_EXTRAS=''
CPP='/lib/cpp'
CPPFLAGS=''
CXX=''
CXXCPP=''
CXXDEPMODE=''
CXXFLAGS='-march=i686 -O2 -pipe'
CYGPATH_W='echo'
DEFS=''
DEPDIR='.deps'
DEVS=''
ECHO='echo'
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EGREP='grep -E'
EXEEXT=''
F77=''
FFLAGS=''
GL_S_LIB=''
INSTALL_DATA='${INSTALL} -m 644'
INSTALL_PROGRAM='${INSTALL}'
INSTALL_SCRIPT='${INSTALL}'
INSTALL_STRIP_PROGRAM='${SHELL} $(install_sh) -c -s'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIBTOOL=''
LN_S='ln -s'
LTLIBOBJS=''
MAKEINFO='${SHELL} /var/abs/lib/libungif/src/libungif-4.1.4/missing --run makeinfo'
MATH_LIB=''
OBJEXT='o'
PACKAGE='libungif'
PACKAGE_BUGREPORT='abadger1999@sourceforge.net'
PACKAGE_NAME='libungif'
PACKAGE_STRING='libungif 4.1.4'
PACKAGE_TARNAME='libungif'
PACKAGE_VERSION='4.1.4'
PATH_SEPARATOR=':'
RANLIB=''
RLE_LIB=''
SET_MAKE=''
SHELL='/bin/sh'
STRIP=''
VERSION='4.1.4'
X11_LIB=''
X_CFLAGS=''
X_EXTRA_LIBS=''
X_LIBS=''
X_PRE_LIBS=''
ac_ct_AR=''
ac_ct_CC='gcc'
ac_ct_CXX=''
ac_ct_F77=''
ac_ct_RANLIB=''
ac_ct_STRIP=''
am__fastdepCC_FALSE='#'
am__fastdepCC_TRUE=''
am__fastdepCXX_FALSE=''
am__fastdepCXX_TRUE=''
am__include='include'
am__leading_dot='.'
am__quote=''
am__tar='${AMTAR} chof - "$$tardir"'
am__untar='${AMTAR} xf -'
bindir='${exec_prefix}/bin'
build='i686-pc-linux-gnu'
build_alias=''
build_cpu='i686'
build_os='linux-gnu'
build_vendor='pc'
datadir='${prefix}/share'
exec_prefix='NONE'
host='i686-pc-linux-gnu'
host_alias=''
host_cpu='i686'
host_os='linux-gnu'
host_vendor='pc'
includedir='${prefix}/include'
infodir='${prefix}/info'
install_sh='/var/abs/lib/libungif/src/libungif-4.1.4/install-sh'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
mkdir_p='mkdir -p --'
oldincludedir='/usr/include'
prefix='/usr'
program_transform_name='s,x,x,'
sbindir='${exec_prefix}/sbin'
sharedstatedir='${prefix}/com'
sysconfdir='${prefix}/etc'
target_alias=''
## ----------- ##
## confdefs.h. ##
## ----------- ##
#define PACKAGE "libungif"
#define PACKAGE_BUGREPORT "abadger1999@sourceforge.net"
#define PACKAGE_NAME "libungif"
#define PACKAGE_STRING "libungif 4.1.4"
#define PACKAGE_TARNAME "libungif"
#define PACKAGE_VERSION "4.1.4"
#define VERSION "4.1.4"
configure: exit 1
Mind you, its a bit long
Kind regards
Benedict White
Offline
configure:3870: /lib/cpp conftest.c
In file included from /usr/include/bits/posix1_lim.h:153,
from /usr/include/limits.h:145,
from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/limits.h:122,
from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/syslimits.h:7,
from /usr/lib/gcc/i686-pc-linux-gnu/4.1.1/include/limits.h:11,
from conftest.c:12:
/usr/include/bits/local_lim.h:36:26: error: linux/limits.h: No such file or directory
configure:3876: $? = 1
configure: failed program was:
| /* confdefs.h. */
looks like your kernel-headers are borked!
which version do you have installed? do you have them at all?
I recognize that while theory and practice are, in theory, the same, they are, in practice, different. -Mark Mitchell
Offline
I had the latest one, but re pacmaned it and everything is working fine now.
Also I susoect it will solve a cpan issue for me.
Many many thanks.
Kind regards
Benedict White
Offline
Pages: 1