Thanks for a great compiler to everybody involved! I would like to inform you that I am writing an ebuild script to make gpc available in Gentoo Linux distribution. (http://www.gentoo.org)
In process I found the issue in the subject, thought it might be interesting. If I have "-pipe" in my CFLAGS when compiling gpc the compilation breaks when gpcpp is processing string.pas (removal of -pipe gets rid of the problem). Listing is included at the end of message.
Also, INSTALL instructions say that I might need PDCurses under Linux to compile some crt programs. Is this a build-time dependency (when I compile gpc) or runtime (when I use gpc to compile some programs)? I guess the question is: should I have PDCurses installed when I compile gpc in order to be able to compile crt programs for use under X? Or will gpc pick the library up later when it is installed? What about ncurses, am I limited to terminal-only programs under X then? Thanks.
George
make[2]: Entering directory `/var/tmp/portage/gpc-20020402/work/gcc-2.95.3/gcc/p/rts' ../.././xgpc -B../.././ -c -I. -W -Wall -Wpointer-arith -Wwrite-strings -Wmissing-prototypes -Wmissing-declarations -march=i686 -O2 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-loop-opt -malign-functions=4 -DRTS_RELEASE_STRING="'`cat /var/tmp/portage/gpc-20020402/work/gcc-2.95.3/gcc/p/rts/rts-version`'" --unit-path=/var/tmp/portage/gpc-20020402/work/gcc-2.95.3/gcc/p/rts --automake `cat needed-options` string.pas xgpc: gpcpp:: No such file or directory xgpc: output: No such file or directory xgpc: pipe: No such file or directory xgpc: has: No such file or directory xgpc: been: No such file or directory xgpc: closed: No such file or directory xgpc: gpcpp:: No such file or directory xgpc: output: No such file or directory xgpc: pipe: No such file or directory xgpc: has: No such file or directory xgpc: been: No such file or directory xgpc: closed: No such file or directory gpc1: ../.././xgpc exited with status 1 gpcpp: output pipe has been closed make[2]: *** [string.o] Error 1 make[2]: Leaving directory `/var/tmp/portage/gpc-20020402/work/gcc-2.95.3/gcc/p/rts' make[1]: *** [pascal.rts] Error 2 make[1]: Leaving directory `/var/tmp/portage/gpc-20020402/work/gcc-2.95.3/gcc' make: *** [all-gcc] Error 2
An update:
I got it working, tests compile with 0 failures! (See report output at the end).
I have one question (this is probably for Frank): When gpc is built the gcc backend gets rebuilt. make install (with configure --enable-languages=pascal) will then overwrite few binaries libs and headers from old gcc installation. This I consider undesirable (especially since my understanding is that these binaries and libraries are essentially the same as in native gcc). I went around by deleting newly built files so that nothing gets overwritten. The test results I report are after such install, so it looks like it does work this way. However I would like to know if there are any issues which might come up later.
One clarification is probably necessary: gentoo is a source-based distribution. When gpc is installed it is compiled against existing system following the procedure in install instructions. Thus the result is pretty consistent on every install and the described trick will work if there are no hidden dependencies which are not catched by the test-suite.
This is the list of relevant files which were kept under /usr/bin and /usr/lib: /usr/bin: gpc, gpc-run /usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/: gpc1, gpcpp, SYSCALLS.c.X, libgpc.a; units/* include/gpc-in-c.h (and of course docs, share, info, man etc were preserved)
everything else is deleted at install, so that existing gcc is not touched. Did I forget anything? Should this list be changed somehow? Thanks.
George
Testing GPC 20020402, based on gcc-2.95.3 20010315 (release) (i686-pc-linux-gnu) (groug.home.net) echo "gpc -g -O3 -Wall " gpc -g -O3 -Wall PC="gpc" PFLAGS="--autobuild -g -O3 -Wall " SRCDIR="." "./test_run" "*.pas" | "./test_sum" TEST fjf480a.pas: SKIPPED: librx not installed TEST fjf480b.pas: SKIPPED: librx not installed TEST fjf480c.pas: SKIPPED: librx not installed TEST regextest.pas: SKIPPED: librx not installed
# of GPC tests 2635 # of GPC tests passed 2631 # of GPC tests skipped 4 # of GPC tests failed 0
real 11m41.476s user 8m28.410s sys 2m6.780s
Great job!
George Shapovalov wrote:
I got it working, tests compile with 0 failures! (See report output at the end).
Good.
I have one question (this is probably for Frank): When gpc is built the gcc backend gets rebuilt. make install (with configure --enable-languages=pascal) will then overwrite few binaries libs and headers from old gcc installation. This I consider undesirable (especially since my understanding is that these binaries and libraries are essentially the same as in native gcc). I went around by deleting newly built files so that nothing gets overwritten. The test results I report are after such install, so it looks like it does work this way. However I would like to know if there are any issues which might come up later.
Do `make pascal.install' then. (Currently, it will still overwrite libgcc.a, but I've just changed this for the next release, according to a request by the Chief.) But note that it will only work seamlessly if the installed GCC version is the same (in particular, uses the same directory below gcc-lib), i.e. exactly in the case where `make install' would overwrite its files.
One clarification is probably necessary: gentoo is a source-based distribution. When gpc is installed it is compiled against existing system following the procedure in install instructions. Thus the result is pretty consistent on every install and the described trick will work if there are no hidden dependencies which are not catched by the test-suite.
This is the list of relevant files which were kept under /usr/bin and /usr/lib: /usr/bin: gpc, gpc-run /usr/lib/gcc-lib/i686-pc-linux-gnu/2.95.3/: gpc1, gpcpp, SYSCALLS.c.X, libgpc.a; units/* include/gpc-in-c.h (and of course docs, share, info, man etc were preserved)
SYSCALLS.c.X should not be necessary, and I don't think there's anything GPC related in share. Otherwise, the list looks correct.
Frank
I completed and tested ebuild for gpc-20020402 (rc5) for Gentoo Linux. It has been commited and now is available. Frank, thanks for help!
If there are any gentoo users I would appreciate some testing :). The instructions are pretty standard: 1. unmask the package by commenting out gpc entry in /usr/portage/profiles/package.mask (I will keep it masked for a few days until I am completely sure) 2. emerge gpc
to test it you can unpack gpc tarball and run testsuite (4 tests will be skipped since librx is not installed).
George
George Shapovalov wrote:
Thanks for a great compiler to everybody involved! I would like to inform you that I am writing an ebuild script to make gpc available in Gentoo Linux distribution. (http://www.gentoo.org)
In process I found the issue in the subject, thought it might be interesting. If I have "-pipe" in my CFLAGS when compiling gpc the compilation breaks when gpcpp is processing string.pas (removal of -pipe gets rid of the problem). Listing is included at the end of message.
Try this fix:
--- orig/p/rts/Makefile.in Fri Mar 1 00:44:30 2002 +++ p/rts/Makefile.in Tue Apr 9 10:21:09 2002 @@ -155,8 +155,11 @@
# The Pascal source is not used, but we have to provide any. # `-x Preprocessed-Pascal /dev/null' works as well, except on mingw. -needed-options: error.pas +needed-options: dummy.pas $(PC) $(RTS_CFLAGS) $(GPC_FLAGS) --print-needed-options "$<" 2> "$@" || true + +dummy.pas: + touch "$@"
$(GPCLIB): $(OBJS) -rm -f $(GPCLIB)
Also, INSTALL instructions say that I might need PDCurses under Linux to compile some crt programs. Is this a build-time dependency (when I compile gpc) or runtime (when I use gpc to compile some programs)? I guess the question is: should I have PDCurses installed when I compile gpc in order to be able to compile crt programs for use under X? Or will gpc pick the library up later when it is installed?
The latter.
What about ncurses, am I limited to terminal-only programs under X then?
ncurses programs run on terminals only (e.g., console, xterm). PDCurses produces native X11 programs on Unix.
Frank