Failure to compile

Boris Samorodov bsam at ipt.ru
Fri Dec 15 00:49:31 PST 2006


[CC to freebsd-questions@ restored]

Hello Brian!

Please, try to not top-post. It's hard to track the thread. Thanks.


On Wed, 13 Dec 2006 14:31:04 -0000 Brian Levie wrote:

> Thanks for your reply,

Sorry for the delay (I've been a little bit busy). BTW if you cc'ed to
freebsd-questions@ you may be able to get an answer from somebody else
much faster. ;-)

> FreeBSD is installed in a 1.5Gb partition the rest is windows XP, downloaded
> an iso file from the web.

OK. Then you should got a system compiler which was overwritten by
Xenix one.

> By Unix files I mean data files which I wrote firstly on a machine running
> Xenix then this was updated to a server running Unix.  These files were used
> to compile many programs that I wrote in those days.  Xenix installation
> disks are now unobtainable, so I thought I would try FreeBSD>

I think that you may try to compile your programms by the system
compiler (or one from the ports system) and adopt the sources when
needed.

> Uname -a:  FreeBSD 6.1-Release 6.1 Release #0: Sun May 7 04:32:13 UTC
> 2006root at apres cse  buffalo.edu:/usr/obj/usr/src/sys/GENERIC i386

> File:  /usr/bin/cc  Microsoft a.outseperate pin semented word swapped not
> stripped V2.3 V3.0 386 small model executable not stripped

Yep, that's why you got "Exec format error". FreeBSD is capable of
running binaries from some other OSes but Xenix is not among them.

> Ls -l: -rwx--x--x 1 root wheel 37376 Nov 3 1993 /usr/bin/cc

...which then you overwrote by another one.

> I hope this is of some help.

Well, to receive a working OS you may either reinstall it or do a
binary update (imho rebuilding is not an option since you overwrote
some system binaries).


> -----Original Message-----
> From: Boris Samorodov [mailto:bsam at ipt.ru] 
> Sent: 12 December 2006 22:27
> To: Brian Levie
> Cc: questions at FreeBSD.org
> Subject: Re: Failure to compile

> Hello Brian and welcome!


> On Tue, 12 Dec 2006 21:38:19 -0000 Brian Levie wrote:

> > I recently installed FreeBSD  6.1,

> How did you do it?

> > and copied many Unix files with no

> What do you call "Unix files" and where did you get them?

> > problems at all.  However when I try to run the C compiler which worked
> fine
> > with Unix, I get the error message '/usr/bin/cc Exec format error  Binary
> > file not executable'. I tried changing permissions and owner with no
> change.

> Please, show us the output of commands "uname -a", "file /usr/bin/cc"
> and "ls -l /usr/bin/cc".

> > Any suggestions or won't the unix C compiler not work with FreeBSD?

> Well, FreeBSD is used to be compiled by this compiler. Those troubles
> of yours shouldn't happen. ;-)


WBR
-- 
Boris Samorodov (bsam)
Research Engineer, http://www.ipt.ru Telephone & Internet SP
FreeBSD committer, http://www.FreeBSD.org The Power To Serve


More information about the freebsd-questions mailing list