[Mono-bugs] [Bug 79240][Maj] New - gmcs assumes bad home directory for user 0 (often root, but sometimes not)

bugzilla-daemon at bugzilla.ximian.com bugzilla-daemon at bugzilla.ximian.com
Thu Aug 31 18:27:26 EDT 2006

Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by wavael at yahoo.fr.


--- shadow/79240	2006-08-31 18:27:26.000000000 -0400
+++ shadow/79240.tmp.7400	2006-08-31 18:27:26.000000000 -0400
@@ -0,0 +1,218 @@
+Bug#: 79240
+Product: Mono: Compilers
+Version: 1.1
+OS Details: Archlinux
+Status: NEW   
+Priority: Major
+Component: C#
+AssignedTo: rharinath at novell.com                            
+ReportedBy: wavael at yahoo.fr               
+QAContact: mono-bugs at ximian.com
+TargetMilestone: ---
+Summary: gmcs assumes bad home directory for user 0 (often root, but sometimes not)
+Description of Problem:
+When gmcs is used in a fakeroot environnement, it will try to write in
+/root/.wapi but it is forbidden. Instead it should write in $HOME/.wapi
+where $HOME is not /root, but the real HOME directory of the user running
+Steps to reproduce the problem:
+1. Log in as normal user (id != 0 , $HOME != /root , /root is not writable
+by the user)
+2. run fakeroot (now id report 0 , but $HOME is not changed)
+3. compile some code with gmcs (failing source code is in the next message)
+Actual Results:
+gmcs will fail in trying to write in /root/.wapi 
+Expected Results:
+gmcs should write in $HOME/.wapi
+How often does this happen? 
+Always ( with source file included )
+Additional Information:
+I'm not a C# coder, so I join the source file (from Desktop Drapes) to
+check if it's a problem with this specific file or with every file.
+fakeroot is a needed tool to compile programs for Archlinux with makepkg.
+It's designed for not having to be root to make installable packages, and
+with mono, I HAVE to be root which is a major problem.
+Here is the compilation process:
+[fun at zod drapes]$ makepkg
+==> Entering fakeroot environment
+==> Making package: drapes 0.4.96-bzr3 (Thu Aug 31 23:31:49 CEST 2006)
+==> Checking Runtime Dependencies...
+==> Checking Buildtime Dependencies...
+==> Retrieving Sources...
+==>     Found drapes-0.4.96-bzr3.tar.gz in build dir
+==> Validating source files with MD5sums
+    drapes-0.4.96-bzr3.tar.gz ... Passed
+==> Extracting Sources...
+==>     tar --use-compress-program=gzip -xf drapes-0.4.96-bzr3.tar.gz
+==> Removing existing pkg/ directory...
+==> Starting build()...
+checking build system type... i686-pc-linux-gnu
+checking host system type... i686-pc-linux-gnu
+checking target system type... i686-pc-linux-gnu
+checking for a BSD-compatible install... /bin/install -c
+checking whether build environment is sane... yes
+checking for gawk... gawk
+checking whether make sets $(MAKE)... yes
+checking whether to enable maintainer-specific portions of Makefiles... no
+checking for intltool >= 0.21... 0.35.0 found
+checking for perl... /usr/bin/perl
+checking for XML::Parser... ok
+checking for iconv... /usr/bin/iconv
+checking for msgfmt... /usr/bin/msgfmt
+checking for msgmerge... /usr/bin/msgmerge
+checking for xgettext... /usr/bin/xgettext
+checking for a BSD-compatible install... /bin/install -c
+checking for pkg-config... /usr/bin/pkg-config
+checking pkg-config is at least version 0.9.0... yes
+checking for UNMANAGED_DEPENDENCIES_MINT... checking for mono... /usr/bin/mono
+checking for gmcs... /usr/bin/gmcs
+checking for GTKSHARP... yes
+checking for gconftool-2... /opt/gnome/bin/gconftool-2
+Using config source xml:merged:/opt/gnome/etc/gconf/gconf.xml.defaults for
+schema installation
+Using $(sysconfdir)/gconf/schemas as install directory for schema files
+checking for style of include used by make... GNU
+checking for gcc... gcc
+checking for C compiler default output file name... a.out
+checking whether the C compiler works... yes
+checking whether we are cross compiling... no
+checking for suffix of executables...
+checking for suffix of object files... o
+checking whether we are using the GNU C compiler... yes
+checking whether gcc accepts -g... yes
+checking for gcc option to accept ISO C89... none needed
+checking dependency style of gcc... none
+checking how to run the C preprocessor... gcc -E
+checking for grep that handles long lines and -e... /bin/grep
+checking for egrep... /bin/grep -E
+checking for ANSI C header files... yes
+checking for sys/types.h... yes
+checking for sys/stat.h... yes
+checking for stdlib.h... yes
+checking for string.h... yes
+checking for memory.h... yes
+checking for strings.h... yes
+checking for inttypes.h... yes
+checking for stdint.h... yes
+checking for unistd.h... yes
+checking locale.h usability... yes
+checking locale.h presence... yes
+checking for locale.h... yes
+checking for LC_MESSAGES... yes
+checking libintl.h usability... yes
+checking libintl.h presence... yes
+checking for libintl.h... yes
+checking for ngettext in libc... yes
+checking for dgettext in libc... yes
+checking for bind_textdomain_codeset... yes
+checking for msgfmt... /usr/bin/msgfmt
+checking for dcgettext... yes
+checking for gmsgfmt... /usr/bin/msgfmt
+checking for xgettext... /usr/bin/xgettext
+checking for catalogs to be installed...  de es fr ko pl pt_BR
+configure: creating ./config.status
+config.status: creating Makefile
+config.status: creating drapes/Makefile
+config.status: creating scripts/Makefile
+config.status: creating docs/Makefile
+config.status: creating data/drapes.desktop
+config.status: creating data/Makefile
+config.status: creating po/Makefile.in
+config.status: executing intltool commands
+config.status: executing depfiles commands
+config.status: executing default-1 commands
+config.status: executing po/stamp-it commands
+Configuration summary
+   * Installation prefix = /opt/gnome
+   * C# compiler = /usr/bin/gmcs
+Making all in drapes
+make[1]: Entering directory `/home/fun/drapes/src/drapes-0.4.96-bzr3/drapes'
+sed -e "s,[@]ASM_VERSION/[@],0.4.96,"           \
+            -e "s,[@]datadir/[@],/opt/gnome/share,"                       
+     \
+                -e "s,[@]version/[@],0.4.96-bzr3,"                        
+     \
+            < AssemblyInfo.cs.in > AssemblyInfo.cs
+/usr/bin/gmcs -debug  -r:System.Xml -r:Mono.Posix -pkg:gconf-sharp-2.0
+-pkg:glade-sharp-2.0 -pkg:gnome-vfs-sharp-2.0
+-resource:../data/drapes.glade,drapes.glade  \
+        -unsafe+ -target:exe -out:"drapes.exe" \
+        ./AssemblyInfo.cs ./panelapplet/*.cs ./Applet.cs ./AppletWidget.cs
+./ConfigMenu.cs ./Main.cs ./Settings.cs ./Traylib.cs ./Wallpaper.cs ./WpList.cs
+** (/usr/lib/mono/2.0/gmcs.exe:5966): CRITICAL **: _wapi_shm_file_open:
+shared file [/root/.wapi/shared_data-zod-Linux-i686-308-10-0] open error:
+Permission denied
+** (/usr/lib/mono/2.0/gmcs.exe:5966): CRITICAL **: _wapi_shm_attach: shared
+file [/root/.wapi/shared_data-zod-Linux-i686-308-10-0] open error
+** ERROR **: file shared.c: line 313 (_wapi_shm_semaphores_init): assertion
+failed: (tmp_shared != NULL)
+Got a SIGABRT while executing native code. This usually indicates
+a fatal error in the mono runtime or one of the native libraries
+used by your application.
+Native stacktrace:
+        /usr/bin/mono(mono_handle_native_sigsegv+0xe7) [0x8154ba7]
+        [0xffffe440]
+        /lib/libc.so.6(abort+0x109) [0x4014dc09]
+        /usr/lib/libglib-2.0.so.0(g_logv+0x42d) [0x4007811d]
+        /usr/lib/libglib-2.0.so.0(g_log+0x29) [0x40078159]
+        /usr/lib/libglib-2.0.so.0(g_assert_warning+0x78) [0x400781d8]
+        /usr/bin/mono [0x8105940]
+        /usr/bin/mono [0x80f95fb]
+        /usr/bin/mono(mono_once+0x94) [0x8101a84]
+        /usr/bin/mono [0x80f938c]
+        /usr/bin/mono [0x81048de]
+        /usr/bin/mono [0x8104cca]
+        /usr/bin/mono(mono_thread_pool_init+0x8e) [0x80c7f4e]
+        /usr/bin/mono(mono_runtime_init+0x21) [0x80ce881]
+        /usr/bin/mono [0x812187e]
+        /usr/bin/mono(mono_main+0x389) [0x805c959]
+        /usr/bin/mono [0x805c0f2]
+        /lib/libc.so.6(__libc_start_main+0xd8) [0x40139808]
+        /usr/bin/mono [0x805c041]
+make[1]: *** [drapes.exe] Aborted
+make[1]: Leaving directory `/home/fun/drapes/src/drapes-0.4.96-bzr3/drapes'
+make: *** [all-recursive] Error 1
+==> ERROR: Build Failed.  Aborting...
+[fun at zod drapes]$ id
+uid=1000(fun) gid=1000(fun)
+[fun at zod drapes]$ echo $HOME
+[fun at zod drapes]$ fakeroot
+bash-3.1# id
+uid=0(root) gid=0(root)
+bash-3.1# echo $HOME

More information about the mono-bugs mailing list