Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 154859 - dev-lang/mosml-2.01 fails to compile
Summary: dev-lang/mosml-2.01 fails to compile
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High normal (vote)
Assignee: Jeremy Olexa (darkside) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-12 01:13 UTC by Michael Helmling
Modified: 2008-06-06 01:28 UTC (History)
4 users (show)

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


Attachments
The output of "emerge mosml". (emerge_mosml.out,14.95 KB, text/plain)
2007-11-20 14:19 UTC, rhywek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Helmling 2006-11-12 01:13:19 UTC
This is the tail of "emerge mosml" on ~amd64.

make[1]: Entering directory `/var/tmp/portage/dev-lang/mosml-2.01/work/mosml/src/mosmllib'
make[1]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
../camlrunm ../mosmlcmp -stdlib ../mosmllib -P none -imptypes Vector.sig
../camlrunm ../mosmlcmp -stdlib ../mosmllib -P none -imptypes Array.sig
../camlrunm ../mosmlcmp -stdlib ../mosmllib -P none -imptypes List.sig
/lib/cpp -P -traditional -Dunix -Umsdos Array.mlp > Array.sml
../camlrunm ../mosmlcmp -stdlib ../mosmllib -P none -imptypes Array.sml
make[1]: *** [Array.uo] Segmentation fault
make[1]: Leaving directory `/var/tmp/portage/dev-lang/mosml-2.01/work/mosml/src/mosmllib'
make: *** [world] Error 2

!!! ERROR: dev-lang/mosml-2.01 failed.
Call stack:
  ebuild.sh, line 1568:   Called dyn_compile
  ebuild.sh, line 937:   Called src_compile
  mosml-2.01.ebuild, line 16:   Called die

!!! (no error message)
!!! If you need support, post the topmost build error, and the call stack if relevant.




# emerge --info
Portage 2.1.2_rc1-r5 (default-linux/amd64/2006.1/desktop, gcc-4.1.1, glibc-2.5-r0, 2.6.18-gentoo x86_64)
=================================================================
System uname: 2.6.18-gentoo x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System version 1.12.6
Last Sync: Sat, 11 Nov 2006 21:00:01 +0000
ccache version 2.4 [enabled]
dev-java/java-config: 1.3.7, 2.0.30
dev-lang/python:     2.4.4
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r6
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.60
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
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -march=athlon64 -pipe -fomit-frame-pointer"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/NX/etc /usr/NX/home /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-O2 -march=athlon64 -pipe -fomit-frame-pointer"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="/usr/portage/distfiles/fetch-restricted/ http://mirror.uni-c.dk/pub/gentoo/"
LANG="de_DE.utf8"
LC_ALL="de_DE.utf8"
LINGUAS="de"
MAKEOPTS="-j2"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="amd64 X a52 aac alsa apache2 avahi bash-completion bitmap-fonts bluetooth browserplugin bzip2 cairo caps cdda cdr cli cracklib crypt cups dbus dga divx4linux dlloader dri dts dvb dvd dvdr dvdread elibc_glibc emboss encode exif fam fbsplash ffmpeg firefox flac foomaticdb fortran gif gpm hal iconv imlib input_devices_evdev input_devices_keyboard input_devices_mouse insecure-savers ipod isdnlog jack java jpeg kde kdeenablefinal kdehiddenvisibility kdepim kernel_linux libcaca libg++ linguas_de linuxthreads-tls lm_sensors logitech-mouse logrotate mad matroska mjpeg mozilla mozsvg mp3 mpeg mplayer musicbrainz mysql ncurses nis nls no-seamonkey nptl nptlonly nsplugin nvidia offensive ogg oggvorbis opengl pam pcre pdf perl png ppds pppd python qt3 qt4 quicktime readline reflection samba sasl sdl session smime spl ssl stream svg tcpd tetex theora threads tidy tiff truetype truetype-fonts type1-fonts udev unicode usb userland_GNU userlocales v4l v4l2 vcd video_cards_nv video_cards_nvidia video_cards_v4l video_cards_vga visualization vlm vorbis wmf xcomposite xext xine xinerama xml xorg xv xvid xvmc zeroconf zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Ian Voysey 2007-01-29 08:39:28 UTC
I have the exact same output. Also, running `mosml` results in the following error and stack trace:

