NetBSD Problem Report #40347
From kre@munnari.OZ.AU Fri Jan 9 10:38:15 2009
Return-Path: <kre@munnari.OZ.AU>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by narn.NetBSD.org (Postfix) with ESMTP id 3297C63B8BA
for <gnats-bugs@gnats.NetBSD.org>; Fri, 9 Jan 2009 10:38:15 +0000 (UTC)
Message-Id: <200901091038.n09Ac0sO022587@jade.coe.psu.ac.th>
Date: Fri, 9 Jan 2009 17:38:00 +0700 (ICT)
From: kre@munnari.OZ.AU
To: gnats-bugs@gnats.NetBSD.org
Subject: sysutils/dbus compilation errros - NetBSD 4.0
X-Send-Pr-Version: 3.95
>Number: 40347
>Category: pkg
>Synopsis: sysutils/dbus compilation errros - NetBSD 4.0
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jan 09 10:40:00 +0000 2009
>Closed-Date: Tue Jan 20 10:36:12 +0000 2009
>Last-Modified: Tue Jan 20 10:36:12 +0000 2009
>Originator: Robert Elz
>Release: NetBSD 4.0_STABLE (pkgsrc current within past 3 hours)
>Organization:
Prince of Songkla University
>Environment:
System: NetBSD jade.coe.psu.ac.th 4.0_STABLE NetBSD 4.0_STABLE (JADE-1.696-20080517) #9: Fri May 23 18:55:13 ICT 2008 kre@jade.coe.psu.ac.th:/usr/obj/4/kernels/JADE i386
Architecture: i386
Machine: i386
>Description:
sysutils/dbus has grown compilation errors for NetBSD 4.0 (4.* probably)
>How-To-Repeat:
Attempt compiling in a NetBSD 4 environment, I use pkg_comp with
libkver and NetBSD 4.0 release sets installed (no x* sets, but
pkgsrc modular xorg instead here, but that will not be relevant to
this problem).
/bin/sh ../libtool --tag=CC --mode=compile cc -DHAVE_CONFIG_H -I. -I.. -I.. -I.. -fPIC -DDBUS_COMPILATION -DDBUS_MACHINE_UUID_FILE=\""/var/db/dbus/machine-id"\" -DDBUS_SYSTEM_CONFIG_FILE=\""/etc/conf/dbus-1/system.conf"\" -DDBUS_SESSION_CONFIG_FILE=\""/etc/conf/dbus-1/session.conf"\" -I/usr/pkg/include -I/usr/include -ffunction-sections -fdata-sections -O2 -pthread -I/usr/pkg/include -I/usr/include -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -Wdeclaration-after-statement -fno-common -MT dbus-sysdeps-unix.lo -MD -MP -MF .deps/dbus-sysdeps-unix.Tpo -c -o dbus-sysdeps-unix.lo dbus-sysdeps-unix.c
cc -DHAVE_CONFIG_H -I. -I.. -fPIC -DDBUS_COMPILATION -DDBUS_MACHINE_UUID_FILE=\"/var/db/dbus/machine-id\" -DDBUS_SYSTEM_CONFIG_FILE=\"/etc/conf/dbus-1/system.conf\" -DDBUS_SESSION_CONFIG_FILE=\"/etc/conf/dbus-1/session.conf\" -I/pkg_comp/obj/pkgsrc/sysutils/dbus/4x/.buildlink/include -ffunction-sections -fdata-sections -O2 -pthread -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -Wdeclaration-after-statement -fno-common -MT dbus-sysdeps-unix.lo -MD -MP -MF .deps/dbus-sysdeps-unix.Tpo -c dbus-sysdeps-unix.c -fPIC -DPIC -o .libs/dbus-sysdeps-unix.o
dbus-sysdeps-unix.c: In function '_dbus_read_credentials_socket':
dbus-sysdeps-unix.c:1213: error: invalid application of 'sizeof' to incomplete type 'struct cmsgcred'
dbus-sysdeps-unix.c:1251: error: invalid application of 'sizeof' to incomplete type 'struct cmsgcred'
gmake[3]: *** [dbus-sysdeps-unix.lo] Error 1
gmake[3]: Leaving directory `/pkg_comp/obj/pkgsrc/sysutils/dbus/4x/dbus-1.2.4.2permissive/dbus'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/pkg_comp/obj/pkgsrc/sysutils/dbus/4x/dbus-1.2.4.2permissive/dbus'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/pkg_comp/obj/pkgsrc/sysutils/dbus/4x/dbus-1.2.4.2permissive'
gmake: *** [all] Error 2
*** Error code 2
Stop.
make: stopped in /usr/pkgsrc/sysutils/dbus
*** Error code 1
Stop.
>Fix:
Most probably don't try to compile code that users data structures that
NetBSD 4.0 doesn't have. But I am guessing...
>Release-Note:
>Audit-Trail:
From: Hauke Fath <hf@spg.tu-darmstadt.de>
To: gnats-bugs@NetBSD.org
Cc: pkg-manager@NetBSD.org, gnats-admin@NetBSD.org
Subject: Re: pkg/40347: sysutils/dbus compilation errros - NetBSD 4.0
Date: Fri, 9 Jan 2009 12:04:07 +0100
At 10:40 Uhr +0000 09.01.2009, kre@munnari.OZ.AU wrote:
> sysutils/dbus has grown compilation errors for NetBSD 4.0
>(4.* probably)
Same for an i386 netbsd-3 system here.
hauke
--
The ASCII Ribbon Campaign Hauke Fath
() No HTML/RTF in email Institut für Nachrichtentechnik
/\ No Word docs in email TU Darmstadt
Respect for open standards Ruf +49-6151-16-3281
From: Hasso Tepper <hasso@estpak.ee>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/40347: sysutils/dbus compilation errros - NetBSD 4.0
Date: Fri, 9 Jan 2009 13:59:48 +0200
kre@munnari.OZ.AU wrote:
> dbus-sysdeps-unix.c: In function '_dbus_read_credentials_socket':
> dbus-sysdeps-unix.c:1213: error: invalid application of 'sizeof' to
> incomplete type 'struct cmsgcred'
> dbus-sysdeps-unix.c:1251: error: invalid application of 'sizeof' to
> incomplete type 'struct cmsgcred'
> gmake[3]: ***
That's me who broke it. Sorry about that. Please try the patch from here:
http://leaf.dragonflybsd.org/~hasso/pkgsrc-sysutils-dbus-borking.patch
--
Hasso Tepper
From: Robert Elz <kre@munnari.OZ.AU>
To: Hasso Tepper <hasso@estpak.ee>, gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/40347: sysutils/dbus compilation errros - NetBSD 4.0
Date: Fri, 09 Jan 2009 20:14:33 +0700
Date: Fri, 9 Jan 2009 12:00:07 +0000 (UTC)
From: Hasso Tepper <hasso@estpak.ee>
Message-ID: <20090109120007.52AD863B8C9@narn.NetBSD.org>
| Please try the patch from here:
| http://leaf.dragonflybsd.org/~hasso/pkgsrc-sysutils-dbus-borking.patch
Thanks, that worked fine for me. I compiled it under both NetBSD 4.0 and
NetBSD 3.0 (after Hauke's message), and it worked for both (build time
worked, I mostly just compile packages, I rarely install them...)
kre
From: Havard Eidnes <he@NetBSD.org>
To: gnats-bugs@NetBSD.org, hasso@estpak.ee
Cc: pkg-manager@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org,
kre@munnari.OZ.AU
Subject: Re: pkg/40347: sysutils/dbus compilation errros - NetBSD 4.0
Date: Fri, 09 Jan 2009 16:41:38 +0100 (CET)
> kre@munnari.OZ.AU wrote:
> > dbus-sysdeps-unix.c: In function '_dbus_read_credentials_socket':
> > dbus-sysdeps-unix.c:1213: error: invalid application of 'sizeof' to
> > incomplete type 'struct cmsgcred'
> > dbus-sysdeps-unix.c:1251: error: invalid application of 'sizeof' to
> > incomplete type 'struct cmsgcred'
> > gmake[3]: ***
>
> That's me who broke it. Sorry about that. Please try the patch from here:
> http://leaf.dragonflybsd.org/~hasso/pkgsrc-sysutils-dbus-borking.patch
I see an additional problem on NetBSD/macppc 4.0: when trying to
run dbus-daemon (without args it should just print the usage
message), the run-time linker instead prints out:
Unsupported relocation type 6 in non-PLT relocations
and the program does not run. This causes sysutils/dbus-glib to
fail to build for NetBSD/macppc 4.0, because it tries to run the
dbus-daemon executable which is part of the dbus package.
It turns out that the origin of this problem is that the dbus
configure script tests to see if gcc accepts the -fPIE and -pie
compilation and linking flags, and gcc does. However, that
apparently doesn't mean that we universally supports running such
executables on all our platforms. Therefore, after getting some
hints from some other developers, I've come to the conclusion
that the following addition to the package's Makefile seems to be
the right thing:
# Package tries to use these if gcc accepts them, but that doesn't
# mean that we universally can *run* the executables
BUILDLINK_TRANSFORM+= rm:-fPIE
BUILDLINK_TRANSFORM+= rm:-pie
This will create a C compiler wrapper script which removes those
options from the compilation before actually invoking the compiler.
I added those lines right after the existing BUILDLINK_TRANSFORM
setting. With those lines in place, and the patch quoted above
applied, the new dbus builds and I get the usage message instead
of the above run-time linker error message when I start
dbus-daemon.
I've also applied a similar patch to a NetBSD/i386 4.0 system I
have (on the older dbus version, the one in 2008Q4), and there
doesn't appear to be any noticeable change introduced by the
above addition; dbus-daemon still runs and prints the usage
message if given no arguments.
Best regards,
- Havard
From: Havard Eidnes <he@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/40347 CVS commit: pkgsrc/sysutils/dbus
Date: Fri, 9 Jan 2009 21:47:33 +0000 (UTC)
Module Name: pkgsrc
Committed By: he
Date: Fri Jan 9 21:47:33 UTC 2009
Modified Files:
pkgsrc/sysutils/dbus: Makefile distinfo
pkgsrc/sysutils/dbus/patches: patch-ab
Log Message:
Update from version 1.2.4.2 to version 1.2.4.2nb1.
Pkgsrc changes:
o Modify one of the patches with a patch reported as part of
PR#40347 to make this package build on NetBSD 4.0 and probably
earlier versions as well. Many thanks to Hasso Tepper for the
patch.
To generate a diff of this commit:
cvs rdiff -r1.40 -r1.41 pkgsrc/sysutils/dbus/Makefile
cvs rdiff -r1.32 -r1.33 pkgsrc/sysutils/dbus/distinfo
cvs rdiff -r1.16 -r1.17 pkgsrc/sysutils/dbus/patches/patch-ab
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->feedback
State-Changed-By: he@NetBSD.org
State-Changed-When: Fri, 09 Jan 2009 22:27:47 +0000
State-Changed-Why:
The patch from Hasso Tepper has been applied -- thanks!
Additionally, the patch supplied by myself has also been
applied, bumping the package revision to 2.
This should improve the ability to both build and run
this package on 4.0 and hopefully older systems as well.
From: "Tyler R. Retzlaff" <rtr@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc:
Subject: PR/40347 CVS commit: [pkgsrc-2008Q4] pkgsrc/sysutils/dbus
Date: Sun, 11 Jan 2009 05:55:56 +0000 (UTC)
Module Name: pkgsrc
Committed By: rtr
Date: Sun Jan 11 05:55:56 UTC 2009
Modified Files:
pkgsrc/sysutils/dbus [pkgsrc-2008Q4]: Makefile distinfo
pkgsrc/sysutils/dbus/patches [pkgsrc-2008Q4]: patch-aa patch-ab
Added Files:
pkgsrc/sysutils/dbus/patches [pkgsrc-2008Q4]: patch-ad
Log Message:
pullup ticket #2627,#2631 - requested by wiz,he
dbus: update for security and build fix
revisions pulled up:
pkgsrc/sysutils/dbus/Makefile 1.40,1.41,1.42
pkgsrc/sysutils/dbus/distinfo 1.32,1.33
pkgsrc/sysutils/dbus/patches/patch-aa 1.10
pkgsrc/sysutils/dbus/patches/patch-ab 1.17
pkgsrc/sysutils/dbus/patches/patch-ad 1.5
Module Name: pkgsrc
Committed By: wiz
Date: Wed Jan 7 19:11:36 UTC 2009
Modified Files:
pkgsrc/sysutils/dbus: Makefile distinfo
pkgsrc/sysutils/dbus/patches: patch-aa
Added Files:
pkgsrc/sysutils/dbus/patches: patch-ad
Log Message:
Update to 1.2.4.2 on the "permissive" branch.
This addresses the security problem CVE-2008-4311. For more
details, read
http://lists.freedesktop.org/archives/dbus/2008-December/010769.html
------------------------------------------------------------------------
Module Name: pkgsrc
Committed By: he
Date: Fri Jan 9 21:47:33 UTC 2009
Modified Files:
pkgsrc/sysutils/dbus: Makefile distinfo
pkgsrc/sysutils/dbus/patches: patch-ab
Log Message:
Update from version 1.2.4.2 to version 1.2.4.2nb1.
Log Message:
Update from version 1.2.4.2 to version 1.2.4.2nb1.
Pkgsrc changes:
o Modify one of the patches with a patch reported as part of
PR#40347 to make this package build on NetBSD 4.0 and probably
earlier versions as well. Many thanks to Hasso Tepper for the
patch.
------------------------------------------------------------------------
Module Name: pkgsrc
Committed By: he
Date: Fri Jan 9 21:54:15 UTC 2009
Modified Files:
pkgsrc/sysutils/dbus: Makefile
Log Message:
Update from version 1.2.4.2nb1 to 1.2.4.2nb2.
Pkgsrc changes:
o Add BUILDLINK_TRANSFORM settings which deactivate -fPIE and -pie
in the compiler invocation. The configure script of this package
checks to see if gcc accepts those options, and uses them if it
does. However, apparently that does not mean that we universally
will be able to run the resulting executables -- on NetBSD/4.0
macppc the run-time linker says
"Unsupported relocation type 6 in non-PLT relocations"
Tested that the dbus-daemon executable remains runnable on both i386
and that it is so now on macppc.
Thanks to jmcneill@ and joerg@ for hints leading to this fix.
To generate a diff of this commit:
cvs rdiff -r1.38 -r1.38.2.1 pkgsrc/sysutils/dbus/Makefile
cvs rdiff -r1.30 -r1.30.2.1 pkgsrc/sysutils/dbus/distinfo
cvs rdiff -r1.9 -r1.9.2.1 pkgsrc/sysutils/dbus/patches/patch-aa
cvs rdiff -r1.15 -r1.15.2.1 pkgsrc/sysutils/dbus/patches/patch-ab
cvs rdiff -r0 -r1.4.6.1 pkgsrc/sysutils/dbus/patches/patch-ad
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
From: Robert Elz <kre@munnari.OZ.AU>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/40347 (sysutils/dbus compilation errros - NetBSD 4.0)
Date: Tue, 20 Jan 2009 15:07:51 +0700
Oh, sorry, didn't notice this had gone into feedback state.
Yes, the fix committed is fine, it builds without problems now.
Please close the PR. Thanks.
kre
State-Changed-From-To: feedback->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Tue, 20 Jan 2009 10:36:12 +0000
State-Changed-Why:
Confirmed fixed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.