I'm trying to distribute a software package that I wrote in RPM, deb, and ebuild formats. I can build the RPM and ebuild (obviously) just fine on a Gentoo system, but 'dpkg -b' dies with a Segmentation Fault. I have to jump onto a Debian box just to create the .deb archive. strace is less than useful: open("debian/DEBIAN/control", O_RDONLY|O_LARGEFILE) = 4 fstat64(4, {st_mode=S_IFREG|0644, st_size=939, ...}) = 0 read(4, "Package: oneSIS\nVersion: 2.0rc10"..., 939) = 939 --- SIGSEGV (Segmentation fault) @ 0 (0) --- +++ killed by SIGSEGV +++ I haven't dug into the dpkg code, nor do I have time to, so I thought I'd post this bug. I have not tried to duplicate the problem on any other distro besides gentoo. Reproducible: Always Steps to Reproduce: 1. copy sample control file into test/DEBIAN directory (get sample here: http://linuxdevices.com/articles/AT8047723203.html) 2. emerge dpkg 3. dpkg -b test test.deb Actual Results: Segmentation Fault Expected Results: create test.deb # emerge info Portage 2.0.51.22-r1 (default-linux/x86/2005.0/2.4, gcc-3.4.3-20050110, glibc-2.3.5-r0, 2.6.7 i686) ================================================================= System uname: 2.6.7 i686 Intel(R) Pentium(R) M processor 1600MHz Gentoo Base System version 1.6.12 dev-lang/python: 2.2.3-r5, 2.3.5 sys-apps/sandbox: 1.2 sys-devel/autoconf: 2.13, 2.59-r6 sys-devel/automake: 1.4_p6, 1.5, 1.6.3, 1.7.9, 1.8.5-r3, 1.9.5 sys-devel/binutils: 2.16-r1 sys-devel/libtool: 1.5.18 virtual/os-headers: 2.4.19-r1, 2.4.22-r1 ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CBUILD="i686-pc-linux-gnu" CFLAGS="-O3 -mtune=i686 -funroll-loops -pipe" CHOST="i686-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.1/share/config /usr/kde/3.2/share/config /usr/kde/3.3/env /usr/kde/3.3/share/config /usr/kde/3.3/shutdown /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3/share/config /usr/lib/X11/xkb /usr/lib/mozilla/defaults/pref /usr/share/config /var/bind /var/qmail/control" CONFIG_PROTECT_MASK="/etc/gconf /etc/terminfo /etc/texmf/web2c /etc/env.d" CXXFLAGS="-O3 -mtune=i686 -funroll-loops -pipe" DISTDIR="/usr/portage/distfiles" FEATURES="autoconfig ccache distlocks sandbox sfperms strict" GENTOO_MIRRORS="http://gentoo.ccccom.com http://gentoo.llarian.net/ http://gentoo.binarycompass.org http://mirror.tucdemonic.org/gentoo/ http://ftp.gentoo.or.kr/" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="/usr/local/portage" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="X Xaw3d aalib acpi acroread alsa apache2 apm arts atlas avi bash-completion berkdb bitmap-fonts bonobo calendar cdr crypt cscope cups curl dba dga directfb divx4linux doc dvd dvdr eds emacs emboss encode esd ethereal evo fam fastcgi fbcon firebird flac flash foomaticdb fortran ftp fusion gb gd gdbm ggi gif gnome gphoto2 gpm gps gstreamer gtk gtk2 guile i8x0 imagemagick imap imlib innodb ipv6 java jikes jpeg junit kde kerberos ldap leim libg++ libgda libwww lirc mad maildir mbox mcal mikmod mmx mono motif mozilla mp3 mpeg mpi mule mysql nagios-dns nagios-ntp nagios-ping nagios-ssh nas ncurses nls odbc offensive ogg oggvorbis opengl oss pam pcmcia pda pdflib perl pic plotutils png pnp postgres ppds python qt quicktime readline real ruby samba sdk sdl server session slang slp sndfile snmp spell sqlite sse sse2 ssl stream subversion svg svga tcltk tcpd tetex threads tiff truetype truetype-fonts trusted type1-fonts usb vorbis x86 xine xinerama xml xml2 xmms xosd xv xvid zlib video_cards_radeon userland_GNU kernel_linux elibc_glibc" Unset: ASFLAGS, CTARGET, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS
Created attachment 62536 [details, diff] gcc4 and gcc3 patch Same problem here. This small patch solves the problem with gcc3 and newer.
Created attachment 62545 [details, diff] New gcc4 patch to replace broken one. Michael: Good work on finding it :-), bad work on spotting that this is exactly a reversion of the current gcc patch. :-P This helps surely with gcc-3.4, but not with gcc-4.x Heinrich: Please replace the gcc4 patch from CVS with the attached one. It fixes ugly arithemtics on pointers which should allow clean compilation with gcc-4.x. (Also, warnings are gone now when compiling with gcc-3.4)
:)) Ok, I agree - I made that patch in a hurry. I just urgently needed to make a dep package on Gentoo...
Fixed in CVS.