SGI: Development

Pascal - Page 1

very last line on the page :

http://www.freepascal.org/future.html
Well, you could always go for GNU Pascal (gpc), http://www.gnu-pascal.de/gpc/h-index.html
Several (5 or 6) years ago, I worked on that compiler and even in those days it ran on IRIX.

I know Debian has a package of it for MIPS/Linux so it's probably still possible to build it on IRIX. I wouldn't know; I haven't used Pascal in years...
how to make it to work under Irix ?
i got a lot of errors because crt1, crtbegin, etc are missing

(edit:
and things put into the wrong place)
ivelegacy wrote: how to make it to work under Irix ?
i got a lot of error because libraries are missing

e.g. crt1, crtbegin, etc

well then search your cds :P
r-a-c.de
CDs ? which CD ? the GNU Pascal Compiler is not built in any CD !

i have downloaded the binary archive from its repo, and there are too many missing libraries about its RunTime. I am able to compiler a pascal source into assembly, then … i miss a lot of symbols

have you installed GPC ? does it work ? if so, tell me what you have done, else way i will try to recompile from scratches.
ivelegacy wrote: CDs ? which CD ? the GNU Pascal Compiler is not built in any CD !

you said you're a developer so you know the difference between each part of a compiler e.g. frontend etc.
r-a-c.de
foetz wrote: you said you're a developer so you know the difference between each part of a compiler e.g. frontend etc.


Not to rain on ivelegacy at all, but he seems to not understand English the best, so I think he's not getting that he's missing dependencies for GNU Pascal off the CDs for IRIX, but Pascal itself isn't on the CDs of course. Kinda Development 1O1 here for IRIX.
SGI:
:A3502L: Dual Itanium [email protected] 4GB Marisa
:Octane2: Dual [email protected] 2GB V12 Sakuya
Non-SGI:
HP C8000
HP EliteBook 8560p [email protected] 16GB Youmu FreeBSD 10.1/Windows 8.1
IBM IntelliStation 265 Dual [email protected] Jigoku-Karasu ( Hell Raven )

Incoming/On bench for repair/not in service:
2x :O3x0: Origin 300

For Sale: O2 DIMMS, Octane and O2 caddies.
These guys claim to be porting Freepascal to the MIPS architcture, could be worth a shot. Me, I've never even seen a line of Pascal! :mrgreen:

http://sourceforge.net/projects/fpc-mips/
Project:
Temporarily lost at sea...
Plan:
World domination! Or something...
TeamBlackFox wrote: but Pascal itself isn't on the CDs of course


it is not, also i have asked if someone has ever tried the binary provided here .
Btw, now i am trying to recompile GPC from scratches, using gcc-core + gpc.

@vishnu
i haven't checked it yet, but i will, It's very good, i simply like pascal and i'd like to have it on Irix. Just to explain how much i like pascal .. i can tell that i have bought a copy of Borland Turbo Pascal and i have installed it into a dos virtual machine. Simply amazing language. I also love ADA which … looks like pascal (and modula2), but … Ada is too difficult to be compiled (you need a bootstrap), so I have put ADA on my PowerPC/gentoo laptop (using a GNAT overlay) but i can't have the same for my MIPS router simply because i do not have a MIPS bootstrapped, i mean GNAT does not have it.

Code: Select all

