Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* upgraded to gcc-2.95.2 --> gcc: cannot specify -o with -c or -S and  multiple compilations
@ 2000-01-09 21:10 Stefan van der Eijk
  2000-01-10  8:33 ` Christian Iseli
  2000-01-10 11:43 ` Craig P Prescott
  0 siblings, 2 replies; 7+ messages in thread
From: Stefan van der Eijk @ 2000-01-09 21:10 UTC (permalink / raw)
  To: axp-list@redhat.com, cooker@linux-mandrake.com

Hello,

I hope this isn't a FAQ question... I just upgraded from ecgs-1.1.2
to gcc 2.95.2:

Reading specs from /usr/lib/gcc-lib/alpha-mandrake-linux/2.95.2/specs
gcc version 2.95.2 19991024 (release)

on my alpha system (running linux), and now I get the following error
when compiling a lot of packages:

make[2]: Leaving directory `/usr/src/RPM/BUILD/groff-1.11/mm'
make[2]: Entering directory `/usr/src/RPM/BUILD/groff-1.11'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/usr/src/RPM/BUILD/groff-1.11'
make[1]: Leaving directory `/usr/src/RPM/BUILD/groff-1.11'
+ cd xditview
+ xmkmf
mv -f Makefile Makefile.bak
imake -DUseInstalled -I/usr/X11R6/lib/X11/config
+ make
gcc -O   -I./lib/Xt -I.  -I/usr/X11R6/include   -Dlinux
LinuxMachineDefines -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE
-D_XOPEN_SOURCE=500L -D_BSD_SOURCE -D_SVID_SOURCE   -DFUNCPROTO=15
-DNARROWPROTO  
-DFONTPATH=\".:/usr/lib/groff/font:/usr/local/lib/font:/usr/lib/font\"   
-c xditview.c -o xditview.o
gcc: cannot specify -o with -c or -S and multiple compilations
make: *** [xditview.o] Error 1

Any idea what it is & how I can fix it??

Thanks,

Stefan van der Eijk
s.vandereijk@chello.nl


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: upgraded to gcc-2.95.2 --> gcc: cannot specify -o with -c or -S and multiple compilations
  2000-01-09 21:10 upgraded to gcc-2.95.2 --> gcc: cannot specify -o with -c or -S and multiple compilations Stefan van der Eijk
@ 2000-01-10  8:33 ` Christian Iseli
  2000-01-10 11:43 ` Craig P Prescott
  1 sibling, 0 replies; 7+ messages in thread
From: Christian Iseli @ 2000-01-10  8:33 UTC (permalink / raw)
  To: axp-list

Hi,

s.vandereijk@chello.nl said:
> on my alpha system (running linux), and now I get the following error
> when compiling a lot of packages: 
> ...
> + make
> gcc -O   -I./lib/Xt -I.  -I/usr/X11R6/include  
> -Dlinux
> LinuxMachineDefines 

As a quick fix, you might try to add:
#define __alpha 1

near the top of /usr/X11R6/lib/X11/config/Imake.tmpl

Another way is to patch XFree86 like so:

--- XFree86-3.3.3/xc/config/imake/imakemdep.h.imake	Fri Dec  4 17:35:13 1998
+++ XFree86-3.3.3/xc/config/imake/imakemdep.h	Fri Dec  4 17:37:01 1998
@@ -511,6 +511,15 @@ char *cpp_argv[ARGUMENTS] = {
 #ifdef linux
         "-traditional",
         "-Dlinux",
+# ifdef __alpha
+	"-D__alpha",
+# endif
+# ifdef __alpha__
+	"-D__alpha__",
+# endif
+# ifdef __i386__
+	"-D__i386__",
+# endif
 #endif
 #ifdef __uxp__
 	"-D__uxp__",

There are probably other ways too... ;-)

Cheers,
					Christian



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: upgraded to gcc-2.95.2 --> gcc: cannot specify -o with -c or -S and multiple compilations
  2000-01-09 21:10 upgraded to gcc-2.95.2 --> gcc: cannot specify -o with -c or -S and multiple compilations Stefan van der Eijk
  2000-01-10  8:33 ` Christian Iseli
