Attempting to build x11/gnome-shell on FreeBSD 8 fails with this error in stage-qa: gmake[1]: Leaving directory '/wrkdirs/usr/ports/x11/gnome-shell/work/gnome-shell-3.14.2' /bin/mkdir -p /wrkdirs/usr/ports/x11/gnome-shell/work/stage/usr/local/lib/browser_plugins/symlinks/gecko /bin/ln -sf /usr/local/lib//libgnome-shell-browser-plugin.so /wrkdirs/usr/ports/x11/gnome-shell/work/stage/usr/local/lib/browser_plugins/symlinks/gecko/ /bin/mkdir -p /wrkdirs/usr/ports/x11/gnome-shell/work/stage/usr/local/lib/browser_plugins/symlinks/opera /bin/ln -sf /usr/local/lib//libgnome-shell-browser-plugin.so /wrkdirs/usr/ports/x11/gnome-shell/work/stage/usr/local/lib/browser_plugins/symlinks/opera/ /bin/mkdir -p /wrkdirs/usr/ports/x11/gnome-shell/work/stage/usr/local/lib/browser_plugins/symlinks/opera-devel /bin/ln -sf /usr/local/lib//libgnome-shell-browser-plugin.so /wrkdirs/usr/ports/x11/gnome-shell/work/stage/usr/local/lib/browser_plugins/symlinks/opera-devel/ /bin/mkdir -p /wrkdirs/usr/ports/x11/gnome-shell/work/stage/usr/local/lib/browser_plugins/symlinks/webkit-gtk2 /bin/ln -sf /usr/local/lib//libgnome-shell-browser-plugin.so /wrkdirs/usr/ports/x11/gnome-shell/work/stage/usr/local/lib/browser_plugins/symlinks/webkit-gtk2/ ====> Compressing man pages (compress-man) =========================================================================== ====> Running Q/A tests (stage-qa) ====> Checking for pkg-plist issues (check-plist) ===> Parsing plist ===> Checking for items in STAGEDIR missing from pkg-plist Error: Orphaned: %%WEBPLUGIN_DIR%%mozilla/plugins}/libgnome-shell-browser-plugin.so ===> Checking for items in pkg-plist which are not in STAGEDIR Error: Missing: %%WEBPLUGIN_DIR%%libgnome-shell-browser-plugin.so ===> Error: Plist issues found. *** Error code 1 Stop in /usr/ports/x11/gnome-shell. ====>> Error: check-plist failures detected =======================<phase: Interactive >============================ The actual error is much earlier, during configure. Due to a bug in /bin/sh in FreeBSD 8, BROWSER_PLUGIN_DIR gets set to '/usr/local/lib//mozilla/plugins}' instead of '/usr/local/lib'. This line in configure gives an incorrect result when run in the FreeBSD 8 version of /bin/sh: BROWSER_PLUGIN_DIR="${BROWSER_PLUGIN_DIR:-"\${libdir}/mozilla/plugins"}" # /bin/sh # BROWSER_PLUGIN_DIR="${BROWSER_PLUGIN_DIR:-"\${libdir}/mozilla/plugins"}" # echo $BROWSER_PLUGIN_DIR ${libdir/mozilla/plugins} or if BROWSER_PLUGIN_DIR is already set: env BROWSER_PLUGIN_DIR=/usr/local/lib /bin/sh # BROWSER_PLUGIN_DIR="${BROWSER_PLUGIN_DIR:-"\${libdir}/mozilla/plugins"}" # echo $BROWSER_PLUGIN_DIR /usr/local/lib/mozilla/plugins} The correct results for these two cases are '${libdir}/mozilla/plugins' or the value of $BROWSER_PLUGIN_DIR. The attached patch works around this problem by using bash for $CONFIGURE_SHELL.
Auto-assigned to maintainer gnome@FreeBSD.org
Created attachment 150654 [details] patch to unbreak x11/gnome-shell on FreeBSD 8 by using bash for CONFIGURE_SHELL Actually add the patch
Created attachment 150660 [details] escape } Is this caused by base r214492? If so try the attached workaround.
(In reply to Jan Beich from comment #3) > Created attachment 150660 [details] > escape } > > Is this caused by base r214492? If so try the attached workaround. Do you mean the lack of the change in r214492? The revision history of sh/parser.c in stable/8 is: ------------------------------------------------------------------------ r221522 | jilles | 2011-05-06 05:49:32 -0700 (Fri, 06 May 2011) | 12 lines MFC r220903: sh: Do not word split "${#parameter}". This is only a problem if IFS contains digits, which is unusual but valid. Because of an incorrect fix for PR bin/12137, "${#parameter}" was treated as ${#parameter}. The underlying problem was that "${#parameter}" erroneously added CTLESC bytes before determining the length. This was properly fixed for PR bin/56147 but the incorrect fix was not backed out. Reported by: Seeker on forums.freebsd.org ------------------------------------------------------------------------ r214113 | obrien | 2010-10-20 11:25:00 -0700 (Wed, 20 Oct 2010) | 2 lines MFC r213811: c89 linkage and storage class (also covers r213744, r213760) Your fix also appears to work. The graphics/evince port also has this problem, see: <https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=195943>
Even with this patch the resulting binary dies with SIGSEGV on startup. This was run under a MATE session, hence the warning about the existing window manager. It also dies when run by gnome-session, so attempting to start GNOME using either gdm or slim fails. GNU gdb (GDB) 7.8.2 [GDB v7.8.2 for FreeBSD] Copyright (C) 2014 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i386-portbld-freebsd8.4". Type "show configuration" for configuration details. For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>. Find the GDB manual and other documentation resources online at: <http://www.gnu.org/software/gdb/documentation/>. For help, type "help". Type "apropos word" to search for commands related to "word"... Reading symbols from gnome-shell...(no debugging symbols found)...done. (gdb) run Starting program: /usr/local/bin/gnome-shell [New Thread 36701140 (LWP 100685 initial thread)] [New Thread 36742140 (LWP 100226)] [New Thread 3673fd00 (LWP 100245)] [New Thread 3673fa80 (LWP 100838)] [New Thread 3673fbc0 (LWP 100852)] [New Thread 3673e900 (LWP 100991)] [New Thread 3673e7c0 (LWP 101004)] Window manager warning: Screen 0 on display ":0.0" already has a window manager; try using the --replace option to replace the current window manager. Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 36701140 (LWP 100685 initial thread)] 0x3415f927 in meta_screen_free () from /usr/local/lib/libmutter.so.0 (gdb) bt #0 0x3415f927 in meta_screen_free () from /usr/local/lib/libmutter.so.0 #1 0x3414b17d in meta_display_close () from /usr/local/lib/libmutter.so.0 #2 0x3414d32c in meta_display_open () from /usr/local/lib/libmutter.so.0 #3 0x34158b55 in meta_run () from /usr/local/lib/libmutter.so.0 #4 0x08049fb0 in ?? () #5 0x08049987 in ?? () #6 0x080498f8 in ?? () #7 0x00000000 in ?? ()
The configure script in gnome-shell-3.14.4 works properly with /bin/sh in FreeBSD 8.4.