Raspberry Jam [Release 0.18]

Community Forums/Showcase/Raspberry Jam [Release 0.18]

Brucey(Posted 2014) [#1]
** NEWS **
RELEASE 0.18

We are happy to release the latest alpha build of the (completely unofficial) Raspberry Pi edition of BlitzMax.

Latest official builds can be found here : https://github.com/bmx-ng/bmx-ng/releases

This build includes the latest bcc, bmk, docmods, and makedocs binaries, and the BlitzMax documentation.
Also, for the first time, we are releasing MaxIDE for Raspberry Pi based on GTKMaxGUI with integrated Scintilla editing (because we like line numbers!).

** NEWS **

It's my favourite flavour you know, so I thought I'd post this, just because it brings together two of my favourite things...


(the other thing would be BlitzMax)

It's (more than) a bit unstable at the moment, but as you can see in the in the main window, it just compiled and ran a program to print "Hello World".

bcc and bmk (the build apps) were cross-compiled on OS X, then ftp'd to the Pi. Then all the modules (BRL, PUB, MaxGUI) were re-built natively there, as well as my GTK libs. Finally, maxide was compiled natively on the Pi.

As mentioned, it's rather unstable at the moment. But it is so on OS X too, and given how large and complex maxide is (in the scheme of things), I'm still somewhat happy that it runs at all ;-)
bcc and bmk are also reasonably complex apps, and they are performing well as native ARM apps. Compiling is somewhat slow though - which I believe is generally down to disk access speed rather than the processor specifically.

Still no graphics-based games for the foreseeable future without an OpenGL ES friendly graphics driver, but I'm sure that will come at some point.

Anyways... I know how you all like pictures of things, even if they aren't (yet) working very well...

:o)


