Scott:
> >I don't understand the difference between p4 and p5. I see p6
> >is under development. If I try it, should I use:
>
> Pascal-P4 is a Pascal subset. Pascal-P5 is full ISO 7185. Pascal-P6
> is an extended Pascal. P5 is 1.3, so yes, pascal-p5_1_3.tar.gz.
Ok, thanks!
I got
https://sourceforge.net/projects/pascalp5/files/pascal-p5_1_3.tar.gz/downlo…
There is no mention of macOS in the README.
The README says:
> The full instructions for running and setting up the P5 compiler/interpreter
> have all been incorporated into the document:
>
> doc/the_p5_compiler.docx
>
> Which is a Microsoft Word document, 2007 or later. it is also available in the
> formats:
>
> doc/the_p5_compiler.pdf Adobe Portable Document Format.
> doc/the_p5_compiler.html Web page format.
> doc/the_p5_compiler.doc Word 1997-2003 format.
>
> Please consult one of these documents for full instructions on how to use P5.
But that's not true. The doc/ diretory only contains:
The_Programming_Language_Pascal_1973.pdf
basic.docx
iso7185rules.html
the_p5_compiler.docx
The_Programming_Language_Pascal_1973.pdf
is great to have a copy of!
I used libreoffice to convert to pdf:
/Applications/LibreOffice.app/Contents/MacOS/soffice -env:UserInstallation=file:///tmp/schneidt.lico --headless --convert-to pdf basic.docx
> 2 Beta software warning
> p5 Basic is beta software at this time (version <1).
> It should not be considered reliable for production use.
Oh my. Looks like your documentation may be out of date.
Is this still beta despite version > 1?
Convert the other docx:
/Applications/LibreOffice.app/Contents/MacOS/soffice -env:UserInstallation=file:///tmp/schneidt.lico --headless --convert-to pdf the_p5_compiler.docx
This one is dated August 29, 2014 and on page 14 it says:
> Is P5 a sueable compiler for real applications? I would assert that
> it is not.
That's no good!
> ./setpath
> ./configure
> make
% ./setpath
./setpath: Permission denied.
You have the windows setpath.bat but have not set the permissions on
setpath correctly.
% chmod u+x setpath
egg 320% ./configure
./configure: Command not found.
% chmod a+rx configure
% ls -l configure
-rwxr-xr-x 1 schneidt admin 6469 Jan 5 2018 configure*
% ./configure
./configure: Command not found.
%
This is really weird.
Please set it up to work on macOS.
Tom
Thomas D. Schneider, Ph.D.
Senior Investigator
National Institutes of Health
National Cancer Institute
Center for Cancer Research
RNA Biology Laboratory
Biological Information Theory Group
Frederick, Maryland 21702-1201
schneidt(a)mail.nih.gov
https://alum.mit.edu/www/toms
Scott:
> I fixed up the line endings and put the archive back in Pascal-p5_1_3.tar.gz.
>
> It works better,but there is still something wrong with it, and it only happens
> on the linux version.
>
> I'll look into it.
I'm glad you are making progress.
Do you think this will work on macOS?
Tom
Thomas D. Schneider, Ph.D.
Senior Investigator
National Institutes of Health
National Cancer Institute
Center for Cancer Research
RNA Biology Laboratory
Biological Information Theory Group
Frederick, Maryland 21702-1201
schneidt(a)mail.nih.gov
https://alum.mit.edu/www/toms
Gale/Scott:
> > egg 320% ./configure
> > ./configure: Command not found.
> >
> > % chmod a+rx configure
> > % ls -l configure
> > -rwxr-xr-x 1 schneidt admin 6469 Jan 5 2018 configure*
> > % ./configure
> > ./configure: Command not found.
> > %
> >
> > This is really weird.
>
> Are you running MacOS 10.15?
>
> The default shell was changed from bash to zsh. I don't know if a clean install of 10.15 gives you just zsh and NO bash but if that is the case then the:
>
> #!/bin/bash
>
> in the configure script file can't find a working bash shell to orrectly execute the script.
>
> To check, open up Terminal and type in and execute the command "bash" [without the ""'s]. If you have a bash shell installed you'll get something like:
>
> bash-3.2$
>
> or some variation of that depending on the version of bash installed.
A great point. I'm not running Apple macOS 10.15 yet on the machine
I'm doing this. So bash is there. I looked on my 10.15 machine and
it gives a warning about "The default interactive shell is now zsh."
but does run bash 3.2.
So that's not the problem. I figured it must be deeper into the code.
Then, using vim to look at the configure file I discovered that
it is a dos file. I used my very handy wtch program
https://alum.mit.edu/www/toms/delila/wtch.html
to find out "what characters are in a file". This program shows the
characters being used. It has saved me many many times over the
years.
It confirmed that the file lines have control-M on them.
Apparently a line with just a control-M gets interepreted by bash
as a weird command that it cannot find.
I removed all control-Ms (with my 'no-m' or 'nom' script,
http://users.fred.net/tds/lab/ftp/nom)
Now the no-m copy nomconfigure runs:
% nomconfigure
*** No flip was found
flip does not exist, has PATH been set up?
attempting to make it
nomconfigure: ./bin/make_flip: /bin/bash^M: bad interpreter: No such file or directory
*** Unable to make flip
*** No ip_pascal was found
So there are other errors.
p5c is not ready for use on macOS.
Tom
Thomas D. Schneider, Ph.D.
Senior Investigator
National Institutes of Health
National Cancer Institute
Center for Cancer Research
RNA Biology Laboratory
Biological Information Theory Group
Frederick, Maryland 21702-1201
schneidt(a)mail.nih.gov
https://alum.mit.edu/www/toms
Scott:
> Yes, I use 64 bit GPC, my P5 site contains instructions to install it and a binary. The latter is because
> the online .tz is missing, so I just provide the binary. It also needs some setup fixes these days.
Wait, what??? I need a Pascal compiler that runs on macOS. GPC no
longer works on macOS. If P5 depends on GPC, then I can't use it!
Tom
Thomas D. Schneider, Ph.D.
Senior Investigator
National Institutes of Health
National Cancer Institute
Center for Cancer Research
RNA Biology Laboratory
Biological Information Theory Group
Frederick, Maryland 21702-1201
schneidt(a)mail.nih.gov
https://alum.mit.edu/www/toms
Scott:
I'm just looking for Pascal compilers that run on macOS. My programs
follow the original compilers in which the files listed at the top of
the program are directly read and written to by the Pascal program.
GPC used to do this. P2C (which I maintain apparently) translates to
C and then provides this. I don't know what ISO that corresponds to.
> For your second point, I assume you are talking about the
> Pascal-P1-P6 thing? (not sure I understand your point about "name
> change breaks the code")
I write scripts that call compilers with the parameters needed to
compile my programs. If the name of the compiler changes then the
scripts break. For example, if the Unix 'ls' command were named ls763
and then a new version were named ls764 lots of code would break.
> Can Pascal-P be used on the Mac? Well, actually yes. Pascal-P6
> includes sufficient tooling to port without GPC (see the interpreter
> written in C). I don't really push that capability because P6 is
> still in development, and also because interpreters are not really
> my thing (yes, I know that sounds funny). I like compilers. To me
> interpreters are more of a fun toy than not, although I note that
> there is a group pushing interpreters as "VM"s for professional use.
> Pascal-P5 has actually been written up as such. Again, not bad, just
> not my thing.
Ok, maybe when P6 is stablized and GPC independent it can be used to
compile on macOS.
> I should mention there is a branch from P5 known as P5c that that
> changed the compiler into a Pascal to C translator that accomplishes
> porting in a different way. You would have to look into that
> yourself, I'm not really up to speed on that.
That's interesting, thanks.
https://sourceforge.net/projects/pascal-p5c/
Tom
Thomas D. Schneider, Ph.D.
Senior Investigator
National Institutes of Health
National Cancer Institute
Center for Cancer Research
RNA Biology Laboratory
Biological Information Theory Group
Frederick, Maryland 21702-1201
schneidt(a)mail.nih.gov
https://alum.mit.edu/www/toms
Scott:
> > FPC certainly qualifies as a cross platform OS, and I believe it
> > runs well on MacOS??
>
> It does run, but because they have a legacy of bells and whistles it
> doesn't comple vanilla Pascal from 1982 (ISO 7185?)
> "
> I'd like some more details on that. I have very extensive testing
> services with Pascal-P5, and FPC passes, or did pass, my ISO 7185
> tests.
It's been a while. For my program to directly access files in the
local diretory I have a script that adds assignments. These are
non-standard as I understand it (that is, they would differ by
differenting operating systems). There were some special compiler
directives. They were incorporating things and maybe the latest
version (which I have not gotten) is easier to compile with. I would
have to dig around to find more details.
> You can also just compile your stuff with Pascal-P5. As mentioned,
> it is perhaps the most rigorous test of ISO 7185 compliance you will
> find today.
I see I have a directory for P4. Apparently I played with it in 2015
according to my notes. This is from my notes [2015 Nov 17]:
> http://homepages.cwi.nl/~steven/pascal/p4c.tar.gz
> Lots of errors. FUBAR.
I also have a directory for p5c ... and we communicated in 2016!
You asked if it would be ok to put copies of my code online (yes).
You mentioned:
https://sourceforge.net/projects/pascalp5/
I don't understand the difference between p4 and p5. I see p6
is under development. If I try it, should I use:
https://sourceforge.net/projects/pascalp5/files/pascal-p5_1_3.tar.gz/downlo…
> You sound like a pretty advanced user of ISO 7185 Pascal, we should
> keep in touch.
I'm not particularly 'advanced' - I just have a large legacy of Pascal
programs that I use for understanding a fundamental theory of biology.
> I am at samiam(a)moorecad.com.
Ok.
Tom
Thomas D. Schneider, Ph.D.
Senior Investigator
National Institutes of Health
National Cancer Institute
Center for Cancer Research
RNA Biology Laboratory
Biological Information Theory Group
Frederick, Maryland 21702-1201
schneidt(a)mail.nih.gov
https://alum.mit.edu/www/toms
> Hmm, is this your work https://sourceforge.net/p/pascalp5/ ?
What is this? I looked into the README and it says:
"You need a working gpc implementation."
I'm looking for a replacement for GPC on macOS since GPC no longer
works there. How would pascalp5 be useful for anything if it depends
on GPC which doesn't work on macOS?
Also, why is the name of the program changing instead of a version number?
This will break code everytime you change the name!
Tom
Thomas D. Schneider, Ph.D.
Senior Investigator
National Institutes of Health
National Cancer Institute
Center for Cancer Research
RNA Biology Laboratory
Biological Information Theory Group
Frederick, Maryland 21702-1201
schneidt(a)mail.nih.gov
https://alum.mit.edu/www/toms
Dear GPC Collaborators,
PROBLEM: MacOS 10.15 does not run 32-bit binaries. My application uses 30k lines of GPC code. The MacOS GPC is 32-bit only.
MY FAILURE ON MACOS: The current GPC is compatible with the back-end of GCC 3.4.6 only. The procedure on all platforms is to compile gcc3.4.6 with the GPC sources. With a variety of C-compilers on MacOS (CLANG, GCC-4.9, GCC-5, and GCC-8), I can produce the two cross-compiler executables xgcc and xgpc. These are x86_64 executables. They both compile "Hello World", but they produce only 32-bit objects. When I pass "-m64", they say "Sorry: 64-bit not compiled in". I try building GCC 3.4.6 alone with:
config --target=x86_64-apple-darwin
make
But I get, "Configuration x86_64-apple-darwin16.7.0 not supported". When I apply the same procedure to the GCC 4.9.4 sources, the build proceeds. The GCC 3.4.6 sources support 64-bit targets on Linux, so I was hoping it could do the same on MacOS. I have examined the GCC literature and the contents of gcc/config, but I still don't know what file should be present to provide x86_64 support on apple-darwin. Unless someone tells me otherwise, I'm going to assume that getting the 64-bit MacOS GPC out of GCC 3.4.6 is impossible.
Translating all my beautiful, reliable GPC code into another language does not sound like fun. Porting GPC to a newer version of GCC, such as GCC 8, is a possibility, but I understand that the GCC back-end team has a history of being uncooperative with the GPC team. Another solution is to port GPC to LVVM so we can use the CLANG compilers. The LVVM strategy seem like a good one to me: produce platform-independent code that then gets compiled and assembled. If I understand correctly, a CLANG front-end will work on any platform.
I would like to hear your advice. I have to solve this problem. I have allocated one thousand hours of my time to get it done. If there is a way to revive GPC with that amount of labor, I'll do it.
Best, Kevan
--
Kevan Hashemi, Electrical Engineer
Physics Department, Brandeis University
http://www.bndhep.net