Pascal | 30 Jan 18:46 2016
Picon

Re: GPC compile on Mac OS X 10.10.5?

Hello Tom,

If ever you consider a port to an another language, I suggest Ada.
Ada is issued from Pascal with strong type checking and more.
(www.ada2012.org)
It is an ISO standard.
I port all my Pascal programs to Ada since 2000 and I'm very happy with it.
I used P2Ada: http://p2ada.sourceforge.net.

I have some exemples on my web site (in French).
Feel free to ask questions if you are interested in.

Regards, Pascal.
http://blady.pagesperso-orange.fr

> Le 27 janv. 2016 à 22:08, gpc-request <at> gnu.de a écrit :
> 
> Date: Wed, 27 Jan 2016 14:11:59 -0500
> From: Schneider <schneidt <at> mail.nih.gov>
> To: <samiam <at> moorecad.com>
> Cc: gpc <at> gnu.de
> Subject: Re: GPC compile on Mac OS X 10.10.5?
> Message-ID: <20160127191159.GA73206 <at> FR-W-C132678.ncifcrf.gov>
> Content-Type: text/plain; charset="us-ascii"
> 
> Scott:
> 
>> What was wrong with getting a p2c translation (just curious). You
>> only have to do the translation once, then you code in C after that.
> 
(Continue reading)

Schneider | 27 Jan 20:25 2016
Picon

Re: GPC compile on Mac OS X 10.10.5?

Scott:

> On another subject entirely, Do you publish your programs, ie., are
> they available somewhere?

https://alum.mit.edu/www/toms/delila/delilaprograms.html

Note that alum.mit.edu/www/toms points to the current location of my
website, so if you use that it should always work even if my website
moves again.

> I'd be interested in large ISO 7185 compliant programs for compiler
> testing. Strict ISO 7185 programs are kinda rare.

The only exception is that some programs need the date and time.  They
all use a procedure called getdatetime which is compiler specific.

I have several programs named time*.p for different compilers.  They
contain 'modules' for the time functions.  Long ago I recognized that
insertion methods were not standard in Pascal, so I wrote a program -
'module' https://alum.mit.edu/www/toms/delila/module.html - which can
transfer chunks of text between Pascal programs.  So I use module to
transfer the time modules into a program and then they compile.

Other than the time modules, I can't guarantee that they are all
"strict ISO 7185 programs" but I try to stick to the original Wirth
definition.  So if you set aside the programs that contain
'getdatetime' it would be a pretty clean set.

You could also use the timenul.p program to neuter any program.
(Continue reading)

samiam | 26 Jan 21:14 2016

RE: GPC compile on Mac OS X 10.10.5?

So side question if you have some time.

What features were you using outside of the ISO 7185 standard
with GPC?

Scott A. Franco (no relation to James)
-------- Original Message --------
Subject: Re: GPC compile on Mac OS X 10.10.5?
From: Schneider <schneidt <at> mail.nih.gov>
Date: Mon, January 11, 2016 5:04 pm
To: Adriaan van Os <adriaan <at> microbizz.nl>
Cc: gpc <at> gnu.de

Adriaan:

> >*I'm on the new Mac OS X 10.10.5 and I've lost my gpc compiler.*
> Sorry, were to busy to reply, but will

I'm struggling with this loss and am seriously considering abandoning
the Mac entirely. Any chance you will get back to this?

Thanks,

Tom

Thomas D. Schneider, Ph.D.
Senior Investigator
National Institutes of Health
National Cancer Institute
Center for Cancer Research
Gene Regulation and Chromosome Biology Laboratory
Molecular Information Theory Group
Frederick, Maryland 21702-1201
https://schneider.ncifcrf.gov (current link)
https://alum.mit.edu/www/toms (permanent link)

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc
_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc
Schneider | 12 Jan 02:04 2016
Picon

Re: GPC compile on Mac OS X 10.10.5?