SRC_URI="ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-core-${PV}.tar.bz2
ftp://gcc.gnu.org/pub/gcc/releases/gcc-${PV}/gcc-ada-${PV}.tar.bz2
ppc?   ( mirror://gentoo/gnatboot-${BOOT_SLOT}-ppc.tar.bz2 )
x86?   ( mirror://gentoo/gnatboot-${BOOT_SLOT}-i386.tar.bz2 )
amd64? ( mirror://gentoo/gnatboot-${BOOT_SLOT}-amd64.tar.bz2 )"


(i have a bootstrap for arm-le, sooner or later i will use it)

It should be wonderful to be able to write a pascal compiler or interpreter that does not need any other tool to be compiler. A bit of time ago i started a tiny project that aims to mime the pascal, so i have realized a tiny interpreter that looks like pascal. Very reduced features and not completed yet.

it's a toy, written in C++, and rewritten in ANSI C. I will improve it, sooner or later (if i will learn something more from the " dragon book ")
I was taught pascal as a predecessor to C, C++, it's quite cute, but I never touched it again.
-----------------------------------------------------------------------
Hey Ho! Pip & Dandy!
:O2: :1600SW: :O2: :1600SW: :Octane2: :1600SW: :1600SW: :Octane2: :Octane: :Indy: :540:
try ADA, try GNAT :mrgreen:
Avionics industries are using it, i was using it in my previous job for aircraft control unit tests.
ADA is a bit pedantic, but amazing and really safe.

I have seen a kernel written in ADA: still shocked X_____X

it seems there is gnat for Irix. Not tested yet.
TeamBlackFox wrote: I think he's not getting that he's missing dependencies for GNU Pascal off the CDs for IRIX, but Pascal itself isn't on the CDs of course

and exactly that is the same for all the unix flavors including linux. compilers always need certain additional stuff from the os that's not installed by default usually so every developer knows that no matter his native language. real language that is not the programming language :P

anyway ivelegacy, bottom line is whatever is missing in this case is likely part of the dev packages hence my hint to check out whatever dev cds you have :-)
r-a-c.de
I took Pascal back in the 80s while in school and then later when Turbo Pascal came out for Windows. I really like the language but sadly only do some Python coding to support the commercial software we have a work. I'd be interested in any progress you make.

For the record, I have two IRIX ADA CDs: 1) ADA95 Compiler 1.1 (says GNAT_dev 1.1 and GNAT_eoe 1.1) and 2) Workshop ADA Extensions 1.1.

I acquired them a long while ago when a friend was going to do some coding in ADA but that project fell through.

I haven't tried to install them so I don't know what if anything might be missing.

I'd be happy to send them to someone who will provide a better home and use them.

thegoldbug
thegoldbug
:ChallengeXL: :ChallengeXL: :ChallengeXL: :OnyxR: :ChallengeL: :ChallengeL: :ChallengeL: :ChallengeL: :Onyx: :O200: :Fuel: :Fuel: :Octane2: :Octane: :Octane: :Octane: :Octane: :Indigo2IMP: :Indigo2IMP: :Indigo2IMP: :Indigo2IMP: :O2: :Indigo2: :Indigo2: :Indigo2: :Indigo2: :320: :320: :320: :320: :Indy: x5 :Indy: x2 :1600SW: x5 :Indigo: x7
Vault L, 6-1200s, Fibre Hub, Dials, Boards, spares, 3 Sun Blade 2000s, Sun Fire V480, 2-Hero 2000 Robots, 5-Hero 1 Robots
ivelegacy wrote: try ADA, try GNAT :mrgreen:
Avionics industries are using it, i was using it in my previous job for aircraft control unit tests.
ADA is a bit pedantic, but amazing and really safe.


I do automotive firmware and we use CoDeSys which is very similar syntactically to pascal (targeting EV supervisory controllers, similar to an automotive BCM or PLC-type machines).

My one complaint is that while I don't have anything against hungarian notation, our target libraries use "systems" type, not "apps" type hungarian notation. So what I do is both, type prefix first and then a more useful prefix (typically whatever the name of the interfacing node is, my controller has to interface with many different nodes on the network,etc). Further reading: http://www.joelonsoftware.com/articles/Wrong.html

I think to the average programmer it would seem very clumsy, but it IS very safe, and a lot of these conventions force you to work slowly and deliberately, they were designed that way. You get used to it.

The Codesys is freely available, it is an implementation of IEC 61131-3
http://www.codesys.com
You eat Cadillacs; Lincolns too... Mercurys and Subarus.
Turbo Pascal is like a whole different language, without all the extensions Pascal is a lot less useful.
:PI: :O2: :Indigo2IMP: :Indigo2IMP:
i wonder if anyone has GnuPascalCompier aka GPC installed under Irix 6.5.

also llvm-pascal , may be ..
about GPC, i haven't understood which library should contain these symbols

Code: Select all

