Bug 372711

Summary: ia64: dbus build error, undefined reference to `audit_init'
Product: [Fedora] Fedora Reporter: Zhan, Yi <yi.zhan>
Component: dbusAssignee: David Zeuthen <davidz>
Status: CLOSED NEXTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: dchapman, mclasen, prarit
Target Milestone: ---   
Target Release: ---   
Hardware: ia64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-02-22 05:38:04 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 163350, 418441    

Description Zhan, Yi 2007-11-09 13:43:55 UTC
Description of problem:

building dbus under Fedora-IA64 failed with below error: 

Making all in bus
make[2]: Entering directory `/usr/src/redhat/BUILD/dbus-1.1.2/bus'
/bin/sh ../libtool --tag=CC   --mode=link gcc  -ffunction-sections -fdata-sectio
ns -g -O2 -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -W
nested-externs -Wpointer-arith -Wcast-align -Wsign-compare -Wdeclaration-after-s
tatement -fno-common -Wl,--gc-sections   -o dbus-daemon-launch-helper-test dbus_
daemon_launch_helper_test-activation-helper-bin.o dbus_daemon_launch_helper_test
-config-loader-expat.o dbus_daemon_launch_helper_test-config-parser-common.o dbu
s_daemon_launch_helper_test-config-parser-trivial.o dbus_daemon_launch_helper_te
st-desktop-file.o dbus_daemon_launch_helper_test-utils.o dbus_daemon_launch_help
er_test-activation-helper.o -lexpat ../dbus/libdbus-convenience.la -lcap
gcc -ffunction-sections -fdata-sections -g -O2 -Wall -Wchar-subscripts -Wmissing
-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align
-Wsign-compare -Wdeclaration-after-statement -fno-common -Wl,--gc-sections -o d
bus-daemon-launch-helper-test dbus_daemon_launch_helper_test-activation-helper-b
in.o dbus_daemon_launch_helper_test-config-loader-expat.o dbus_daemon_launch_hel
per_test-config-parser-common.o dbus_daemon_launch_helper_test-config-parser-tri
vial.o dbus_daemon_launch_helper_test-desktop-file.o dbus_daemon_launch_helper_t
est-utils.o dbus_daemon_launch_helper_test-activation-helper.o  -lexpat ../dbus/
.libs/libdbus-convenience.a -lcap
/usr/bin/ld: Warning: gc-sections option ignored
../dbus/.libs/libdbus-convenience.a(dbus-sysdeps-util-unix.o): In function `_dbu
s_change_to_daemon_user':
/usr/src/redhat/BUILD/dbus-1.1.2/dbus/dbus-sysdeps-util-unix.c:398: undefined re
ference to `audit_init'
collect2: ld returned 1 exit status
make[2]: *** [dbus-daemon-launch-helper-test] Error 1
make[2]: Leaving directory `/usr/src/redhat/BUILD/dbus-1.1.2/bus'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/src/redhat/BUILD/dbus-1.1.2'
make: *** [all] Error 2

It's seems that the problem is caused by the code in dbus-1.1.2-audit-user.patch
. The patch add a call to audit_init() in the file
dbus/dbus-sysdeps-util-unix.c. But the function is defined in bus/selinux.c and
not available there. Do some change in dbus-sysdeps-util-unix.c or add the
selinux.o (and might some other ".o"s in bus/) to the link command above may fix
 the problem.

Version-Release number of selected component (if applicable):
dbus-1.1.2-8.fc8.src.rpm (CVS Nov 8 2007)
dbus-1.1.2-7.fc8.src.rpm

How reproducible:
always

Steps to Reproduce:
1.rpmbuild --rebuild dbus-1.1.2-8.fc8.src.rpm
2.
3.
  
Actual results:


Expected results:


Additional info:

I tried the same build on x86 and x86_64 platforms and both successful. Then I
traced this issue and found that the issue occurred only on ia64 due to the lack
of support for the linker (ld) option "--gc-sections". When replacing the
options with "-wl,--no-gc-sections" in the makefiles, I got the same error both
in x86 and x86_64.

I'm not familiar with dbus and not very sure if this is a real bug or some
tricks depending on the specified linker option.

Comment 1 Doug Chapman 2008-02-22 05:38:04 UTC
latest version is building in rawhide now, closing.