@ 2000-01-10 11:43 ` Craig P Prescott
  2000-01-10 17:38   ` Stefan van der Eijk
  2000-01-11 12:42   ` upgraded to gcc-2.95.2 --> gcc: cannot specify -o with -c or -S and multiple compilations Ivan Kokshaysky
  1 sibling, 2 replies; 7+ messages in thread
From: Craig P Prescott @ 2000-01-10 11:43 UTC (permalink / raw)
  To: axp-list


Stefan van der Eijk wrote:
>on my alpha system (running linux), and now I get the following error
>when compiling a lot of packages:
>...
>gcc -O   -I./lib/Xt -I.  -I/usr/X11R6/include   -Dlinux
>LinuxMachineDefines -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE
>...
>gcc: cannot specify -o with -c or -S and multiple compilations

Designer Seven replied:
>You need to track down where LinuxMachineDefines is
>suppose to get defined and find out why it isn't.
>Usually it was something the preprocessor was suppose
>to define but for whatever reason, didn't. Check:
>
>/lib/cpp -dM /dev/null

I ran into the same problem when I grabbed the gcc-2.95.2-3 source rpm
from RedHat's Rawhide, built, and installed the binary rpms.  gcc
built perfectly it seemed, but after installation of the binary rpms

/lib/cpp -dM /dev/null

gave me nothing, and I was unable to build stuff.  It would seem that
cpp cannot find the /usr/lib/gcc-lib/alpha-redhat-linux/2.95.2/specs
(or wherever you've got it) which has all the predefines and such.

BTW - the same thing happens on Intel.  It is not just Alpha.

You can solve this problem by building gcc-2.95.2 from the tarball.
When you build gcc-2.95 from the tarball, it puts cpp in
"--prefix"/bin and everything just works.  And you can make a link
from /usr/local/bin/cpp (or wherever) to /lib/cpp if you want, and it
will be fine (indeed, some packages will probably expect it to be
there).  On 164LX:

bash$ /lib/cpp -dM /dev/null
#define __LANGUAGE_C 1 
#define __linux__ 1 
#define linux 1 
#define __alpha_ev5__ 1 
#define _LONGLONG 1 
#define __alpha_bwx__ 1 
#define __LANGUAGE_C__ 1 
#define __alpha__ 1 
#define __unix 1 
#define __unix__ 1 
#define __linux 1 
#define LANGUAGE_C 1 
#define __ELF__ 1 
#define __alpha 1 
#define unix 1 

For additional reading, have a peek the thread beginning with:

http://www.lib.uaa.alaska.edu/axp-list/archive/1999-07/0235.html

Hope that helps...

Cheers,
Craig
---
Craig P Prescott                              (352) 846-3145 (Phone)
2011 New Physics Building                     (352) 392-8863 (Fax)
University of Florida, Gainesville, FL 32611  prescott@phys.ufl.edu


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: upgraded to gcc-2.95.2 --> gcc: cannot specify -o with -c or -S and  multiple compilations
  2000-01-10 11:43 ` Craig P Prescott
