From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <96230698606211.tru64-unix-managers.marc@archive.invalid> From: Paul Crittenden Date: Thu, 29 Jun 2000 19:29:30 +0000 To: tru64-unix-managers Subject: SUMMARY: Samba & gcc (LONG) X-MARC-Message: https://marc.info/?l=tru64-unix-managers&m=96230698606211 Thanks to: Octave Orgeron Nikola Milutinovic Joe Fletcher I have included their responses at the end of this email. Original message: >When trying to compile samba 2.0.7 using gcc 2.95.2 I get the following. > >Compiling rpcclient/cmd_srvsvc.c >In file included from /usr/local/lib/gcc-lib/alphaev56-dec-osf4.0f/2.95.2/include/stdarg.h:36, >fr om include/includes.h:203, from rpcclient/cmd_srvsvc.c:29: >/usr/local/lib/gcc-lib/alphaev56-dec-osf4.0f/2.95.2/include/va-alpha.h:36: warning: >redefinition of `va_list' >/usr/local/lib/gcc-lib/alphaev56-dec-osf4.0f/2.95.2/include/va_list.h:7: warning: `va_list' >previously declared here >In file included from include/includes.h:291 from rpcclient/cmd_srvsvc.c:29: >/usr/include/net/if.h:144: warning: no semicolon at end of struct or union >/usr/include/net/if.h:182: warning: `struct rtentry' declared inside parameter list >/usr/include/net/if.h:182: warning: its scope is only this definition or declaration, which is >probably not what you want. >/usr/include/net/if.h:182: warning: `struct mbuf' declared inside parameter list >In file included from include/includes.h:291 from rpcclient/cmd_srvsvc.c:29: >/usr/include/net/if.h:462: warning: `struct rtentry' declared inside parameter list > >I realize they are only warnings and samba appears to compile correctly but when I use cc >to compile samba I don't get any warnings. I have tried this on two different systems both >running Tru-64Unix v4.0f with the same results. Why do I get the warnings with gcc and >not with cc. Any ideas? From: Octave Orgeron This is fairly common with gcc. It tends to be rather verbose, which comes from the compiler options that are used. A lot of applications that are compiled with gcc will try to use gcc specific options, which will give you a lot of warnings and sometimes.. cause the compile or binary to fail. When you use cc, the only options that would be used are ANSI/POSIX compliant, so there are no "tricks" being used.. so less warnings. Of course, compiling software with cc will show how well the application was written. For example, if you try to compile something like enlightenment, it has many dependencies on gcc and will not compile the ANSI/POSIX way.. so you have to hack the compiler options to get it work with cc. So.. what does it all mean.. well if you are compiling an application that was developed on in a GNU/Linux based world, you use gcc.. if you are compiling a program that was developed in a SV or BSD world, you use cc. Wacky eh? Well I have ran into it all of the time on Solaris and Tru64. I hope that helps.. From: Nikola Milutinovic I've ran into some nasty things with PGP 5.0i. It had INDENTED C-pre-processor directives, like #define and others. This is not compatible with any C specification I'm aware of. Of course, DEC CC refused to compile, where (I was told) GCC compiles just fine. It looks like GCC, in your case, is missing some ";" characters and it is ignoring it. Most likely some macros or #defines are bugging you. GCC is being "polite" and consideres stuff like a missing ";" just a warning, where it should be an error. Most likely, the GCC compiled code would be unreliable. Maybe it works, maybe GCC sorted it out, but I wouldn't trust it. From: Joe Fletcher I may be wrong but isn't this to do with running gcc on EV6s? I believe you may find some info in the archives relating to this. My SUMMARY: I checked the archives and found a message concerning EV6 and EV56. I have an EV56 not EV6. Anyway, I tried to reconfigure gcc with the following command: configure --host=alpha-dec-osf-dec4.0f to build a generic alpha gcc compiler. After doing that I still get the same warnings. I guess I'll use cc for samba at least and then see what happens with other packages. I certainly am not a programmer so I'll have to do whatever I can to get a reliable product. Paul Crittenden Computer System Manager Simpson College e-mail: crittend@simpson.edu "Success in life is not necessarily drawing a good hand, but playing a bad hand well"