Ethereal-dev: [Ethereal-dev] Long command-line when building ethereal on Solaris

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

Date: Sat, 26 May 2001 23:16:14 -0500
I tried building ethereal 0.8.18 on Solaris with a long --prefix and
the compile barfed when building ethereal. With the -L paths and all
the package-* files, the command-line limit was exceeded. My solution
was to make the package-* files into a libtool convenience library and
link that whenever $(DISSECTOR_SRC) was used. Patch attached.

The downside to this is that libtool builds both a *.lo (shared) and
*.o (static) version of all the package-* files. I don't know how to
work around this with libtool 1.3.x. Libtool 1.4 has a -prefer-non-pic
flag that would build only the *.o files.

-- 
albert chin (china@xxxxxxxxxxxxxxxxxx)

-- snip snip
--- Makefile.am.orig	Sat May 26 14:00:52 2001
+++ Makefile.am	Sat May 26 15:17:23 2001
@@ -69,7 +69,9 @@
 
 sysconf_DATA = manuf
 
-DISSECTOR_SRC = \
+noinst_LTLIBRARIES = libdissector.la
+libdissector_la_LDFLAGS = -static
+libdissector_la_SOURCES = \
 	packet-aarp.c  \
 	packet-afs.c   \
 	packet-aim.c   \
@@ -385,7 +387,6 @@
 	x11-register-info.h
 
 ethereal_SOURCES = \
-	$(DISSECTOR_SRC) \
 	$(ETHEREAL_COMMON_SRC) \
 	capture.c      \
 	capture.h      \
@@ -456,6 +457,7 @@
 # @GTK_LIBS@ (as those are also needed for X applications, and GTK+
 # applications are X applications).
 ethereal_LDADD = \
+	libdissector.la			\
 	$(ethereal_optional_objects)	\
 	$(ethereal_additional_libs)	\
 	@SNMP_LIBS@ @SSL_LIBS@ 		\
@@ -464,6 +466,7 @@
 	"-dlopen" plugins/mgcp/mgcp.la @PCAP_LIBS@ @GTK_LIBS@
 
 ethereal_static_LDADD = \
+	libdissector.la			\
 	$(ethereal_optional_objects)	\
 	$(ethereal_additional_libs)	\
 	@SNMP_LIBS@ @SSL_LIBS@		\
@@ -473,7 +476,6 @@
 ethereal_static_LDFLAGS = -Wl,-static
 
 tethereal_SOURCES = \
-	$(DISSECTOR_SRC) \
 	$(ETHEREAL_COMMON_SRC) \
 	tethereal.c
 
@@ -501,6 +503,7 @@
 
 # This automake variable adds to the link-line for the executable
 tethereal_LDADD = wiretap/libwiretap.a	\
+	libdissector.la			\
 	$(ethereal_optional_objects)	\
 	$(tethereal_additional_libs)	\
 	@SNMP_LIBS@ @SSL_LIBS@		\
@@ -510,6 +513,7 @@
 	@PCAP_LIBS@ @SOCKET_LIBS@ @NSL_LIBS@
 
 tethereal_static_LDADD = wiretap/libwiretap.a	\
+	libdissector.la			\
 	$(ethereal_optional_objects)	\
 	$(tethereal_additional_libs)	\
 	@SNMP_LIBS@ @SSL_LIBS@		\
@@ -557,9 +561,9 @@
 # The first argument is the directory in which the source files live.
 # All subsequent arguments are the files to scan.
 #
-register.c: $(DISSECTOR_SRC) $(srcdir)/make-reg-dotc
+register.c: $(libdissector_la_SOURCES) $(srcdir)/make-reg-dotc
 	@echo Making register.c
-	@$(srcdir)/make-reg-dotc $(srcdir) $(DISSECTOR_SRC)
+	@$(srcdir)/make-reg-dotc $(srcdir) $(libdissector_la_SOURCES)
 
 ps.c: print.ps rdps
 	./rdps $(srcdir)/print.ps ps.c
@@ -575,7 +579,6 @@
 
 
 dftest_SOURCES = \
-	$(DISSECTOR_SRC) \
 	$(ETHEREAL_COMMON_SRC) \
 	dftest.c
 
@@ -592,6 +595,7 @@
 
 # This automake variable adds to the link-line for the executable
 dftest_LDADD = \
+	libdissector.la			\
 	$(ethereal_optional_objects)	\
 	$(dftest_additional_libs)	\
 	@SNMP_LIBS@ @SSL_LIBS@		\