Adriaan:

> >*I'm on the new Mac OS X 10.10.5 and I've lost my gpc compiler.*
> Sorry, were to busy to reply, but will

I'm struggling with this loss and am seriously considering abandoning
the Mac entirely.  Any chance you will get back to this?

Thanks,

Tom

  Thomas D. Schneider, Ph.D.
  Senior Investigator
  National Institutes of Health
  National Cancer Institute
  Center for Cancer Research
  Gene Regulation and Chromosome Biology Laboratory
  Molecular Information Theory Group
  Frederick, Maryland  21702-1201
  https://schneider.ncifcrf.gov (current link)
  https://alum.mit.edu/www/toms (permanent link)

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc

Schneider | 14 Nov 05:39 2015
Picon

Re: GPC compile on Mac OS X 10.10.5?

Adriaan:

> > >*I'm on the new Mac OS X 10.10.5 and I've lost my gpc compiler.*
> > Sorry, were to busy to reply, but will

I'm seriously hung without gpc ... Any chance you'll be able to fix
it?

Tom

  Thomas D. Schneider, Ph.D.
  Senior Investigator
  National Institutes of Health
  National Cancer Institute
  Center for Cancer Research
  Gene Regulation and Chromosome Biology Laboratory
  Molecular Information Theory Group
  Frederick, Maryland  21702-1201
  https://schneider.ncifcrf.gov (current link)
  https://alum.mit.edu/www/toms (permanent link)

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc

Gayle Lee Fairless | 6 Oct 21:41 2015

GNU Pascal Compiler 64-bit version

Has the 64-bit version of the GNU Pascal Compiler been done by your student?

Some time ago I got the 32-bit version installed into RedHat Cygywin running
under Windows.

Thanks for the information!

Sincerely,
(Mr.) Gayle Lee Fairless
fairless <at> ieee.org
fairless <at> fsfe.org

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc

Picon

compiling gpc on Mac OS 10.10.5 Yosemite

Dear GPCers:

I recently was forced to upgrade to Yosemite and lost my GPC compiler.

I tried to compile according to

* GNU Pascal 3.4.6u4 compiler sources and double-clickable building script (for Mac OS X 10.3 - 10.6) (22.2 MB)

and got:
% build-gpc.command
setenv GPC_BUILD_TOOLS 1
setenv GPC_BUILD_GP 1
setenv GPC_BUILD_GPC_SOURCES 1
setenv GPC_BUILD_GPC_CLEAN 1
setenv GPC_BUILD_GPC_CONFIGURE 1
setenv GPC_BUILD_GPC 1
setenv GPC_BUILD_GPC_DYLIB 1
setenv GPC_BUILD_GPC_CLEAN_CROSS 1
setenv GPC_BUILD_GPC_CONFIGURE_CROSS 1
setenv GPC_BUILD_GPC_CROSS 1
setenv GPC_BUILD_GPC_DYLIB_CROSS 1
setenv GPC_BUILD_GPC_DOCS 1
setenv GPC_BUILD_TESTSUITE 0
setenv GPC_BUILD_PACKAGE 0
setenv GPC_BISON bison-2.3
setenv GPC_FLEX flex-2.5.35
setenv GPC_HELP2MAN help2man-1.36.4
setenv GPC_SED sed-4.1.4
setenv GPC_GCC 3.4.6
setenv GPC_GCC_DIFF gcc-3.4.4.diff
setenv GPC_SNAPSHOT gpc-20070904
setenv GPC_PDF gpc-20070904.pdf
setenv GPC_RELEASE 346u4
setenv GPC_PACKAGE 3.4.6u4
setenv GPC_FPSAVE fpsave-20051224
setenv GPC_GP gp-0.61
setenv GPC_DIR /Developer/Pascal
setenv GPC_GPC gpc346u4
setenv GPC_DYLIB 346u4
setenv GPC_CONTACT -- Please contact Adriaan van Os at <gpc <at> microbizz.nl>
setenv GPC_OSX_VERSION `uname -r`
uname -r
switch ( 14.5.0 )
unset echo