@ 2000-01-10 17:38   ` Stefan van der Eijk
  2000-01-11  6:34     ` Stefan van der Eijk
  2000-01-11 12:42   ` upgraded to gcc-2.95.2 --> gcc: cannot specify -o with -c or -S and multiple compilations Ivan Kokshaysky
  1 sibling, 1 reply; 7+ messages in thread
From: Stefan van der Eijk @ 2000-01-10 17:38 UTC (permalink / raw)
  To: axp-list, cooker@linux-mandrake.com

> >on my alpha system (running linux), and now I get the following error
> >when compiling a lot of packages:
> >...
> >gcc -O   -I./lib/Xt -I.  -I/usr/X11R6/include   -Dlinux
> >LinuxMachineDefines -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE
> >...
> >gcc: cannot specify -o with -c or -S and multiple compilations
 
> Designer Seven replied:
> >You need to track down where LinuxMachineDefines is
> >suppose to get defined and find out why it isn't.
> >Usually it was something the preprocessor was suppose
> >to define but for whatever reason, didn't. Check:
> >
> >/lib/cpp -dM /dev/null
 
> I ran into the same problem when I grabbed the gcc-2.95.2-3 source rpm
> from RedHat's Rawhide, built, and installed the binary rpms.  gcc
> built perfectly it seemed, but after installation of the binary rpms
 
> /lib/cpp -dM /dev/null
Well... this is _very_ amusing... This command won't work for me on
_both_ of my machine (Redhat 6.0 alpha with tonnes of new packages, and
my intel Mandrake 7.0b2 box). On my friend's intel Mandrake 6.1 box it 
gives the right output:

[stefan@c18793233 stefan]$ /lib/cpp -dM /dev/null
#define linux 1
#define __i386__ 1
#define i386 1
#define __ELF__ 1
#define unix 1

So... I don't know what conclusion I should make (this is _way_ over
my head)... but to get things working again I think I'm going to
bail-out
to redhat 6.1's gcc...

> gave me nothing, and I was unable to build stuff.  It would seem that
> cpp cannot find the /usr/lib/gcc-lib/alpha-redhat-linux/2.95.2/specs
> (or wherever you've got it) which has all the predefines and such.
/usr/lib/gcc-lib/alpha-mandrake-linux/2.95.2/specs
 
> BTW - the same thing happens on Intel.  It is not just Alpha.
very true...

> You can solve this problem by building gcc-2.95.2 from the tarball.
> When you build gcc-2.95 from the tarball, it puts cpp in
> "--prefix"/bin and everything just works.  And you can make a link
> from /usr/local/bin/cpp (or wherever) to /lib/cpp if you want, and it
> will be fine (indeed, some packages will probably expect it to be
> there).  On 164LX:
> 
> bash$ /lib/cpp -dM /dev/null
> #define __LANGUAGE_C 1
> #define __linux__ 1
> #define linux 1
> #define __alpha_ev5__ 1
> #define _LONGLONG 1
> #define __alpha_bwx__ 1
> #define __LANGUAGE_C__ 1
> #define __alpha__ 1
> #define __unix 1
> #define __unix__ 1
> #define __linux 1
> #define LANGUAGE_C 1
> #define __ELF__ 1
> #define __alpha 1
> #define unix 1
> 
> For additional reading, have a peek the thread beginning with:
> 
> http://www.lib.uaa.alaska.edu/axp-list/archive/1999-07/0235.html
> 
> Hope that helps...
> 
> Cheers,
> Craig
> ---
> Craig P Prescott                              (352) 846-3145 (Phone)
> 2011 New Physics Building                     (352) 392-8863 (Fax)
> University of Florida, Gainesville, FL 32611  prescott@phys.ufl.edu
> 
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: upgraded to gcc-2.95.2 --> gcc: cannot specify -o with -c or -S and  multiple compilations
  2000-01-10 17:38   ` Stefan van der Eijk
@ 2000-01-11  6:34     ` Stefan van der Eijk
  2000-01-11  7:17       ` upgraded to gcc-2.95.2 --> gcc: cannot specify -o with -c or -S and Michal Jaegermann
  0 siblings, 1 reply; 7+ messages in thread
From: Stefan van der Eijk @ 2000-01-11  6:34 UTC (permalink / raw)
  To: axp-list

I solved the problem by switching bak from gcc to egcs. I took the ones
from the redhat 6.1 CD, and they work fine... GCC is off-limits for me
for a while ;-)

Thanks for the responses!!!

Stefan van der Eijk
s.vandereijk@chello.nl

