[prev in list] [next in list] [prev in thread] [next in thread]
List: ipfilter
Subject: Re: Solaris 7 compile errs using gcc
From: Tom Walsh <mfilter () mytoys ! com>
Date: 1999-02-25 16:52:20
[Download RAW message or body]
Okay,
Help get my courage up here! :) I have been coding for the past 20
years, mostly in C + Assembler on microcontrollers. I did CP/M, etc
etc... This is my first foray into the unix realm, I like unix, but am
intimidated by the sheer size of this thing, it is more powerful than
the DOS stuff I have been working with for the last 10 years!
I think my major concern is that of libraries. I can hack the code so
that I come up with some binaries, but I am concerned by the mis-match
of the header file definitions. As I see it, the source code,
ipfilter, will link to the resident sun libraries and the worst that
can happen is the code could be broken as someone may have exploited a
gnu #def variation to call a sun library function? As in the case of
the va_start function, under the gnu #def it is possible to retrieve
the address of element N in the list as the start, while under sun it
is only possible to return the address of element 0.
In my microcontroller software designs and in the DOS arena, a broken
call to a function could result in a disasterous crash of the software
system (O/S) during which the processor can thrash around and trash
the system. How possible is it to trash the solaris, or any other
unix, in such a situation? I realize that tape backup is a good thing,
but maybe CD backups would be more appropriate if I continue to build
code on the unix box?
Any comments would be appreciated as I am looking forward to writing
code under unix!
Tom
>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<
On 2/25/99, 7:45:52 AM, Darren Reed <avalon@coombs.anu.edu.au> wrote
regarding Re: Solaris 7 compile errs using gcc:
> > >Hello,
> > > I recently attempted to install the ipfilter package onto a Solaris
7
> > >x86 system, this is the freebie from sun. I have the gnu 2.8.1
package
> > >installed and appears to work well as I have compiled the vim, qmail,
> > >imap4-4, less & fastforward sources.
> > > When I attempt to compile the ipfilter version 3.2.10 sources with
> > >'make solaris', everything proceeds normally until it aborts
reporting
> > >that a 'redefinition of ...' has been encountered. The conflict is
> > >with the /usr/include/sys/varargs.h and the
> > >/<gcc2.8.1>/include/stdarg.h, in checking I find that there has been
> > >an attempt at a redef.
> > > My question(s) is this: which include file should I allow to be
used?
> > >In looking at the definitions for va_start:
> > > #define va_start(list, name) (void) (list = (va_list)
> > >&__builtin_va_alist)
> >
> > hi;
> >
> > Same for me with gcc 2.8.1 and egcs 1.1 both build on Solaris 7. This
compilers
> > have worked with dozends of complex builds - only this fails. For me
the
> > trick was to comment out two lines in
> > ?/lib/gcc-lib/arch/version/include/stdarg.h (the error Message
indicates
> > which lines to comment out)
> > This results in 'some' warnings but ipfilter compiles and runs ok
(latest
> > version). I also tried gcc -nostdinc -I/usr/include as suggested but
this dies
> > with bubazillions of parse errors and releated undefined stuff etc.
> >
> > PS My System is upgraded from 2.6 to 2.7 Perhaps fixincludes fails
under some
> > circumstances.
> >
> >
> > > #define va_start(AP, LASTARG) (AP = ((__gnuc_va_list)
> > >__builtin_next_arg (LASTARG)))
> > > The first def is for the sun supplied include and returns the
address
> > >of the start of the list, the second def is the gcc def and returns
> > >the result of the function call to a routine that finds a particular
> > >element, obviously both may return an identical value if the second
> > >argument to va_start is ZERO? In looking at the defs of va_args I
also
> > >see similar differences.
> > > How can I resolve these conflicts? I do not have the sun C language
> > >development tools so I am stuck with gcc for now.
> > >Tom
> > >
> > >
> >
> > hb
> > ---------------------------------------------------------------------
> > UNIX SysAdmin - BCI GmbH
> > Business: hburde@bci-bremen.de ; http://www.bci-bremen.de
> > Private: hburde@t-online.de ; http://home.t-online.de/home/hburde
> >
> > -----BEGIN PGP PUBLIC KEY BLOCK-----
> > Version: 2.6.3ia
> >
> > mQCNAzbRbOAAAAEEANjiKN6BDGeQ9C7qtAl4locT2zYPpLxVFTBu6DHWIHqErJ0K
> > 8YJ1LtquO+B3+DztON8CAIW0Q0XuaKUrok7il/JQ0CLzdQYFm09nKwgijeE+IIm/
> > vRlGjzP1z444gM0CN1ScQLupRbByLdxUXB75HGdX0+qizjlvBgqz9Ot8Cuu9AAUR
> > tCNIb2xnZXIgQnVyZGUgPGhidXJkZUBiY2ktYnJlbWVuLmRlPokAlQMFEDbRbOAK
> > s/TrfArrvQEBB38D+QHY+Tu381uBCpBj8awDdngEXF/pfS9kudrzS0LHKtvHHONV
> > TfcTBynGN6PChVyB3lBrXpQ0mu/35qx34fTG7FkNMQeQn3in3Ofp+sB4pV6THt+d
> > efJ6xofuVKJtVIVfV82g6K48vb7aFaDVjviTGPT8qskidW94KGD2hMA/dfSL
> > =i+zT
> > -----END PGP PUBLIC KEY BLOCK-----
> >
> >
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic