Hi all. I'm trying to compile latest gpc 20011222 snapshot for Mandrake, which ships either gcc-2.96 and gcc-3.03. Latest message on this topic (early december) says gpc is not supported on these versions. Is this still true ?
On 28 Jan 02, at 18:55, Guillaume Rousse wrote:
Hi all. I'm trying to compile latest gpc 20011222 snapshot for Mandrake, which ships either gcc-2.96 and gcc-3.03. Latest message on this topic (early december) says gpc is not supported on these versions. Is this still true ?
In terms of the gcc sources that you use to build GPC, yes - you should use gcc-core-2.95.x sources for that. In terms of the compiler used to build GPC, you can use 2.96 or 3.03. I would advise you to use 2.96, since it is probably more tweaked and stable under Mandrake.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~African_Chief email: African_Chief@bigfoot.com
Ainsi parlait Prof Abimbola Olowofoyeku :
On 28 Jan 02, at 18:55, Guillaume Rousse wrote:
Hi all. I'm trying to compile latest gpc 20011222 snapshot for Mandrake, which ships either gcc-2.96 and gcc-3.03. Latest message on this topic (early december) says gpc is not supported on these versions. Is this still true ?
In terms of the gcc sources that you use to build GPC, yes - you should use gcc-core-2.95.x sources for that. In terms of the compiler used to build GPC, you can use 2.96 or 3.03. I would advise you to use 2.96, since it is probably more tweaked and stable under Mandrake.
I should have precised i'm building a mdk package, not just installing it on my box. Anyway, i took the 'official' gpc rpm found on gnu-pascal ftp site, and adapted it to current gpc-20011222 and gcc-2.95-3. However, some things have changed: - there is now only one gpc binary, where they were epc, bpc, gpc and pc before - i had to add the following files and directories to make units work: %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/cpp0 %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/cc1 %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/units - gcc-cpp seems to be called gccpp now Off course, if you're interested in the spec file, i can send it back :-)
Everything now seems to be fine, however, CRT extension doesn't work -( [guillaume@silbermann 301]$ cat test1.pas PROGRAM Test;
BEGIN WRITELN('Hello World'); END. [guillaume@silbermann 301]$ cat test2.pas PROGRAM Test; USES CRT;
BEGIN WRITELN('Hello World'); END. [guillaume@silbermann 301]$ gpc --automake test1.pas -o test1 [guillaume@silbermann 301]$ ./test1 Hello World [guillaume@silbermann 301]$ gpc --automake test2.pas -o test2 [guillaume@silbermann 301]$ ./test2 (nothing)
So, what going wrong there ? My ncurse version is: [guillaume@silbermann 301]$ rpm -qa | grep curse ncurses-5.2-17mdk libncurses5-5.2-17mdk libncurses5-devel-5.2-17mdk
Guillaume Rousse wrote:
Anyway, i took the 'official' gpc rpm found on gnu-pascal ftp site, and adapted it to current gpc-20011222 and gcc-2.95-3. However, some things have changed:
- there is now only one gpc binary, where they were epc, bpc, gpc and pc
before
- i had to add the following files and directories to make units work:
%{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/cpp0 %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/cc1 %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/units
- gcc-cpp seems to be called gccpp now
That's correct.
Off course, if you're interested in the spec file, i can send it back :-)
Everything now seems to be fine, however, CRT extension doesn't work -(
I don't know. I've heard that some versions of some distributions (mostly RH, but perhaps also Mandrake) ship with a broken version of ncurses, but I don't know the details ATM. Does it make a difference if you try it on the console or in an xterm? Do other ncurses programs work?
Frank
Ainsi parlait Frank Heckenbach : [..]
Everything now seems to be fine, however, CRT extension doesn't work -(
I don't know. I've heard that some versions of some distributions (mostly RH, but perhaps also Mandrake) ship with a broken version of ncurses, but I don't know the details ATM. Does it make a difference if you try it on the console or in an xterm? Do other ncurses programs work?
Actually, you're right, everything is OK on console. Except accentuated characters, but that's another problem :-) I also RTFM, and i found deep in info page that the -DX11 switch was needed for using CRT under X11. However, compilations fails for missing files: [guillaume@silbermann guillaume]$ gpc --autobuild -DX11 test.pas In file included from /usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.95.3/units/crtx.c:35: /usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.95.3/units/crtc.c:62: xcurses.h: Aucun fichier ou r?pertoire de ce type/usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.95.3/units/crtc.c:63: xpanel.h: Aucun fichier ou r?pertoire de ce type gpc1: gpc exited with status 1 gpc1: gpc exited with status 1
I checked, thos xcurses.h and xpanel.h doesn't exist neither on my current system, nor in any available mandrake package....
All ncurses programm works well, AFAR (make menuconfig, for instance).
Guillaume Rousse wrote:
Ainsi parlait Frank Heckenbach : [..]
Everything now seems to be fine, however, CRT extension doesn't work -(
I don't know. I've heard that some versions of some distributions (mostly RH, but perhaps also Mandrake) ship with a broken version of ncurses, but I don't know the details ATM. Does it make a difference if you try it on the console or in an xterm? Do other ncurses programs work?
Actually, you're right, everything is OK on console. Except accentuated characters, but that's another problem :-) I also RTFM, and i found deep in info page that the -DX11 switch was needed for using CRT under X11.
As noted by others, you don't *need* it. It's an alternative to compile the program such that it will run in its own window.
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.95.3/units/crtx.c:35: /usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.95.3/units/crtc.c:62: xcurses.h:
I checked, thos xcurses.h and xpanel.h doesn't exist neither on my current system, nor in any available mandrake package....
You need PDCurses for that. I don't know if there's a Mandrake package of it, but the sources and generic binaries can be had from ftp://agnes.dida.physik.uni-essen.de/gnu-pascal/libs/
Frank
On Tue, 29 Jan 2002, Guillaume Rousse wrote:
Everything now seems to be fine, however, CRT extension doesn't work -(
[guillaume@silbermann 301]$ cat test2.pas PROGRAM Test; USES CRT;
BEGIN WRITELN('Hello World'); END.
[..]
So, what going wrong there ?
with crt you need to open a window to write to it. try this:
program hello; uses crt;
var Awindow : winstate;
procedure InitWindow; begin textbackground( blue ); textcolor( lightgray ); makewin( Awindow, 1, 1, 30, 10 ); fillwin( ' ', textattr ); end;
begin Initwindow; writeln('hello world'); end.
Russ
Russell Whitaker wrote:
So, what going wrong there ?
with crt you need to open a window to write to it.
No, you don't. :-)
Frank
On 29 Jan 02, at 20:37, Guillaume Rousse wrote:
[...]
I should have precised i'm building a mdk package, not just installing it on my box.
Hmm ... I know nothing about building those ...
Anyway, i took the 'official' gpc rpm found on gnu-pascal ftp site, and adapted it to current gpc-20011222 and gcc-2.95-3. However, some things have changed: - there is now only one gpc binary, where they were epc, bpc, gpc and pc before
Yes.
- i had to add the following
files and directories to make units work: %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/cpp0 %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/cc1 %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/units - gcc-cpp seems to be called gccpp now Off course, if you're interested in the spec file, i can send it back :-)
Well, I don't think all that is necessary if the compiler is installed correctly (at least, it all works here, without my fiddling with the specs file). Perhaps this is all because you are building and mdk?
Everything now seems to be fine, however, CRT extension doesn't work -(
[guillaume@silbermann 301]$ cat test1.pas PROGRAM Test;
BEGIN WRITELN('Hello World'); END. [guillaume@silbermann 301]$ cat test2.pas PROGRAM Test; USES CRT;
BEGIN WRITELN('Hello World'); END. [guillaume@silbermann 301]$ gpc --automake test1.pas -o test1 [guillaume@silbermann 301]$ ./test1 Hello World [guillaume@silbermann 301]$ gpc --automake test2.pas -o test2 [guillaume@silbermann 301]$ ./test2 (nothing)
So, what going wrong there ?
Strange. Doesn't work here either. I have never noticed this before (probably because I haven't used crt under linux). However, I don't remember any problem with crt coming up when I ran the testsuite. Mandrake is based on RH and so may have the same bugs as RH. But I have also tested this on Redmond Linux, which is based on Debian, and the same problem exists there. Again, this didn't show up when I ran the testsuite.
Frank - is there a problem with the testsuite not showing up crt problems?
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~African_Chief email: African_Chief@bigfoot.com
Prof Abimbola Olowofoyeku wrote:
Strange. Doesn't work here either. I have never noticed this before (probably because I haven't used crt under linux). However, I don't remember any problem with crt coming up when I ran the testsuite. Mandrake is based on RH and so may have the same bugs as RH. But I have also tested this on Redmond Linux, which is based on Debian, and the same problem exists there.
Well, on a Debian (2.2) system I have access to, it works. Maybe they also have a broken version. I don't know ...
Again, this didn't show up when I ran the testsuite.
Frank - is there a problem with the testsuite not showing up crt problems?
Yes -- it's not easy to test the behaviour of CRT automatically, so for now it mostly only tests that it compiles ok.
You might want to try running crtdemo and testing things manually.
Frank
Ainsi parlait Prof Abimbola Olowofoyeku : [..]
- i had to add the following
files and directories to make units work: %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/cpp0 %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/cc1 %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/include %{_prefix}/lib/gcc-lib/%{gcc_target_platform}/%{gcc_version}/units - gcc-cpp seems to be called gccpp now Off course, if you're interested in the spec file, i can send it back :-)
Well, I don't think all that is necessary if the compiler is installed correctly (at least, it all works here, without my fiddling with the specs file). Perhaps this is all because you are building and mdk?
There is not 2.95.2 gcc package available, only 2.96 and 3.03, so i had to create a standalone gpc package. However, there is also a gcc 2.95.4 maintained for PPC, and i just had the maintainer agreement to use it also for gpc. I'll try this ASAP.
Everything now seems to be fine, however, CRT extension doesn't work -(
[guillaume@silbermann 301]$ cat test1.pas PROGRAM Test;
BEGIN WRITELN('Hello World'); END. [guillaume@silbermann 301]$ cat test2.pas PROGRAM Test; USES CRT;
BEGIN WRITELN('Hello World'); END. [guillaume@silbermann 301]$ gpc --automake test1.pas -o test1 [guillaume@silbermann 301]$ ./test1 Hello World [guillaume@silbermann 301]$ gpc --automake test2.pas -o test2 [guillaume@silbermann 301]$ ./test2 (nothing)
So, what going wrong there ?
Strange. Doesn't work here either. I have never noticed this before (probably because I haven't used crt under linux). However, I don't remember any problem with crt coming up when I ran the testsuite. Mandrake is based on RH and so may have the same bugs as RH. But I have also tested this on Redmond Linux, which is based on Debian, and the same problem exists there. Again, this didn't show up when I ran the testsuite.
Same for me for crtdemo.pas
On 31 Jan 02, at 13:54, Guillaume Rousse wrote:
[...]
Well, I don't think all that is necessary if the compiler is installed correctly (at least, it all works here, without my fiddling with the specs file). Perhaps this is all because you are building and mdk?
There is not 2.95.2 gcc package available, only 2.96 and 3.03, so i had to create a standalone gpc package. However, there is also a gcc 2.95.4 maintained for PPC, and i just had the maintainer agreement to use it also for gpc. I'll try this ASAP.
I build my GPC with 2.95.3 sources. The trick then is to do "make install" rather than "make pascal.install". That way, you get everything that GPC needs (including a C compiler) all in one package. That circumvents all the configuration problems - but it perhaps not the ideal way to do things.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~African_Chief email: African_Chief@bigfoot.com
Prof Abimbola Olowofoyeku wrote:
I build my GPC with 2.95.3 sources. The trick then is to do "make install" rather than "make pascal.install". That way, you get everything that GPC needs (including a C compiler) all in one package. That circumvents all the configuration problems - but it perhaps not the ideal way to do things.
If you don't already have GCC of the same version installed, I think it is the best way.
Frank
On 1 Feb 2002 at 7:45, Frank Heckenbach wrote:
Prof Abimbola Olowofoyeku wrote:
I build my GPC with 2.95.3 sources. The trick then is to do "make install" rather than "make pascal.install". That way, you get everything that GPC needs (including a C compiler) all in one package. That circumvents all the configuration problems - but it perhaps not the ideal way to do things.
If you don't already have GCC of the same version installed, I think it is the best way.
Is there a "make" target to install it like this? I think "pascal.bindist" only packages the GPC compiler. Perhaps we could add another one (e.g., "full.bindist")? Best regards, The Chief --------- Prof. Abimbola Olowofoyeku (The African Chief) Email: African_Chief@bigfoot.com http://www.bigfoot.com/~african_chief/
Prof. A Olowofoyeku (The African Chief) wrote:
On 1 Feb 2002 at 7:45, Frank Heckenbach wrote:
Prof Abimbola Olowofoyeku wrote:
I build my GPC with 2.95.3 sources. The trick then is to do "make install" rather than "make pascal.install". That way, you get everything that GPC needs (including a C compiler) all in one package. That circumvents all the configuration problems - but it perhaps not the ideal way to do things.
If you don't already have GCC of the same version installed, I think it is the best way.
Is there a "make" target to install it like this? I think "pascal.bindist" only packages the GPC compiler. Perhaps we could add another one (e.g., "full.bindist")?
I suggested something like this in a mail on 10 Nov 2001, but since there were no replies to that mail, I assumed there was no interest.
Frank
On 1 Feb 2002 at 21:45, Frank Heckenbach wrote:
[...]
Is there a "make" target to install it like this? I think "pascal.bindist" only packages the GPC compiler. Perhaps we could add another one (e.g., "full.bindist")?
I suggested something like this in a mail on 10 Nov 2001, but since there were no replies to that mail, I assumed there was no interest.
I don't remember seeing that mail. In any case, I am interested now ;-)
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~African_Chief email: African_Chief@bigfoot.com
Prof Abimbola Olowofoyeku wrote:
On 1 Feb 2002 at 21:45, Frank Heckenbach wrote:
[...]
Is there a "make" target to install it like this? I think "pascal.bindist" only packages the GPC compiler. Perhaps we could add another one (e.g., "full.bindist")?
I suggested something like this in a mail on 10 Nov 2001, but since there were no replies to that mail, I assumed there was no interest.
I don't remember seeing that mail. In any case, I am interested now ;-)
I'm adding the targets `pascal.install-with-gcc' and `pascal.bindist-with-gcc' now. I put in the `-with-gcc' part explicitly (rather than `full' as you suggested) and put it also in the name of the archive generated for the bindist to make it very clear what it does. Otherwise we might get some complaints if we just overwrite GCC files ...
Frank
On 4 Feb 2002 at 7:02, Frank Heckenbach wrote:
[....]
I'm adding the targets `pascal.install-with-gcc' and `pascal.bindist-with-gcc' now. I put in the `-with-gcc' part explicitly (rather than `full' as you suggested) and put it also in the name of the archive generated for the bindist to make it very clear what it does. Otherwise we might get some complaints if we just overwrite GCC files ...
True. The new targets are just fine - thanks.
Best regards, The Chief --------- Prof. Abimbola Olowofoyeku (The African Chief) Email: African_Chief@bigfoot.com http://www.bigfoot.com/~african_chief/
Guillaume Rousse wrote:
Everything now seems to be fine, however, CRT extension doesn't work -( [guillaume@silbermann 301]$ cat test1.pas PROGRAM Test;
BEGIN WRITELN('Hello World'); END. [guillaume@silbermann 301]$ cat test2.pas PROGRAM Test; USES CRT;
BEGIN WRITELN('Hello World'); END. [guillaume@silbermann 301]$ gpc --automake test1.pas -o test1 [guillaume@silbermann 301]$ ./test1 Hello World [guillaume@silbermann 301]$ gpc --automake test2.pas -o test2 [guillaume@silbermann 301]$ ./test2 (nothing)
Maybe this is a silly idea, but... Did you run the example program in Konsole? If so, you can't expect it to do anything visible.
Emil Jerabek
Ainsi parlait Emil Jerabek :
Guillaume Rousse wrote:
Everything now seems to be fine, however, CRT extension doesn't work -( [guillaume@silbermann 301]$ cat test1.pas PROGRAM Test;
BEGIN WRITELN('Hello World'); END. [guillaume@silbermann 301]$ cat test2.pas PROGRAM Test; USES CRT;
BEGIN WRITELN('Hello World'); END. [guillaume@silbermann 301]$ gpc --automake test1.pas -o test1 [guillaume@silbermann 301]$ ./test1 Hello World [guillaume@silbermann 301]$ gpc --automake test2.pas -o test2 [guillaume@silbermann 301]$ ./test2 (nothing)
Maybe this is a silly idea, but... Did you run the example program in Konsole? If so, you can't expect it to do anything visible.
You're perfectly right, i just tested with rxvt and eterm. But 1) how did you guess i used konsole :-) ? 2) is there a reason why this doesn't work (and should be reported as a bug to konsole maintainers) ?
On 31 Jan 2002 at 14:16, Guillaume Rousse wrote:
Ainsi parlait Emil Jerabek :
[...]
Maybe this is a silly idea, but... Did you run the example program in Konsole? If so, you can't expect it to do anything visible.
You're perfectly right, i just tested with rxvt and eterm. But
- how did you guess i used konsole :-) ?
- is there a reason why this doesn't work (and should be reported as a
bug to konsole maintainers) ?
I use xterm, not konsole - and it didn't work there either. Is there any reason why it shouldn't work with xterm? Best regards, The Chief --------- Prof. Abimbola Olowofoyeku (The African Chief) Email: African_Chief@bigfoot.com http://www.bigfoot.com/~african_chief/
Guillaume Rousse wrote:
Maybe this is a silly idea, but... Did you run the example program in Konsole? If so, you can't expect it to do anything visible.
You're perfectly right, i just tested with rxvt and eterm. But
- how did you guess i used konsole :-) ?
- is there a reason why this doesn't work (and should be reported as a bug
to konsole maintainers) ?
That's not a bug, that's a feature :-) Konsole restores automatically the previous screen contents after the curses shut down (-> your example doesn't leave a visible trace). Moreover it buffers the screen output, so that rapid changes are merged together to reduce the load on X server (-> you don't even see a flash or something like that).
This should work though:
program Test (Input, Output);
uses Crt;
begin WriteLn ('Hello world!'); Write ('Press ENTER, svp... '); ReadLn end.
Emil Jerabek
Ainsi parlait Emil Jerabek : [..]
That's not a bug, that's a feature :-) Konsole restores automatically the previous screen contents after the curses shut down (-> your example doesn't leave a visible trace). Moreover it buffers the screen output, so that rapid changes are merged together to reduce the load on X server (-> you don't even see a flash or something like that).
This should work though:
program Test (Input, Output);
uses Crt;
begin WriteLn ('Hello world!'); Write ('Press ENTER, svp... '); ReadLn end.
Arghh, the return of the evil readln at the end of the program :-) I used to instruct my students to use it with TurboPascal, as they were confused by automatic return to editing mode after completion of program execution, it seems i'll have to use it myself with konsole...
Guillaume Rousse wrote:
Ainsi parlait Emil Jerabek : [..]
That's not a bug, that's a feature :-) Konsole restores automatically the previous screen contents after the curses shut down (-> your example doesn't leave a visible trace). Moreover it buffers the screen output, so that rapid changes are merged together to reduce the load on X server (-> you don't even see a flash or something like that).
This should work though:
program Test (Input, Output);
uses Crt;
begin WriteLn ('Hello world!'); Write ('Press ENTER, svp... '); ReadLn end.
Arghh, the return of the evil readln at the end of the program :-) I used to instruct my students to use it with TurboPascal, as they were confused by automatic return to editing mode after completion of program execution, it seems i'll have to use it myself with konsole...
Alternatively, you could probably modify your terminfo entries and omit the commands to switch to "alternate screen" and back ...
Frank