BlitzMax Vanilla on Ubuntu 14.04 64bit

BlitzMax Forums/BlitzMax Programming/BlitzMax Vanilla on Ubuntu 14.04 64bit

RustyKristi(Posted 2016) [#1]
Is there any easy way to build an app and build all the modules in 64bit Ubuntu?

I'm always getting segmentation fault. The only success I got so far is compiling a simple hello world from 32bit ubuntu and then running in 64bit.

flat assembler version 1.68 (0 kilobytes memory)
Segmentation fault
Build Error: Failed to assemble /root/bmx/BlitzMax/bin/.bmx/server2.bmx.console.release.linux.x86.s
root@localhost:~/bmx/BlitzMax/bin#


markcw(Posted 2016) [#2]
It's probably because your 32bit libs are not all installed properly. It's not straight-forward to install those in 64bit. I can't say more as I've never installed 64bit Linux.

See post #18 and #19 in particular here.
Installing on Linux

Also for install script see here.
How To: Dependencies Ubuntu/Debian/Mint Apr 2015


RustyKristi(Posted 2016) [#3]
Ok thanks for the links. I found the first link earlier but I thought it was an older Ubuntu version..


Brucey(Posted 2016) [#4]
You don't often see FASM segfault.

Also, unless you have really (really) good reasons, it's not usual to log on as the root user in Linux... :-)


RustyKristi(Posted 2016) [#5]
Thanks Brucey and yes, I know about that root thing it's just a virtualbox/image for testing and nothing serious. ;-)


dawlane(Posted 2016) [#6]
@RustyKristi:
You will find that you will have a lot of problems with BlitzMax on Linux. More so if you try to use the GUI modules. BlitzMax is now free, but you would be better off using some other cross-platform implementation. Currently there isn't any good cross-platform BASIC like language (they all have problems, but Purebasic is possibly one of the better ones). Qt is possibly the only cross-platform framework that is of any use, but it has one hell of a learning curve and requires that you know C/C++.

For 2D games MonkeyX would be the better choice. But this has it's problems as well and suspect that MX2 will not be much of an improvement.


Brucey(Posted 2016) [#7]
You will find that you will have a lot of problems with BlitzMax on Linux

Perhaps dawlane does, but it performs well for me on all the versions of Linux I'm running on.
That said, I'm not using the base BlitzMax install. I use various 3rd-party modules that are available which makes working in Linux as good as OS X (or perhaps Windows, which I don't use so much).


RustyKristi(Posted 2016) [#8]
You will find that you will have a lot of problems with BlitzMax on Linux. More so if you try to use the GUI modules. BlitzMax is now free, but you would be better off using some other cross-platform implementation. Currently there isn't any good cross-platform BASIC like language (they all have problems, but Purebasic is possibly one of the better ones). Qt is possibly the only cross-platform framework that is of any use, but it has one hell of a learning curve and requires that you know C/C++.

For 2D games MonkeyX would be the better choice. But this has it's problems as well and suspect that MX2 will not be much of an improvement.


I was beginning to suspect that but I'm still positive on trying out more bmax stuff. Honestly, I can't say I have a bad experience performance wise since I'm using guest emulation and not the full host which is kind of expected.

@Brucey
I was hoping there will be a clean definitive guide stickied and updated to the most recent version. What I was doing is finding and picking what works and not knowing that some of those infos were outdated posts.

But then, it was the 64bit only part that really threw me off guard. I guess that's one of the reason why you created BMX NG with 64bit support which btw I can't also build since you need an existing version of it? so where can I find a 64bit NG Binary release? :)

I hope I made sense coz I have still a lot to learn with bmx stuff even though I've managed to create some few cool experiments of my own.


Derron(Posted 2016) [#9]
You do not need to have a 64bit BCC/BMK to build 64bit binaries. BCC-NG converts to C and then GCC is doing the 64bit work.

On our BlitzMax-side the change is, that on 64 bit the numbers use different amount of memory, this is taken care of from BCC (as you tell BMK that you want a 64bit binary) - it then creates the C-code accordingly.


@crossplatform GUI
That will be problematic everytime you use wrappers to 3rd party code. So if you would write your own widget classes and event handling stuff in BlitzMax, it should work on all supported platforms (of course only things existing on all platforms - mouse input etc.).
As you want to behave "native" on each OS.

Same problem for every hardware thingy: OpenGL + DX, Sound (Alsa+Pulse, OSS, OpenAL, DirectX, CoreAudio).

Everything connecting to 3rd party might be broken somewhen (PNG v2 with same file ending but an outdated libpng).


bye
Ron


RustyKristi(Posted 2016) [#10]
Thanks Derron. The problem here is I'm also getting the same segmentation fault when I'm trying to rebuild the modules on a 64bit ubuntu, the same with building bmx-ng. I guess I need to check out those links that munch posted earlier.


Brucey(Posted 2016) [#11]
Your FASM crash may be related to VirtualBox.
FASM is a third-party assembler and is pretty much rock-solid. If you have issues with that, BlitzMax itself is the least of your worries :-)


Brucey(Posted 2016) [#12]
It may be worth your while trying the latest FASM ( http://flatassembler.net/download.php )
Or some different VM software :-)


TomToad(Posted 2016) [#13]
Why use VirtualBox at all? On my setup, I have Ubuntu installed on a bootable external HD. If you are only using Linux for development, you could probably get away with a 32GB flash drive. Since you are in the US, OfficeMax/OfficeDepot are always having sales on storage devices, currently a 32GB USB 3.0 is on sale for $12.99, 64GB for 19.99. Amazon.com always has some good deals going on too.

Actually thinking about it. Been wanting to get Linux up and running on my laptop. Might go ahead and get myself a flashdrive from OfficeMax and give it a try myself. Give me a few days and I'll let you know how it goes.


RustyKristi(Posted 2016) [#14]
Hey Tom, Actually, I did have a dual boot once but I'm kinda switching between windows and linux so there's a reason why I'm doing emulation right now. I might give it a try again next time with an external drive or dual boot internal again.

Thanks Brucey, I'll try that next.


Derron(Posted 2016) [#15]
Having a look for

flat assembler "(0 kilobytes memory)" only 2 hits were returned on google. This thread here, and this post (#35) on this forum thread here too.

The user also used a virtualbox VM.


I am not sure, but I am running a Xubuntu 12.04-VM on my Linux Mint 64 bit guest without problems. VirtualBox is 5.0.18 here.

What is your host OS?

bye
Ron


RustyKristi(Posted 2016) [#16]
Win 7 64bit is my host running ubuntu 14.04 x64, VM 5.0.10


RustyKristi(Posted 2016) [#17]
[double post]


Derron(Posted 2016) [#18]
If you have the bandwidth and are willed to narrow things down, you might create another VM and boot a 32bit linux there (you should even be able to skip installation - just share your BlitzMax via "shared folder" or a SMB share).

Another option is to try a more current fasm:
http://www.flatassembler.net/fasm-1.71.51.tgz
Replace the fasm in Blitzmax/bin with it.
If this really would solve the issue I would be surprised but at least it is a chance.


As in the other post someone wrote, it works with an older BlitzMax: give it a try too (and then check what version "fasm" was there).


bye
Ron


dawlane(Posted 2016) [#19]
@Brucey:
The main problems are 32/64 bit library conflicts that can arise. GTK themes and Webkit spring to mind.

@RustyKristi:
Are you trying the vanilla version or the one on github?

Argh, forgot people have this inexplicable (to me) desire to create 64 bit apps for windows, so I guess simply forcing -m32 is out.

With a statement like that, in Marks own words (Found here at post 11)
I've come to realise that Mark's visions for any of his tools didn't allow for the possibility for him to upgrade the core code without a major rewrite or for flexibility with code generation. And Linux it's self was always an after though for BlitzMax and MonkeyX.


Brucey(Posted 2016) [#20]
The main problems are 32/64 bit library conflicts that can arise

Yes, 32-bit webkit on a 64-bit Linux are somewhat of a pain to work with.

But a 64-bit BlitzMax gets around that issue for me :-)

And for 32-bit development I'm just using a 32-bit VM - because I don't have time to mess around with trying to get things installed when I'd rather be coding.


RustyKristi(Posted 2016) [#21]
Thanks guys. I think I'll try what Derron suggested with the latest fasm or might do a complete reinstall just to track my progress this time.

@dawlane
Yes it is the downloadable Vanilla version here.