* imake/xmkmf on rh5.1 alpha, egcs1.1b @ 1998-09-23 14:53 Charl Botha 1998-09-23 16:40 ` Michal Jaegermann 1998-09-24 3:36 ` Richard Henderson 0 siblings, 2 replies; 10+ messages in thread From: Charl Botha @ 1998-09-23 14:53 UTC (permalink / raw) To: axp-list Dear axp-list, In trying to get vnc-3.3.2 to compile on Linux RH5.1 alpha, I ran into some problems. It seems the imake doesn't know about alpha, or doesn't handle it correctly. When doing xmkmf in the toplevel of vnc, the necessary imake AlphaArchitecture variable is not set, so none of the right switches for the Makefile get set either. Primarily, the LinuxMachineDefines variable doesn't get a value, so it gets passed directly to gcc, which doesn't like this very much. I.e., instead of -D__alpha__, it gets just LinuxMachineDefines as one of its arguments. The file Imake.cf in /usr/X11R6/lib/X11/conf uses __alpha to check for the alpha in the linux clause. I tried changing this to __alpha__, but this still didn't help. Anyone have any ideas? I'd like to make a clean patch for vnc to compile on alpha. As an aside, debian slink distribution has a i386 vnc .deb, but not an alpha vnc .deb -- could this perhaps be because of these problems? Or do they have to get different maintainers for the same package on different platforms? Thanks very much for any help or advice, Charl --------------------------------------------------------------------------- Charl Botha E-Mail cpbotha@sun.ac.za Image Processing and Pattern Recognition Digital Signal Processing Group <http://dsp.ee.sun.ac.za> Department of Electronic Engineering University of Stellenbosch South Africa ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: imake/xmkmf on rh5.1 alpha, egcs1.1b 1998-09-23 14:53 imake/xmkmf on rh5.1 alpha, egcs1.1b Charl Botha @ 1998-09-23 16:40 ` Michal Jaegermann 1998-09-24 3:36 ` Richard Henderson 1 sibling, 0 replies; 10+ messages in thread From: Michal Jaegermann @ 1998-09-23 16:40 UTC (permalink / raw) To: axp-list Charl Botha wrote: > > In trying to get vnc-3.3.2 to compile on Linux RH5.1 alpha, I ran into > some problems. It seems the imake doesn't know about alpha, or doesn't > handle it correctly. Can't tell you what you installed and what not, but a while ago I recompiled vnc-3.3.2 on RH 5.1 alpha and results even work. :-) I was even a bit surprised that all of this did not require any manual intervention which would be worth remembering (this was already some months) or some other "heroic efforts". This was definitely not the case with older versions of vnc; it was mostly curiosity then on my part so then I decided not to spent time trying to fix it. With 3.3.2 it was roughly 'make' and that was it. Please check what you miss ("devel" rpms for X-windows?) but it looks like that something you do. Just a data point. --mj ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: imake/xmkmf on rh5.1 alpha, egcs1.1b 1998-09-23 14:53 imake/xmkmf on rh5.1 alpha, egcs1.1b Charl Botha 1998-09-23 16:40 ` Michal Jaegermann @ 1998-09-24 3:36 ` Richard Henderson 1998-09-24 9:51 ` Charl Botha 1 sibling, 1 reply; 10+ messages in thread From: Richard Henderson @ 1998-09-24 3:36 UTC (permalink / raw) To: axp-list On Wed, Sep 23, 1998 at 04:53:55PM +0200, Charl Botha wrote: > When doing xmkmf in the toplevel of vnc, the necessary imake > AlphaArchitecture variable is not set, so none of the right switches for > the Makefile get set either. It sounds like someone is invoking cpp directly, rather than using gcc -E. The way the preprocessor definitions are created was rearranged both to be ISO C namespace compliant as well as allowing ev56 and ev6 to be detected through preprocessor macros. Likely just replacing /lib/cpp with a script to invoke gcc -E (as it should have been in the first place) will do the job. r~ ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: imake/xmkmf on rh5.1 alpha, egcs1.1b 1998-09-24 3:36 ` Richard Henderson @ 1998-09-24 9:51 ` Charl Botha 1998-09-24 11:09 ` Jochen Kuepper 0 siblings, 1 reply; 10+ messages in thread From: Charl Botha @ 1998-09-24 9:51 UTC (permalink / raw) To: Richard Henderson; +Cc: axp-list On Wed, 23 Sep 1998, Richard Henderson wrote: > On Wed, Sep 23, 1998 at 04:53:55PM +0200, Charl Botha wrote: > > When doing xmkmf in the toplevel of vnc, the necessary imake > > AlphaArchitecture variable is not set, so none of the right switches for > > the Makefile get set either. > > It sounds like someone is invoking cpp directly, rather than > using gcc -E. The way the preprocessor definitions are created > was rearranged both to be ISO C namespace compliant as well as > allowing ev56 and ev6 to be detected through preprocessor macros. > > Likely just replacing /lib/cpp with a script to invoke gcc -E > (as it should have been in the first place) will do the job. Yes!! This does the trick wonderfully... Richard, please then ignore the mail that I sent to egcs-bugs (about cpp only showing four internal #defines when invoked with -dM). Is the fact that /lib/cpp should in fact be a script calling gcc -E documented somewhere obvious? Thanks again! Charl --------------------------------------------------------------------------- Charl Botha E-Mail cpbotha@sun.ac.za Image Processing and Pattern Recognition Digital Signal Processing Group <http://dsp.ee.sun.ac.za> Department of Electronic Engineering University of Stellenbosch South Africa ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: imake/xmkmf on rh5.1 alpha, egcs1.1b 1998-09-24 9:51 ` Charl Botha @ 1998-09-24 11:09 ` Jochen Kuepper 1998-09-24 13:36 ` Jeff Sturm 0 siblings, 1 reply; 10+ messages in thread From: Jochen Kuepper @ 1998-09-24 11:09 UTC (permalink / raw) To: axp-list, Charl Botha On Thu, 24 Sep 1998 Charl Botha wrote: >On Wed, 23 Sep 1998, Richard Henderson wrote: >> Likely just replacing /lib/cpp with a script to invoke gcc -E >> (as it should have been in the first place) will do the job. > >Yes!! This does the trick wonderfully... Richard, please then ignore the >mail that I sent to egcs-bugs (about cpp only showing four internal >#defines when invoked with -dM). Is the fact that /lib/cpp should in fact >be a script calling gcc -E documented somewhere obvious? IIRC, only X11 needs /lib/cpp. Since it is not the right place to have a executable anyhow, the X11 people should document it. ( Maybe it is for XFree86 ? I do not know. ) Greetings, Jochen ----------------------------------------------------------------------- Jochen K"upper Heinrich-Heine-Universit"at D"usseldorf jochen@uni-duesseldorf.de Institut f"ur Physikalische Chemie I Universit"atsstr. 1, Geb 26.43 Raum 02.29 phone ++49-211-8113681 40225 D"usseldorf fax ++49-211-8115195 Germany http://www-public.rz.uni-duesseldorf.de/~jochen ----------------------------------------------------------------------- ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: imake/xmkmf on rh5.1 alpha, egcs1.1b 1998-09-24 11:09 ` Jochen Kuepper @ 1998-09-24 13:36 ` Jeff Sturm 1998-09-24 15:46 ` Michal Jaegermann 0 siblings, 1 reply; 10+ messages in thread From: Jeff Sturm @ 1998-09-24 13:36 UTC (permalink / raw) To: Jochen Kuepper; +Cc: axp-list On Thu, 24 Sep 1998, Jochen Kuepper wrote: > IIRC, only X11 needs /lib/cpp. > Since it is not the right place to have a executable anyhow, the X11 people > should document it. ( Maybe it is for XFree86 ? I do not know. ) OK, that's fine for systems with gcc, what about the others? There have been many packages which depend on /lib/cpp, not many are still around (PostgreSQL still does, IIRC). Back in the early days of Unix you could almost always count on having a real /lib/cpp. It's still best for compatibility to have a /lib/cpp that does something. Richard's suggestion is perfect for gcc-based systems. Jeff ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: imake/xmkmf on rh5.1 alpha, egcs1.1b 1998-09-24 13:36 ` Jeff Sturm @ 1998-09-24 15:46 ` Michal Jaegermann 1998-09-25 10:18 ` Charl Botha 0 siblings, 1 reply; 10+ messages in thread From: Michal Jaegermann @ 1998-09-24 15:46 UTC (permalink / raw) To: axp-list Jeff Sturm wrote: > > On Thu, 24 Sep 1998, Jochen Kuepper wrote: > > IIRC, only X11 needs /lib/cpp. > > OK, that's fine for systems with gcc, what about the others? > > There have been many packages which depend on /lib/cpp, not many are > still around (PostgreSQL still does, IIRC). AFAIK having /lib/cpp as a link to on of copies of a preprocessor which I happen to have around (one with every C compiler :-) serves the goal admirably. If this link does not exist then, for example, you will not see your host name in xdm login window. If you have some macros or defines in your ~/.Xdefaults they will be not preprocessed (this seems to be buggy in places anyway and you can force an explicit preprocessor with options to xrdb); and so on, and so on.... I indeed noticed that this link vanished, for some reason or another, on one of my Intel boxes after a Red Hat update. Maybe this was the problem Charles orignally had with xmkmf and vnc sources? Honestly, I used xmkmf on Alpha on multiple occasions, not only for vnc, and never noticed troubles he described. '/lib/cpp' is not a script calling 'gcc -E' on any of boxes I have around. An advantage of a script over this link is that you pick up a preprocessor from a compiler you are using as opposed to 'this preprocessor always'. So far I do not think that this matters. A disadvantage is that you have to be **really** careful how you write that script to make sure that all possible preprocessor flags they can show up are passed down by gcc to a preprocessor called. A trivial 'gcc -E $1', or even 'gcc -E $@', ***will not*** do!! Various programs expect, for example, that '-traditional' flag is present. With simple '#define THIS' only this does not matter. If something plays more complicated preprocessor games and you forgot to pass that flag, or maybe another, you will be for nasty surprises. Calls to cpp may be hidden inside of programs and you may not even be aware of them. 'xdm' provides an example. Michal ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: imake/xmkmf on rh5.1 alpha, egcs1.1b 1998-09-24 15:46 ` Michal Jaegermann @ 1998-09-25 10:18 ` Charl Botha 1998-09-25 10:36 ` Charl Botha 1998-09-25 16:02 ` Jim Paradis 0 siblings, 2 replies; 10+ messages in thread From: Charl Botha @ 1998-09-25 10:18 UTC (permalink / raw) To: axp-list On Thu, 24 Sep 1998, Michal Jaegermann wrote: > Jeff Sturm wrote: > > On Thu, 24 Sep 1998, Jochen Kuepper wrote: > > > IIRC, only X11 needs /lib/cpp. > > OK, that's fine for systems with gcc, what about the others? > > There have been many packages which depend on /lib/cpp, not many are > > still around (PostgreSQL still does, IIRC). > AFAIK having /lib/cpp as a link to on of copies of a preprocessor > which I happen to have around (one with every C compiler :-) serves > the goal admirably. If this link does not exist then, for example, > you will not see your host name in xdm login window. If you have > some macros or defines in your ~/.Xdefaults they will be not > preprocessed (this seems to be buggy in places anyway and you can > force an explicit preprocessor with options to xrdb); and so on, > and so on.... > > I indeed noticed that this link vanished, for some reason or another, > on one of my Intel boxes after a Red Hat update. Maybe this was the > problem Charles orignally had with xmkmf and vnc sources? Honestly, > I used xmkmf on Alpha on multiple occasions, not only for vnc, and never > noticed troubles he described. '/lib/cpp' is not a script calling > 'gcc -E' on any of boxes I have around. <snip> > A trivial 'gcc -E $1', or even 'gcc -E $@', ***will not*** do!! > Various programs expect, for example, that '-traditional' flag > is present. With simple '#define THIS' only this does not matter. If > something plays more complicated preprocessor games and you forgot > to pass that flag, or maybe another, you will be for nasty surprises. > Calls to cpp may be hidden inside of programs and you may not even > be aware of them. 'xdm' provides an example. I ran into that whilst trying to write a script to replace /lib/cpp. Michal is right, it's not trivial. I *did* have /lib/cpp as a link to cpp itself (of egcs-1.1b). The problem is, just that cpp doesn't have many of the necessary internal defines, such as the ones used for indicating the present architecture; this is why xmkmf didn't work, there were no architecture flags. When one replaces /lib/cpp with a trivial script calling gcc -E, all the necessary flags are there, but other problems pop up. First, some applications call cpp and utilise it via standard input. Default behaviour of the true cpp when called without parameters is to accept input from stdin, whilst gcc -E bombs with an error message when no other parameters are specified. I coded up a quick script which checks for no parameters and then rather invokes "gcc -E -" which does the trick. The second problem is that some programs, e.g. xdm and WindowMaker, use /lib/cpp to parse configuration files. "gcc -E" works on files with the expected .{c,cc,C,h} (and others) extensions, but when passed a file with an unknown extension, also does not work, but rather exits with an error message. This problem will have to be looked into somewhat more... Best regards, Charl --------------------------------------------------------------------------- Charl Botha E-Mail cpbotha@sun.ac.za Image Processing and Pattern Recognition Digital Signal Processing Group <http://dsp.ee.sun.ac.za> Department of Electronic Engineering University of Stellenbosch South Africa ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: imake/xmkmf on rh5.1 alpha, egcs1.1b 1998-09-25 10:18 ` Charl Botha @ 1998-09-25 10:36 ` Charl Botha 1998-09-25 16:02 ` Jim Paradis 1 sibling, 0 replies; 10+ messages in thread From: Charl Botha @ 1998-09-25 10:36 UTC (permalink / raw) To: axp-list > This problem will have to be looked into somewhat more... I really hate replying on my own email but... I sent a similar diagnosis to the egcs-bug list, someone did reply but my procmail put it in a funny place. Following is the script I wrote up to replace /lib/cpp, + a change advised by Manfred Hollstein <manfred@s-direktnet.de> to solve the problem when the cpp is passed a file with a non-program or non-header extension. This works for me (if there's a more effective way, please enlighten me): ------- SNIP # /lib/cpp replacement; # <cpbotha@sun.ac.za>, <manfred@s-direktnet.de> #!/bin/bash # check if we have a filename on the commandline for i in $*; do if [ -f $i ]; then FNBOOL="true"; break; fi done # run gcc with parameters so it'll work on files # with non-program extensions if [ -z $FNBOOL ]; then gcc -x c -E $* - else gcc -x c -E $* fi ------- SNIP Regards, Charl --------------------------------------------------------------------------- Charl Botha E-Mail cpbotha@sun.ac.za Image Processing and Pattern Recognition Digital Signal Processing Group <http://dsp.ee.sun.ac.za> Department of Electronic Engineering University of Stellenbosch South Africa ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: imake/xmkmf on rh5.1 alpha, egcs1.1b 1998-09-25 10:18 ` Charl Botha 1998-09-25 10:36 ` Charl Botha @ 1998-09-25 16:02 ` Jim Paradis 1 sibling, 0 replies; 10+ messages in thread From: Jim Paradis @ 1998-09-25 16:02 UTC (permalink / raw) To: axp-list > The second problem is that some programs, e.g. xdm and WindowMaker, use > /lib/cpp to parse configuration files. "gcc -E" works on files with the > expected .{c,cc,C,h} (and others) extensions, but when passed a file with > an unknown extension, also does not work, but rather exits with an error > message. > > This problem will have to be looked into somewhat more... Well, gcc *has* a cpp program within it, it's just buried... It's a bit risky, but you could symlink something like: /usr/lib/gcc-lib/alpha-redhat-linux/egcs-2.90.27/cpp to /lib/cpp and it should behave as expected. [the reason it's risky is that the pathname isn't constant; if you install a different version of gcc you need to update the symlink as well...] -- Jim Paradis (paradis@linux01.hlo.dec.com) "The early bird gets the worm. Compaq Computer Corporation If you want something else for (508)841-3243 breakfast, get up later." http://www.tiac.net/users/jrp/index.html ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~1998-09-25 16:12 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 1998-09-23 14:53 imake/xmkmf on rh5.1 alpha, egcs1.1b Charl Botha 1998-09-23 16:40 ` Michal Jaegermann 1998-09-24 3:36 ` Richard Henderson 1998-09-24 9:51 ` Charl Botha 1998-09-24 11:09 ` Jochen Kuepper 1998-09-24 13:36 ` Jeff Sturm 1998-09-24 15:46 ` Michal Jaegermann 1998-09-25 10:18 ` Charl Botha 1998-09-25 10:36 ` Charl Botha 1998-09-25 16:02 ` Jim Paradis
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox