Experimental BlitzMax NG installer script

Archives Forums/Linux Discussion/Experimental BlitzMax NG installer script

dawlane(Posted 2016) [#1]
Well folks I've been scripting again, but this time I've knock up something to make building BlitzMax NG easier. It's still a work in progress, so be warned! you should test it out in virtual box.

You can get it here.
md5check: da1094eaeb1b8b4ab5f56240a4f87fc4

Usage:
If you use sudo on any of the commands apart from the one with the parameter fix. Then it will run the dependency install script for a base distribution.
To just download and build the vanilla BlitzMax from git-hub
./blitzmas-install.sh

To build BlitzMax NG there are two ways
Download and build just enough to get BlitzMax NG built.
./blitzmas-install.sh ng
Just use an installed BlitzMax version and don't bother downloading (NOTE not retested this yet)
./blitzmas-install.sh ng "/path-to-vanilla-installed-blitzmax"
Build both the git vanilla BlitzMax and the BlitzMax NG versions.
./blitzmas-install.sh both


If, for some reason the build was interrupted and you used sudo. Then you need to fix the file permissions with
sudo ./blitzmax-install.sh fix
If it was downloading or extracting an archive; then you will have to delete the files in the directories package and the directories bah.mod,BlitzMax and BlitzMax NG.

Enjoy.


Derron(Posted 2016) [#2]
Your download contains a user (you) specific hidden file ".directory".

Regardless of this minor-minor it works like a charm here for vanilla/original.

BTW: The NG-64bit-build stalls here:
[ 62%] Compiling:glew.bmx.debug.linux.x64.c
(which might be an issue with NG-64bit and the module's sources)
Takes a big bit of time until it continues - so be warned :-p


Little suggestion:
Of course I tried to build NG too but it does the whole thing again. I mean: it skips downloading vanilla (because already there) but it still does a complete module-rebuild (release, debug and mt) just to be able to compile the ng toolchain...
a) only rebuild release modules
b) directly use a NG-bmk which auto builds modules on demand

Spelling bee cries for help in line 103: "Retrievingq $3".

Ah ... and once you used "bmk ng" you could use "-quick" to make compilation a bit faster (disables some file lookups).



Hmm, do not get above's criticism wrong: good work!


bye
Ron


dawlane(Posted 2016) [#3]
Hidden file, well that's the Dolphin file browser for you. I will have to knock up an auto clean up script for those before compressing as that settings file tends to get around a bit.

The script is only ment to up a run once affair. You either pass ng or both as a parameter. I will play around with it when I get some time.


Derron(Posted 2016) [#4]
Rebuilding bmk as a threaded 64 bit executable
[ 52%] Compiling:waitpid.c
[ 86%] Processing:bmk_cores_linux.bmx
Illegal instruction
~>Unhandled Exception:Build Error: failed to compile /home/ronny/Downloads/install_scripts/BlitzMax_NG/src/bmk/bmk_cores_linux.bmx

Hmm, seems like an BMK issue then.


@ Autoclean

zip -9 \
 -x '*/.git/*' \
 -x '*/*.bak' \
 -x '*/.gitignore' \
 -x '*/.DS_Store' \
 -r ../$OUTPUTNAME *

A similar thing for your gzip should do well (above was a snipped of my "create-release-zip"-script.


@ playing around and "run once affair"
No hurry. We have all the time we want. I just tried to follow your "steps" and the 3) and above parts sounded as if it was an additional step to call the installer with "ng" param.



bye
Ron


dawlane(Posted 2016) [#5]
Rebuilding bmk as a threaded 64 bit executable
[ 52%] Compiling:waitpid.c
[ 86%] Processing:bmk_cores_linux.bmx
Illegal instruction
~>Unhandled Exception:Build Error: failed to compile /home/ronny/Downloads/install_scripts/BlitzMax_NG/src/bmk/bmk_cores_linux.bmx

What distribution are you currently using Ron? Vanilla bmk has got a few problems building any release build with a number of later distribution versions. Not sure whats causing that, but making core dumps and a dose of printf's keep showing the problems with bbStringFromUTF8String, bbStringFromShorts and bbStringNew. I don't think that its GC related and possibly more gcc optimisation related. The while loop in bbStringFromUTF8String on Debian 8 screws up the size to pass to bbStringFromShorts, but appears to be a GC problem on Ubuntu.
It's either that or Brucey has broken something, but today's build work perfectly.

Another issue is with later releases of freetype on a 64 bit distribution expecting to find header files in /usr/include/i386-linux-gnu when non exist.


Derron(Posted 2016) [#6]
ronny@RonnyPC ~ $  cat /etc/*-release
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=17.3
DISTRIB_CODENAME=rosa
DISTRIB_DESCRIPTION="Linux Mint 17.3 Rosa"
NAME="Ubuntu"
VERSION="14.04.3 LTS, Trusty Tahr"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 14.04.3 LTS"
VERSION_ID="14.04"


PS: I have read about that bbStringFrom... thing in another thread already. Hmm


Bye
Ron


dawlane(Posted 2016) [#7]
Right just uploaded a new set of scripts.

Linux Mint 17.3 doesn't suffer from the release build issue, but Linux Mint 18 does. So there should be no problems with with Linux Mint 17. I would suspect that anything new than Ubuntu 14.04 (gcc 4.8 if I remember) would have the problem.

All multi-thread stuff has been removed. It builds single thread releases unless it's one of the problem distributions. Then it will build the basic debug version of vanilla bcc and bmk to get BlitzMax NG going with release builds.