ports/70922: x11/x3270 breaks palm/pose
Eric P. Scott
eps+pbug0408 at ana.com
Fri Aug 27 22:40:27 UTC 2004
The following reply was made to PR ports/70922; it has been noted by GNATS.
From: eps+pbug0408 at ana.com (Eric P. Scott)
To: freebsd-gnats-submit at FreeBSD.org
Cc:
Subject: Re: ports/70922: x11/x3270 breaks palm/pose
Date: Fri, 27 Aug 2004 15:36:55 -0700 (PDT)
ktrace says it fails trying to process
/usr/X11R6/lib/X11/fonts/local/3270.pcf.gz.
I rebuilt pose with debugging enabled, and the backtrace then
looked like:
(gdb) bt
#0 0x0 in ?? ()
#1 0x833b01f in fill_inbuf (eof_ok=0) at ./../../SrcShared/Gzip/util.c:105
#2 0x83393e2 in inflate_block (e=0xbfbfe70c)
at ./../../SrcShared/Gzip/inflate.c:882
#3 0x8339506 in inflate () at ./../../SrcShared/Gzip/inflate.c:931
#4 0x28814014 in ft_gzip_file_fill_output ()
from /usr/local/lib/libfreetype.so.9
[...]
Aha!
This probably wasn't identified earlier because:
1) Few users have "strange" fonts installed, so the offending
code never got executed.
2) The developers presumably use systems with a linker/loader
that resolves undefined symbols left-to-right.
You'll see pose links with this order:
Miscellaneous.o libposergzip.a -lfltk
Miscellaneous.o calls inflate(), which is satisfied by
libposergzip.a. libfltk depends on [libXft, which depends
on libfontconfig, which depends on] libfreetype, which calls
an inflate() that should come from libz--but instead binds to
the incompatible inflate() already brought in from
libposergzip.a. That one doesn't expect to be called, and trips
over a NULL pointer from an uninitialized global.
One solution is to add "palm/pose/files/patch-gzip-conflict" to
rename the conflicting functions.
--- ../SrcShared/Gzip/gzip.h.orig Fri Mar 29 05:11:06 2002
+++ ../SrcShared/Gzip/gzip.h Thu Aug 26 16:12:35 2004
@@ -320,4 +320,6 @@
//extern voidp xmalloc OF((unsigned int size)); // POSER
/* in inflate.c */
+#define inflate POSE_inflate
+#define inflate_codes POSE_inflate_codes
extern int inflate OF((void));
As a rule, I don't suggest using CONFLICTS except for mutually-
exclusive packages. x3270 wasn't impacted; it just exposed the
underlying issue. (I wonder how many other ports are similarly
affected by multiply-defined symbols?)
-=EPS=-
More information about the freebsd-ports-bugs
mailing list