Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 136145 - [GCC 4.1.1] mono-1.1.13.6 failed (undefined reference to `mono_mutex_unlock_in_cleanup')
Summary: [GCC 4.1.1] mono-1.1.13.6 failed (undefined reference to `mono_mutex_unlock_...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Library (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: dotnet project
URL:
Whiteboard:
Keywords:
: 146740 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-06-08 21:59 UTC by Marco Lui
Modified: 2006-12-12 10:59 UTC (History)
3 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 Marco Lui 2006-06-08 21:59:15 UTC
i686-pc-linux-gnu-gcc -O -march=pentium4 -pipe -fno-strict-aliasing -Wdeclaration-after-statement -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings -mno-tls-direct-seg-refs -o pedump pedump.o -pthread -Wl,--export-dynamic  ./.libs/libmonoruntime.a ../io-layer/.libs/libwapi.a ../utils/.libs/libmonoutils.a ../os/.libs/libmonoos.a ../../libgc/.libs/libmonogc.a /usr/lib/libgthread-2.0.so /usr/lib/libgmodule-2.0.so -ldl /usr/lib/libglib-2.0.so -lnsl -lpthread -lm -lrt
../io-layer/.libs/libwapi.a(events.o): In function `_wapi_handle_set_signal_state':
../../mono/io-layer/handles-private.h:156: undefined reference to `mono_mutex_unlock_in_cleanup'
../io-layer/.libs/libwapi.a(handles.o): In function `_wapi_handle_new':
/var/tmp/portage/mono-1.1.13.6/work/mono-1.1.13.6/mono/io-layer/handles.c:335: undefined reference to `mono_mutex_unlock_in_cleanup'
../io-layer/.libs/libwapi.a(handles.o): In function `_wapi_handle_new_from_offset':
/var/tmp/portage/mono-1.1.13.6/work/mono-1.1.13.6/mono/io-layer/handles.c:424: undefined reference to `mono_mutex_unlock_in_cleanup'
/var/tmp/portage/mono-1.1.13.6/work/mono-1.1.13.6/mono/io-layer/handles.c:465: undefined reference to `mono_mutex_unlock_in_cleanup'
../io-layer/.libs/libwapi.a(handles.o): In function `_wapi_handle_foreach':
/var/tmp/portage/mono-1.1.13.6/work/mono-1.1.13.6/mono/io-layer/handles.c:605: undefined reference to `mono_mutex_unlock_in_cleanup'
../io-layer/.libs/libwapi.a(handles.o):/var/tmp/portage/mono-1.1.13.6/work/mono-1.1.13.6/mono/io-layer/handles.c:646: more undefined references to `mono_mutex_unlock_in_cleanup' follow
collect2: ld returned 1 exit status
make[3]: *** [pedump] Error 1
make[3]: Leaving directory `/var/tmp/portage/mono-1.1.13.6/work/mono-1.1.13.6/mono/metadata'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/mono-1.1.13.6/work/mono-1.1.13.6/mono'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/mono-1.1.13.6/work/mono-1.1.13.6'
make: *** [all] Error 2

!!! ERROR: dev-lang/mono-1.1.13.6 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  mono-1.1.13.6.ebuild, line 80:   Called die

!!! MONO compilation failure
!!! If you need support, post the topmost build error, and the call stack if relevant.
Comment 1 Marco Lui 2006-06-08 21:59:42 UTC
emerge --info
Portage 2.1_rc3-r5 (default-linux/x86/2006.0, gcc-4.1.1, glibc-2.3.6-r3, 2.6.15-1.2054_FC5smp i686)
=================================================================
System uname: 2.6.15-1.2054_FC5smp i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.6.14
dev-lang/python:     2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict userfetch userpriv"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.UTF-8"
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://neek.room/gentoo-postage"
USE="x86 7zip X acpi alsa apache2 apm arts avi bash-completion beagle berkdb bitmap-fonts cdr cli crypt cups dri dvd dvdr eds emboss encode esd foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 imlib ipv6 isdnlog jpeg kde libg++ libwww mad mikmod motif mp3 mpeg ncurses nls nptl nvidia ogg opengl oss pam pcre pdflib perl png pppd python qt quicktime readline reflection samba sdl session spell spl ssl tcpd truetype truetype-fonts type1-fonts udev vorbis xml xmms xorg xv zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux userland_GNU video_cards_nv video_cards_nvidia video_cards_vesa"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 2 Marco Lui 2006-06-08 22:03:27 UTC
Building a new system w/ LVM2, GCC 4.1, xorg-x11-7.0, and gnome 2.14 using an existing FC5 install as a medium. mono fails to emerge with the above error. No SIGSEGV unlike most other mono bugs. As it's a new install, there is no previous version of mono installed.
Comment 3 Marco Lui 2006-06-10 06:17:31 UTC
I tried switching back to gcc-3.4.4. The merge still fails but with a different error:

make[3]: Entering directory `/var/tmp/portage/mono-1.1.13.6/work/mono-1.1.13.6/mcs'
make profile-do--default--all profile-do--net_2_0--all
make[4]: Entering directory `/var/tmp/portage/mono-1.1.13.6/work/mono-1.1.13.6/mcs'
make PROFILE=basic all
make[5]: Entering directory `/var/tmp/portage/mono-1.1.13.6/work/mono-1.1.13.6/mcs'
mono: mono-codeman.c:257: new_codechunk: Assertion `!err' failed.
make[6]: *** [build/deps/basic-profile-check.exe] Aborted
make[6]: Entering directory `/var/tmp/portage/mono-1.1.13.6/work/mono-1.1.13.6/mcs'
*** The contents of your 'monolite' directory may be out-of-date
*** You may want to try 'make get-monolite-latest'
make[6]: *** [do-profile-check-monolite] Error 1
make[6]: Leaving directory `/var/tmp/portage/mono-1.1.13.6/work/mono-1.1.13.6/mcs'
make[5]: *** [do-profile-check] Error 2
make[5]: Leaving directory `/var/tmp/portage/mono-1.1.13.6/work/mono-1.1.13.6/mcs'
make[4]: *** [profile-do--basic--all] Error 2
make[4]: Leaving directory `/var/tmp/portage/mono-1.1.13.6/work/mono-1.1.13.6/mcs'
make[3]: *** [profiles-do--all] Error 2
make[3]: Leaving directory `/var/tmp/portage/mono-1.1.13.6/work/mono-1.1.13.6/mcs'
make[2]: *** [all-local] Error 2
make[2]: Leaving directory `/var/tmp/portage/mono-1.1.13.6/work/mono-1.1.13.6/runtime'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/mono-1.1.13.6/work/mono-1.1.13.6'
make: *** [all] Error 2

!!! ERROR: dev-lang/mono-1.1.13.6 failed.
Call stack:
  ebuild.sh, line 1539:   Called dyn_compile
  ebuild.sh, line 939:   Called src_compile
  mono-1.1.13.6.ebuild, line 80:   Called die

!!! MONO compilation failure
!!! If you need support, post the topmost build error, and the call stack if relevant.


*****************
** EMERGE INFO **
*****************

Portage 2.1_rc3-r5 (default-linux/x86/2006.0, gcc-3.4.4, glibc-2.3.6-r3, 2.6.15-1.2054_FC5smp i686)
=================================================================
System uname: 2.6.15-1.2054_FC5smp i686 Intel(R) Pentium(R) 4 CPU 2.40GHz
Gentoo Base System version 1.6.14
ccache version 2.3 [enabled]
dev-lang/python:     2.4.2
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.3
dev-util/confcache:  0.4.2-r1
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=pentium4 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb"
CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/env.d"
CXXFLAGS="-march=pentium4 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig buildpkg ccache confcache distlocks metadata-transfer parallel-fetch sandbox sfperms strict userfetch userpriv"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.UTF-8"
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://neek.room/gentoo-postage"
USE="x86 7zip X acpi alsa apache2 apm arts avi bash-completion beagle berkdb bitmap-fonts cdr cli crypt cups dri dvd dvdr eds emboss encode esd foomaticdb fortran gdbm gif gnome gpm gstreamer gtk gtk2 imlib ipv6 isdnlog jpeg kde libg++ libwww mad mikmod motif mp3 mpeg ncurses nls nptl nvidia ogg opengl oss pam pcre pdflib perl png pppd python qt quicktime readline reflection samba sdl session spell spl ssl tcpd truetype truetype-fonts type1-fonts udev vorbis xml xmms xorg xv zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux userland_GNU video_cards_nv video_cards_nvidia video_cards_vesa"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 4 Marco Lui 2006-06-11 03:25:15 UTC
I went into /var/tmp after the failure of the ebuild and did the following in mono's working dir:

make clean
./configure --prefix=/usr/local
make

make here succeeds without errors. Trying to figure out why the ebuild doesn't succeed.
Comment 5 Marco Lui 2006-06-12 00:31:23 UTC
Ammendment to comment #3: Switching to gcc-3.4.5 and re-emerging libtool allows mono to build properly. It seems that gcc-4.1.1 and its libtool mangle the package somehow. Is it safe to keep a mono built with gcc-3.4.5 in a system built with gcc-4.1.1?
Comment 6 Graziano Panzera 2006-06-12 06:17:53 UTC
(In reply to comment #4)
> I went into /var/tmp after the failure of the ebuild and did the following in
> mono's working dir:
> 
> make clean
> ./configure --prefix=/usr/local
> make
> 
> make here succeeds without errors. Trying to figure out why the ebuild doesn't
> succeed.
> 
Ty commenting your CFLAGS in make.conf .
Running configure without the enviroment set make the script fall back to defaults gcc flags.
Comment 7 Marco Lui 2006-06-12 07:53:23 UTC
Commenting out cflags solved it. For reference, my cflags are:

CFLAGS="-march=pentium4 -pipe"
CXXFLAGS="${CFLAGS}"

I notice that the ebuild calls strip-flags in src_compile(). Is this supposed to do the equivalent of commenting out the flags?
Comment 8 Aaron Peterson 2006-08-13 12:11:49 UTC
I already ran fix_libtool scripts. I get the same error on 1.1.16.1

i686-pc-linux-gnu-gcc -O -march=athlon-xp -O2 -pipe -fno-unit-at-a-time -fno-strict-aliasing -Wdeclaration-after-statement -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual -Wcast-align -Wwrite-strings -mno-tls-direct-seg-refs -o pedump pedump.o -pthread -Wl,--export-dynamic  ./.libs/libmonoruntime.a ../io-layer/.libs/libwapi.a ../utils/.libs/libmonoutils.a ../../libgc/.libs/libmonogc.a /usr/lib/libgthread-2.0.so /usr/lib/libgmodule-2.0.so -ldl /usr/lib/libglib-2.0.so -lnsl -lpthread -lm -lrt
../io-layer/.libs/libwapi.a(events.o): In function `_wapi_handle_set_signal_state':
../../mono/io-layer/handles-private.h:157: undefined reference to `mono_mutex_unlock_in_cleanup'
../io-layer/.libs/libwapi.a(events.o): In function `event_create':
/mnt/sata2/portage_tempdir/portage/mono-1.1.16.1/work/mono-1.1.16.1/mono/io-layer/events.c:196: undefined reference to `_wapi_handle_unlock_handle'
../io-layer/.libs/libwapi.a(events.o): In function `event_pulse':
/mnt/sata2/portage_tempdir/portage/mono-1.1.16.1/work/mono-1.1.16.1/mono/io-layer/events.c:376: undefined reference to `_wapi_handle_unlock_handle'
../io-layer/.libs/libwapi.a(events.o): In function `event_reset':
/mnt/sata2/portage_tempdir/portage/mono-1.1.16.1/work/mono-1.1.16.1/mono/io-layer/events.c:540: undefined reference to `_wapi_handle_unlock_handle'
../io-layer/.libs/libwapi.a(events.o): In function `event_set':

scargot aaron # emerge --info
Portage 2.1.1_pre5 (default-linux/x86/2006.0, gcc-4.1.1/vanilla, glibc-2.4-r3, 2.6.17-gentoo-r3 i686)
=================================================================
System uname: 2.6.17-gentoo-r3 i686 AMD Athlon(tm) XP 1700+
Gentoo Base System version 1.12.4
Last Sync: Sun, 13 Aug 2006 18:20:01 +0000
ccache version 2.4 [enabled]
app-admin/eselect-compiler: 2.0.0_rc2-r1
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     2.4-r2
dev-util/confcache:  [Not Present]
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
sys-devel/binutils:  2.17
sys-devel/gcc-config: 2.0.0_rc1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.17
ACCEPT_KEYWORDS="x86 ~x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon-xp -O2 -fomit-frame-pointer -Wall -pipe -fno-unit-at-a-time "
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/X11/xkb /usr/share/config"
CONFIG_PROTECT_MASK="/etc/env.d /etc/env.d/java/ /etc/eselect/compiler /etc/gconf /etc/java-config/vms/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c"
CXXFLAGS="-march=athlon-xp -O2 -fomit-frame-pointer -Wall -pipe -fno-unit-at-a-time "
DISTDIR="/mnt/sata2/distfiles"
FEATURES="autoconfig ccache confcache distlocks fixpackages metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS="en_US en zh_TW zh_CN ru es en_US"
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="/mnt/sata2/portage_tempdir"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.namerica.gentoo.org/gentoo-portage"
USE="x86 16bit 3dnow 3dnowext X a52 aac accessibility acl acpi alsa amd amr apache2 apm arts artswrappersuid asf avi berkdb bidi bitmap-fonts cap caps cjk cjkcrypt cli cpudetection crypt css cups dba dbus dga divx4linux djbfft dlloader dmx dnd doc dpms dri dv dvb dvd dvdread edl eds elibc_glibc emboss encode esd fat fbcon ffmpeg firefox flac flash flatfile fmod font-server foomaticdb fortran freewnn gdbm gif gimp gimpprint gnome gphoto2 gpm grammar gstreamer gtk gtk2 hal hardenedphp icq ieee1394 imagemagick imap imlib immqt-bc input_devices_kbd input_devices_keyboard input_devices_mouse intl ipod ipv6 isdnlog jabber java javascript jbig jce joystick jp2 jpeg jpeg2k kde kdeenablefinal kdehiddenvisibility kdepim kernel_linux ldap libg++ libwww linguas_en linguas_en_US linguas_es linguas_ru linguas_zh_CN linguas_zh_TW live lm_sensors logitech-mouse ltsp lzo lzw m17n-lib mad madwifi maildir math md5sum mdb mikmod ming mjpeg mmx mmxext mng mono motif mozdevelop mozsvg mozxmlterm mp3 mp4 mp4live mpeg mpeg2 mpi mplayer msn mssql mule music nas ncurses net network nforce2 nls nptl nptlonly nsplugin ntlm nv nvidia offensive ogg oldworld openexr opengl oss pam pcre pdf pdflib perl physfs pic png posix pppd python qt3 qt4 quicktime readline real reflection reiserfs rtc samba sasl sdl session smime spell spl sql sse sse-filters ssl subtitles tcpd tga theora threads tidy tiff timidity transcode truetype truetype-fonts type1 type1-fonts udev uim unicode usb userland_GNU v4l v4l2 vcd vhosts video_cards_fbdev video_cards_nv video_cards_nvidia video_cards_vesa vidix vim-with-x virus-scan vnc vorbis wifi win32codecs winbind wma wmf x264 xanim xcomposite xine xinerama xml xmms xorg xpm xprint xscreensaver xv xvid xvmc yahoo yv12 zeo zeroconf zlib"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY


Comment 9 Aaron Peterson 2006-09-15 10:13:42 UTC
So.. Why after running fixlibtool scripts, and re emerging the system from ground up, and commenting out useflags... does mono still not compile?
Comment 10 Aaron Peterson 2006-09-15 10:14:13 UTC
So.. Why after running fixlibtool scripts, and re emerging the system from ground up, and commenting out useflags... does mono still not compile?
Comment 11 Aaron Peterson 2006-09-18 12:19:58 UTC
could be a bad glibc?
Comment 12 Jurek Bartuszek (RETIRED) gentoo-dev 2006-10-21 14:46:25 UTC
*** Bug 146740 has been marked as a duplicate of this bug. ***
Comment 13 Saleem Abdulrasool (RETIRED) gentoo-dev 2006-12-09 17:14:34 UTC
Marking fixed, please reopen if you can cause the build failure with the current versions in portage.
Comment 14 Daniel Gryniewicz (RETIRED) gentoo-dev 2006-12-12 10:59:23 UTC
This just failed for me, with 1.1.13.8.1.  I changed my CFLAGS from this:
CFLAGS="-march=opteron -O0 -pipe -ggdb -Wstrict-aliasing -Wreturn-type -Wimplicit -Wformat -Werror-implicit-funciton-declaration"
to this:
CFLAGS="-march=opteron -O2 -pipe"

and it worked.  Best guess is it doesn't like -O0.