Hello all,
As you can tell from the subject I am a real newbie to GNU-Pascal but I have an application I am trying to port to Cygwin and it has several pascal modules (originally from Borland Delphi) that I will need to compile so I am trying to get a working copy of gnu-pascal for my Cygwin install. I tried a binary install and it had a gpc.exe but the problem there was the binary was for cygwin and gcc 2.95.3 and cygwin has moved to gcc 3.2 and the binaries were compiled so they installed to cygnus/usr/bin instead of say usr/bin in cygwin so I couldn't really use the binary as it could not find all the 2.95.3 libraries for gcc it needed.
I was going to try the install-gpc-binary script but was unsure if it would shorten the path so it would work if I copied to usr/bin as opposed to lengthening as if I had installed to /usr/local/cygnus....
So instead I decided to try to compile my own and attempted to follow the compiling instructions from the Website for gnu-pascal. I used cvs from the cygwin site to get the gcc sources for Cygwin for the 3.2.1 release and then I downloaded the gpc sources from website for gpc-20021128 which is supposed to work with gcc-3.2.1. I then created the symlink for p as described in the instructions and then I created a build directory and from there I ran the configure line and the make line as documented. I think I have done everything correctly but after compilation I am still not sure I have all I need. If in my build directory I do a find for gpc - I have the following:
/usr/develop/obj $ find ./ -name "gpc*" -depth -print /gcc/gcc/p/gpc.o /gcc/gcc/p/gpc-common.o /gcc/gcc/p/gpc-decl.o /gcc/gcc/p/gpc-lex.o /gcc/gcc/p/gpc-typeck.o /gcc/gcc/p/gpcpp.o /gcc/gcc/p/rts/gpc.gpm /gcc/gcc/p/rts/gpc.gpi /gcc/gcc/p/rts/gpc_sp.gpi /gcc/gcc/p/rts/gpc_ep.gpi /gcc/gcc/p/rts/gpc_bp.gpi /gcc/gcc/p/rts/gpc_delphi.gpi /gcc/gcc/p/rts/gpc.o /gcc/gcc/gpc1.exe /gcc/gcc/gpcpp.exe /gcc/gcc/gpc-run
This appears to be correct except that I don't see a gpc.exe like what existed in the binary install I did. I am really unfamiliar with pascal (I have often thought I would like to learn but...) but as I said I have an application I am trying to port to Cygwin and it has several pascal modules (originally from Borland Delphi) that I will need to compile. I see some warning but doesn't really seem to be any show stopper errors.
Is anyone familiar with Cygwin enough to offer some pointers on compiling.
Brian Keener bkeener@thesoftwaresource.com
On 9 Apr 2003 at 16:45, Brian Keener wrote:
Hello all,
As you can tell from the subject I am a real newbie to GNU-Pascal but I have an application I am trying to port to Cygwin and it has several pascal modules (originally from Borland Delphi) that I will need to compile so I am trying to get a working copy of gnu-pascal for my Cygwin install. I tried a binary install and it had a gpc.exe but the problem there was the binary was for cygwin and gcc 2.95.3 and cygwin has moved to gcc 3.2 and the binaries were compiled so they installed to cygnus/usr/bin instead of say usr/bin in cygwin so I couldn't really use the binary as it could not find all the 2.95.3 libraries for gcc it needed.
You can set environment variables that point to the location of the 2.95.3 files (e.g., GPC_EXEC_PREFIX, LIBRARY_PATH, etc).
I was going to try the install-gpc-binary script but was unsure if it would shorten the path so it would work if I copied to usr/bin as opposed to lengthening as if I had installed to /usr/local/cygnus....
So instead I decided to try to compile my own and attempted to follow the compiling instructions from the Website for gnu-pascal. I used cvs from the cygwin site to get the gcc sources for Cygwin for the 3.2.1 release and then I downloaded the gpc sources from website for gpc-20021128 which is supposed to work with gcc-3.2.1. I then created the symlink for p as described in the instructions and then I created a build directory and from there I ran the configure line and the make line as documented. I think I have done everything correctly but after compilation I am still not sure I have all I need. If in my build directory I do a find for gpc - I have the following:
/usr/develop/obj $ find ./ -name "gpc*" -depth -print /gcc/gcc/p/gpc.o /gcc/gcc/p/gpc-common.o /gcc/gcc/p/gpc-decl.o /gcc/gcc/p/gpc-lex.o /gcc/gcc/p/gpc-typeck.o /gcc/gcc/p/gpcpp.o /gcc/gcc/p/rts/gpc.gpm /gcc/gcc/p/rts/gpc.gpi /gcc/gcc/p/rts/gpc_sp.gpi /gcc/gcc/p/rts/gpc_ep.gpi /gcc/gcc/p/rts/gpc_bp.gpi /gcc/gcc/p/rts/gpc_delphi.gpi /gcc/gcc/p/rts/gpc.o /gcc/gcc/gpc1.exe /gcc/gcc/gpcpp.exe /gcc/gcc/gpc-run
This appears to be correct except that I don't see a gpc.exe like what existed in the binary install I did.
What you will find in the build directory tree is xgpc.exe. If you run "make pascal.install", everything that should be installed will be installed. You will need to do "make pascal.install-with-gcc" if your installed gcc is not version 3.2.1.
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/
Prof A Olowofoyeku (The African Chief) wrote:
the binary as it could not find all the 2.95.3 libraries for gcc it needed.
You can set environment variables that point to the location of the 2.95.3 files (e.g., GPC_EXEC_PREFIX, LIBRARY_PATH, etc).
Looking through the manual pages I see that now. Supports the environment variables for GCC as well. Sorry - I should have checked the manual first. Actually I did - looked for switches but didn't think about environment variables.
Existed in the binary install I did.
What you will find in the build directory tree is xgpc.exe. If you run "make pascal.install", everything that should be installed will be installed. You will need to do "make pascal.install-with-gcc" if your installed gcc is not version 3.2.1.
Coooll,
Worked - of course you knew it would. I was afraid to try that because I didn't see a gpc.exe and I knew there should be one based on the binary install. Of course I didn't want to goof up my Cygwin Gcc install either so I'm glad you mentioned the "make pascal.install-with-gcc" option. With Cygwin - we are currently at Gcc 3.2-3 and we do have 2.95.3-10 still available as gcc2. We can actually have both operational.
I tried to compile the test programs but I had and error if I just ran make as follows (apparently the summary script has an issue with Cygwins gawk from what I can tell):
$ make
Running the GPC Test Suite. This may take a while ...
rm -f *.dat *.o *.s *.gpm *.gpi *.gpd *.gpc core a.out stderr.out *.exe testmake tmp dummy.c dummy.pas dummy.out diff_cr*.tmp fixcr fixcr.exe rm -f todo/a.out todo/*.exe todo/*.o todo/*.s todo/*.gpm todo/*.gpi todo/*.gpd t odo/core { gpc --version | head -1; gpc --print-search-dirs | grep install | head -1; hos tname || echo "unknown host"; } | \ sed -e 's,^,Testing ,;N;s,\n.*gcc-lib[/], (,;s,[/].*,),;N;s,\n, (,;s,$,),' Testing gpc 20021128, based on gcc-3.2.1 (i686-pc-cygwin) (FPC-ATL-BKNB) echo "gpc -g -O3 -W -Wall -Wundef -Wpointer-arith -Wno-unused " gpc -g -O3 -W -Wall -Wundef -Wpointer-arith -Wno-unused PC="gpc" PFLAGS="--autobuild -g -O3 -W -Wall -Wundef -Wpointer-arith -Wno-unused " SRCDIR="/usr/develop/src/gpc-20021128/p/test/." TEST_MAKE_FLAG=test-make-fl ag "/usr/develop/src/gpc-20021128/p/test/./test_run" "*.pas" | "/usr/develop/src /gpc-20021128/p/test/./test_sum" gawk: cmd. line:42: (FILENAME=- FNR=17) fatal: error reading input file `-': Permission denied make: *** [pascal.check-nomsg] Error 2 /usr/develop/obj/gpc-tests $
and then if I used the option for check-long I only had the following problems:
agettext2test.pas skipped because could not run msgfmt crttest.pas skipped - no curses library found (its cygncurses[version].dll on Cygwin) fjf165a.pas skipped german locale not installed fjf480a.pas skipped librx not installed fjf480b.pas skipped librx not installed fjf480c.pas skipped librx not installed fjf582.pas signal 11 gmptest.pas skipped libgmp not installed longr2.pas skipped no LongReal mathy routines available mod4.pas seemed to hang here and finally I was going to kill the test and I hit CTRL C and everytest up though readc2.pas appeared with OK's except params.pas as documented next params.pas failed ./a regextest.pas skipped librx not installed
I'd say I have pretty good install.
Thanks Professor or Chief (whichever you prefer)
Brian Keener bkeener@thesoftwaresource.com
Brian Keener wrote:
Looking through the manual pages I see that now. Supports the environment variables for GCC as well. Sorry - I should have checked the manual first. Actually I did - looked for switches but didn't think about environment variables.
The corresponding switches are `-B' and `-L', BTW.
I tried to compile the test programs but I had and error if I just ran make as follows (apparently the summary script has an issue with Cygwins gawk from what I can tell):
gawk: cmd. line:42: (FILENAME=- FNR=17) fatal: error reading input file `-': Permission denied make: *** [pascal.check-nomsg] Error 2 /usr/develop/obj/gpc-tests
No idea what this is. You might want to try saving the output of the "long" command to a file and passing this to test_sum, either by:
.../test_sum < file
or
cat file | .../test_sum
Frank
Frank Heckenbach wrote:
Permission denied make: *** [pascal.check-nomsg] Error 2 /usr/develop/obj/gpc-tests
No idea what this is. You might want to try saving the output of the "long" command to a file and passing this to test_sum, either by:
.../test_sum < file
or
cat file | .../test_sum
Thanks Frank,
I simply assumed it might be a difference in the gawk ports but I like your suggestion - I'll give it a shot a see what shakes loose.
Thanks for the switches too.
bk
Frank Heckenbach wrote:
.../test_sum < file
or
cat file | .../test_sum
Hmmm,
Either way I get the following, just what I would expect except the fails are 1 over and the skips are on under based on the output:
/usr/develop/obj/gpc-tests $ cat ./bpkgpctest.log | /usr/develop/src/gpc-20021128/p/test/test_sum TEST agettext2test.pas: msgfmt: not found SKIPPED: could not run msgfmt TEST crttest.pas: SKIPPED: no curses library found TEST daj13.pas: TEST fjf165a.pas: SKIPPED: German locale not installed TEST fjf480a.pas: SKIPPED: librx not installed TEST fjf480b.pas: SKIPPED: librx not installed TEST fjf480c.pas: SKIPPED: librx not installed TEST fjf582.pas: Signal 11 TEST gmptest.pas: SKIPPED: libgmp not installed TEST longr2.pas: SKIPPED: no LongReal math routines available TEST params.pas: failed: ./a TEST regextest.pas: SKIPPED: librx not installed
# of GPC tests 2856 # of GPC tests passed 2844 # of GPC tests skipped 8 # of GPC tests failed 4 /usr/develop/obj/gpc-tests $
but if I just run Make to make the tests I get the error. Oh well - it is working - I might have to dig into just for the learning experience - actually I will bet it is the first error for agettext2test.pas where is displays the message about the msgfmt and then on the next line it says SKIPPED: and another warning about msgfmt - I'll betcha.
Brian Keener wrote:
but if I just run Make to make the tests I get the error. Oh well - it is working - I might have to dig into just for the learning experience -
It might be a difference between shells (bash and command.com), perhaps.
Frank
On 10 Apr 2003 at 18:28, Brian Keener wrote:
[...]
I'd say I have pretty good install.
I'd say so too. I have just built gpc for Cygwin, based on gcc-3.2.2, and the test suite is running okay (I had to run "test_run" manually, because I was getting "error 22" otherwise).
Thanks Professor or Chief (whichever you prefer)
How about "Professor Chief"? ;-)
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/
Prof A Olowofoyeku (The African Chief) wrote:
I'd say so too. I have just built gpc for Cygwin, based on gcc-3.2.2,
I tried some of the newer GCC CVS versions from Cygwin and the 20030323 of GPC but kept getting in over my head. When I started to get close on the 3.2.1 release of gcc and 20021128 for gpc I decided that was the place to be for now.
Thanks Professor Chief ;-)