Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 222343 - configure for dev-lisp/gcl-2.6.7-r3 failes
Summary: configure for dev-lisp/gcl-2.6.7-r3 failes
Status: RESOLVED LATER
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Common Lisp Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-05-16 07:33 UTC by Juergen Rose
Modified: 2009-03-04 14:24 UTC (History)
1 user (show)

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


Attachments
/var/tmp/portage/dev-lisp/gcl-2.6.7-r3/work/gcl-2.6.7/config.log (config.log,7.93 KB, text/plain)
2008-05-16 07:34 UTC, Juergen Rose
Details
gcl-sbrk.patch (gcl-sbrk.patch,7.13 KB, text/plain)
2008-07-26 07:37 UTC, Ingo Bormuth
Details
gcl-2.6.7-r7.ebuild (gcl-2.6.7-r7.ebuild,4.00 KB, text/plain)
2008-07-26 07:40 UTC, Ingo Bormuth
Details
gcl-2.6.7-r7.log (dev-lisp:gcl-2.6.7-r7:20080726-071810.log,56.37 KB, text/plain)
2008-07-26 07:43 UTC, Ingo Bormuth
Details
Same as 2.6.7-r3, with debian patch version 45 (gcl-2.6.7-r4.ebuild,2.98 KB, text/plain)
2009-02-18 06:43 UTC, hirakendu
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Juergen Rose 2008-05-16 07:33:01 UTC
# Subconfigure of BFD done
# ------------------------
#
checking size of long... 4
checking sizeof struct contblock... 8
checking for endian.h... yes
checking endianness... little
checking for sbrk... yes
checking for randomized sbrk... yes
checking for ADDR_NO_RANOMIZE constant... 0x40000
checking for sys/personality.h... yes
cannot trap sbrk

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/dev-lisp/gcl-2.6.7-r3/work/gcl-2.6.7/config.log
 * 
 * ERROR: dev-lisp/gcl-2.6.7-r3 failed.


Reproducible: Always




root@snake:/root(4)# emerge --info
Portage 2.1.5 (default-linux/x86/2007.0, gcc-4.2.3, glibc-2.7-r2, 2.6.25-gentoo-r3 i686)
=================================================================
System uname: 2.6.25-gentoo-r3 i686 Pentium III (Katmai)
Timestamp of tree: Thu, 15 May 2008 23:45:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r4, 2.5.2-r3
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.2.4-r1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.62
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.25-r3
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-pipe -O3 -march=pentium3 -fomit-frame-pointer"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/config /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-pipe -O3 -march=pentium3 -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://linux.rz.ruhr-uni-bochum.de/download/gentoo-mirror http://ftp-stud.fht-esslingen.de/pub/Mirrors/gentoo/ rsync://ftp.fi.muni.cz/pub/linux/gentoo ftp://ftp.wh2.tu-dresden.de/pub/mirrors/gentoo rsync://gd.tuwien.ac.at/opsys/linux/gentoo ftp://sunsite.informatik.rwth-aachen.de/pub/Linux/gentoo http://gentoo.oregonstate.edu http://212.219.247.17/sites/www.ibiblio.org/gentoo/"
LDFLAGS=""
LINGUAS="de fr"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/science /usr/local/portage /usr/local/portage/xeffects /usr/local/sci"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X Xaw3d a52 aac acl administrator afs alsa amrr ao aotuv apache2 asf atlas auctex audacious audiofile automount bash-completion beagle berkdb bjam blas bonobo boo boost bzip2 c++ cairo cdda cddb cdf cdio cdparanoia cdr cgi chm cli corba cracklib cran crypt cups curl cxx daap dbus device-mapper dga dia divx djvu dlloader dmi dri ds3490 dv dvb dvd dvdr dvi dxr3 dynagraph eds effects elf emacs emboss encode epiphany esd evo examples exif expat extra fam fame ffmpeg fftw firefox fits flac fltk foomaticdb fortran fpx galago gd gdal gdbm geos gif gimp gimpprint ginac glade glitz gml gmp gnokii gnome gnuplot gnutls gphoto2 gpm graphics graphviz gs gsl gsm gstreamer gtk guile hal hardened hddtemp hdf hdf5 hlapi http iconv icq icu id3 imagemagick imap innodb ipv6 irda irmc isdnlog ithreads jabber java jbig john jpeg jpeg2k kerberos kexi keyring ladspa lame lapack latex lcms ldap libgda libsamplerate lm_sensors lua lzo lzw mad maildir math matroska matrox midi mmx mmxext mng mod mono motif mozdevelop mozilla mozsvg mozxmlterm mp3 mp4 mp4live mpeg mpeg2 mplayer mudflap musicbrainz mysql mysqli nautilus ncurses neXt netcdf netpbm network networkmanager nfs nls nntp nptl nptlonly nsplugin ntfs numarray numeric obex ocaml octave odbc ogdi ogg ole opengl openmp pae pam pcre pda pdf perl plotutils plugins png posix postgres postscript pppd preview-latex proj projectx pstricks python qhull quicktime readline real reflection reiserfs rhythmbox rle rpc rrdcgi rrdtool samba sasl science sdl session slang slp smp sndfile snmp soup sox speex spell spl sqlite sse sse2 ssl stlport subtitles subversion suexec svg t1lib tcl tcpd tetex tex theora threads thunderbird tidy tiff tk truetype unicode userlocales utempter v4l2 vorbis win32codecs wmf wxwindows x86 xattr xemacs xext xine xml xmlreader xmlrpc xorg xpm xv xvid xvmc zlib zvbi" ALSA_CARDS="ens1371" 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" APACHE2_MODULES="actions alias auth_basic auth_digest authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock dbd deflate dir disk_cache env expires ext_filter file_cache filter headers ident imagemap include info log_config logio mem_cache mime mime_magic negotiation proxy proxy_ajp proxy_balancer proxy_connect proxy_http rewrite setenvif so speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse                " KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de fr" USERLAND="GNU" VIDEO_CARDS="mga vesa fbdev"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Juergen Rose 2008-05-16 07:34:32 UTC
Created attachment 153285 [details]
/var/tmp/portage/dev-lisp/gcl-2.6.7-r3/work/gcl-2.6.7/config.log
Comment 2 Panagiotis Christopoulos (RETIRED) gentoo-dev 2008-05-16 15:44:54 UTC
I have tried to reproduce but I cannot. Please tell me, have you patched your kernel with an execshield patch or have you introduced to your system any hardening utilities such as paxutils etc.? 

