pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/39939: pkgsrc/sysutils/dbus/ generate a wrong binary type.



>Number:         39939
>Category:       pkg
>Synopsis:       pkgsrc/sysutils/dbus/ generate a wrong binary type.
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 17 01:35:00 +0000 2008
>Originator:     Eric Auge
>Release:        5.0_BETA
>Organization:
>Environment:
$ uname -a
NetBSD bearcave.no.phear.org 5.0_BETA NetBSD 5.0_BETA (BearCave) #0: Fri Nov 14 
17:20:50 CET 2008  
root%bearcave.no.phear.org@localhost:/usr/obj/sys/arch/i386/compile/BEARCAVE 
i386

>Description:
pkgsrc compiled dbus-daemon is not working due to an invalid binary type (emul 
linux ?!?!?!?!).

as shown on the following:
[7] root@bearcave:/usr/pkgsrc
# dbus-daemon --help
[8] root@bearcave:/usr/pkgsrc
# ktruss -id dbus-daemon --help
  5166      1 ktruss   emul(netbsd)
  5166      1 ktruss   fktrace                     = 0
  5166      1 ktruss   fcntl(0x4, 0x3, 0)          = 1
  5166      1 ktruss   fcntl(0x4, 0x4, 0x1)        = 0
  5166      1 ktruss   execve("/home/rival/bin/dbus-daemon", 0xbfbfed18, 
0xbfbfed24) Err#2 ENOENT
  5166      1 ktruss   execve("/bin/dbus-daemon", 0xbfbfed18, 0xbfbfed24) Err#2 
ENOENT
  5166      1 ktruss   execve("/sbin/dbus-daemon", 0xbfbfed18, 0xbfbfed24) 
Err#2 ENOENT
  5166      1 ktruss   execve("/usr/bin/dbus-daemon", 0xbfbfed18, 0xbfbfed24) 
Err#2 ENOENT
  5166      1 ktruss   execve("/usr/sbin/dbus-daemon", 0xbfbfed18, 0xbfbfed24) 
Err#2 ENOENT
  5166      1 ktruss   execve("/usr/X11R6/bin/dbus-daemon", 0xbfbfed18, 
0xbfbfed24) Err#2 ENOENT
  5166      1 dbus-daemon emul(linux)
  5166      1 dbus-daemon oldolduname("/usr/pkg/bin/dbus-daemon", 0xbfbfed18, 
0xbfbfed24) JUSTRETURN
  5166      1 dbus-daemon fstat64(0xbbbfee20, 0)   Err#9 EBADF
  5166      1 dbus-daemon write(0xbbbfee20, 0xbbbff200, 0xbbbfbcc4) Err#9 EBADF
  5166      1 dbus-daemon write(0xbbbfee20, 0xbbbff200, 0xbbbfc0be) Err#9 EBADF
  5166      1 dbus-daemon write(0xbbbfee20, 0xbbbff200, 0xbbbfc235) Err#9 EBADF
  5166      1 dbus-daemon exit(0xbbbfee20)


>How-To-Repeat:
pkgsrc compile dbus after an update to 5.0_BETA from 4.0_STABLE.
>Fix:
after tacklig a bit with the problems, it seems that the binary generated by 
pkgsrc is wrong when compiled with this option: -Wl,--gc-sections
[...]
cc -ffunction-sections -fdata-sections -O2 -pthread 
-I/usr/pkgsrc/sysutils/dbus/work/.buildlink/include 
-I/usr/pkgsrc/sysutils/dbus/work/.x11-buildlink/include -Wall -Wchar-subscripts 
-Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith 
-Wcast-align -Wsign-compare -Wdeclaration-after-statement -fno-common 
-Wl,--gc-sections -Wl,-R/usr/X11R7/lib -pthread -Wl,-R/usr/pkg/lib -o 
dbus-daemon-launch-helper activation-helper-bin.o config-loader-expat.o 
config-parser-common.o config-parser-trivial.o desktop-file.o utils.o 
activation-helper.o  -L/usr/pkgsrc/sysutils/dbus/work/.buildlink/lib 
-L/usr/pkgsrc/sysutils/dbus/work/.x11-buildlink/lib -lexpat 
../dbus/.libs/libdbus-convenience.a
[...]

whereas other dbus package binaries not using -Wl,--gc-sections are working 
perfectly, I'm not really sure of the root cause of this, I did not have time 
to investigate much further.


from the same package, dbus-monitor works :
[...]
/bin/sh ../libtool --tag=CC   --mode=link cc  -ffunction-sections 
-fdata-sections -O2 -pthread -I/usr/pkg/include -I/usr/X11R7/include 
-I/usr/include -Wall -Wchar-subscripts -Wmissing-declarations 
-Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align 
-Wsign-compare -Wdeclaration-after-statement -fno-common  -L/usr/pkg/lib 
-L/usr/X11R7/lib -Wl,-R/usr/X11R7/lib -pthread -L/usr/lib -Wl,-R/usr/lib 
-Wl,-R/usr/pkg/lib -o dbus-monitor dbus-monitor.o dbus-print-message.o 
../dbus/libdbus-1.la
[...]
$ dbus-monitor
Failed to open connection to session message bus: dbus-launch failed to 
autolaunch D-Bus session: EOF in dbus-launch reading address from bus daemon




Home | Main Index | Thread Index | Old Index