Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 182072 - app-text/highlight-2.4.8 fails to compile
Summary: app-text/highlight-2.4.8 fails to compile
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Gentoo SGML project
URL: http://www.andre-simon.de/dokuwiki/do...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-14 23:49 UTC by VinnieNZ
Modified: 2008-05-05 03:51 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description VinnieNZ 2007-06-14 23:49:33 UTC
app-text/highlight-2.4.8 fails to compile on x86 machine here with the following error:

>>> Compiling source in /var/tmp/portage/app-text/highlight-2.4.8/work/highlight-2.4.8 ...
make -C ./highlight -f ./makefile HL_DATA_DIR=/usr/share/highlight/
make[1]: Entering directory `/var/tmp/portage/app-text/highlight-2.4.8/work/highlight-2.4.8/highlight'
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c main.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c configurationreader.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c stylecolour.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c stringtools.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c xhtmlgenerator.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c latexgenerator.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c texgenerator.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c rtfgenerator.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c htmlgenerator.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c ansigenerator.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c xmlgenerator.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c codegenerator.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c languagedefinition.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c help.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c elementstyle.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c documentstyle.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c datadir.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c cmdlineoptions.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c preformatter.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c ./astyle/ASStreamIterator.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c ./astyle/ASResource.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c ./astyle/ASFormatter.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c ./astyle/ASBeautifier.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c ./dirstream0.4/dirstream.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c ./dirstream0.4/dirstream_w32_posix.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c platform_fs.cpp
c++ -O2 -DHL_DATA_DIR=\"/usr/share/highlight/\"  -c ./re/Pattern.cpp
re/Pattern.cpp: In member function `bool Pattern::quantifyCurly(int&, int&)':
re/Pattern.cpp:138: `isdigit' undeclared (first use this function)
re/Pattern.cpp:138: (Each undeclared identifier is reported only once for each
   function it appears in.)
re/Pattern.cpp: In member function `NFANode* Pattern::parse(bool, bool,
   NFANode**)':
re/Pattern.cpp:785: `tolower' undeclared (first use this function)
make[1]: *** [Pattern.o] Error 1
make[1]: Leaving directory `/var/tmp/portage/app-text/highlight-2.4.8/work/highlight-2.4.8/highlight'
make: *** [all] Error 2

!!! ERROR: app-text/highlight-2.4.8 failed.
Call stack:
  ebuild.sh, line 1615:   Called dyn_compile
  ebuild.sh, line 972:   Called qa_call 'src_compile'
  ebuild.sh, line 44:   Called src_compile
  highlight-2.4.8.ebuild, line 14:   Called die




This also happens on RHEL3 with the exact same error, solution here:

http://www.andre-simon.de/dokuwiki/doku.php?id=en:installation_linux





System info:

Portage 2.1.2.7 (default-linux/x86/2007.0, gcc-3.2.3, glibc-2.3.2-r9, 2.6.15-gentoo-r7 i686)
=================================================================
System uname: 2.6.15-gentoo-r7 i686 Intel(R) Celeron(R) CPU 2.40GHz
Gentoo Base System version 1.12.5
Timestamp of tree: Thu, 14 Jun 2007 16:30:01 +0000
dev-java/java-config: 1.3.7, 2.0.31
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.4.3-r1, 1.5.22
virtual/os-headers:  2.4.19, 2.6.11-r3
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -mcpu=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/php/apache1-php5/ext-active/ /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -mcpu=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="aac aalib acl berkdb bitmap-fonts clamav cli cracklib crypt ctype cups cvs cvsgraph dri fastcgi fortran freetds gcj gdbm iconv ipv6 isdnlog java java5 javascript jpeg2k lcms libg++ lighttpd midi milter ming mod_python modperl mssql mudflap mysql mysqli ncurses nis nls nptl nptlonly oav odbc openmp openssl pam pcre perl php pppd python readline reflection samba sendmail session snmp soap sockets spl sql sqlite sqlite3 ssl sybase t1lib tcl tcpd tidy tiff truetype-fonts type1-fonts unicode win32codecs x86 xorg zip zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS


Reproducible: Always
Comment 1 VinnieNZ 2007-06-15 00:01:59 UTC
Sorry for the spam, but I forgot that I should probably add the fix here as well, incase the website doesn't work for some reason:



*      On RHEL 3 with gcc 3.x, this error appears

re/Pattern.cpp: In member function `bool Pattern::quantifyCurly(int&, int&)’: re/Pattern.cpp:138: `isdigit’ undeclared (first use this function)

To fix, simply edit highlight/re/Pattern.cpp and add #include <ctype.h> to the includes. 



A temporary work around is to extract the archive somewhere, edit the file as above, re-tar.bz2 up the directory and stick the new copy into /usr/portage/distfiles.

Then change to /usr/portage/app-text/highlight and run a 'ebuild highlight-2.4.8.ebuild digest' and 'emerge -av app-text/highlight'.  

This allowed me to install highlight for the moment.
Comment 2 Axel Dyks 2007-06-19 17:37:55 UTC
Cannot confirm.

The problem might occur due to the rather old version of "gcc" you are using.
At least with "gcc-4.1.2" <ctype.h> is automatically included
on some very nested level ...

See "http://www.gentoo.org/doc/en/gcc-upgrading.xml" on how to
upgrade gcc on gentoo.

NOTE that upgrading gcc might break (parts of) your system, so
be careful and make sure you've followed the instructions.

Cheers,
Axel

Comment 3 Samuli Suominen (RETIRED) gentoo-dev 2008-05-05 03:35:53 UTC
Please try 2.6.9.

*highlight-2.6.9 (04 May 2008)

  04 May 2008; Samuli Suominen <drac@gentoo.org>
  +files/highlight-2.6.9-asneeded.patch, +files/highlight-2.6.9-gcc43.patch,
  +highlight-2.6.9.ebuild:
  Version bump with GCC 4.3 and -Wl,--as-needed patch by Peter Alfredsen.
Comment 4 VinnieNZ 2008-05-05 03:51:16 UTC
Can't test sorry.

Since this bug was filed almost a year ago the machine has been retired for a new one, so this is no longer a problem for me.