Menu

Hello again 64 bit linux - goodbye again 64 bit linux

2018-08-29
2018-09-09
  • Scott Franco

    Scott Franco - 2018-08-29

    Because I work mostly in Linux these days (it is actually my job, after all), I decided a while back to warm up the 64 bit Linux installation of Pascal-P, which was done quite a while ago and left after getting it to produce the "hello world", and not much else. The idea was that if I could that that environment up, I would not need to switch back to Windows so much. My work desktop rarely leaves Linux mode nowdays (mainly to cover incompatabilities between Windows and Linux word processors, but that is another story).

    The good news is I discovered several bit dependent issues. The bad news is that, even though I got it all working, I am leaving the environment for Windows yet again. Why?

    Basically, the reliance on GPC for a compile host is still an issue on that system. Installing 64 bit GPC on linux (Ubuntu 14.04 LTS, in fact) is doable but a major pain in the rear, replete with unexplainable fixes and the need to support a sad, downrev gcc so that the GCC and GPC install matches. This last death of the thousanth cut is really enough to basically kill the shooting match, because I have to use my machines as kernal compile engines, and that means able to host modern software.

    However, more than this, the fact is that getting GPC to work on a current Linux, much less on the Mac OS (which used to work but no longer does) is a very touchy operation. Its bad enough on Windows, but doing that for other environments is basically an inexplicable series of steps. To that end, I have reminded myself several times that my aim here is not to become a repairman for GPC installations, but rather to get beyond the need for GPC at all.

    Finally, an unfortunate aspect of Linux in general is that trying to drag an older version of the OS along with newer application software does not seem to be a good idea. It is not stable, and crashes several times a day, which I cannot tolerate. My work desk build environment is Ubuntu 18.04 LTS and rock solid, so I know it can work. But here you have this downrev GPC requiring everything else to be downrev with it.

    Anyways, here now in the last series of patches is 64 bit capability in addition to the 32 bit capability on Windows. For what it's worth, since nobody but me can use it, and even I cannot at present.

     
  • Scott Franco

    Scott Franco - 2018-09-09

    And of course, having written 64 bit linux/GPC off, right after that I was able to get it working. Now it is fast becoming my mainstream working platform. I do plan to update the documentation, but first, I'll post the instructions here.

    First of all, Ubuntu's update process does not, sorry, work. I was afraid to directly wipe out the existing 14.04 LTS installation because I did a lot of work to get GPC to run on it, and didn't want to start over. So I noticed that Ubuntu would update all the way from 14.04 to 18.04 if you do it in a series of steps. Doing that, however, took an ubuntu implementation that was already crashing frequently and made it unbearable. After wiping it out and performing a scratch install of 18.04 LTS, however, I found it ran fine on my aging main machine.

    Then what I found was that the 64 bit version of GPC/Linux could be installed and then given the fix I discovered back in 14.04 LTS and it now runs fine. It even runs alongside a modern gcc 7 install, which is something of a wonder to me really, since I know it is using some of its libraries. GPC was designed to work with gcc of about 4.6, so you will forgive me if I am amazed that it can work with gcc 7 libraries.

    The other question is why 64 bit? Well, I did try to install a 32 bit toolset for GPC, but it was the death of a 1000 cuts. Yes, I know it is technically possible, but trying to make it work with an old compiler (GPC) was really too much work. I decided that, since I was able to get a 64 bit compiler up and running, I might as well go for the inevitable adaption of P5/P6 to a 64 bit environment now.

    So how to do it? Its a two step process. I recommend you start with the latest version of Ubuntu, 18.04 LTS. Anything else and you are on your own.

    A prebuilt package of 64 bit GPC for linux can be found here:

    http://rpm.pbone.net/index.php3/stat/4/idpl/33822565/dir/scientific_linux_other/com/gpc-20070904-185.1.x86_64.rpm.html

    (which by the way bears the name Trevor Blight, a P5 contributor)

    Download and install that.

    Now add the following line to your startup file, usually .bash_aliases:

    LIBRARY_PATH="/usr/lib/x86_64-linux-gnu:/usr/lib/gcc/x86_64-linux-gnu/7:/usr/lib/x86_64-linux-gnu"
    export LIBRARY_PATH

    This was done with gcc version 7 in mind. You will need to substitute the current version for the "7" above for other versions.

    That's pretty much it. Run the usual:

    . setpath
    ./configure
    make

    To get it set up.

     

    Last edit: Scott Franco 2018-09-11

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.