Panagiotis
Comment 3 Juergen Rose 2008-05-16 20:05:15 UTC
Today I tried to install gcl on five computers, three times I got 

cannot trap sbrk

!!! Please attach the following file when seeking support:
!!! /var/tmp/portage/dev-lisp/gcl-2.6.7-r3/work/gcl-2.6.7/config.log
 * 
 * ERROR: dev-lisp/gcl-2.6.7-r3 failed.

Twice I could emerge gcl. At the computers, where 'emerge gcl' fails, linux-2.6.25,  2.6.25.1 , 2.6.25.3 (vanilla-sources) or 2.6.25-gentoo-r3 (gentoo-sources) were installed

and 'gzip -cd /proc/config.gz | grep -i brk' provides

# CONFIG_COMPAT_BRK is not set

On the systems where 'emerge gcl' were succesfull, linux-2.6.25 with 'gzip -cd /proc/config.gz | grep -i brk' providing "CONFIG_COMPAT_BRK=y" or 2.6.24-gentoo-r8 (the result of 'gzip -cd /proc/config.gz | grep -i brk' is empty) were installed. 
Beside of this I did not pached the kernel or used any hardened features.

Regards Juergen

Comment 4 Marijn Schouten (RETIRED) gentoo-dev 2008-05-16 21:21:59 UTC
in #lisp:
[ma mei 12 2008] [19:02:54] <hkBst>     does heap randomization (COMPAT_BRK) break any lisp implementation?
[ma mei 12 2008] [19:03:06] <froydnj>   sbcl and cmucl almost certainly
Comment 5 Panagiotis Christopoulos (RETIRED) gentoo-dev 2008-05-16 23:02:25 UTC
(In reply to comment #4)
> in #lisp:
> [ma mei 12 2008] [19:02:54] <hkBst>     does heap randomization (COMPAT_BRK)
> break any lisp implementation?
> [ma mei 12 2008] [19:03:06] <froydnj>   sbcl and cmucl almost certainly
> 

It is definitely a heap randomization issue. If you set your CONFIG_COMPAT_BRK to "yes", you will be fine, Juergen. I don't know how you build the kernels of your boxes, but propably, the boxes that fail to emerge gcl, have enabled randomization("no"). With CONFIG_COMPAT_BRK=no , gcl failed in both my two boxes, on which I tested it. Theoritically, gcl's configure script can fix this itself, but, old gcl sources+new headers, I think that cause those personality.h syntax errors. A workaround for now is just CONFIG_COMPAT_BRK=yes. 

Comment 6 Juergen Rose 2008-05-17 06:12:18 UTC
I have no problem to emerge clisp and sbcl, if heap randomization is set as a kernel option. And I thought it is recommended to set it for security reasons.
And maxima basing on sbcl seems to work correctly. Perhaps there is a chance, that gcl cooperates with heap randomization too? ;-)

