Bug 14204 - dbus does not compile
Summary: dbus does not compile
Status: RESOLVED NOTOURBUG
Alias: None
Product: dbus
Classification: Unclassified
Component: core (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) FreeBSD
: medium blocker
Assignee: Havoc Pennington
QA Contact: John (J5) Palmieri
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-22 12:32 UTC by Joe Marcus Clarke
Modified: 2008-03-10 07:22 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Joe Marcus Clarke 2008-01-22 12:32:08 UTC
On FreeBSD amd64 with GCC 4.2.1, dbus-1.1.4 does not compile.  The error seen is:

cc -O2 -fno-strict-aliasing -pipe -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -Wdeclaration-after-statement -fno-common -pie -Wl,-z -Wl,relro -pthread -o dbus-daemon activation.o bus.o config-parser.o config-parser-common.o connection.o desktop-file.o dir-watch-kqueue.o dispatch.o driver.o expirelist.o policy.o selinux.o services.o signals.o test.o utils.o config-loader-expat.o main.o  -L/usr/local/lib /usr/local/lib/libexpat.so ../dbus/.libs/libdbus-convenience.a -pthread   -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib
/usr/bin/ld: /usr/lib/crt1.o: relocation R_X86_64_32 can not be used when making a shared object; recompile with -fPIC
/usr/lib/crt1.o: could not read symbols: Bad value

This is caused by the PIE linker flags.  If these are removed, dbus compiles just fine.  This problem does not affect GCC 3.4.6 on the same platform.  I do not believe FreeBSD is the only affected platform.  I have seen similar PIE-related errors on RedHat for other projects (e.g. xdm and KDE).
Comment 1 John (J5) Palmieri 2008-03-04 10:13:15 UTC
Have you tried the latest 1.1.20 or from GIT?  We fixed some errors showing up in the new gcc.
Comment 2 Joe Marcus Clarke 2008-03-07 08:19:01 UTC
No, the build is still broken in the same way.  The problem has to do with the PIE flags.
Comment 3 John (J5) Palmieri 2008-03-10 07:22:12 UTC
After talking it over with a gcc developer I have come to the conclusion this is a FreeBSD GCC bug which should be fixed there.  -pie should be the norm these days especially in such a system sensitive daemon.  I do not wish to make it configurable upstream and accidentally have this important security measure turned off on other platforms.  Please file a bug upstream and patch it out in the meantime.  Thanks.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.