Hello, I'm trying to compile GPC under linux using unix sources. (in order to compile pascal programs written for BP 7.0 but it is another story). The GCC 2.95 and GPC were downloaded and dealt with as it is described in the GPC/p/INSTALL file. Howevre, there are no diff file gcc-2.95.diff and mkdiff script also seems to be of little use (for making this file). running make LANGUAGES=pascal in the outer (gcc) directory does not lead to gpc executable, of course.
Could someone help me with it? I'm a novice in compiling compilers, as usually all DOS/Windows programs are ready made, although may contains viruses.
Thank you, Ivan.
Hello!
Ivan Torshin wrote:
I'm trying to compile GPC under linux using unix sources. (in order to compile pascal programs written for BP 7.0 but it is another story). The GCC 2.95 and GPC were downloaded and dealt with as it is described in the GPC/p/INSTALL file.
That file is not really up-to-date. This is what to do:
* Unarchive the GCC and the GPC source.
* Move (or copy) the `p' subdirectory from the GPC source tree into the `gcc' subdirectory of the GCC source tree. (After that there must be a directory `gcc-<version>/gcc/p'.)
* Make a directory for compiling (e.g. `gpc'). `cd' to that directory.
* Call the `configure' script in the GCC source directory, e.g.
/foo/bar/gcc-2.95.2/configure
This will automatically patch your GCC source, create `Makefile's in the new directory, etc.
* Call `make'.
* When everything compiled, you can install (as `root') with `make install'.
Howevre, there are no diff file gcc-2.95.diff
Hmm... there is. Strange.
You are sure that you have the most recent (alpha) version of GPC that works with gcc-2.95.x?
and mkdiff script also seems to be of little use (for making this file).
That's correct. It's a developers' tool.
Could someone help me with it? I'm a novice in compiling compilers, as usually all DOS/Windows programs are ready made, although may contains viruses.
You can also download a ready-made GPC from
ftp://agnes.dida.physik.uni-essen.de/beta/binary/
Hope this helps,
Peter
Dear Peter, thank you for help. The linux binary version of gpc was downloaded from: ftp://agnes.dida.physik.uni-essen.de/gnu-pascal/beta/binary/
upon compiling a.pas the following output is given:
program aaa; begin writeln ('This prints "aaa", does it ?'); end.
gpc -v a.pas
Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/2.8.1/specs gpc version 19990118, based on gcc-2.8.1 /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/2.8.1/gpc-cpp -lang-pascal -v -nochares cape -D__GNU_PASCAL__ -undef -D__GNUC__=2 -D__GNUC_MINOR__=8 -D__GPC__=2 -D__GPC _MINOR__=0 -D__GPC_RELEASE__=19990118 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__uni x__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__BITS_LITTLE_ENDIAN__=1 -D __BYTES_LITTLE_ENDIAN__=1 -D__WORDS_LITTLE_ENDIAN__=1 -Di386 -Di586 -Asystem(uni x) -Acpu(i386) -Amachine(i386) -D__i386__ -D__i586__ -Asystem(unix) -Acpu(i386) -Amachine(i386) a2.pas /tmp/cca19468.i GNU CPP version 2.8.1 (i386 GNU/Linux with ELF) #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/i586-pc-linux-gnulibc1/include /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/2.8.1/include /usr/include End of search list. /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/2.8.1/gpc1 /tmp/cca19468.i -quiet -dum base a2.pas -version -famtmpfile=/tmp/cca19468.gpc -o /tmp/cca19468.s GNU Pascal version 2.8.1 (i586-pc-linux-gnulibc1) compiled by GNU C version egcs -2.91.60 19981201 (egcs-1.1.1 release). /tmp/cca19468.i:1: numeric constant with no digits /tmp/cca19468.i:1: numeric constant with no digits /tmp/cca19468.i:1: invalid #line /tmp/cca19468.i:2: warning: missing program header /tmp/cca19468.i:2: parse error at null character
How could one get the executable? thank you. Ivan.
19-Jan-00 12:14 you wrote:
Dear Peter, thank you for help. The linux binary version of gpc was downloaded from: ftp://agnes.dida.physik.uni-essen.de/gnu-pascal/beta/binary/
upon compiling a.pas the following output is given:
program aaa; begin writeln ('This prints "aaa", does it ?'); end.
gpc -v a.pas
Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/2.8.1/specs gpc version 19990118, based on gcc-2.8.1 /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/2.8.1/gpc-cpp -lang-pascal -v -nochares cape -D__GNU_PASCAL__ -undef -D__GNUC__=2 -D__GNUC_MINOR__=8 -D__GPC__=2 -D__GPC _MINOR__=0 -D__GPC_RELEASE__=19990118 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__uni x__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__BITS_LITTLE_ENDIAN__=1 -D __BYTES_LITTLE_ENDIAN__=1 -D__WORDS_LITTLE_ENDIAN__=1 -Di386 -Di586 -Asystem(uni x) -Acpu(i386) -Amachine(i386) -D__i386__ -D__i586__ -Asystem(unix) -Acpu(i386) -Amachine(i386) a2.pas /tmp/cca19468.i GNU CPP version 2.8.1 (i386 GNU/Linux with ELF) #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/i586-pc-linux-gnulibc1/include /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/2.8.1/include /usr/include End of search list. /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/2.8.1/gpc1 /tmp/cca19468.i -quiet -dum base a2.pas -version -famtmpfile=/tmp/cca19468.gpc -o /tmp/cca19468.s GNU Pascal version 2.8.1 (i586-pc-linux-gnulibc1) compiled by GNU C
^^^^^^^^
version egcs -2.91.60 19981201 (egcs-1.1.1 release). /tmp/cca19468.i:1: numeric constant with no digits /tmp/cca19468.i:1: numeric constant with no digits /tmp/cca19468.i:1: invalid #line /tmp/cca19468.i:2: warning: missing program header /tmp/cca19468.i:2: parse error at null character
How could one get the executable? thank you.
You need working compiler, of course :-) Looks like you downloaded version for libc5 and using it on glibc-based system or something like this. On Linux usually installation of binaries is MUCH harder then sources. That is if all goes right installation of binaries is breeze but if something goes wrong then something REALLY goes wrong: usually much faster to recompile the whole thing from scratch then to track problem down to library incompatibilities... It's possible! There are LOTS of tools for that! If you do not have choice (binary-only program, for example) you'll need to do this. But if can recompile thing then usually it's best choice.
Hello!
Ivan Torshin wrote:
Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/2.8.1/specs
^^^^^^^^ Maybe your system has gnulibc2? I remember some problems with the gnulibc1 (included for compatibility) with some gnulibc2-based distributions.
Please retry with i586-pc-linux-gnu.
Hope this helps,
Peter
Hello,
Thanks for help with GPC installation. I've compiled the alpha source according to the instructions and it works.
Ivan.
On Tue, 18 Jan 2000, Peter Gerwinski wrote:
Hello!
Ivan Torshin wrote:
I'm trying to compile GPC under linux using unix sources. (in order to compile pascal programs written for BP 7.0 but it is another story). The GCC 2.95 and GPC were downloaded and dealt with as it is described in the GPC/p/INSTALL file.
That file is not really up-to-date. This is what to do:
- Unarchive the GCC and the GPC source.
... et al