Ethereal-users: RE: [ethereal-users] Solaris 2.6 x86 compile error

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

From: "Brown, Wes" <Wes_Brown@xxxxxxx>
Date: Fri, 13 Aug 1999 15:30:31 -0500
Folks,

I'm beginning to think that we need some sort of configure
option, or some sort of explicit documentation on the requirements
on how to get this working under Solaris, or as a matter of fact,
any non-Linux or FreeBSD machine.

To answer your question, Roar, I've cut and pasted a previous answer
to this problem.  I, myself, have had this problem before.  Credits
to Guy Harris for the imported information.

Regards,
Wes

> I'm attempting to compile Ethereal on my Solaris machine.
> 
> Everything seems to go fine, until it gets to the linking stage.
> 
> At that point, there's apparently a conflict between the two parsers
> generated by lex/flex in libpcap and dfilter-scanner.
> 
> Any suggestions as to how to resolve this?  I am using gcc, on a
> Solaris-2.5.1 machine -- and using the Solaris lexical compiler.

Alas, Solaris's "lex", like Solaris's "yacc", doesn't have a nice
command-line argument to tell it to prefix global symbols with something
such as "ethereal_" or "pcap_"; the "Makefile.in" for "libpcap" will use
those features, if present, for "flex" and "bison", if your system has
them.

Right now, the only workaround I can offer is to get them and use them
to build "libpcap"; that should, at least, give its symbols names
prefixed with "pcap_", which should keep those symbols out of the way of
Ethereal - and of any other programs that use "libpcap" and
"lex"-generated scanners and/or "yacc"-generated parsers.

(Well, another possibility would be to edit "dfilter-scanner.c" and
"dfilter-grammar.c" by hand to rename the symbols.)

Ethereal requires "flex" and either "bison" or Berkeley "yacc"; we
distribute the results of those programs with Ethereal, so you don't
need them to build Ethereal (unless you modify the scanner or grammar),
but we don't use the prefixing features with them, so our scanner and
parser don't have symbols prefixed with, say, "ethereal_".

It might also be nice to, if there isn't "flex" or "bison", have the
build process run a "sed" script or something such as that to generate
the resulting ".c" file, to do the symbol renaming.



-----Original Message-----
From: Roar Pettersen [mailto:roar@xxxxxxxxxxxx]
Sent: Friday, August 13, 1999 2:52 PM
To: Ethereal-users@xxxxxxxx
Subject: [ethereal-users] Solaris 2.6 x86 compile error


Hello !

I got this error message during compilation of ethereal-0.7.2 :

ld: fatal: symbol `yyparse' is multiply defined:
        (file dfilter-grammar.o and file
/usr/local/lib/libpcap.a(grammar.o));
ld: fatal: File processing errors. No output written to ethereal
*** Error code 1
make: Fatal error: Command failed for target `ethereal'
Current working directory /usr/local/src/ethereal-0.7.2
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'
Current working directory /usr/local/src/ethereal-0.7.2
*** Error code 1
make: Fatal error: Command failed for target `all-recursive-am'

I have :

Solaris 2.6 x86 with current patches.
gcc-2.8.1
flex-2.5.4
bison-1.28


Vennligst hilsen / Regards

                                                         \|//
                                                         (O-O)
-----------------------------------------------------oOO--(_)--OOo------
Roar Pettersen				Phone:	(47) 55304600
Technical Support			Fax:	(47) 55304601
Heath Comm A/S, Norway  		E-mail:	roar@xxxxxxxxxxxx
------------------------------------------------------------------------