Stefan van der Eijk wrote:
> 
> > >on my alpha system (running linux), and now I get the following error
> > >when compiling a lot of packages:
> > >...
> > >gcc -O   -I./lib/Xt -I.  -I/usr/X11R6/include   -Dlinux
> > >LinuxMachineDefines -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE
> > >...
> > >gcc: cannot specify -o with -c or -S and multiple compilations
> 
> > Designer Seven replied:
> > >You need to track down where LinuxMachineDefines is
> > >suppose to get defined and find out why it isn't.
> > >Usually it was something the preprocessor was suppose
> > >to define but for whatever reason, didn't. Check:
> > >
> > >/lib/cpp -dM /dev/null
> 
> > I ran into the same problem when I grabbed the gcc-2.95.2-3 source rpm
> > from RedHat's Rawhide, built, and installed the binary rpms.  gcc
> > built perfectly it seemed, but after installation of the binary rpms
> 
> > /lib/cpp -dM /dev/null
> Well... this is _very_ amusing... This command won't work for me on
> _both_ of my machine (Redhat 6.0 alpha with tonnes of new packages, and
> my intel Mandrake 7.0b2 box). On my friend's intel Mandrake 6.1 box it
> gives the right output:
> 
> [stefan@c18793233 stefan]$ /lib/cpp -dM /dev/null
> #define linux 1
> #define __i386__ 1
> #define i386 1
> #define __ELF__ 1
> #define unix 1
> 
> So... I don't know what conclusion I should make (this is _way_ over
> my head)... but to get things working again I think I'm going to
> bail-out
> to redhat 6.1's gcc...
> 
> > gave me nothing, and I was unable to build stuff.  It would seem that
> > cpp cannot find the /usr/lib/gcc-lib/alpha-redhat-linux/2.95.2/specs
> > (or wherever you've got it) which has all the predefines and such.
> /usr/lib/gcc-lib/alpha-mandrake-linux/2.95.2/specs
> 
> > BTW - the same thing happens on Intel.  It is not just Alpha.
> very true...
> 
> > You can solve this problem by building gcc-2.95.2 from the tarball.
> > When you build gcc-2.95 from the tarball, it puts cpp in
> > "--prefix"/bin and everything just works.  And you can make a link
> > from /usr/local/bin/cpp (or wherever) to /lib/cpp if you want, and it
> > will be fine (indeed, some packages will probably expect it to be
> > there).  On 164LX:
> >
> > bash$ /lib/cpp -dM /dev/null
> > #define __LANGUAGE_C 1
> > #define __linux__ 1
> > #define linux 1
> > #define __alpha_ev5__ 1
> > #define _LONGLONG 1
> > #define __alpha_bwx__ 1
> > #define __LANGUAGE_C__ 1
> > #define __alpha__ 1
> > #define __unix 1
> > #define __unix__ 1
> > #define __linux 1
> > #define LANGUAGE_C 1
> > #define __ELF__ 1
> > #define __alpha 1
> > #define unix 1
> >
> > For additional reading, have a peek the thread beginning with:
> >
> > http://www.lib.uaa.alaska.edu/axp-list/archive/1999-07/0235.html
> >
> > Hope that helps...
> >
> > Cheers,
> > Craig
> > ---
> > Craig P Prescott                              (352) 846-3145 (Phone)
> > 2011 New Physics Building                     (352) 392-8863 (Fax)
> > University of Florida, Gainesville, FL 32611  prescott@phys.ufl.edu
> >
> > --
> > To unsubscribe: send e-mail to axp-list-request@redhat.com with
> > 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com
> 
> --
> To unsubscribe: send e-mail to axp-list-request@redhat.com with
> 'unsubscribe' as the subject.  Do not send it to axp-list@redhat.com


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: upgraded to gcc-2.95.2 --> gcc: cannot specify -o with -c or -S and
  2000-01-11  6:34     ` Stefan van der Eijk
@ 2000-01-11  7:17       ` Michal Jaegermann
  0 siblings, 0 replies; 7+ messages in thread
From: Michal Jaegermann @ 2000-01-11  7:17 UTC (permalink / raw)
  To: axp-list

Stefan van der Eijk wrote:
> 
> I solved the problem by switching bak from gcc to egcs. I took the ones
> from the redhat 6.1 CD, and they work fine... GCC is off-limits for me
> for a while ;-)