ld32: ERROR   33 : Unresolved text symbol "_p_stdout" -- 1st referenced by hallo.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: ERROR   33 : Unresolved text symbol "_p_write" -- 1st referenced by hallo.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: ERROR   33 : Unresolved text symbol "_p_InOutRes" -- 1st referenced by hallo.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: ERROR   33 : Unresolved text symbol "_p_check_inoutres" -- 1st referenced by hallo.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: ERROR   33 : Unresolved text symbol "_p_stdin" -- 1st referenced by hallo.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: ERROR   33 : Unresolved text symbol "_p_read" -- 1st referenced by hallo.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: ERROR   33 : Unresolved text symbol "_p_atexit" -- 1st referenced by hallo.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: ERROR   33 : Unresolved text symbol "_p_doinitproc" -- 1st referenced by hallo.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: ERROR   33 : Unresolved text symbol "_p_initialize" -- 1st referenced by hallo.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: ERROR   33 : Unresolved text symbol "_p_finalize" -- 1st referenced by hallo.o.
Use linker option -v to see when and which objects, archives and dsos are loaded.
ld32: INFO    152: Output file removed because of error.
collect2: ld returned 2 exit status



/usr/nekoware/lib/gcc/mips-sgi-irix6.5/3.4.6/* does not contain
/usr/freeware/lib/gcc-lib/mips-sgi-irix6.5/3.3 does not contain

the binary GPC ends with this result

Code: Select all

gpc hallo.pas

ld32: FATAL   9  : I/O error (crtend.o): No such file or directory
collect2: ld returned 32 exit status



(yes, hEllo, but i prefer hAllo)

toying with gpc, i have realized it really misses these symbols

all.c

Code: Select all

void _p_write()
{
printf("_p_write()\n");
}

void _p_check_inoutres(){}
void _p_read(){}
void _p_atexit(){}
void _p_doinitproc(){}
void _p_initialize(){}
void _p_finalize(){}
void _p_InOutRes(){}
void _p_stdin(){}

void _p_stdout()
{
printf("_p_stdout()\n");
}


hallo.pas

Code: Select all

Program Lesson1_Program1;
Begin
Write('hallo World. Prepare to learn PASCAL!!');
Readln;
End.


gpc -static --big-endian -c hallo.pas
gcc -c all.c
gcc hallo.o all.o -o hallo

# ./hallo
_p_write()


so i wonder where evil are these symbols

/usr/local/lib/gcc-lib/mips-sgi-irix6.5/2.95.2/
libgcc.a -> does not contain
libgpc.a -> does not contain
ivelegacy wrote: about GPC, i haven't understood which library should contain these symbols
[...]
the binary GPC ends with this result

Code: Select all

gpc hallo.pas

ld32: FATAL   9  : I/O error (crtend.o): No such file or directory
collect2: ld returned 32 exit status


Well, it's telling you that it can't find the crtend.o file, which is likely where you'll find the needed symbols defined. So the real question is, where is the crtend.o file?

Since the hint that foetz gave you earlier in the thread didn't seem to help, I'll be more blunt: you'll need the "Development Foundation" and "Development Libraries" CDs from the full Irix install set. There are many things on those CDs that are required in order to have a fully functional compiler. It doesn't matter if it's a C compiler or Pascal, from SGI or an open source one. They all need the same development foundation and libraries installed from the operating system CD set.
:Indigo2IMP: :Octane: :Indigo: :O3x0:
Sun SPARCstation 20, Blade 2500
HP C8000
jpstewart wrote: Since the hint that foetz gave you earlier in the thread didn't seem to help, I'll be more blunt: you'll need the "Development Foundation" and "Development Libraries" CDs from the full Irix install set.


i have already installed Development Foundation and Development Libraries, and as result you can see gcc and MIPSpro are perfectly fully working ( i have already recompiled things with them, without any issues) while GPC has been installed from an external binary repository and seems to require these special symbols

Code: Select all

_p_write
_p_check_inoutres
_p_read
_p_atexit
_p_doinitproc
_p_initialize
_p_finalize
_p_InOutRes
_p_stdin
_p_stdout


do you know which library contain them ? _p_write seems a bit uncommon to me. Btw, let me check again.

as i was thinking the GPC's run time system (RTS) defines a function `_p_write' which is responsible for all output to text files. The C source is in`rts/rts-write.c'. I can't se the RTS library in the IRIX dev CDs. Can you see it ?
I am interested in Pascal for programming, but I do not know why. :)
What can I do with it on a SGI machine?