Juergen


Comment 7 Ingo Bormuth 2008-07-26 07:37:43 UTC
Created attachment 161391 [details]
gcl-sbrk.patch

The people at debian seem to have solved this bug.
See http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=487435

Attached patch applies, configure passes but make fails.
I currently don't have time to follow this up so I post what I have...
Comment 8 Ingo Bormuth 2008-07-26 07:40:47 UTC
Created attachment 161393 [details]
gcl-2.6.7-r7.ebuild


Ebuild taken from the the gentoo lisp overlay.
Version 2.6.7-36.1 using the sbrk patch.
Comment 9 Ingo Bormuth 2008-07-26 07:43:09 UTC
Created attachment 161394 [details]
gcl-2.6.7-r7.log


Portage Log. Fails to include some header file.
Comment 10 Panagiotis Christopoulos (RETIRED) gentoo-dev 2008-07-28 06:51:41 UTC
Hi Ingo, 

Thanks for searching for this patch, and for the updated ebuild, which reminded me, for the new debian sources(36.1). I'm going to write two new ebuilds, one based on the 36.1 debian sources, which propably are gcl 2.6.8 and another based on the CVS debian snapshot, version 2.7.0. For now, I resolve the this bug, as RESOLVED LATER, as it's here for ages, and the lisp team will do a lot of testing before moving any overlay's gcl ebuild, to the main tree. I'm sure that Jurgen, will report any bugs of the new ebuilds, as he always does :) Stay tuned.

Panagiotis(pchrist)
Comment 11 hirakendu 2009-02-18 06:43:20 UTC
Created attachment 182398 [details]
Same as 2.6.7-r3, with debian patch version 45

Instead of disabling heap randomization in the kernel, an easy workaround is to temporarily disable using command 'sysctl kernel.randomize_va_space=0' (as suggested by the debian patch?). In any case, it would be nice to update to debian patch version 45 (ebuild attached), although the current ebuid works fine too.
Comment 12 Martin von Gagern 2009-03-04 08:30:16 UTC
(In reply to comment #10)
> For now, I resolve the this
> bug, as RESOLVED LATER, as it's here for ages, and the lisp team will do a lot
> of testing before moving any overlay's gcl ebuild, to the main tree.

How about moving it to the main tree, but package-masking it? That way, you won't have to worry about breaking things for happy users, but those who hit this issue and are willing to risk breaking their gcl (well, breaking it more than it might already be, due to wrong assumptions at build time) can simply unmask it and give it a try. They would not have to jump through hoops (i.e. install yet another overlay). I would even consider an unmasked ~ARCH ebuild reasonable, given the fact that unfixed behaviour seems plainly wrong.
Comment 13 Marijn Schouten (RETIRED) gentoo-dev 2009-03-04 14:24:31 UTC
(In reply to comment #12)
> How about moving it to the main tree, but package-masking it? That way, you
> won't have to worry about breaking things for happy users, but those who hit
> this issue and are willing to risk breaking their gcl (well, breaking it more
> than it might already be, due to wrong assumptions at build time) can simply
> unmask it and give it a try. They would not have to jump through hoops (i.e.
> install yet another overlay). I would even consider an unmasked ~ARCH ebuild
> reasonable, given the fact that unfixed behaviour seems plainly wrong.

Hi Martin,
Panagiotis had been working on gcl in the overlay, but it isn't pretty since gcl hasn't released in a long time. Hopefully that will change as there is some activity on the gcl lists again.
I don't want to add ebuilds of low quality to the tree and I'm not sure of the relative quality of what's currently in the tree compared to what's in the lisp overlay. gcl is potentially a huge time sink and there is plenty of other stuff to work on with a better return/investment ratio. Since Panagiotis will be unavailable for a year, that leaves no-one to work on this who has commit access to the main tree.
If you or anyone else wants to work on gcl in our overlay, then please find me in #gentoo-lisp.