Ethereal-users: [Ethereal-users] Link error Solaris 7

Note: This archive is from the project's previous web site, ethereal.com. This list is no longer active.

From: Ruud Linders <ruud@xxxxxxxxxx>
Date: Wed, 03 Apr 2002 10:53:08 +0200
Hello,

I keep getting this link error in the latest versions of ethereal (since 0.8.?)
in one of the final link stages on Solaris 5.7.
Tried solving this by re-ordering some declaration/define in epan/plugins.[ch]
(see below) and that indeed solved the build error but then no plugins seem
to be find wherever I put them.

Anybody an idea how to properly solve this ?

Thanks,
	Ruud Linders


****************************************************************************
rm -f .libs/ethereal.nm .libs/ethereal.nmS .libs/ethereal.nmT
creating .libs/etherealS.c
(cd .libs && gcc -c -fno-builtin -fno-rtti -fno-exceptions "etherealS.c")
rm -f .libs/etherealS.c .libs/ethereal.nm .libs/ethereal.nmS .libs/ethereal.nmT
gcc "-D_U_=__attribute__((unused))" -Wall -W -Wno-unused -g -O2 -Wno-return-type
 -DFUNCPROTO=15 -I. -I./wiretap -I/usr/local/include -I/usr/local/include/gtk-1.
2 -I/usr/local/include/glib-1.2 -I/usr/local/lib/glib/include -I/usr/openwin/inc
lude -o ethereal packet-aarp.o
 ............ lot of *.o files .....
/usr/local/lib/libgmodule.so /usr/local/lib/libglib.so -ldl -lXext -lX11 -lsocket -lnsl -lm -R/usr/local/
lib -R/usr/local/lib -R/usr/openwin/lib
Undefined                       first referenced
 symbol                             in file
plugin_list                         gtk/libui.a(plugins_dlg.o)
ld: fatal: Symbol referencing errors. No output written to ethereal
collect2: ld returned 1 exit status
rm -f .libs/etherealS.o
make[2]: *** [ethereal] Error 1
make[2]: Leaving directory `/export/home/ethereal-0.9.3'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/export/home/ethereal-0.9.3'
make: *** [all-recursive-am] Error 2
****************************************************************************

Patch to be able to build/link succesfully but ...
===============================================
--- plugins.h.ORIG      Wed Apr  3 10:46:50 2002
+++ plugins.h   Wed Apr  3 10:47:25 2002
@@ -39,7 +39,7 @@
     struct _plugin *next;         /* forward link */
 } plugin;

-extern plugin *plugin_list;
+static plugin *plugin_list;

 void init_plugins(const char *);
 void register_all_plugin_handoffs(void);
--- plugins.c.ORIG      Wed Apr  3 10:46:50 2002
+++ plugins.c   Wed Apr  3 10:47:42 2002
@@ -68,7 +68,7 @@
 #endif

 /* linked list of all plugins */
-plugin *plugin_list;
+/* plugin *plugin_list; */

 #ifndef WIN32
 static gchar std_plug_dir[] = "/usr/lib/ethereal/plugins/" VERSION;