You'll also want to read General gcc tips for SCO.
Do realize that in the long run, you are better off to move off SCO onto Linux.
From: Robert Lipe <robertlipe@usa.net> Newsgroups: comp.unix.sco.misc Subject: Re: SSH on SCO 5.0.5 Date: Tue, 02 May 2000 15:37:53 GMT Message-ID: <sgttihd01g2157@corp.supernews.com> "Brian K. White" <linut@squonk.net> writes: >Geoff Bleau wrote: >> >> Robert Lipe wrote: >> >> > Geoff Bleau <geoffb@bellsouth.net> writes: >> > >> > >The gcc 2.9.5pl1 release and the needed binutils on the SCO site >> > >are incompatible ( binutils still has endless references to -belf insted >> > >of -melf ) >> > >> > GCC 2.95 does not need binutils. In fact, binutils (especially the >> > assembler and linker) are _less_ compatible with GCC than the free SCO >> > native assembler and linker. >> >> Well - I followed the instructions on the SCO site - and installed >> gcc 2.9.5 along with the Linker and Application Libraries from >> the SCO cd ( all this on SCO 5.0.4 ) That's what you should have done. >> Then tried to compile tcp_wrappers 7.6. >> >> Bombed - complained about a missing ' ar ' file. >> >> When I asked back in this group ( or gcc,help ) - it was >> suggested that I needed binutils - as that would be the source >> of ' ar '. Ar should have been installed as part of the L&L package. >> When I tried to install the binutils from the SCO site - it barfed >> due to all the references to -belf instead of -melf ( catch 22 ?? ) >> >> So - what is the REAL answer to be able to compile tcp_wrappers ??? >the answer is edit the makefile. you will find you almost always have to >edit the makefile. get use to it. No one is writing makefiles for the odd >case of gcc-on-OSR5. if the makefile author (actually the autoconf author) >is even aware of OSR5 they almost always have a section that is correct for >the native compiler. the other sections are correct for gcc on Linux >usually, which is not the same as gcc on OSR5. The current autoconf knows how to handle this. If you're building something that is autoconfiscated and is using an outdated one, just rebuild the configure.in/Makefile.in's with a current autoconf. >that gcc had been using -melf on osr5 up untill recently, and now it uses >-belf. or maybe it's the other way around... and I think there was some GCC until '96 used -belf. Newer GCC defaults to ELF and uses -mcoff to flip back. >than most, and thus perversely is one of the most non-intuitive to figure >out unless you give up all hope that any makefile should work out of the >box. If you are simply resigned to checking over every makefile for >correctness with current gcc on osr5, then you never have this problem. >do a net search for "gcc SCO" and find some pages by Robert Lipe to see some >of the main things that always need to be fixed on cc/gcc command lines >also note that that document is itself a little out of date in that it has >the -melf/-belf backwards, although then again, it is correct for the >version of gcc that is referenced in that document. that's just not users are welcome to submit patches to the GCC doc: http://gcc.gnu.org/install/specific.html#ix86-*-sco3.2v5* or add entries to the SCO Programmer's FAQ at http://www.zenez.com/cgi-bin/scoprogfaq/faq.pl Sometimes, I wonder if we'd be doing the SCO community a favor by deleting all the old compilers and all the old doc; it only seems to confuse people..
From - Wed May 31 16:26:28 2000 From: Robert Lipe <robertlipe@usa.net> Newsgroups: comp.unix.sco.misc Subject: Re: gcc problem Date: Tue, 30 May 2000 14:01:52 GMT Message-ID: <sj7iegv05pj26@corp.supernews.com> "Mark R" <markr@NOSPAMMICHbluecap.co.uk> writes: >Hi all, >#include <stdio.h> >int main() { printf("Ok\n"); exit(0); } >I used the command: > gcc -O0 -U M_XENIX -D PERL_SCO -D >PERL_SCO5 -w0 -belf -fno-strict-aliasi >ng -I/usr/local/include -o try -L/usr/local/lib >try.c -lintl -lsocket -lnsl -lnd >bm -ldbm -lmalloc -lld -lm -lc -lcrypt -lPW -lx > ./try Why would you compile such a simple program with such an obtuse command line? The (incorrect) obtuse command line is your problem. >gcc: unrecognized option `-w0' >cpp: -lang-c: linker input file unused since linking not done This is becuase -w0 isn't a valid gcc option. >gcc: installation problem, cannot exec `cc1': No such file or directory >gcc: file path prefix `/usr/local/lib/gcc-lib/elf/2.95.2/' never used This is becuase you don't have a cc1 in your /usr/local/lib/gcc-lib/elf directory? Why is it looking there? Becuase you told it to with your '-belf' flag. '-b' means a very different thing to GCC than it does to /bin/cc. It's interesting that your command line has a mixture of GCC-specific flags (-fno-strict-aliasing) and flags specific to the native compilers. Don't do that. RJL
More Articles by Tony Lawrence
Have you tried Searching this site?
Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates
This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more. We appreciate comments and article submissions.
Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. I also may own stock in companies mentioned here. If you have any question, please do feel free to contact me.
Specific links that take you to pages that allow you to purchase the item I reviewed are very likely to pay me a commission. Many of the books I review were given to me by the publishers specifically for the purpose of writing a review. These gifts and referral fees do not affect my opinions; I often give bad reviews anyway.
We use Google third-party advertising companies to serve ads when you visit our website. These companies may use information (not including your name, address, email address, or telephone number) about your visits to this and other websites in order to provide advertisements about goods and services of interest to you. If you would like more information about this practice and to know your choices about not having this information used by these companies, click here.
Click here to add your comments
Don't miss responses! Subscribe to Comments by RSS or by Email
Click here to add your comments
If you want a picture to show with your comment, go get a Gravatar