Re: Bug#685625: implicit declaration of function ‘reallocf’

2012-12-22 Thread Guillem Jover
On Fri, 2012-12-21 at 23:47:47 +, Steven Chamberlain wrote:
 To further confuse things, here's a related problem in freebsd-buildutils:
 
  gcc -O2 -g -Wall -D_GNU_SOURCE -DMACHINE_ARCH='i386' 
  -DMACHINE_MULTIARCH='i386-kfreebsd-gnu' 
  -I/build/buildd-freebsd-buildutils_9.0-11-kfreebsd-i386-fRMINn/freebsd-buildutils-9.0/build-tree/src/sys
   -D_GNU_SOURCE=1 -isystem /usr/include/freebsd  -std=gnu99 
  -fstack-protector  -c excludes.c
  excludes.c: In function 'read_excludes_file':
  excludes.c:75:2: warning: implicit declaration of function 'fgetln' 
  [-Wimplicit-function-declaration]
  excludes.c:75:15: warning: assignment makes pointer from integer without a 
  cast [enabled by default]
  gcc -O2 -g -Wall -D_GNU_SOURCE -DMACHINE_ARCH='i386' 
  -DMACHINE_MULTIARCH='i386-kfreebsd-gnu' 
  -I/build/buildd-freebsd-buildutils_9.0-11-kfreebsd-i386-fRMINn/freebsd-buildutils-9.0/build-tree/src/sys
   -D_GNU_SOURCE=1 -isystem /usr/include/freebsd  -std=gnu99 
  -fstack-protector  -c misc.c
  gcc -O2 -g -Wall -D_GNU_SOURCE -DMACHINE_ARCH='i386' 
  -DMACHINE_MULTIARCH='i386-kfreebsd-gnu' 
  -I/build/buildd-freebsd-buildutils_9.0-11-kfreebsd-i386-fRMINn/freebsd-buildutils-9.0/build-tree/src/sys
   -D_GNU_SOURCE=1 -isystem /usr/include/freebsd  -std=gnu99 
  -fstack-protector  -c mtree.c
  gcc -O2 -g -Wall -D_GNU_SOURCE -DMACHINE_ARCH='i386' 
  -DMACHINE_MULTIARCH='i386-kfreebsd-gnu' 
  -I/build/buildd-freebsd-buildutils_9.0-11-kfreebsd-i386-fRMINn/freebsd-buildutils-9.0/build-tree/src/sys
   -D_GNU_SOURCE=1 -isystem /usr/include/freebsd  -std=gnu99 
  -fstack-protector  -c spec.c
  spec.c: In function 'set':
  spec.c:229:4: warning: implicit declaration of function 'setmode' 
  [-Wimplicit-function-declaration]
  spec.c:229:11: warning: assignment makes pointer from integer without a 
  cast [enabled by default]
  spec.c:232:4: warning: implicit declaration of function 'getmode' 
  [-Wimplicit-function-declaration]
 
 fgetln, setmode and getmode are defined in bsd/stdio.h and bsd/unistd.h.
  Using fgetln without its prototype truncates the pointer to 32 bits.
 Fortunately a mode_t is only 16 bits long so getmode/setmode may be okay.
 
 I think the preferred method is to use libbsd's 'overlay' in code that
 needs these functions.  Previously freebsd-buildutils couldn't use the
 overlay, so 20_libbsd_overlay.diff worked around it with extra includes:
 
 http://anonscm.debian.org/viewvc/glibc-bsd/trunk/freebsd-buildutils/debian/patches/20_libbsd_overlay.diff?view=markup

There were bugs in the libbsd include logic which made the overlay
unusable, this should be fixed now in latest libbsd versions. So it
should be possible to switch packages back, although I'm not sure of
the effects of mixing the libbsd overlay with the freebsd-glue stuff.
In any case I think that would be correct course of action, but then
I'm not sure either if that would be a minimal change solution, given
the freeze and all.

 Then for some unexplained reason that workaround got disabled;  the
 overlay was never re-enabled though:
 
 http://anonscm.debian.org/viewvc/glibc-bsd/trunk/freebsd-buildutils/debian/patches/series?r1=3805r2=3960
 
 [added Guillem Jover in Cc: in the hope he can explain any of this :) ]

Thanks, I've added Robert to it too, as he is the one who did these
changes. My guess would be that he intended to reduce duplication and
maintenance costs by centralizing those fixes into a single package
(freebsd-glue).

 Another occurrence is in freebsd-libs:
 
  cc -Wall -g -pipe -fPIC -I. 
  -I/build/buildd-freebsd-libs_9.0+ds1-3-kfreebsd-i386-0LY6QJ/freebsd-libs-9.0+ds1/sys
   -D_GNU_SOURCE -D__va_list=__builtin_va_list -O2 -isystem 
  /usr/include/freebsd 
  -I/build/buildd-freebsd-libs_9.0+ds1-3-kfreebsd-i386-0LY6QJ/freebsd-libs-9.0+ds1/debian/local/include

  -I/build/buildd-freebsd-libs_9.0+ds1-3-kfreebsd-i386-0LY6QJ/freebsd-libs-9.0+ds1/lib/libgeom
   -std=gnu99 -fstack-protector -Wsystem-headers -Wall -Wno-format-y2k -W 
  -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes 
  -Wpointer-arith -Wno-uninitialized -Wno-pointer-sign -c geom_ctl.c
  In file included from geom_ctl.c:38:0:
  /usr/include/freebsd/unistd.h: In function 'feature_present':
  /usr/include/freebsd/unistd.h:138:2: warning: implicit declaration of 
  function 'strcmp' [-Wimplicit-function-declaration]
  geom_ctl.c: At top level:
  geom_ctl.c:55:1: warning: no previous prototype for 'gctl_dump' 
  [-Wmissing-prototypes]
  geom_ctl.c: In function 'gctl_new_arg':
  geom_ctl.c:142:2: warning: implicit declaration of function 'reallocf' 
  [-Wimplicit-function-declaration]
  geom_ctl.c:142:11: warning: assignment makes pointer from integer without a 
  cast [enabled by default]
 
 And many more places in freebsd-utils according to:
 
 https://buildd.debian.org/~brlink/packages/f/freebsd-utils.html

Thanks,
Guillem


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact 

Workaround for kFreeBSD crash in reportbug

2012-12-22 Thread Jeff Epler
This patch lets me start reportbug's text ui.  It sidesteps the
python-gtk2 problem with readline and threads by requesting that the
readline hook be uninstalled.

However, I still believe that the problem is either in python-gtk2 or
python-gtk2's FAQ advice on how to use gtk.gdk.threads_init().

diff -Nru reportbug-6.4.3/debian/changelog reportbug-6.4.3+nmu1/debian/changelog
--- reportbug-6.4.3/debian/changelog2012-08-18 15:50:08.0 -0500
+++ reportbug-6.4.3+nmu1/debian/changelog   2012-12-22 10:38:40.0 
-0600
@@ -1,3 +1,11 @@
+reportbug (6.4.3+nmu1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Avoid a kFreeBSD crash by telling python-gtk not to hook readline
+Closes: #671785
+
+ -- Jeff Epler jepler@localhost  Sat, 22 Dec 2012 10:35:25 -0600
+
 reportbug (6.4.3) unstable; urgency=low
 
   * reportbug/debbugs.py
diff -Nru reportbug-6.4.3/reportbug/ui/gtk2_ui.py 
reportbug-6.4.3+nmu1/reportbug/ui/gtk2_ui.py
--- reportbug-6.4.3/reportbug/ui/gtk2_ui.py 2012-08-18 15:50:08.0 
-0500
+++ reportbug-6.4.3+nmu1/reportbug/ui/gtk2_ui.py2012-12-22 
10:35:19.0 -0600
@@ -35,6 +35,7 @@
 except:
 has_spell = False
 
+gtk.set_interactive (0)
 gtk.gdk.threads_init ()
 
 import sys


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20121222173709.gl13...@unpythonic.net



Bug#696556: [kfreebsd] ldd: segfault with inkscape/inkview executables

2012-12-22 Thread Steven Chamberlain
Package: libc-bin
Version: 2.13-37
File: /usr/bin/ldd
User: debian-bsd@lists.debian.org
Usertags: kfreebsd
X-Debbugs-Cc: debian-bsd@lists.debian.org

Hi,

On 22/07/12 22:18, Steven Chamberlain wrote:
 $ ldd /usr/bin/inkscape
 ldd: exited with unknown exit code (139)
[...]
 pid 16961 (ld-2.13.so), uid 1000: exited on signal 10

I haven't seen this happen with any other executables - the most notable
thing about the inkscape/inkview 0.48.3.1-1 binaries is their large size.

On linux amd64 the bug does not occur, but we see that some 100 dynamic
libraries are linked in.

I'm struggling to get any helpful debugging info:

(gdb) run --verify ./inkscape
Starting program: /usr/lib/debug/lib/x86_64-kfreebsd-gnu/ld-2.13.so
--verify ./inkscape
Cannot access memory at address 0x220128
Cannot access memory at address 0x220120
(gdb) bt
#0  0x01021ab0 in ?? ()
#1  0x in ?? ()

From a separate run under ktrace(1) we get some rough idea of what leads
up to the crash:

 49053 ld-2.13.so CALL  open(0x1241148,0invalid0,unused0)
 49053 ld-2.13.so NAMI  ./inkscape
 49053 ld-2.13.so RET   open 3
 49053 ld-2.13.so CALL  read(0x3,0x7fffcfb8,0x340)
 49053 ld-2.13.so RET   read 832/0x340
 49053 ld-2.13.so CALL  fstat(0x3,0x7fffcd00)
[...]
 49053 ld-2.13.so RET   fstat 0
 49053 ld-2.13.so CALL  __getcwd(0x7fffc900,0x400)
 49053 ld-2.13.so NAMI  ..
 49053 ld-2.13.so NAMI  /usr/bin
 49053 ld-2.13.so RET   __getcwd 0
 49053 ld-2.13.so CALL
mmap(0x40,0xc5c000,0x5PROT_READ|PROT_EXEC,0x12MAP_PRIVATE|MAP_FIXED,0x3,0)
 49053 ld-2.13.so RET   mmap 4194304/0x40
 49053 ld-2.13.so PSIG  SIGSEGV SIG_DFL code=0x1

That mmap is the inkscape ELF executable, up to and including the
.gcc_except_table section.

The 0x1021ab0 address mentioned by GDB would be within that
.gcc_except_table section, where I guess it's not supposed to be
executing code?

 1021aa4: 0001 0e550578 0060058d 01008801  .U.x.`..
 1021ab4: 05ff ff01081b 05450059 05ff  .E.Y
 1021ac4: ff013451 9f018c03 00850205 fe03008d  ..4Q

$ file inkscape
inkscape: ELF 64-bit LSB executable, x86-64, version 1 (FreeBSD),
dynamically linked (uses shared libs), for GNU/kFreeBSD 8.1.0,
BuildID[sha1]=0x085d1e83d4ab8e3466e0a31b2f480cc7d9cda835, stripped

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: kfreebsd-amd64 (x86_64)

Kernel: kFreeBSD 9.0-2-amd64
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

-- no debconf information


-- 
To UNSUBSCRIBE, email to debian-bsd-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/50d6055e.4010...@pyro.eu.org