Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 27 Mar 2008 11:11:13 +0100 (CET)
From:      Stefan Sperling <stsp@stsp.name>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   ports/122151: www/gnome-keyring fails to build
Message-ID:  <200803271011.m2RABDFl014543@ted.stsp.name>
Resent-Message-ID: <200803271050.m2RAo8Vi052338@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         122151
>Category:       ports
>Synopsis:       www/gnome-keyring fails to build
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Mar 27 10:50:02 UTC 2008
>Closed-Date:
>Last-Modified:
>Originator:     Stefan Sperling
>Release:        FreeBSD 6.3-RELEASE-p1 i386
>Organization:
>Environment:
System: FreeBSD ted.stsp.name 6.3-RELEASE-p1 FreeBSD 6.3-RELEASE-p1 #0: Sat Feb 16 13:49:01 CET 2008 stsp@ted.stsp.name:/usr/obj/home/stsp/src/freebsd-6.3-wol/sys/TED i386


	
>Description:

	security/gnome-keyring fails to build with this error:

	 cc -DHAVE_CONFIG_H -I. -I.. -DPREFIX=\"/usr/local\" -DBINDIR=\"/usr/local/bin\" -DLIBEXECDIR=\"/usr/local/libexec\" -DGNOMELOCALEDIR=\"/usr/local/share/locale\" -I.. -I.. -I/usr/local/include/dbus-1.0 -I/usr/local/include/dbus-1.0/include -DGKR_DBUS_MAJOR_VERSION=1 -DGKR_DBUS_MINOR_VERSION=1 -DGKR_DBUS_MICRO_VERSION=20 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/local/include -O2 -fno-strict-aliasing -pipe -MT gnome-keyring.lo -MD -MP -MF .deps/gnome-keyring.Tpo -c gnome-keyring.c  -fPIC -DPIC -o .libs/gnome-keyring.o
gnome-keyring.c: In function `gnome_keyring_daemon_prepare_environment_sync':
gnome-keyring.c:1792: error: `environ' undeclared (first use in this function)
gnome-keyring.c:1792: error: (Each undeclared identifier is reported only once
gnome-keyring.c:1792: error: for each function it appears in.)
gmake[3]: *** [gnome-keyring.lo] Error 1

	The code seems to assume that the global variabel 'environ'
	has already been declared somewhere -- it's cast to a const gchar**,
	which from looking at the glib headers is just a const char**.

	It looks like in FreeBSD code should explicitly declare
	extern char **environ; before using it, see environ(7).
	
>How-To-Repeat:
	This happened to me first during 'portmaster -auD', and I can reproduce
	it by running:
	cd /usr/ports/security/gnome-keyring && make
>Fix:
	I've added this patch and now it compiles, no idea if it runs,
	but I don't really care since this port just got pulled
	in as a dependency. I'll never really it use anyway.

stsp@ted [gnome-keyring] $ cat files/patch-library_gnome-keyring.c 
--- library/gnome-keyring.c.orig        2008-03-27 10:50:03.000000000 +0100
+++ library/gnome-keyring.c     2008-03-27 11:06:27.000000000 +0100
@@ -1779,6 +1779,7 @@ gnome_keyring_daemon_set_display_sync (c
  * Return value: %GNOME_KEYRING_RESULT_OK if the operation was succcessful or 
  * an error result otherwise. 
  **/ 
+extern char **environ;
 GnomeKeyringResult
 gnome_keyring_daemon_prepare_environment_sync (void)
 {
stsp@ted [gnome-keyring] $ 
>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200803271011.m2RABDFl014543>