I had a quick peek into files in /usr/X11R6/lib/X11/config/
and it looks like that these 'LinuxMachineDefines' will be expanded
if __alpha__ is defined.  Well, my gcc-2.95.2, compiled from sources,
has this define included.

> > > /lib/cpp -dM /dev/null
> > Well... this is _very_ amusing... This command won't work for me on
> > _both_ of my machine (Redhat 6.0 alpha with tonnes of new packages, and
> > my intel Mandrake 7.0b2 box).

Try 'gcc -dM -E - < /dev/null' instead.  Should work. :-)
On my Alpha it shows:

#define __LANGUAGE_C 1 
#define __linux__ 1 
#define linux 1 
#define __alpha_ev4__ 1 
#define _LONGLONG 1 
#define __GNUC_MINOR__ 95 
#define __LANGUAGE_C__ 1 
#define __alpha__ 1 
#define __unix 1 
#define __unix__ 1 
#define __GNUC__ 2 
#define __linux 1 
#define LANGUAGE_C 1 
#define __ELF__ 1 
#define __alpha 1 
#define unix 1 

'/lib/ccp -dM - < /dev/null' also should be ok.

If you have a few versions of a compiler floating around watch
out which version of 'cpp' and which specs you are really using
('gcc -dumpspecs' to examine the later).

  Michal


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: upgraded to gcc-2.95.2 --> gcc: cannot specify -o with -c or -S and multiple compilations
  2000-01-10 11:43 ` Craig P Prescott
  2000-01-10 17:38   ` Stefan van der Eijk
@ 2000-01-11 12:42   ` Ivan Kokshaysky
  1 sibling, 0 replies; 7+ messages in thread
From: Ivan Kokshaysky @ 2000-01-11 12:42 UTC (permalink / raw)
  To: axp-list

On Mon, Jan 10, 2000 at 06:43:57AM -0500, Craig P Prescott wrote:
> I ran into the same problem when I grabbed the gcc-2.95.2-3 source rpm

These rpms are broken.

> You can solve this problem by building gcc-2.95.2 from the tarball.
> When you build gcc-2.95 from the tarball, it puts cpp in
> "--prefix"/bin and everything just works.  And you can make a link

Actually, there are two different cpp executables - one in
"--prefix"/lib/gcc-lib/${ARCH}-${VENDOR}-linux/2.95.2 and another
in "--prefix"/bin, which is the one what we need and which is missing
in rpms. The former is intended for gcc internal use only.

Fix is quite easy - just add %{GCC_PREFIX}/bin/cpp in %files section
for cpp package in the gcc.spec and point the link /lib/cpp to correct
executable, although I think this link isn't really needed - I happily
live without it last few months.

Or grab working gcc-2.95.2 rpms I built for myself from
ftp://ftp.park.msu.ru/ink/rh6.1-rpms (BTW, rth's float-complex patch
is included there, so you can compile glibc with it, although
only with -O2).

Ivan.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2000-01-11 12:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-01-09 21:10 upgraded to gcc-2.95.2 --> gcc: cannot specify -o with -c or -S and multiple compilations Stefan van der Eijk
2000-01-10  8:33 ` Christian Iseli
2000-01-10 11:43 ` Craig P Prescott
2000-01-10 17:38   ` Stefan van der Eijk
2000-01-11  6:34     ` Stefan van der Eijk
2000-01-11  7:17       ` upgraded to gcc-2.95.2 --> gcc: cannot specify -o with -c or -S and Michal Jaegermann
2000-01-11 12:42   ` upgraded to gcc-2.95.2 --> gcc: cannot specify -o with -c or -S and multiple compilations Ivan Kokshaysky

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox