Red Hat axp-list: Linux on Alpha (1995-2022)
 help / color / mirror / Atom feed
* Problems with egcs & xmkmf
@ 1999-03-30  6:52 Helge Kreutzmann
  1999-03-30  8:55 ` Jurij Smakov
  0 siblings, 1 reply; 4+ messages in thread
From: Helge Kreutzmann @ 1999-03-30  6:52 UTC (permalink / raw)
  To: axp-list

Hallo !
I recently got the egcs from ftp.alphalinux.org

[root@sixtyfor awesfx-0.4.3a]# gcc -v
Reading specs from /usr/lib/gcc-lib/alpha-redhat-linux/egcs-2.91.60/specs
gcc version egcs-2.91.60 19981201 (egcs-1.1.1 release)

(thanks Peter !) to compile 2.2.3 (wich went fine). When I try to compile
programms which create their makefiles via xmkmf I get bogous makefiles
e.g. output like

gcc -Wall   -Iinclude  -I/usr/X11R6/include -I/include  -Dlinux
LinuxMachineDefines -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE
-D_XOPEN_SOURCE=500L -D_BSD_SOURCE -D_SVID_SOURCE   -DFUNCPROTO=15
-DNARROWPROTO     -c sfxload.c -o sfxload.o
gcc: cannot specify -o with -c or -S and multiple compilations
make: *** [sfxload.o] Error 1

When I remove the "LinuxMachineDefines" manually from all makefiles
created, the compilation runs (almost) fine. I checked the docs at cygnus
but could not find something I thought related. Does anyone know what
xmkmf intends to include and what I have to change to get it work (or
which rtfm I have to read) ?

Thanks !

P.S. The egcs-rpms installed (almost) fine, except some minor conflicts
(fvwm beeing the most "important" but it works flawlessly) and some
warning due to the fact that no user pptrakis exists on my system :-((



               Helge.Kreutzmann@stud.uni-hannover.de
                     kreutzm@itp.uni-hannover.de


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

* Re: Problems with egcs & xmkmf
@ 1999-03-30  7:15 designer seven
  1999-03-30 17:24 ` Michal Jaegermann
  0 siblings, 1 reply; 4+ messages in thread
From: designer seven @ 1999-03-30  7:15 UTC (permalink / raw)
  To: axp-list

Hello,

Hmmm.. I kind of remember this from when I was
compiling XFree86 3.3.2 a while ago... I might be
totally wrong.. but if my memory serves me well,

the problem is that the egcs doesn't know about

__alpha and only knows about __alpha__ .... 

the the LinuxMachineDefines that you removed should
really have been replaced with something more sensible.


The way I got around it was grep thru all the files in
the source tree for __alpha and replaced them with
__alpha__ ...once I did that, everything was fine.

Sorry if this is totally unrelated... but I think this
is what I remember... and it was egcs-1.1.1 too..

D.

--- Helge Kreutzmann <kreutzm@itp.uni-hannover.de>
wrote:
> Hallo !
> I recently got the egcs from ftp.alphalinux.org
> 
> [root@sixtyfor awesfx-0.4.3a]# gcc -v
> Reading specs from
>
/usr/lib/gcc-lib/alpha-redhat-linux/egcs-2.91.60/specs
> gcc version egcs-2.91.60 19981201 (egcs-1.1.1
> release)
> 
> (thanks Peter !) to compile 2.2.3 (wich went fine).
> When I try to compile
> programms which create their makefiles via xmkmf I
> get bogous makefiles
> e.g. output like
> 
> gcc -Wall   -Iinclude  -I/usr/X11R6/include
> -I/include  -Dlinux
> LinuxMachineDefines -D_POSIX_C_SOURCE=199309L
> -D_POSIX_SOURCE
> -D_XOPEN_SOURCE=500L -D_BSD_SOURCE -D_SVID_SOURCE  
> -DFUNCPROTO=15
> -DNARROWPROTO     -c sfxload.c -o sfxload.o
> gcc: cannot specify -o with -c or -S and multiple
> compilations
> make: *** [sfxload.o] Error 1
> 
> When I remove the "LinuxMachineDefines" manually
from
> all makefiles
> created, the compilation runs (almost) fine. I
> checked the docs at cygnus
> but could not find something I thought related. Does
> anyone know what
> xmkmf intends to include and what I have to change
to
> get it work (or
> which rtfm I have to read) ?
> 
> Thanks !
> 
> P.S. The egcs-rpms installed (almost) fine, except
> some minor conflicts

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


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