Guy Fawkes(Posted 2014) [#2]
So basically Python in Blitzmax? SWEET =D


Derron(Posted 2014) [#3]
Quote: Guy Fawkes
So basically Python in Blitzmax? SWEET =D


Awww..uhmm. yes.

Did you even read what Brucey wrote? Or did you just look at the picture, recognizing the python icon on the top left?


Brucey posted his success on porting the new BlitzMax compiler ("BCC NG") to ARM based systems: in this case RasPI. As people like to see images, he posted that screenshot: showing a MaxIDE running on an ARM processor and the successful compilation of a bmx-sample (hello world).

For you even more "clearly stated":
BEFORE: Mac, Linux, Win
AFTER: Mac, Linux, Win, ARM (RasPI, maybe Android)

Before your next answer is: "sweet, games for android": up to now no graphics output is possible with the new "target", as eg. RasPI support OpenGL ES and not the basic OpenGL, so one has to write a new driver for Max2D (et. al.) or a completely new graphics package (compatible with modules like TImage).


@Brucey
congrats ... next big step is done :D.

Compilation times are highly depending on file-access-times. Compiling in my Virtual machines takes longer than on real ones, compiling over LAN takes way longer - except on my MicroXP which really has low network share access times.)
Maybe there will be time in the future to measure what takes so long to compile on these machines - think it is the cache check (locate file, exists file? outdated file? ...).


bye
Ron


xlsior(Posted 2014) [#4]



Henri(Posted 2014) [#5]
@xlsior: ^-^One of my alltime favourite movies.

@Brucie: Yes, pictures are always nice and good to see you are making progress too:-)


-Henri


BlitzSupport(Posted 2014) [#6]

Compiling is somewhat slow though - which I believe is generally down to disk access speed



Might be worth setting up a RAM disk on your main machine, shared, with correct permissions, so the Pi can build from there instead...

Here are some Windows RAM disks, though I know you aren't big on Windows!

https://www.raymond.cc/blog/12-ram-disk-software-benchmarked-for-fastest-read-and-write-speed/

I use ImDisk (slightly awkward interface) but Passmark OSFMount 1.5 was pretty good too IIRC.

I'm sure it'd be easy enough on Mac, and Linux is dead easy -- I used this on my server.


Derron(Posted 2014) [#7]
Problematic part isn't the speed of the discs itself, it is the way one accesses files (eg. SMB-Shares). Speed between the diskimage of virtualBox (coming from my hdd) and SMB accessing a public folder on the same hdd was differing. the diskimage won (multiple times faster).

Of course the compiler is slower too - but there are multiple factors cumulating to the overall compilation time.


bye
Ron


BlitzSupport(Posted 2014) [#8]
Fair enough -- I know that BlitzMax/Win32 builds way faster (for BMX builds anyway, and for IDE startup) if you copy it (and your project) to a RAM disk.

Interestingly, though, I just tried rebuilding 250 MB+ of modules (plenty of Brucey-wrapped C/C++ stuff in there), from both hard disk and RAM disk, and the build times were almost exactly the same -- just over 7 minutes!

It's definitely much faster on plain BMX, but it does appear that you're right when it comes to building tons of little C/C++ files, and of course the network can only make that worse.

(I did actually try building Monkey stuff from RAM a while back, and got similar results, which now seems rather unsurprising, given it's mainly gcc doing the grunt work in both cases.)

So... scrap that idea!


degac(Posted 2014) [#9]
Congratulations!!!

@Derron: you can create games.... well text game I think ! Or just 'guess the number' so everyone is happy!

Seriously, this is really a *big* step: creating a 'new' compiler (or translator or whatever you want to call it), checking everything, compiling a language designed (well at this point!) for 'ancient' ISA.
Something to be proud!

Question:
at this stage BMAX-NG (...) could 'runs' a server on that ARM-machines? What also it will possible to compile? (Honest question I have no informations about RasPI & co and 'real' use for it - excluding experimentation and personal fun).


skidracer(Posted 2014) [#10]
I ordered a model b+ after reading this thread.


Derron(Posted 2014) [#11]
Good to read .. hope you enjoy fiddling around with raspi and bmx-ng. (People sometimes need something to tinker with ..maybe something useful is created out of it).


bye
Ron


Panno(Posted 2014) [#12]
fantastic !


zzz(Posted 2014) [#13]
Still no graphics-based games for the foreseeable future without an OpenGL ES friendly graphics driver, but I'm sure that will come at some point.


I mailed you something if you have the time to check it out regarding this.


Brucey(Posted 2014) [#14]
Anyone here with a Raspberry Pi that would like to test a small websockets server?

Download is here : rpi_websockets_test.tar.gz 378 KB
(It was built on Raspbian, if that makes any difference? - I have no idea)
Linux raspberrypi 3.6.11+ #474 PREEMPT Thu Jun 13 17:14:42 BST 2013 armv6l GNU/Linux


Unzip in a folder somewhere, and run the test_server :
./test_server


Once it's running, point your browser to port 7681. You should be able to draw on the canvas.
Now, if you open another browser to the same page, you can see your drawing in one appear on the other, using the magic of websockets.
(probably easier if your Pi is on a network... as mine is. Dunno how good the browsers *on* the Pi are).

The test_server is one of the examples in my BaH.libwebsockets module, compiled natively on the Pi.

... the other part of the demo is meant to show a counter (at the top of the webpage), but it wasn't working for me in my test. Instead it shows a URL - whether this was because I wasn't on the same machine or not, I'm not sure. YMMV :-p

The demo itself is running pretty stable here. I've connected several browser instances to it at the same time, and it appears to cope fine with them.

So, what do we get from all this? Not terribly exciting things, other than the fact that it shows an example of BlitzMax, third-party libraries, on the Raspberry Pi.


PhotonTom(Posted 2014) [#15]
That sounds great :)


Brucey(Posted 2014) [#16]
Ooops... I forgot the obligatory "screenshot"... haw
pi@raspberrypi ~/BlitzMax/mod/bah.mod/libwebsockets.mod/examples $ ./test_server
[1406662626:0517] NOTICE: Initial logging level 7
[1406662626:0530] NOTICE: Library version: 1.3 6c58228577306c023b072b5c7c7a2b044a94f12a
[1406662626:0547] NOTICE:  static allocation: 4436 + (12 x 1024 fds) = 16724 bytes
[1406662626:0565] NOTICE:  canonical_hostname = raspberrypi
[1406662626:0575] NOTICE:  Compiled without SSL support
[1406662626:0593] NOTICE:  per-conn mem: 100 + 1360 headers + protocol rx buf
[1406662626:0609] NOTICE:  Listening on port 7681


:-p


skidracer(Posted 2014) [#17]
Installing B+ now with raspbian?. It's failed twice but I 'm hoping that my TV USB port wasn't up to it so am using xbox as usb power source for third attempt. [ edit ] I'm up! first code compiled and run:

main.cpp
#include <stdio.h>
#include <EGL/egl.h>

int main()
{
	printf("hullo\n");
	EGLDisplay display;
	display=eglGetDisplay(EGL_DEFAULT_DISPLAY);
	printf("display=%d\n",display);
	return 0;
}


CMakeLists.txt
cmake_minimum_required(VERSION 2.8)

project("testegl")

include_directories(
  /opt/vc/include
  /opt/vc/include/interface/vcos/pthreads
)

add_executable(testegl main.cpp)

find_library(EGL_LIB EGL /opt/vc/lib)
find_library(GLES_LIB GLESv2 /opt/vc/lib)

target_link_libraries(testegl ${EGL_LIB} ${GLES_LIB})



Brucey(Posted 2014) [#18]
We've been busy with the Pi this weekend. My 7 year old step-son and I have been doing some "science experiments" using one of these kits to create some traffic light sequences with LEDs, resistors, and buttons.
Everything is wired into the GPIOs on the the Pi, and controlled by a BlitzMax program using my BaH.wiringPi mod ;-)

Here's an example LED blinking program :
superstrict

framework bah.wiringpi

wiringPiSetup 

pinmode 0, PM_OUTPUT

while true

	digitalWrite 0, HIGH

	delay 500

	digitalWrite 0, LOW

	delay 500
wend


BlitzMax is fun and educational :-)

Release
This is the latest bcc and bmk that I'm using on the Pi : BlitzMax_rpi_bcc.0.15.tar.gz 1.2 MB

The BRL and PUB mods are available from : https://github.com/bmx-ng

You probably can't "build all" modules, because of issues with the GL modules, but if you want to do a quick test :
./bmk makemods -a brl.blitz
./bmk makemods -a brl.standardio

and then you can build a basic app with
./bmk makeapp -a -r -o /path/helloworld path/helloworld.bmx

where helloworld.bmx is
SuperStrict

Framework BRL.Standardio

Print "Hello World!"


Can't remember what dev libs I installed...


skidracer(Posted 2014) [#19]
Choice! Thanks Brucey!

libs used: libasound2-dev libpulse-dev libx11-dev

mods removed: glew.mod glgraphics glmax2d opengl

makemods: debug complete, release... complete!

mods begun: raspi.eglgraphics raspi.eglmax2d


Brucey(Posted 2014) [#20]
mods begun: raspi.eglgraphics raspi.eglmax2d

Oh my... I'm glad someone knows what they're doing!

EGL can in theory also work with iOS and Android?


BlitzSupport(Posted 2014) [#21]

mods begun: raspi.eglgraphics raspi.eglmax2d


Ooh...


skidracer(Posted 2014) [#22]
I got my first segfault this morning, which signals <pun> the official start of this project for me:)


Derron(Posted 2014) [#23]
I think segfaults are the fetishes of coders.

Doesnt EGL work on desktops too? Should speed up experimenting/development process then.


@Skidracer
Hope you already bought the "B+" variant - or at least one of the now-cheaper-B's.


bye
Ron


Brucey(Posted 2014) [#24]
Doesnt EGL work on desktops too?

Would a shader-based OpenGL module be more efficient on desktop than the current one? (for those systems that support such a thing, obviously)


Derron(Posted 2014) [#25]
I think everything affecting the render pipeline could come in handy (even if you are enforced to manually start a batch and end it). But I do know nothing about that, so skip my post if it just contains nonsense.


bye
Ron


skidracer(Posted 2014) [#26]
EGL is native to the new Wayland window manager so hopefully it will be relevant there. Android support looks pretty likely also for these mods if bcc-ng is as cool as it seems after initial play.

Apple support, meh, objective c boilerplate code required, unless of course there was an easy way of connecting to a webgl context...


skidracer(Posted 2014) [#27]
Initial release of the egl modules project is up.

https://max-edit.googlecode.com/svn/trunk/mod/raspi.mod

max2d commands supported: 2

Here is the test example code which is included and runs and turns your pi into a soothing light panel. Not tested under X and my setup has a few patches to brl.system which shouldn't be needed.

Framework raspi.EGLMax2D
Import brl.StandardIO

Print "EGL test suite version 0.1"

Global modecount=GraphicsModes().length

Print "Modes="+modecount

Local defaultMode:TGraphicsMode

For Local mode:TGraphicsMode=EachIn GraphicsModes()
	If Not defaultMode defaultMode=mode
	Print ""+mode.width+","+mode.height+" at "+mode.hertz+"hz"
Next

Print "Default Display Test"

Graphics defaultMode.width,defaultMode.height

Print "Press Escape to Exit"

Local t=0

While Not KeyHit(KEY_ESCAPE)
	t=t+1
	Local r=50+100*Sin(t*0.02)
	Local g=50+100*Sin(t*0.2)
	Local b=50+100*Sin(t*0.01)
	SetClsColor r,g,b
	Cls
	Flip
	Delay 200
Wend



Brucey(Posted 2014) [#28]
Exciting stuff!

However, raspi.mod doesn't appear in your online repo yet ;-)


therevills(Posted 2014) [#29]
Isnt this it Brucey?

https://code.google.com/p/max-edit/source/browse/#svn%2Ftrunk%2Fmod%2Fraspi.mod


Brucey(Posted 2014) [#30]
That's the thing! Thanks :-)

I was just going off the URL skid posted, which appears to stop at revision 149 (current, as of this post, appears to be 156)


Derron(Posted 2014) [#31]
Wasn't visible for me too ... think that link uses some klind of cache or so (normally I would assume the "viewer" to use cached data).

Maybe its a good time to move stuff to github :p (Sorry for "offtoping").

Glad to see EGL starting off ... Brucey needs thing to play with so he keeps encouraged to code things. Even more glad that there seem people taking some workload away from him.


bye
Ron


Brucey(Posted 2014) [#32]
Even more glad that there seem people taking some workload away from him

Yay ;-)

I finished the exception handling implementation last night... so now it should unwind the stack correctly if you attempt to Exit or Continue from a Try statement whilst inside a loop :-p

Also created a Pub.OpenGLES module, which is now up on github, that you may want to use instead of that egl.bmx, skid. It's a port of the gl2 header, which should have all the correct args defined for ES.


skidracer(Posted 2014) [#33]
Awesome, thanks Brucey. Am looking forward to your next release. Any chance of a MaxIDE binary for raspi?

Hosting EGL in a window looks interesting, some links:

weston on pi (already installed?) http://wayland.freedesktop.org/raspberrypi.html
wl sample source: http://code.metager.de/source/xref/freedesktop/wayland/weston/clients/simple-egl.c


skidracer(Posted 2014) [#34]
I see no OpenGLES module after a

$ git remote update

on my pub.mod clone, or is there another command I should be using?


Brucey(Posted 2014) [#35]
if you type

git remote -v

It will list which repos are your remotes.
If the maxmods/pub isn't in your list you can add it with

git remote add upstream URL


If maxmods is already listed, you should just be able to issue a pull :

git pull origin master

(I think)

I usually use a GUI (SourceTree on OS X, and SmartGit on Linux), so my command-line is a bit fuzzy.


skidracer(Posted 2014) [#36]
I am a noob. Thanks, all fixed.


Derron(Posted 2014) [#37]
I prefer SmartGit too ... with v6 they introduce some live-monitor so icons next to the repo-titles indicate if there are updates available (green arrows).

So while I send Brucey non-working-things (aka "bugs" - or "odd derron code") you can now fill the hole of missing functionality on raspi targets ... sounds fair to me :p.


bye
Ron


skidracer(Posted 2014) [#38]
I prefer using Linux keyboard only

- it works better on couch
- same muscle memory as the server stuff I do
- more like the good old days / fun

In nano I have now worked out you hit ctrl k multiple times to move line sequence to buffer and then paste it back and in other places with ctrl u.

For running multiple shells I tried dvtm but cursor is broken on pi so now trying tmux. In HD two side by side consoles is pretty nice.

I want to learn also mc as I have noted many midnight commanders at work.

Oh and I hate the mouse.

I dunno how many pi users are up for some raspberry jam but it would be cool if a bit of promotion to that community could help this one.


Derron(Posted 2014) [#39]
Yeah Midnight Commander is what Volkov Commander (Norton Commander clone) was for in the early 90s).

@couch "coding":
I prefer a remote control for my couch activities (I really like the old MCE remote and the IR blaster to control my AMP/TV, but I do not run MCE but XBMC/KODI).

@tmux
Only saw this used once ... with an usenet nzb indexer. Not much difference for me to "screen".


Hacking things together needs people "liking the consoles".


bye
Ron


Richard Betson(Posted 2014) [#40]
Hi,

Just noticed this thread. Mouth a-gape. :D Very sweet to see ARM support. I will finally order a PI next month!


Derron(Posted 2014) [#41]
You should not need a PI ... should run on emulator already. Maybe future will bring Android-support (arm v5/v7 ...).
Think this really would have chances to boost popularity (-> easyness of the language + "toyability").


bye
Ron


Richard Betson(Posted 2014) [#42]
Maybe future will bring Android-support (arm v5/v7 ...).
Think this really would have chances to boost popularity (-> easyness of the language + "toyability").

Agreed.

I did not know there was an emulator. That is cool. Where is it at?


Derron(Posted 2014) [#43]
you need qemu or virtualbox ... download an ready-to-use image (like you would do when putting the raspi-OS on an sdcard).

Images (virtualbox):
http://www.thefruitycomputer.com/forums/files/file/8-raspberry-pi-virtualbox/
-> virtualbox would then just run that modified rasbian-debian-system


But better use qemu, as it is capable of emulating the ARM architecture (virtual box uses techniques of qemu but I am not sure if they do "arm" yet).

http://cronicasredux.blogspot.de/2011/09/installing-and-running-debian-armel-on.html

http://www.raspberrypi.org/forums/viewtopic.php?f=5&t=5743

"simplest form" for Windows:
http://sourceforge.net/projects/rpiqemuwindows/


bye
Ron


Brucey(Posted 2014) [#44]
you need qemu or virtualbox

Sounds like a big schlep, and I doubt it even emulates the GPU. Have you actually tried using it?


Derron(Posted 2014) [#45]
I did not try it ... but the "core" compilation thing should work as qemu emulates an ARM1176JZF-S.

GPU driver is closed source ... so no emulation of that currently.


bye
Ron


Brucey(Posted 2014) [#46]
RELEASE

We are happy to release the latest alpha build of the (completely unofficial) Raspberry Pi edition of BlitzMax.

You can download the binaries here : BlitzMax_rpi_bcc.0.18.tar.gz (5.5 meg)

This build includes the latest bcc, bmk, docmods, and makedocs binaries, and the BlitzMax documentation.
Also, for the first time, we are releasing MaxIDE for Raspberry Pi based on GTKMaxGUI with integrated Scintilla editing (because we like line numbers!).

This version of MaxIDE uses libgtkhtml to drive the webview. You may need to add the following package to your distro :

* libgtkhtml3.14-19

This release does not include modules, but they can be acquired from https://github.com/bmx-ng

The latest GTKMaxGUI modules are available via SVN or the github mirror

Notes
* Still no graphics support yet, but console and MaxGUI stuff is working very well.
* Things are not as zippy as a desktop. Rebuilding modules can take some time.
* It's BlitzMax on Raspberry Pi ! :-D


skidracer(Posted 2014) [#47]
Only just had a chance to check this out. Wow!

Few notes on raspi MaxIDE which you probably am already aware of:

- the cursor and when editing standard .c file text is always black.

- the OK buttons on requesters seem to be using title text

- a bit more whitespace in left margin and between lines would be nice


Brucey(Posted 2014) [#48]
I've re-uploaded the 0.18 release with a new build of MaxIDE - this time using 1.43 source, as well as some updates to the scintilla textarea module :

the cursor and when editing standard .c file text is always black.

It turns out I hadn't implemented SetTextColor... oops.

the OK buttons on requesters seem to be using title text

This appears to be fixed by updating the MaxIDE source from 1.40 to 1.43. (I appear to have far too many copies of MaxIDE lying around!)

a bit more whitespace in left margin and between lines would be nice

I've also implemented SetMargin() now which adds some space to the left-hand side. Not sure about the line spacing yet. It may depend on the font, how squashed it feels?
There are also a couple of settings I could implement (SCI_SETEXTRAASCENT and/or SCI_SETEXTRADESCENT), but unsure as yet how to use them generically - given MaxGUI doesn't know/care about such things.
Also looking at adding folding support via a flag during the gadget creation...

Same version number as before, because I'm lazy.. (and it's only the IDE that was changed anyway)


skidracer(Posted 2014) [#49]
Awesome, thanks Brucey. I have some basic shaders loading in the EGL module so am hoping to have DrawLine and maybe even DrawRect added to the 3 supported commands in EGLMax2D (Flip CLS SetCLSColor) soon.

I'm not sure if you have SDL building OK for raspi but it looks like a pretty good layer for adding more generic EGL device support for bmx-ng as seen here.

Also, more recent version of GL for desktop would also allow me to split off the EGL specific device management stuff from the shader / buffer management stuff which should happily run in both environments.


BlitzSupport(Posted 2014) [#50]
Hmm, need to get my Pi set up again now... between this and the new browser, which looks to be fairly speedy (check the Javascript/Canvas demo at 04:20-ish!) it might finally be good enough for some Blitz/low-res Monkey-ing around!


skidracer(Posted 2014) [#51]
Eek, I was obviously being a bit optimistic 3 weeks ago.

I did a blog about running GL2 on BlitzMax on may Laptop as that seemed a better next step than developing a ShaderMax2D module on the pi, GL2 and EGL being the same in that respect.

I need to share most resent BroadcomGraphics EGL device module, but again, developing code in fullscreen, not so good for next steps.


I did trip over this which also seems worth a nosey.


Brucey(Posted 2014) [#52]
Straight OpenGL? I suppose it must be some kind of wrapper?

Skid, if you have any thoughts about this, it would be appreciated, thanks.


Derron(Posted 2014) [#53]
I think skidracer does not want to taint the vanilla modules - so for him it is better to bend around problems on "new target platforms" than to rewrite everything for all platforms.
I dunno what is better but I think that a new render module might surely improve performance - and might "ease" the process for us "lite" developers to include effects (screen shaking, frozen glass). Also of interest: render2texture (to cache complicated dynamical image compositions), but thats another story.

Maybe all the tinkers should try to tinker at the same piece of "project", else you have 4 implementations with all doing something, but every implementation has some restrictions, "incompatibilities" etc.


This means: people should decide on a "base" (egl,ogl - or a complete new base with more base-functions for ogl/dx/...) and then from there on extend the stub functions to make it work (github -> forks, pull requests, ...). But this is again subject of another potential posting, sorry.


bye
Ron


Brucey(Posted 2014) [#54]
Just a small update.

Debug code generation is maturing to the point where it actually seems to work ;-)


(Debugging a small program in the IDE on the Pi)

I had to rewrite the actual debugger (located in appstub/debugger_mt.stdio.bmx) to support 64-bit, and rearrange local variable declarations for their address capture, but otherwise, it all works just like in standard BlitzMax.

Now to see if I can get the new SDL stuff to create a context on the Pi...


Derron(Posted 2014) [#55]
Is this running with GTK? Seems more integrated than here on linux with fltk (you seem to ignore my kindly begging emails for a gtk-build of maxide, somehow I have trouble compiling the gtk-mod).


bye
Ron


LT(Posted 2014) [#56]
Now to see if I can get the new SDL stuff to create a context on the Pi...
It would be very exciting to see some of the game demos running on the Pi. I'll be posting a GL2Max2D update soon.


LAB[au](Posted 2015) [#57]
I thought I would give it a go, since I got recently a raspberry B+...Unfortunately, modules will not compile, it is stopping at this one

root@raspberrypi:/Desktop/BlitzMax/bin# ./bmk makemods -r brl.blitz
Compiling:blitz_app.c
Compiling:blitz_types.c
Compiling:blitz_cclib.c
Compiling:blitz_memory.c
Compiling:blitz_module.c
Compiling:blitz_object.c
Compiling:blitz_string.c
Compiling:blitz_array.c
Compiling:blitz_handle.c
Compiling:blitz_debug.c
Compiling:blitz_incbin.c
Compiling:blitz_thread.c
/Desktop/BlitzMax/mod/brl.mod/blitz.mod/blitz_thread.c: In function 'bbAtomicCAS':
/Desktop/BlitzMax/mod/brl.mod/blitz.mod/blitz_thread.c:430:2: error: impossible constraint in 'asm'
Build Error: failed to compile /Desktop/BlitzMax/mod/brl.mod/blitz.mod/blitz_thr


Any idea?

Thanks


Brucey(Posted 2015) [#58]
Hi. Looks like a bug in blitz_thread.c which was recently re-introduced into the build.

You could try the following changes :

Add this near the top of the file
#include "bdwgc/libatomic_ops/src/atomic_ops.h"


Swap the two atomic ops functions with
int bbAtomicCAS( volatile int *addr,int old,int new_val ){
	return AO_int_compare_and_swap(addr, old, new_val);
}

int bbAtomicAdd( volatile int *p,int incr ){
	return AO_fetch_and_add((AO_t*)p, incr);
}


I'll patch the repository later.

You can also raise issues directly on github ;-)
(I'm directly notified about them there)


BlitzSupport(Posted 2015) [#59]
Waiting for my RPi2 to arrive and this will be going on it!


LAB[au](Posted 2015) [#60]
With the libatomic changes, it compiles all of brl.blitz.
Pub.mod compiles up to lua
Compiling:lua.bmx
Compile Error: Expression has no scope
[/Desktop/BlitzMax/mod/pub.mod/lua.mod/lua.bmx;587;0]
gcc: error: /Desktop/BlitzMax/mod/pub.mod/lua.mod/.bmx/lua.bmx.debug.linux.arm.c: No such file or directory
gcc: fatal error: no input files
compilation terminated.
Build Error: failed to compile /Desktop/BlitzMax/mod/pub.mod/lua.mod/.bmx/lua.bmx.debug.linux.arm.c

will report to github later