Unforeseen version of Mac OS X. -- Please contact Adriaan van Os at <gpc <at> microbizz.nl>

-----

Adriaan has not responded for several days.

I don't see how to get a binary.

Has anyone migrated to 10.10.5?  How do I do this?

Thanks,

Tom Schneider

  Thomas D. Schneider, Ph.D.
  Senior Investigator
  National Institutes of Health
  National Cancer Institute
  Center for Cancer Research
  Gene Regulation and Chromosome Biology Laboratory
  Molecular Information Theory Group
  Frederick, Maryland  21702-1201
  schneidt <at> mail.nih.gov
  http://schneider.ncifcrf.gov (current link)
  http://alum.mit.edu/www/toms (permanent link)

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc

Gayle Lee Fairless | 20 Jan 03:58 2015
Picon

finding recipe for x86_64 or x86 or Cygwin or MingW or whatever will work

    I installed Cygwin onto an Alienware M17x-R3 running Windows 7 and
also downloaded various files from http://www.gnu-pascal.de/ to add
Pascal to the list of compilers.
gayle <at> weirdcat ~/Documents
$ gcc --version
gcc (GCC) 4.9.2
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

gayle <at> weirdcat ~/Documents

I successfully ran the classic Hello World program under C.

However I have been unable to install Gnu Pascal Compiler although I
believe I have followed the instructions in the manual.  I have tried
both software installation and direct use of a binary file.

I have gpc source files, too.  I also downloaded the source files for
gcc 3.2.3 and gcc 3.4.3 because the manual seems to indicate that I
should compile against a version that produces a standard compiler.  I
have the gpc source file:  gpc-20060325/.

I got as far as the makeinfo file in the manual.  Here is the tail of a
verbose output from makeinfo:

gayle <at> weirdcat ~/Documents
$ tail verbosemakeinfo.txt
checking for .preinit_array/.init_array/.fini_array support... no
checking if mkdir takes one argument... no
*** Configuration x86_64-unknown-cygwin not supported
Reaping losing child 0x6000bba30 PID 9292
Makefile:23335: recipe for target 'configure-gcc' failed
make: *** [configure-gcc] Error 1
Removing child 0x6000bba30 PID 9292 from chain.

gayle <at> weirdcat ~/gpc-build
$

gayle <at> weirdcat ~/Documents

	I have also attempted to install gcc-3.4.3 with the suffix modifier. The output from make with the -d and -i
switches is also available.

	Should I specify a different host, target, etc.?

 What ingredients am I missing to complete the recipe?

    Thank you for your help and your time!

        Sincerely,
        (Mr.) Gayle Lee Fairless
        fairless <at> ieee.org
        fairless <at> fsfe.org

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc

Waldek Hebisch | 10 Jan 03:11 2015
Picon

Re: gdb-patches RFA: Fix pascal behavior for class fields

> Pierre Muller wrote:
> > 
> > It compiles if you put a 'program' statement at the beginning, and
> > change a.check(b) to assign the function result,
>   I tried this,
> but here is what I get after your changes:
> $ gpc  test-class-pascal.pas
> test-class-pascal.pas:4: error: undeclared identifier `class' (first use in
> this routine)
> test-class-pascal.pas:4: error:  (Each undeclared identifier is reported
> only once
> test-class-pascal.pas:4: error:  for each routine it appears in.)
> test-class-pascal.pas:6: error: undeclared identifier `x' (first use in this
> routine)
> test-class-pascal.pas:6: error: syntax error before `,'
> 
> Pierre <at> d620-muller ~/pas/test
> $ gpc --version
> gpc 20050331, based on gcc-3.4.4 (cygming special, gdc 0.12, using dmd
> 0.125)
> Copyright (C) 2005 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.  There is NO
> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
> 
> Is it because I am using version 3.4.4?

gcc version is not a problem.  But your gpc is too old: classes are
supported starting from gpc-20051104 (the next version after the one
you tried).

> The problem is that I did not find any system 
> with easy installation of GPC,

AFAICS old Debian binaries should work on new systems.  In 2012
Peter Blackman generated Debian/Ubuntu package (IIRC it was
at launchpad).

>  Anyhow, by using objects instead of classes, I was able to compile the
> modified program,
> and it turns out that GPC is using 'Self' for the hidden 
> object name for stabs debugging, so that the problem probably does not apply
> to
> GPC compiled sources.
> 

Classes are transformed by GPC into pointers to objects, so
there is small difference.  Attacheched is assembler output
from gpc-20070904 using '-fextended-syntax -gstabs -O -S'
as options.

--

-- 
                              Waldek Hebisch
hebisch <at> math.uni.wroc.pl 
Attachment (test-class-pascal.s): application/octet-stream, 9 KiB
_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc
Prof Abimbola Olowofoyeku | 9 Jan 12:23 2015

Re: gdb-patches RFA: Fix pascal behavior for class fields

On 8 Jan 2015 at 23:12, Pierre Muller wrote:

> For gpc mailing list:
[...]
> 
>   The problem is that GPC and Free Pascal support several
> 
> pascal 'dialects'. But this requires command line options.
> 
> 
> 
>   The -Mobjfpc option is required for Free Pascal compiler
> 
> to understand class type definition, but is rejected in default mode.
> 
> 
> 
>   I expect GNU GPC to also reject class in 'normal' mode...
> 
> Maybe someone on the gpc mailing list knows if classes are supported
> 
> by GPC and if it requires a special compiler option.
> 
> 
> 
> Pierre Muller
> 
> 
> 
> FYI: Here is the example code that is included in the bug report.
> 
> 
> 
> $ cat ~/pas/test/test-class-pascal.pas
> 
> 
> 
> type
> 
>   TA = class
> 
>   public
> 
>   x, y : integer;
> 
>   constructor Create;
> 
>   function check(b : TA) : boolean;
> 
>   destructor Done; virtual;
> 
> end;
> 
> 
> 
> constructor TA.Create;
> 
> begin
> 
>   x:=-1;
> 
>   y:=-1;
> 
> end;
> 
> 
> 
> destructor TA.Done;
> 
> begin
> 
> end;
> 
> 
> 
> function TA.check (b : TA) : boolean;
> 
> begin
> 
>   check:=(x < b.x);
> 
> end;
> 
> 
> 
> 
> 
> 
> 
> var
> 
>   a, b : TA;
> 
> 
> 
> begin
> 
>   a:=TA.Create;
> 
>   b:=TA.Create;
> 
>   a.x := 67;
> 
>   a.y := 33;
> 
>   a.check (b);
> 
> end.

Supply "--extended-syntax" and GPC will accept "class" (and if you are 
going to use "Result" then you will need to add "--implicit-result"). 

However, I do not believe that the "class" will be treated much 
differently from a bog-standard Borland Pascal "object" - for example, 
not having (or not calling) a constructor will not crash the program 
(as it should do, with Delphi-style classes).

Best regards, The Chief
--------
Prof. Abimbola A. Olowofoyeku (The African Chief) 
web:  http://www.greatchief.plus.com/

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc

Pierre Muller | 9 Jan 08:46 2015
Picon

RE: gdb-patches RFA: Fix pascal behavior for class fields

 Hi Peter,

> >   The problem is that GPC and Free Pascal support several
> >
> > pascal 'dialects'. But this requires command line options.
> >
> >
> >
> >   The -Mobjfpc option is required for Free Pascal compiler
> >
> > to understand class type definition, but is rejected in default mode.
> >
> >
> >
> >   I expect GNU GPC to also reject class in 'normal' mode...
> >
> > Maybe someone on the gpc mailing list knows if classes are supported
> >
> > by GPC and if it requires a special compiler option.
> >
> >
> >
> > Pierre Muller
> >
> >
> >
> > FYI: Here is the example code that is included in the bug report.
> >
> >
> >
> > $ cat ~/pas/test/test-class-pascal.pas
> >
> >
> >
> > type
> >
> >   TA = class
> >
> >   public
> >
> >   x, y : integer;
> >
> >   constructor Create;
> >
> >   function check(b : TA) : boolean;
> >
> >   destructor Done; virtual;
> >
> > end;
> >
> >
> >
> > constructor TA.Create;
> >
> > begin
> >
> >   x:=-1;
> >
> >   y:=-1;
> >
> > end;
> >
> >
> >
> > destructor TA.Done;
> >
> > begin
> >
> > end;
> >
> >
> >
> > function TA.check (b : TA) : boolean;
> >
> > begin
> >
> >   check:=(x < b.x);
> >
> > end;
> >
> >
> >
> >
> >
> >
> >
> > var
> >
> >   a, b : TA;
> >
> >
> >
> > begin
> >
> >   a:=TA.Create;
> >
> >   b:=TA.Create;
> >
> >   a.x := 67;
> >
> >   a.y := 33;
> >
> >   a.check (b);
> >
> > end.
> >
> >
> >
> >
> >
> >
> >
> > _______________________________________________
> > Gpc mailing list
> > Gpc <at> gnu.de
> > https://www.g-n-u.de/mailman/listinfo/gpc
> 
> It compiles if you put a 'program' statement at the beginning, and
> change a.check(b) to assign the function result,
  I tried this,
but here is what I get after your changes:
$ gpc  test-class-pascal.pas
test-class-pascal.pas:4: error: undeclared identifier `class' (first use in
this routine)
test-class-pascal.pas:4: error:  (Each undeclared identifier is reported
only once
test-class-pascal.pas:4: error:  for each routine it appears in.)
test-class-pascal.pas:6: error: undeclared identifier `x' (first use in this
routine)
test-class-pascal.pas:6: error: syntax error before `,'