$ mosml
Moscow ML version 2.01 (January 2004)
Enter `quit();' to quit.
*** glibc detected *** /opt/mosml/bin/camlrunm: free(): invalid pointer: 0x000000000053f000 ***
======= Backtrace: =========
/lib/libc.so.6[0x2afddaf56c1c]
/lib/libc.so.6(__libc_free+0x86)[0x2afddaf57796]
/opt/mosml/bin/camlrunm(alloc_shr+0x35c)[0x40b60c]
/opt/mosml/bin/camlrunm(intern_val+0x1e7)[0x40e0e7]
/opt/mosml/bin/camlrunm(interprete+0xe26)[0x4065e6]
/opt/mosml/bin/camlrunm(main+0x285)[0x409fc5]
/lib/libc.so.6(__libc_start_main+0xf6)[0x2afddaf0a396]
/opt/mosml/bin/camlrunm[0x405729]
======= Memory map: ========
00400000-00419000 r-xp 00000000 03:03 1458499                            /opt/mosml/bin/camlrunm
00518000-0051a000 rw-p 00018000 03:03 1458499                            /opt/mosml/bin/camlrunm
0051a000-005a0000 rw-p 0051a000 00:00 0                                  [heap]
2afddab75000-2afddab90000 r-xp 00000000 03:03 4350308                    /lib/ld-2.5.so
2afddab90000-2afddab91000 rw-p 2afddab90000 00:00 0 
2afddabb3000-2afddac79000 rw-p 2afddabb3000 00:00 0 
2afddac8f000-2afddac90000 r--p 0001a000 03:03 4350308                    /lib/ld-2.5.so
2afddac90000-2afddac91000 rw-p 0001b000 03:03 4350308                    /lib/ld-2.5.so
2afddac91000-2afddace8000 r-xp 00000000 03:03 4350268                    /lib/libm-2.5.so
2afddace8000-2afddade7000 ---p 00057000 03:03 4350268                    /lib/libm-2.5.so
2afddade7000-2afddade9000 rw-p 00056000 03:03 4350268                    /lib/libm-2.5.so
2afddade9000-2afddadeb000 r-xp 00000000 03:03 4350269                    /lib/libdl-2.5.so
2afddadeb000-2afddaeeb000 ---p 00002000 03:03 4350269                    /lib/libdl-2.5.so
2afddaeeb000-2afddaeed000 rw-p 00002000 03:03 4350269                    /lib/libdl-2.5.so
2afddaeed000-2afddb01d000 r-xp 00000000 03:03 4350309                    /lib/libc-2.5.so
2afddb01d000-2afddb11d000 ---p 00130000 03:03 4350309                    /lib/libc-2.5.so
2afddb11d000-2afddb120000 r--p 00130000 03:03 4350309                    /lib/libc-2.5.so
2afddb120000-2afddb122000 rw-p 00133000 03:03 4350309                    /lib/libc-2.5.so
2afddb122000-2afddb129000 rw-p 2afddb122000 00:00 0 
2afddb1d1000-2afddb2b3000 rw-p 2afddb1d1000 00:00 0 
2b008b0b0000-2b008b0bb000 r-xp 00000000 03:03 4350184                    /lib/libgcc_s.so.1
2b008b0bb000-2b008b1ba000 ---p 0000b000 03:03 4350184                    /lib/libgcc_s.so.1
2b008b1ba000-2b008b1bb000 rw-p 0000a000 03:03 4350184                    /lib/libgcc_s.so.1
2b033c000000-2b033c021000 rw-p 2b033c000000 00:00 0 
2b033c021000-2b0340000000 ---p 2b033c021000 00:00 0 
7fffffcba000-7fffffccf000 rw-p 7fffffcba000 00:00 0                      [stack]
ffffffffff600000-ffffffffffe00000 ---p 00000000 00:00 0                  [vdso]



Here's my emerge --info:
Portage 2.1.2-r1 (default-linux/amd64/2006.0, gcc-3.4.6, glibc-2.5-r0, 2.6.16-gentoo-r8 x86_64)
=================================================================
System uname: 2.6.16-gentoo-r8 x86_64 AMD Athlon(tm) 64 Processor 3500+
Gentoo Base System release 1.12.9
Timestamp of tree: Sun, 28 Jan 2007 08:00:01 +0000
dev-java/java-config: 1.3.7, 2.0.31-r3
dev-lang/python:     2.3.6, 2.4.4
dev-python/pycrypto: 2.0.1-r5
sys-apps/sandbox:    1.2.18.1
sys-devel/autoconf:  2.13, 2.61
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
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.14
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.19.2-r1
ACCEPT_KEYWORDS="amd64 ~amd64"
AUTOCLEAN="yes"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=athlon64 -O3 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=athlon64 -O3 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://mirror.datapipe.net/gentoo"
MAKEOPTS="-j2"
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"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X aac aim alsa amd64 avi bash-completion berkdb bitmap-fonts cdr cli cracklib crypt cups dlloader dri dvd dvdr dvdread eds emacs emboss encode flac foomaticdb fortran gif gpg gpm gstreamer gtk gtk2 iconv imlib ipv6 isdnlog joystick jpeg ldap lzw lzw-tiff matroska mikmod mmap mp3 mpeg ncurses nls nptl nptlonly ntpl nvidia ogg oggvorbis opengl oss pam pcre pdflib perl png ppds pppd python qt3 qt4 quicktime readline reflection sdl server session spell spl ssl tcpd tetex tiff truetype-fonts type1-fonts unicode usb vorbis x264 xinerama xorg xpm xv zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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 joystick" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="nvidia vesa fbdev"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 2 rhywek 2007-11-20 14:19:36 UTC
Created attachment 136489 [details]
The output of "emerge mosml".

I seem to get a different problem, but perhaps related. The output of "emerge mosml" is in the attachment.

# emerge --info
Portage 2.1.3.19 (default-linux/amd64/2007.0, gcc-4.1.2, glibc-2.6.1-r0, 2.6.22-gentoo-r9 x86_64)
=================================================================
System uname: 2.6.22-gentoo-r9 x86_64 Intel(R) Core(TM)2 Duo CPU T7500 @ 2.20GHz
Timestamp of tree: Tue, 20 Nov 2007 09:46:01 +0000
app-shells/bash:     3.2_p17
dev-java/java-config: 1.3.7, 2.0.33-r1
dev-lang/python:     2.4.4-r6
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.18-r1
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.22-r2
ACCEPT_KEYWORDS="amd64"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=nocona -O2 -ggdb"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=nocona -O2 -ggdb"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer nostrip parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv"
GENTOO_MIRRORS="http://mirror.uni-c.dk/pub/gentoo/"
MAKEOPTS="-j3"
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"
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage"
USE="X accessibility acl alsa amd64 avahi berkdb bitmap-fonts cli cracklib crypt cups dbus dri fortran gdbm gnome gpm gtk hal iconv ipv6 isdnlog matroska midi mmx mmxext mudflap ncurses nls nptl nptlonly nvidia opengl openmp pam pcre perl pppd python readline reflection session spl sse sse2 ssl ssse3 tcpd truetype truetype-fonts type1-fonts unicode xorg xulrunner xvmc zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci 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="vesa nv nvidia"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 3 Hans Lub 2008-01-12 17:15:39 UTC
Setting the environment variable MALLOC_MMAP_THRESHOLD_  (don't forget that final underscore!) to 0 before emerging (and running) mosml will fix the problem.

This problem is not gentoo-specific, cf: http://fcp.surfsite.org/modules/newbb/viewtopic.php?viewmode=flat&order=ASC&topic_id=45883&forum=10&move=prev&topic_time=1193047140 ; it will have to be fixed somewhere upstream.

Comment 4 Evil Compile Person 2008-01-16 19:49:04 UTC
Let me be the first one to say "Eeeeeeeew."
Comment 5 marty rosenberg 2008-04-14 12:57:33 UTC
they say that this is in fact a bug with mosml in more modern implementations of glibc, and provide a fixed version on the frontpage

http://www.itu.dk/people/sestoft/mosml/gc_ctrl.c

I tried it with that file, and it seems to work fine.
Comment 6 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-06-06 01:27:52 UTC
(In reply to comment #5)
> they say that this is in fact a bug with mosml in more modern implementations
> of glibc, and provide a fixed version on the frontpage
> 
> http://www.itu.dk/people/sestoft/mosml/gc_ctrl.c
> 
> I tried it with that file, and it seems to work fine.
> 

Committed mosml-2.01-r1.ebuild + patch. Thanks for reporting!