* Re: Problems with egcs & xmkmf
  1999-03-30  6:52 Helge Kreutzmann
@ 1999-03-30  8:55 ` Jurij Smakov
  0 siblings, 0 replies; 4+ messages in thread
From: Jurij Smakov @ 1999-03-30  8:55 UTC (permalink / raw)
  To: axp-list

On Tue, 30 Mar 1999, Helge Kreutzmann wrote:

> Hallo !
[skipped]
> gcc -Wall -Iinclude  -I/usr/X11R6/include -I/include  -Dlinux
> LinuxMachineDefines -D_POSIX_C_SOURCE=199309L -D_POSIX_SOURCE
> -D_XOPEN_SOURCE=500L -D_BSD_SOURCE -D_SVID_SOURCE -DFUNCPROTO=15
> -DNARROWPROTO   -c sfxload.c -o sfxload.o
> gcc: cannot specify -o with -c or -S and multiple compilations
> make: *** [sfxload.o] Error 1
> 
> When I remove the "LinuxMachineDefines" manually from all makefiles
> created, the compilation runs (almost) fine. I checked the docs at cygnus
> but could not find something I thought related. Does anyone know what
> xmkmf intends to include and what I have to change to get it work (or
> which rtfm I have to read) ?

I ran into this too... The answer is:

$ more /usr/X11R6/lib/X11/config/linux.cf | grep LinuxMachineDefines
#define LinuxMachineDefines     -D__i386__
#define LinuxMachineDefines     -D__alpha__
#define LinuxMachineDefines     -D__mc68000__
#define StandardDefines         -Dlinux LinuxMachineDefines 
LinuxSourceDefines

If you compile on Alpha, You should replace LinuxMachineDefines
with -D__alpha__

Best regards,
O----------------------O---------------------------------------O
|           _          | ICQ    : 1690331                      |
|     Jurij Smakov     | E-mail : jurijus@theophys.kth.se      |
|                      | WWW    : www.theophys.kth.se/~jurijus |
O----------------------O---------------------------------------O
|   PGP public key: finger -l jurijus@medea.theophys.kth.se    |
O--------------------------------------------------------------O


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

* Re: Problems with egcs & xmkmf
  1999-03-30  7:15 Problems with egcs & xmkmf designer seven
@ 1999-03-30 17:24 ` Michal Jaegermann
  0 siblings, 0 replies; 4+ messages in thread
From: Michal Jaegermann @ 1999-03-30 17:24 UTC (permalink / raw)
  To: axp-list

designer seven wrote:
> 
> the problem is that the egcs doesn't know about
> 
> __alpha and only knows about __alpha__ .... 
> 
> the the LinuxMachineDefines that you removed should
> really have been replaced with something more sensible.
> 
> 
> The way I got around it was grep thru all the files in
> the source tree for __alpha and replaced them with
> __alpha__ ...once I did that, everything was fine.

Much simpler, saner and faster is to load a spec file for a compiler
you are using (**that** one, in case you have few different variants
of gcc installed on your system) into any text editor and to add this
missing define in question.  Once you look there it will be obvious
what to do.  Do not replace but add.

To find a precise location of your spec file try 'gcc -v </dev/null'.

If you do not feel like messing around with a system specs then egcs
has an option (from 'gcc --help')
  -specs=<file>            Override builtin specs with the contents of <file>

Last, but not least, you can always add a define to a compiler
invocation with a help of -D flag. 

BTW - my compiler with 'gcc -v < /dev/null' shows, among other things:
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
and presented with this input:

#ifdef __alpha
#error defined
#else
#error undefined
#endif

prints "#error defined" so "egcs doesn't know about __alpha" statement
seems to be a tad too general. :-)

   Michal


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

end of thread, other threads:[~1999-03-30 17:40 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-03-30  7:15 Problems with egcs & xmkmf designer seven
1999-03-30 17:24 ` Michal Jaegermann
  -- strict thread matches above, loose matches on Subject: below --
1999-03-30  6:52 Helge Kreutzmann
1999-03-30  8:55 ` Jurij Smakov

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