Subject: pkg/29949: ethereal build fails on darwin
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <jml@snorkkeli.homeip.net>
List: pkgsrc-bugs
Date: 04/11/2005 18:47:00
>Number:         29949
>Category:       pkg
>Synopsis:       ethereal build fails on darwin
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 11 18:47:00 +0000 2005
>Originator:     Juha-Matti Liukkonen
>Release:        ethereal-0.10.10, libtool-base-1.5.14
>Organization:
>Environment:
Darwin wazoo.koti2.net 7.8.0 Darwin Kernel Version 7.8.0: Wed Dec 22 14:26:17 PST 2004; root:xnu/xnu-517.11.1.obj~1/RELEASE_PPC  Power Macintosh powerpc
>Description:
ethereal build fails in final link, can't find some CoreFoundation
routines although the framework clauses are correctly given by
ethereal's Makefile to libtool. The linker command line is missing
stuff for what appears to be the symbol file build:

$ sudo bmake
...
Making all in gtk
/bin/sh ./libtool --mode=link gcc -pipe  -DINET6 -no-cpp-precomp -D_U_="__attribute__((unused))" -Wall -W  -O2 -I/usr/pkg/include -I/usr/include -I/usr/pkg/include/freetype2 -I/usr/local/include -DXTHREADS -D_REENTRANT -I/usr/pkg/include/gtk-2.0 -I/usr/pkg/lib/gtk-2.0/include -I/usr/pkg/include -I/usr/X11R6/include -I/usr/pkg/include/atk-1.0 -I/usr/pkg/include/pango-1.0 -I/usr/pkg/include/freetype2 -I/usr/pkg/include/glib/glib-2.0 -I/usr/pkg/lib/glib-2.0/include   -I/usr/pkg/include -I/usr/pkg/include -I/usr/pkg/include -DINET6 -O2 -I/usr/pkg/include -Ddarwin -no-cpp-precomp -I/usr/pkg/include -I. -I/usr/pkg/include   -L/usr/pkg/lib -L/usr/lib -L/usr/X11R6/lib -L/usr/local/lib -L/usr/pkg/lib -L/usr/pkg/lib -L/usr/lib -L/usr/local/lib -o ethereal -export-dynamic pcap-util-unix.o capture_stop_conditions.o  capture_ui_utils.o cfile.o  clopts_common.o conditions.o  disabled_protos.o packet-range.o  pcap-util.o print.o ps.o  ringbuffer.o timestats.o util.o  version_info.o alert_bo
 x.o  capture.o capture_opts.o  capture_sync.o capture_loop.o  color_filters.o file.o filters.o  g711.o merge.o proto_hier_stats.o  summary.o       gtk/libui.a             wiretap/libwiretap.la   epan/libethereal.la     -L/usr/pkg/lib -L/usr/pkg/lib -lnetsnmp -lcrypto -lm -lcrypto          "-dlopen" self   "-dlopen" plugins/acn/acn.la  "-dlopen" plugins/agentx/agentx.la  "-dlopen" plugins/artnet/artnet.la  "-dlopen" plugins/asn1/asn1.la  "-dlopen" plugins/ciscosm/ciscosm.la  "-dlopen" plugins/docsis/docsis.la  "-dlopen" plugins/enttec/enttec.la  "-dlopen" plugins/giop/cosnaming.la  "-dlopen" plugins/giop/coseventcomm.la  "-dlopen" plugins/gryphon/gryphon.la  "-dlopen" plugins/irda/irda.la  "-dlopen" plugins/lwres/lwres.la  "-dlopen" plugins/megaco/megaco.la  "-dlopen" plugins/mgcp/mgcp.la  "-dlopen" plugins/opsi/opsi.la  "-dlopen" plugins/pcli/pcli.la  "-dlopen" plugins/rdm/rdm.la  "-dlopen" plugins/rlm/rlm.la  "-dlopen" plugins/rtnet/rtnet.la  "-dlopen" plugins/rudp/rudp.la 
  "-dlopen" plugins/v5ua/v5ua.la                       -L/usr!
 /pkg/lib
 -lpcre  -L/usr/pkg/lib -lz  -lintl                       -lpcap -L/usr/pkg/lib -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgdk_pixbuf-2.0 -lm -lpangoxft-1.0 -lpangox-1.0 -lpango-1.0 -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lglib-2.0 -liconv     -framework ApplicationServices -framework CoreFoundation -framework ApplicationServices -framework CoreFoundation -L/usr/pkg/lib -lz  -lintl -lpcre

[NOTE: the above is OK and works, linking the ethereal binary; the
following then generated by libtool for some fine reason, and missing
the frameworks it fails:]

creating .libs/etherealS.c
(cd .libs && gcc -pipe -c -fno-builtin "etherealS.c")
rm -f .libs/etherealS.c .libs/ethereal.nm .libs/ethereal.nmS .libs/ethereal.nmT
gcc -pipe -DINET6 -no-cpp-precomp "-D_U_=__attribute__((unused))" -Wall -W -O2 -I/Users/admin/pkgsrc/net/ethereal/work/.buildlink/include -I/Users/admin/pkgsrc/net/ethereal/work/.buildlink/include/freetype2 -DXTHREADS -D_REENTRANT -I/Users/admin/pkgsrc/net/ethereal/work/.buildlink/include/gtk-2.0 -I/Users/admin/pkgsrc/net/ethereal/work/.buildlink/lib/gtk-2.0/include -I/Users/admin/pkgsrc/net/ethereal/work/.x11-buildlink/include -I/Users/admin/pkgsrc/net/ethereal/work/.buildlink/include/atk-1.0 -I/Users/admin/pkgsrc/net/ethereal/work/.buildlink/include/pango-1.0 -I/Users/admin/pkgsrc/net/ethereal/work/.buildlink/include/glib/glib-2.0 -I/Users/admin/pkgsrc/net/ethereal/work/.buildlink/lib/glib-2.0/include -O2 -Ddarwin -no-cpp-precomp -I. -o .libs/ethereal pcap-util-unix.o capture_stop_conditions.o capture_ui_utils.o cfile.o clopts_common.o conditions.o disabled_protos.o packet-range.o pcap-util.o print.o ps.o ringbuffer.o timestats.o util.o version_info.o alert_box.o capture.o 
 capture_opts.o capture_sync.o capture_loop.o color_filters.o file.o filters.o g711.o merge.o proto_hier_stats.o summary.o .libs/etherealS.o  -L/Users/admin/pkgsrc/net/ethereal/work/.buildlink/lib -L/Users/admin/pkgsrc/net/ethereal/work/.x11-buildlink/lib gtk/libui.a wiretap/.libs/libwiretap.dylib epan/.libs/libethereal.dylib /Users/admin/pkgsrc/net/ethereal/work/.buildlink/lib/libnetsnmp.dylib -lcrypto -lpcap /Users/admin/pkgsrc/net/ethereal/work/.buildlink/lib/libgtk-x11-2.0.dylib /Users/admin/pkgsrc/net/ethereal/work/.buildlink/lib/libgdk-x11-2.0.dylib /Users/admin/pkgsrc/net/ethereal/work/.buildlink/lib/libatk-1.0.dylib /Users/admin/pkgsrc/net/ethereal/work/.buildlink/lib/libgdk_pixbuf-2.0.dylib -lpthread /Users/admin/pkgsrc/net/ethereal/work/.buildlink/lib/libpangoxft-1.0.dylib /Users/admin/pkgsrc/net/ethereal/work/.buildlink/lib/libpangox-1.0.dylib /Users/admin/pkgsrc/net/ethereal/work/.buildlink/lib/libpango-1.0.dylib -lm /Users/admin/pkgsrc/net/ethereal/work/.buildlin
 k/lib/libgobject-2.0.dylib /Users/admin/pkgsrc/net/ethereal/!
 work/.bu
ildlink/lib/libgmodule-2.0.dylib /Users/admin/pkgsrc/net/ethereal/work/.buildlink/lib/libgthread-2.0.dylib /Users/admin/pkgsrc/net/ethereal/work/.buildlink/lib/libglib-2.0.dylib /Users/admin/pkgsrc/net/ethereal/work/.buildlink/lib/libz.dylib /Users/admin/pkgsrc/net/ethereal/work/.buildlink/lib/libintl.dylib /usr/lib/libiconv.dylib -lc /Users/admin/pkgsrc/net/ethereal/work/.buildlink/lib/libpcre.dylib
ld: Undefined symbols:
_CFRelease
_CFStringCreateWithCString
_CFURLCreateWithString
_LSOpenCFURLRef
*** Error code 1

Stop.
bmake: stopped in /Users/admin/pkgsrc/net/ethereal/work/ethereal-0.10.10
*** Error code 1

Stop.
bmake: stopped in /Users/admin/pkgsrc/net/ethereal/work/ethereal-0.10.10
*** Error code 1

Stop.
bmake: stopped in /Users/admin/pkgsrc/net/ethereal/work/ethereal-0.10.10
*** Error code 1

Stop.
bmake: stopped in /Users/admin/pkgsrc/net/ethereal

>How-To-Repeat:
cd pkgsrc/net/ethereal; bmake
>Fix:
"Scrap configure and libtool and use regular makefiles" comes to mind;
require gnu make instead of the make-abstracting script tools.
Writing makefiles for a sane make ain't that hard. But I digress (and
humbly recognize being a dinosaur).

libtool seems to drop the quite essential -framework flags for
whatever black magic it does. It should be made not to :-)