Hi, I wanted to compile a program with the GPC, and when I invoke gpc supp.pas it make "supp.pas:5: module/unit interface `Crt' could not be imported" !!
I have installed GPC with the src.rpm. I have installed FPC too, and I tried to compile with the crt.o or/and the crt.ppu or/and the crt.pas gived with the source.
Where can I find this Unit under Linux ?? Or how to do this work ! ?
Hello!
Romain Chantereau wrote:
Hi, I wanted to compile a program with the GPC, and when I invoke gpc supp.pas it make "supp.pas:5: module/unit interface `Crt' could not be imported" !!
Did you give `gpc' the `--automake' option?
gpc -O --automake foo.pas -o foo
Otherwise this is strange because in recent versions of GPC (19990118 or later) the Crt unit is installed to a directory that is searched by the compiler.
Which version of GPC are you running, and in which directories is it installed? To find this out, run GPC with the `-v' option.
Hope this helps,
Peter
Peter Gerwinski wrote:
Hello!
Romain Chantereau wrote:
Hi, I wanted to compile a program with the GPC, and when I invoke gpc supp.pas it make "supp.pas:5: module/unit interface `Crt' could not be imported" !!
Did you give `gpc' the `--automake' option?
gpc -O --automake foo.pas -o foo
I invoke that gpc -O --automake supp.pas -o supp it make that ! ==> supp.pas:5: module `crt' could not be compiled
And I have with gpc -v =>> Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.8.1/specs gpc version 19990118, based on gcc-2.8.1
What the problem doc ? Please ?
Romain Chantereau wrote:
I invoke that gpc -O --automake supp.pas -o supp it make that ! ==> supp.pas:5: module `crt' could not be compiled
Maybe this is only the last error message of a longer sequence? It is possible that `gpc' failed to compile the `crt' unit on your system because it did not find the C compiler.
If this is the case you can recover from this by manually compiling `crtc.c':
cd /usr/lib/gcc-lib/i386-redhat-linux/2.8.1 gcc -c -O crtc.c
And I have with gpc -v =>> Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.8.1/specs gpc version 19990118, based on gcc-2.8.1
And `/usr/lib/gcc-lib/i386-redhat-linux/2.8.1/units/crt.pas' is in place?
If the above does not solve your problem, please show me a little more complete output of:
gpc -O --automake supp.pas -o supp -v
Good luck,
Peter
Peter Gerwinski wrote:
Romain Chantereau wrote:
I invoke that gpc -O --automake supp.pas -o supp it make that ! ==> supp.pas:5: module `crt' could not be compiled
Maybe this is only the last error message of a longer sequence? It is possible that `gpc' failed to compile the `crt' unit on your system because it did not find the C compiler.
If this is the case you can recover from this by manually compiling `crtc.c':
cd /usr/lib/gcc-lib/i386-redhat-linux/2.8.1 gcc -c -O crtc.c
I don't have this, I just have : crtbegin.o crtend.o gpc-cpp libgcc.a specs crtbeginS.o crtendS.o gpc1 libgpc.a units in this directory
And `/usr/lib/gcc-lib/i386-redhat-linux/2.8.1/units/crt.pas' is in place?
Nothing, I don't have this, I don't understand.... => I installed gpc with the src.rpm (base and extra)
If the above does not solve your problem, please show me a little more complete output of:
gpc -O --automake supp.pas -o supp -v
tadam !
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.8.1/specs gpc version 19990118, based on gcc-2.8.1 /usr/lib/gcc-lib/i386-redhat-linux/2.8.1/gpc-cpp -lang-pascal -v -nocharescape -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__unix__ -D__linux__ -D__unix -D__linux -Asystem(posix) -D__BITS_LITTLE_ENDIAN__=1 -D__BYTES_LITTLE_ENDIAN__=1 -D__WORDS_LITTLE_ENDIAN__=1 -D__OPTIMIZE__ -Di386 -Asystem(unix) -Acpu(i386) -Amachine(i386) -D__i386__ -Asystem(unix) -Acpu(i386) -Amachine(i386) supp.pas /tmp/cc2nE2I2.i GNU CPP version 2.8.1 (i386 GNU/Linux with ELF) #include "..." search starts here: #include <...> search starts here: /usr/local/include /usr/i386-redhat-linux/include /usr/lib/gcc-lib/i386-redhat-linux/2.8.1/include /usr/include End of search list. /usr/lib/gcc-lib/i386-redhat-linux/2.8.1/gpc1 /tmp/cc2nE2I2.i -quiet -dumpbase supp.pas -O -version -famtmpfile=/tmp/ccEupIq6.gpc -fautomake -o /tmp/cc2nE2I2.sGNU Pascal version 2.8.1 (i386-redhat-linux) compiled by GNU C version pgcc-2.91.66 19990314 (egcs-1.1.2 release). supp.pas:5: module `crt' could not be compiled
Good luck,
Thanks !
Romain Chantereau wrote:
cd /usr/lib/gcc-lib/i386-redhat-linux/2.8.1 gcc -c -O crtc.c
I don't have this, I just have : crtbegin.o crtend.o gpc-cpp libgcc.a specs crtbeginS.o crtendS.o gpc1 libgpc.a units in this directory
Sorry - typo. I meant:
cd /usr/lib/gcc-lib/i386-redhat-linux/2.8.1/units gcc -c -O crtc.c
But anyway ...
And `/usr/lib/gcc-lib/i386-redhat-linux/2.8.1/units/crt.pas' is in place?
Nothing, I don't have this, I don't understand.... => I installed gpc with the src.rpm (base and extra)
Then your `src.rpm' is incomplete. If this is the archive from `agnes.dida.physik.uni-essen.de' it should be complete. (I tend to remember to have checked that before uploading; however I cannot re-check right now because I am on holidays and have only a slow and very expensive connection to the Internet.)
/usr/lib/gcc-lib/i386-redhat-linux/2.8.1/gpc1 /tmp/cc2nE2I2.i -quiet -dumpbase supp.pas -O -version -famtmpfile=/tmp/ccEupIq6.gpc -fautomake -o /tmp/cc2nE2I2.sGNU Pascal version 2.8.1 (i386-redhat-linux) compiled by GNU C version pgcc-2.91.66 19990314 (egcs-1.1.2 release). supp.pas:5: module `crt' could not be compiled
Indeed there seems to be no `crt.pas' at all. What is the contents of your `units' directory?
ls /usr/lib/gcc-lib/i386-redhat-linux/2.8.1/units
I'm going to try to install gpc with the tar.gz....
Anyway, that's a good idea.
The units that seem to be missing in your `units' are in the `gpc/p/units' directory except one: `gpc.pas' is in `gpc/p/rts'.
Hope this helps,
Peter