Bug 108776 - net/wireshark 0.99.5 - "undefined reference" when linking
Summary: net/wireshark 0.99.5 - "undefined reference" when linking
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Joe Marcus Clarke
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-04 22:10 UTC by David Wood
Modified: 2007-02-13 00:10 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Wood 2007-02-04 22:10:17 UTC
End of output from build attempt:

creating .libs/wiresharkS.c
(cd .libs && cc  -O -pipe -march=pentium3 -c -fno-builtin "wiresharkS.c")
rm -f .libs/wiresharkS.c .libs/wireshark.nm .libs/wireshark.nmS .libs/wireshark.nmT
cc -DINET6 "-D_U_=__attribute__((unused))" -Wall -Wpointer-arith -W -O -pipe -march=pentium3 -I/usr/local/include -D_REENTRANT -DXTHREADS -DXUSE_MTSAFE_API -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/atk-1.0 -I/usr/local/include/cairo -I/usr/local/include/pango-1.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/X11R6/include -I/usr/local/include/freetype2 -I/usr/local/include -I/usr/local/lib/include -DINET6 -O -pipe -march=pentium3 -Dfreebsd6 -DAPPLLIB_EXP=/usr/local/lib/perl5/5.8.8/BSDPAN -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/lib/perl5/5.8.8/mach/CORE -I. -I/usr/local/include -I/usr/include -rpath=/usr/local/lib -o .libs/wireshark capture-pcap-util-unix.o capture_errs.o capture-pcap-util.o capture_stop_conditions.o capture_ui_utils.o cfile.o clopts_common.o conditions.o disabled_protos.o packet-range.o print.o ps.o pcapio.
 o ringbuffer.o timestats.o util.o version_info.o airpcap_loader.o alert_box.o capture.o capture_info.o capture_opts.o capture_sync.o color_filters.o file.o fileset.o filters.o g711.o merge.o proto_hier_stats.o sync_pipe_write.o summary.o tempfile.o -rpath=/usr/local/lib .libs/wiresharkS.o -pthread -pthread -pthread -Wl,--rpath -Wl,/usr/local/lib -pthread -pthread -Wl,--export-dynamic  -L/usr/local/lib -L/usr/local/lib/lib gtk/libui.a codecs/libcodec.a wiretap/.libs/libwiretap.so epan/.libs/libwireshark.so -L/usr/lib /usr/local/lib/libnetsnmp.so -lkvm -ldevstat -lwrap -lpcap -L/usr/X11R6/lib /usr/local/lib/libgtk-x11-2.0.so /usr/local/lib/libgdk-x11-2.0.so -lXrandr -lXi -lXinerama /usr/local/lib/libatk-1.0.so /usr/local/lib/libgdk_pixbuf-2.0.so /usr/local/lib/libpangocairo-1.0.so -lXcursor -lXfixes /usr/local/lib/libcairo.so -lpng -lSM -lICE /usr/local/lib/libpangoft2-1.0.so /usr/X11R6/lib/libfontconfig.so /usr/local/lib/libexpat.so /usr/local/lib/libfreetype.so /usr/local/li
 b/libpango-1.0.so -lm -lXrender -lX11 -lXext /usr/local/lib/!
 libgobje
ct-2.0.so /usr/local/lib/libgmodule-2.0.so /usr/local/lib/libgthread-2.0.so -pthread /usr/local/lib/libglib-2.0.so -licui18n -ladns -lkrb5 -lasn1 -lroken -lcrypt -lcom_err -lcrypto /usr/local/lib/libgnutls.so /usr/local/lib/libgcrypt.so /usr/local/lib/libgpg-error.so /usr/local/lib/libintl.so /usr/local/lib/libiconv.so -lportaudio -lz /usr/local/lib/libpcre.so -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/X11R6/lib
epan/.libs/libwireshark.so: undefined reference to `.LC831'
epan/.libs/libwireshark.so: undefined reference to `.LC834'
epan/.libs/libwireshark.so: undefined reference to `.LC830'
epan/.libs/libwireshark.so: undefined reference to `.LC832'
epan/.libs/libwireshark.so: undefined reference to `.LC835'
epan/.libs/libwireshark.so: undefined reference to `.LC833'
epan/.libs/libwireshark.so: undefined reference to `.LC829'
gmake[2]: *** [wireshark] Error 1
gmake[2]: Leaving directory `/var/ports/usr/ports/net/wireshark/work/wireshark-0.99.5'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/var/ports/usr/ports/net/wireshark/work/wireshark-0.99.5'
gmake: *** [all] Error 2
*** Error code 2

