Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

setting up to compile C code in PASE

337 views
Skip to first unread message

Steve Richter

unread,
Oct 4, 2015, 1:40:10 PM10/4/15
to
How do I go about installing the GCC C compiler on the IBM i? I want to compile and run C code in PASE.

thanks,

CRPence

unread,
Oct 4, 2015, 7:27:19 PM10/4/15
to
On 04-Oct-2015 11:40 -0600, Steve Richter wrote:
> How do I go about installing the GCC C compiler on the IBM i?
> I want to compile and run C code in PASE.

From the web search
[https://www.google.com/search?q=install+gcc+%20ibm+i+%20+OR+%20iseries%20+OR+%20as400%20],
the following URL was the first result presented to me, and seems of
possible interest in answering the inquiry:

[http://yips.idevcloud.com/wiki/index.php/PASE/GCC]
"_gcc_

A quick script to help install gcc on IBM i. This information is offered
“as is”.

_wwwinstallgcc.sh_ — download
[http://yips.idevcloud.com/wiki/uploads/PASE/wwwinstallgcc.sh]

gcc on IBM i
------------
Installing gcc

Thanks to Michael Perzl’s fantastic site (_perzl.org_
[http://www.perzl.org/aix/], IBM i binaries of many OpenSource projects
are available. Though, prior to installing gcc you need to prepare your
system according to _Open Source Binaries_
[http://yips.idevcloud.com/wiki/index.php/PASE/OpenSourceBinaries] (you
don’t need to install any packages using wwwinstall.sh – this script
points to the old IBM binaries).

Once you’ve prepared your system according to the wiki’s instructions,
run _wwwinstallgcc.sh_
[http://yips.idevcloud.com/wiki/uploads/PASE/wwwinstallgcc.sh] (also
copied to /QOpenSys/download) in a PASE shell (CALL QP2TERM) to install
gcc and all its prereqs. Using --all as the sole argument will do the
trick. To see the complete syntax, call this script without any arguments.

..."

--
Regards, Chuck

lae...@gmail.com

unread,
Oct 5, 2015, 12:53:16 PM10/5/15
to
On Sunday, October 4, 2015 at 7:27:19 PM UTC-4, CRPence wrote:
> On 04-Oct-2015 11:40 -0600, Steve Richter wrote:
> > How do I go about installing the GCC C compiler on the IBM i?
> > I want to compile and run C code in PASE.
>
> From the web search
> [https://www.google.com/search?q=install+gcc+%20ibm+i+%20+OR+%20iseries%20+OR+%20as400%20],
> the following URL was the first result presented to me, and seems of
> possible interest in answering the inquiry:
>
> [http://yips.idevcloud.com/wiki/index.php/PASE/GCC]
> "_gcc_
>
> A quick script to help install gcc on IBM i. This information is offered
> "as is".
>
> _wwwinstallgcc.sh_ -- download
> [http://yips.idevcloud.com/wiki/uploads/PASE/wwwinstallgcc.sh]
>
> gcc on IBM i
> ------------
> Installing gcc
>
> Thanks to Michael Perzl's fantastic site (_perzl.org_
> [http://www.perzl.org/aix/], IBM i binaries of many OpenSource projects
> are available. Though, prior to installing gcc you need to prepare your
> system according to _Open Source Binaries_
> [http://yips.idevcloud.com/wiki/index.php/PASE/OpenSourceBinaries] (you
> don't need to install any packages using wwwinstall.sh - this script
> points to the old IBM binaries).
>
> Once you've prepared your system according to the wiki's instructions,
> run _wwwinstallgcc.sh_
> [http://yips.idevcloud.com/wiki/uploads/PASE/wwwinstallgcc.sh] (also
> copied to /QOpenSys/download) in a PASE shell (CALL QP2TERM) to install
> gcc and all its prereqs. Using --all as the sole argument will do the
> trick. To see the complete syntax, call this script without any arguments.
>
> ..."
>
> --
> Regards, Chuck

It is not that easy for me.

The instructions say to download a tar file. download-2.0.tar.
http://yips.idevcloud.com/wiki/index.php/PASE/OpenSourceBinaries

Do I put that on the 400 and then run what to unpack it?


Buck

unread,
Oct 5, 2015, 10:13:20 PM10/5/15
to
On Monday, October 5, 2015 at 12:53:16 PM UTC-4, lae...@gmail.com wrote:
> It is not that easy for me.
>
> The instructions say to download a tar file. download-2.0.tar.
> http://yips.idevcloud.com/wiki/index.php/PASE/OpenSourceBinaries
>
> Do I put that on the 400 and then run what to unpack it?

I did this very long ago, in the V4 time frame, before the YiPS made it easier. Easier, but not as easy as RSTLICPGM.

A tar file is like a ZIP file. Tar stands for Tape ARchive, and it is unpacked with the tar command. I don't have a machine in front of me but if PASE doesn't have tar, you might consider installing it the same way you'd install GCC.

There are alternatives. You could install Linux on a PC, or live boot it from a CD, or install Cygwin on a PC and use the tar that comes with any of those environments. Untar the file on the PC and then put the resulting directory tree up on PASE where you can work on it.

One advantage to installing Cygwin (for example) is that you can exactly follow the directions to untar, make and make install right on the PC. That way you get to practice working with GNU open source without worrying about doing something ugly in PASE.

Hope this gets you started.

If you can wait until the end of November, IBM are releasing GCC as part of 7.1 TR11 and 7.2 TR3.
--buck

lae...@gmail.com

unread,
Oct 6, 2015, 5:16:37 PM10/6/15
to
thanks for the info. Good idea on getting gcc running on a PC first.

Got tar working. Picking up how the .sh files work. Would be nice if the .sh script could be run in debug. Step thru the code and correct problems as they appear. With an option to cancel or retry the instruction.

Still not working for me. But I guess I will get it working at some point.

Buck

unread,
Oct 6, 2015, 8:47:30 PM10/6/15
to
On Tuesday, October 6, 2015 at 5:16:37 PM UTC-4, lae...@gmail.com wrote:
> thanks for the info. Good idea on getting gcc running on a PC first.
>
> Got tar working. Picking up how the .sh files work. Would be nice if the .sh script could be run in debug. Step thru the code and correct problems as they appear. With an option to cancel or retry the instruction.

If I really need to debug a shell script I use an editor like Notepad++ to edit the script. Sprinkle echo statements where I'm getting stuck. For instance echo "Variable cmd=$cmd"; that sort of thing.
--buck
0 new messages