Pierre <at> d620-muller ~/pas/test
$ gpc --version
gpc 20050331, based on gcc-3.4.4 (cygming special, gdc 0.12, using dmd
0.125)
Copyright (C) 2005 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Is it because I am using version 3.4.4?
The problem is that I did not find any system 
with easy installation of GPC,
and finally tested it on an old Cygwin installation
which had GPC, but it's version 3.4.4

> ie as
> 
> 
> VAR OK : Boolean;
> ...
> OK := a.check(b);
> 
> 
> No special command line switches are needed.
> 
> 
> 
> Program test;
> 
> type
>   TA =
>   class
>     public
>       x, y : integer;
>     constructor Create;
>     function check(b : TA) : boolean;
>     destructor Done; virtual;
>  end;
> 
> constructor TA.Create;
> begin
>   x:=-1;
>   y:=-1;
> end;
> 
> destructor TA.Done;
> begin
> end;
> 
> function TA.check (b : TA) : boolean;
> begin
>   check:=(x < b.x);
> end;
> 
> var
>   a, b : TA;
>   OK : boolean;
> 
> begin
>   a:=TA.Create;
>   b:=TA.Create;
>   a.x := 67;
>   a.y := 33;
>   OK := a.check (b);
> end.

 Anyhow, by using objects instead of classes, I was able to compile the
modified program,
and it turns out that GPC is using 'Self' for the hidden 
object name for stabs debugging, so that the problem probably does not apply
to
GPC compiled sources.

Thanks Peter

Pierre Muller

_______________________________________________
Gpc mailing list
Gpc <at> gnu.de
https://www.g-n-u.de/mailman/listinfo/gpc


Gmane