Stop in /usr/ports/net/wireshark.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade.96350.0 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=wireshark-0.99.4_1 UPGRADE_PORT_VER=0.99.4_1 make
** Fix the problem and try again.
--->  Build of net/wireshark ended at: Sun, 04 Feb 2007 21:24:01 +0000 (consumed 01:52:43)

How-To-Repeat: Update the port to 0.99.5 and attempt to build (0.99.4 builds correctly on this system)
Comment 1 Edwin Groothuis freebsd_committer freebsd_triage 2007-02-04 22:10:25 UTC
Responsible Changed
From-To: freebsd-ports-bugs->marcus

Over to maintainer
Comment 2 David Wood 2007-02-05 15:10:01 UTC
I tried again with the default options (RTP off, the rest on) and it 
fails in exactly the same way on the same 6.2-RELEASE i386 box:

End of output from build attempt:

creating .libs/wiresharkS.c
(cd .libs && cc  -O -pipe -march=pentium3 -c -fno-builtin "wiresharkS.c")
rm -f .libs/wiresharkS.c .libs/wireshark.nm .libs/wireshark.nmS .libs/wireshark.nmT
cc -DINET6 "-D_U_=__attribute__((unused))" -Wall -Wpointer-arith -W -O -pipe -march=pentium3 -I/usr/local/include -D_REENTRANT -DXTHREADS -
DXUSE_MTSAFE_API -I/usr/local/include/gtk-2.0 -I/usr/local/lib/gtk-2.0/include -I/usr/local/include/atk-1.0 -I/usr/local/include/cairo -
I/usr/local/include/pango-1.0 -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -I/usr/X11R6/include -I/usr/local/include/freetype2 -
I/usr/local/include -I/usr/local/lib/include -DINET6 -O -pipe -march=pentium3 -Dfreebsd6 -DAPPLLIB_EXP=/usr/local/lib/perl5/5.8.8/BSDPAN -
DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -Wdeclaration-after-statement -I/usr/local/include -I/usr/local/lib/perl5/5.8.8/
mach/CORE -I. -I/usr/local/include -I/usr/include -rpath=/usr/local/lib -o .libs/wireshark capture-pcap-util-unix.o capture_errs.o capture-pcap-util.o
capture_stop_conditions.o capture_ui_utils.o cfile.o clopts_common.o conditions.o disabled_protos.o packet-range.o print.o ps.o pcapio.o ringbuffer.o
timestats.o util.o version_info.o airpcap_loader.o alert_box.o capture.o capture_info.o capture_opts.o capture_sync.o color_filters.o file.o fileset.o
filters.o g711.o merge.o proto_hier_stats.o sync_pipe_write.o summary.o tempfile.o -rpath=/usr/local/lib .libs/wiresharkS.o -pthread -pthread -Wl,--
rpath -Wl,/usr/local/lib -pthread -Wl,--export-dynamic  -L/usr/local/lib -L/usr/local/lib/lib gtk/libui.a codecs/libcodec.a wiretap/.libs/libwiretap.so
epan/.libs/libwireshark.so -L/usr/lib /usr/local/lib/libnetsnmp.so -lkvm -ldevstat -lwrap -lpcap -L/usr/X11R6/lib /usr/local/lib/libgtk-x11-2.0.so
/usr/local/lib/libgdk-x11-2.0.so -lXrandr -lXi -lXinerama /usr/local/lib/libatk-1.0.so /usr/local/lib/libgdk_pixbuf-2.0.so /usr/local/lib/libpangocairo-1.0.so -
lXcursor -lXfixes /usr/local/lib/libcairo.so -lpng -lSM -lICE /usr/local/lib/libpangoft2-1.0.so /usr/X11R6/lib/libfontconfig.so /usr/local/lib/libexpat.so
/usr/local/lib/libfreetype.so /usr/local/lib/libpango-1.0.so -lm -lXrender -lX11 -lXext /usr/local/lib/libgobject-2.0.so /usr/local/lib/libgmodule-2.0.so
/usr/local/lib/libgthread-2.0.so -pthread /usr/local/lib/libglib-2.0.so -licui18n -ladns -lkrb5 -lasn1 -lroken -lcrypt -lcom_err -lcrypto
/usr/local/lib/libgnutls.so /usr/local/lib/libgcrypt.so /usr/local/lib/libgpg-error.so /usr/local/lib/libintl.so /usr/local/lib/libiconv.so -lz /usr/local/lib/libpcre.so
-Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/X11R6/lib
epan/.libs/libwireshark.so: undefined reference to `.LC831'
epan/.libs/libwireshark.so: undefined reference to `.LC834'
epan/.libs/libwireshark.so: undefined reference to `.LC830'
epan/.libs/libwireshark.so: undefined reference to `.LC832'
epan/.libs/libwireshark.so: undefined reference to `.LC835'
epan/.libs/libwireshark.so: undefined reference to `.LC833'
epan/.libs/libwireshark.so: undefined reference to `.LC829'
gmake[2]: *** [wireshark] Error 1
gmake[2]: Leaving directory `/var/ports/usr/ports/net/wireshark/work/wireshark-0.99.5'
gmake[1]: *** [all-recursive] Error 1
gmake[1]: Leaving directory `/var/ports/usr/ports/net/wireshark/work/wireshark-0.99.5'
gmake: *** [all] Error 2
*** Error code 2

Stop in /usr/ports/net/wireshark.
** Command failed [exit code 1]: /usr/bin/script -qa /tmp/portupgrade.93525.109 env UPGRADE_TOOL=portupgrade UPGRADE_PORT=wireshark-
0.99.4_1 UPGRADE_PORT_VER=0.99.4_1 make
** Fix the problem and try again.
Comment 3 Joe Marcus Clarke freebsd_committer freebsd_triage 2007-02-10 06:37:48 UTC
State Changed
From-To: open->closed

All reproducible build problems with wireshark have now been corrected. 
This problem was never reproducible.  If you still encounter a build failure, 
try with default compiler options, and try rebuilding all dependent ports.
Comment 4 TsurutaniNaoki 2007-02-11 11:25:30 UTC
I saw the same problem.
I re-build all the ports depended by wireshark, and found the same problem.
The errors are very resemble, but the numbers in ".LC831" etc are not
 the same numbers.
On my host of FreeBSD/i386 and amd64, the former has no problem, and
the latter causes error. Both hosts are 6-STABLE, built on the same day and
with almost same options.
What is the origin of this kind of errors ?
I cannot find the origin of "reference"s in source code...

---
Tsurutani Naoki
Comment 5 David Wood 2007-02-11 16:41:40 UTC
The problem looks to be in ld, the linker, and relates to the following 
statement executed in the epan directory within the work directory.

On my system, that step is (watch for line breaks!):

cc -shared  .libs/addr_and_mask.o .libs/addr_resolv.o .libs/adler32.o .libs/afn.o .libs/atalk-utils.o .libs/base64.o .libs/bitswap.o
  .libs/camel-persistentdata.o .libs/charsets.o .libs/circuit.o .libs/column.o .libs/column-utils.o .libs/conversation.o .libs/crc16.
o .libs/crc32.o .libs/crcdrm.o .libs/dtd_grammar.o .libs/dtd_parse.o .libs/dtd_preparse.o .libs/emem.o .libs/epan.o .libs/ex-opt.o .
libs/except.o .libs/expert.o .libs/filesystem.o .libs/follow.o .libs/frame_data.o .libs/funnel.o .libs/guid-utils.o .libs/h225-persi
stentdata.o .libs/in_cksum.o .libs/ipproto.o .libs/ipv4.o .libs/load_snmp_users_file.o .libs/next_tvb.o .libs/nstime.o .libs/oid_res
olv.o .libs/osi-utils.o .libs/packet.o .libs/plugins.o .libs/prefs.o .libs/privileges.o .libs/proto.o .libs/radius_dict.o .libs/rang
e.o .libs/reassemble.o .libs/reedsolomon.o .libs/req_resp_hdrs.o .libs/sigcomp_state_hdlr.o .libs/sigcomp-udvm.o .libs/sminmpec.o .l
ibs/sna-utils.o .libs/stat_cmd_args.o .libs/stats_tree.o .libs/strutil.o .libs/stream.o .libs/t35.o .libs/tap.o .libs/tcap-persisten
tdata.o .libs/timestamp.o .libs/tfs.o .libs/to_str.o .libs/tvbparse.o .libs/tvbuff.o .libs/unicode-utils.o .libs/value_string.o .lib
s/xdlc.o .libs/xmlstub.o -Wl,--whole-archive crypt/.libs/libairpdcap.a ftypes/.libs/libftypes.a dfilter/.libs/libdfilter.a dissector
s/.libs/libdissectors.a -Wl,--no-whole-archive  -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib -L/usr/local/lib -L/us
r/local/lib/lib /usr/local/lib/libgmodule-2.0.so /usr/local/lib/libglib-2.0.so -licui18n /usr/local/lib/libintl.so -ladns /usr/local
/lib/libgnutls.so /usr/local/lib/libgcrypt.so /usr/local/lib/libgpg-error.so /usr/local/lib/libiconv.so -L/usr/lib -lkrb5 -lasn1 -lr
oken -lcrypt -lcom_err /usr/local/lib/libnetsnmp.so -lkvm -ldevstat -lwrap -lcrypto -lm -lz /usr/local/lib/libpcre.so  -march=pentiu
m3 -march=pentium3 -pthread -Wl,-soname -Wl,libwireshark.so.0 -o .libs/libwireshark.so.0


If you dump the symbol tables of all the wireshark object files in that 
step (all the .libs/*.o files), there are no undefined symbols (U status 
in nm). However, when this problem happens, epan/.libs/libwireshark.so 
finishes up with several undefined symbols, which, from their names 
appear to be local to the library (that is, names beginning with .L). 
The linker emits no errors, however.

Here's partial output from nm .libs/libwireshark.so.0 :

...
00904abe t .L998
006723ee t .L998
00b11a30 t .L998
00440fc6 t .L998
00904adc t .L999
0086c3f3 t .L999
006723fc t .L999
00440fe3 t .L999
00b11a8b t .L999
          U .LC829
          U .LC830
          U .LC831
          U .LC832
          U .LC833
          U .LC834
          U .LC835
014552c4 b A
0112bd40 d A5_1_algorithm_sup_vals
0112bed8 d A5_2_algorithm_sup_vals
0112bec0 d A5_3_algorithm_sup_vals
0100a020 d AARE_apdu_sequence
...


I tried stripping local symbols from the wireshark .o files before 
building the library. That doesn't help.

I tried telling the linker to delete temporary local symbols (which is 
what I understand the .L symbols to be - they tend to be symbols 
relating to branches and jumps in the code) via -Wl,-X. That doesn't 
help.

I tried a more aggressive linking step, telling the linker to delete all 
local symbols via -Wl,-x - again, it doesn't help.

No matter what I do on my system, there's still those unresolved symbols 
in the library. Without solving this problem, it's not possible to build 
wireshark-0.99.5 on my system.


At this point, maybe a binutils or, even better, ld guru would have some 
input. FreeBSD 6.2-RELEASE contains binutils 2.15; I have no idea if 
this is solved in the version of ld in the latest version of binutils, 
which is 2.17. I may try building binutils 2.17 on my box and seeing if 
ld 2.17 will link the library successfully.

If binutils 2.17 doesn't help (I don't know what version of binutils is 
in 7-CURRENT, and whether there's any reason not to import binutils 2.17 
to 6-STABLE), the only thing I can think of is posting on the binutils 
and wireshark mailing lists.


It is quite possible that this problem is dependent on which options are 
selected when building wireshark, and/or on the versions of those shared 
libraries selected when using that option. The troublesome library is 
linked against various shared libraries, and clearly different versions 
of those libraries or a different combination of libraries with a system 
that's configured differently may or may not trigger the problem.

To reproduce this problem, installing 6.2-RELEASE i386, portsnapping up 
to date and building wireshark with the default options may be enough. 
The port takes account of the openssl port if it's installed - on my 
system, openssl-0.9.8d is installed, and that may be the extra thing 
that pushes the linker over the edge, though the openssl shared library 
is not included in the link step that silently fails but later causes 
problems.

For reference, pkg_info on my system shows:
adns-1.4            Easy to use, asynchronous-capable DNS client library and ut
apcupsd-3.12.4      A daemon for controlling APC UPS
apr-gdbm-db42-1.2.7_1 The Apache Group's Portability Library
atk-1.12.4          A GNOME accessibility toolkit (ATK)
autoconf-2.13.000227_5 Automatically configure source code on many Un*x platforms
autoconf-2.59_2     Automatically configure source code on many Un*x platforms
autoconf-2.61       Automatically configure source code on many Un*x platforms
automake-1.4.6_2    GNU Standards-compliant Makefile generator (1.4)
automake-1.9.6      GNU Standards-compliant Makefile generator (1.9)
bash-3.1.17         The GNU Project's Bourne Again SHell
bison-1.75_2,1      A parser generator from FSF, (mostly) compatible with Yacc
bitstream-vera-1.10_2 Bitstream Vera TrueType font collection
cairo-1.2.6_1       Vector graphics library with cross-device output support
cups-base-1.2.7_2   Common UNIX Printing System
cvsup-16.1h_2       General network file distribution system optimized for CVS
db41-4.1.25_4       The Berkeley DB package, revision 4.1
db42-4.2.52_5       The Berkeley DB package, revision 4.2
desktop-file-utils-0.12 A couple of command line utilities for working with desktop
diablo-jdk-1.5.0.07.01_1 Java Development Kit 1.5.0_07.01
diablo-jre-1.5.0.07.01_1 Java Runtime Environment 1.5.0_07.01
expat-2.0.0_1       XML 1.0 parser written in C
ezjail-2.0.1        A framework to easily create, manipulate and run FreeBSD ja
ezm3-1.2_1          Easier, more portable Modula-3 distribution for building CV
findutils-4.2.29    The GNU find utilities
firefox-2.0.0.1_1,1 Web browser based on the browser portion of Mozilla
fontconfig-2.3.2_6,1 An XML-based font configuration API for X Windows
freeradius-1.1.4_1  A free RADIUS server implementation
freetype2-2.2.1_1   A free and portable TrueType font rendering engine
gamin-0.1.7_2       A file and directory monitoring system
gcc-4.1.2_20070205  GNU Compiler Collection 4.1
gdbm-1.8.3_3        The GNU database manager
gettext-0.14.5_2    GNU gettext package
glib-2.12.9         Some useful routines of C programming (current stable versi
gmake-3.81_1        GNU version of 'make' utility
gnutls-1.6.1        GNU Transport Layer Security library
gtk-2.10.9          Gimp Toolkit for X11 GUI (current stable version)
help2man-1.36.4_1   Automatically generating simple manual pages from program o
hicolor-icon-theme-0.9_2 A high-color icon theme shell from the FreeDesktop project
icu-3.6             International Components for Unicode (from IBM)
imake-6.9.0_1       Imake and other utilities from X.Org
intltool-0.35.4     Tools to internationalize various kinds of data files
javavmwrapper-2.3   Wrapper script for various Java Virtual Machines
jerm-8095           Communication terminal through serial and TCP/IP interfaces
jpeg-6b_4           IJG's jpeg compression utilities
lame-3.97_1         ISO code based fast MP3 encoder kit
libIDL-0.8.7        A library for creating trees of CORBA IDL files
libXft-2.1.7_1      A client-sided font API for X applications
libchk-1.9          A tool to check shared library links
libdrm-2.0.2        Userspace interface to kernel Direct Rendering Module servi
libdts-0.0.2_2      Free DTS Coherent Acoustics decoder
libgcrypt-1.2.4     "General purpose crypto library based on code used in GnuPG
libgpg-error-1.4    Common error values for all GnuPG components
libiconv-1.9.2_2    A character set conversion library
libltdl-1.5.22_1    System independent dlopen wrapper
libogg-1.1.3,3      Ogg bitstream library
libtool-1.5.22_3    Generic shared library support script
libungif-4.1.4_2    Tools and library routines for working with GIF images
libvorbis-1.1.2,3   Audio compression codec library
libxml2-2.6.27      XML parser library for GNOME
libxslt-1.1.20      The XSLT C library for GNOME
linux_base-fc-4_9   Base set of packages needed in Linux mode (for i386/amd64)
lynx-2.8.5_2        A non-graphical, text-based World-Wide Web client
m4-1.4.8_1          GNU m4
mplayer-0.99.10_3   High performance media player/encoder supporting many forma
mysql-client-5.0.33 Multithreaded SQL database (client)
nasm-0.98.39,1      General-purpose multi-platform x86 assembler
neon-0.25.5         An HTTP and WebDAV client library for Unix systems
net-snmp-5.2.3_3    An extendable SNMP implementation
nspr-4.6.4          A platform-neutral API for system level and libc like funct
nss-3.11.4          Libraries to support development of security-enabled applic
open-motif-2.2.3_2  Motif X11 Toolkit (industry standard GUI (IEEE 1295))
openldap-client-2.3.33 Open source LDAP client implementation
openntpd-3.9p1,2    OpenBSD's Network Time Protocol daemon
openssl-0.9.8d      SSL and crypto library
p5-DBD-mysql50-4.001 MySQL 5.0 driver for the Perl5 Database Interface (DBI)
p5-DBI-1.53         The perl5 Database Interface.  Required for DBD::* modules
p5-Storable-2.15    Persistency for perl data structures
p5-XML-Parser-2.34_2 Perl extension interface to James Clark's XML parser, expat
p5-gettext-1.05_1   Message handling functions
pango-1.14.10       An open-source framework for the layout and rendering of i1
pcre-7.0            Perl Compatible Regular Expressions library
perl-5.8.8          Practical Extraction and Report Language
pkg-config-0.21     A utility to retrieve information about installed libraries
png-1.2.14          Library for manipulating PNG images
popt-1.7_2          A getopt(3) like library with a number of enhancements, fro
poptop-1.3.0        Windows 9x compatible PPTP (VPN) server
portaudio-18.1_2    Portable cross-platform Audio API
portaudit-0.5.11    Checks installed ports against a list of security vulnerabi
portlint-2.9.2      A verifier for FreeBSD port directory
portupgrade-2.2.2_4,2 FreeBSD ports/packages administration and management tool s
python-2.4.3,1      The "meta-port" for the stable version of Python interprete
python24-2.4.3_3    An interpreted object-oriented programming language
rpm-3.0.6_13        The Red Hat Package Manager
rsync-2.6.9         A network file distribution/synchronization utility
ruby-1.8.5.12,1     An object-oriented interpreted scripting language
ruby18-bdb-0.6.0    Ruby interface to Sleepycat's Berkeley DB revision 2 or lat
samba-3.0.24,1      A free SMB and CIFS client and server for UNIX
shared-mime-info-0.20 A MIME type database from the FreeDesktop project
subversion-1.4.3    Version control system
svn2cl-0.8          Subversion ChangeLog generator
svndelta-1.0.5      Summarizes and manages differences between local files and
tiff-3.8.2_1        Tools and library routines for working with TIFF images
unzip-5.52_3        List, test and extract compressed files in a ZIP archive
wireshark-0.99.4_1  A powerful network analyzer/capture tool
xemacs-21.4.20_1    This port tracks the stable version of the XEmacs text edit
xemacs-packages-14.1_1 Basic XEmacs elisp packages(xemacs-packages)
xorg-clients-6.9.0_3 X client programs and related files from X.Org
xorg-documents-6.9.0 Documentation of X11 protocol and libraries from X.Org
xorg-fonts-100dpi-6.9.0_1 X.Org 100dpi bitmap fonts
xorg-fonts-75dpi-6.9.0_1 X.Org 75dpi bitmap fonts
xorg-fonts-encodings-6.9.0_1 X.Org font encoding files
xorg-fonts-miscbitmaps-6.9.0_1 X.Org miscellaneous bitmap fonts
xorg-fonts-truetype-6.9.0 X.Org TrueType fonts
xorg-libraries-6.9.0_1 X11 libraries and headers from X.Org
xorg-manpages-6.9.0 X.Org library manual pages
xorg-server-6.9.0_6 X.Org X server and related programs
xterm-223           Terminal emulator for the X Window System
zip-2.32            Create/update ZIP files compatible with pkzip


I think this PR needs reopening. Certainly closed looks to be the wrong 
status, despite marcus' understandable comments, because the problem is 
manifesting on pointyhat.

That said, I have a nasty suspicion that the problem and therefore the 
fix needed may lie some way away from the port - either with the version 
of binutils in the base system, or a bug in ld itself.


There is a security issue here, as Wireshark 0.99.5 fixes various 
security related bugs in 0.99.4 or previous versions. If someone can 
build 0.99.5 on 6-STABLE or 6.2-RELEASE and produce a package for 
download, that would be extremely useful


Tsuritani - you seem to have managed to build 0.99.5 on your i386 
machine, though you don't state what version of FreeBSD you're using. 
Could you or anyone else who has built 0.99.5 on 6.2-RELEASE i386 or 
6-STABLE i386 produce and host a 0.99.5 package?

It would be interesting to take a look at the dump of the symbol table 
of your libwireshark.so using nm (if you haven't set ${PREFIX} to 
anything non standard, nm /usr/local/lib/libwireshark.so | less will do 
the job). The problem may relate to the number of local symbols, and 
hence where the L look to see where the .L numbers cut off. On my 
0.99.4_1 version on 6.2-RELEASE i386, they go up to .L4272 and my 0.99.5 
version with unresolved symbols goes to .L4274.


As of now, pointyhat has failed to build 0.99.5 on any platform that 
it's tried. However, following marcus' comment, I will attempt to get 
round to building a jail on my machine that has no other ports 
installed, an up to date ports tree and no special compiler options in 
/etc/make.conf - then see what happens.

That said,
CPUTYPE?=pentium3
CFLAGS= -O -pipe
CXXFLAGS+= -fconserve-space
COPTFLAGS= -O -pipe
in /etc/make.conf is hardly that unusual or aggressive.
Comment 6 TsurutaniNaoki 2007-02-13 00:06:56 UTC
On my host of 6-STABLE, I tried some, and found some relationship.
Symbols .LC775 etc are generated by optimization or other compiler internal
process, as you said and I checked with my codes.
I try to build with "-O" and "-O2" optimization, but it failed.
Looking at the log in build, I found another optimization flags,
probably defined in $PREFIX/bin/net-snmp-config, as I guess.
I rebuild net-snmp with "-O2" optimization and then build wireshark
with "-O2" or "-O", and both succeeded.
I cannot state what is the correct way and how to fix this problem,
but could you try building both ports with "-O2" ?

The reason I used "-O" instead of "-O2" is written in PR bin/102424.

---
Tsurutani Naoki
turutani@scphys.kyoto-u.ac.jp