Author Topic: QB64 on RPI4 (4gb)  (Read 3041 times)

0 Members and 1 Guest are viewing this topic.

Offline awkutchins

  • Newbie
  • Posts: 12
    • View Profile
QB64 on RPI4 (4gb)
« on: May 26, 2020, 05:44:46 pm »
Hello reader,

My goal is to create a server to facilitate communications between different computers for mulitplayer games (online shooters, board games, baseball, ect.). I am very new to linux and not very comfortable doing anything outside of a tutorial and there isn't much online about this. I have tried what I have found but it's either not updated for rpi 4 or not enough information for me to connect the dots since I'm beyond a noob in this.

I have an RPI 4 (4gb) I am trying to use to do this but I can't seem to run anything useful. I have tried using wine (64 bit), and wine (32 bit) for linux to run the .exe files (the tutorial I used was
) . I have also tried to run qb64 for linux on it to try to compile my programs directly on it. I would like to use the RPI instead of getting a small windows computer if I can avoid it.

My options (in my mind and I'm probably wrong) are:
*Copy .exe files to rpi then use wine to run them
*Create a .exe like program to run on linux natively
*Try to put windows onto the RPI then run .exe (unlikely)
*Switch machines (Last resort)

I can get into much more detail of what I have and what I have tried to do as I am not sure what will help. I know some people got qb64 to run on the pi but I couldn't follow their instructions. https://www.qb64.org/forum/index.php?topic=1550.0

Any help would be much appreciated.

Offline jack

  • Seasoned Forum Regular
  • Posts: 408
    • View Profile
Re: QB64 on RPI4 (4gb)
« Reply #1 on: May 27, 2020, 03:16:30 pm »
hello awkutchins
in the file QB64/internal/c/common.h
add the following at the top
#define QB64_NOT_X86
then run the build script
running x86 code in wine seems like a crazy idea to me, way too much overhead

Offline awkutchins

  • Newbie
  • Posts: 12
    • View Profile
Re: QB64 on RPI4 (4gb)
« Reply #2 on: May 27, 2020, 04:28:09 pm »
I did that and when I ran the setup I was gui location errors I believe. I will try again from scratch when I get home and see if I get those errors again. Also just for my piece of mind, what is the easiest way to install qb64 onto rpi4? I believe I downloaded the linux version onto my windows pc and copied it over on the sd card. I'm not sure if that is part of the reason I'm having issues.

Offline jack

  • Seasoned Forum Regular
  • Posts: 408
    • View Profile
Re: QB64 on RPI4 (4gb)
« Reply #3 on: May 27, 2020, 05:23:38 pm »
I recommend that you connect the PI to the internet because there may be libraries that need to be installed, and once having the PI connected I would simply launch the web browser and download QB64
I am doing a clean Raspbian install as I write, once installed I will try to build QB64
« Last Edit: May 27, 2020, 05:25:41 pm by jack »

Offline jack

  • Seasoned Forum Regular
  • Posts: 408
    • View Profile
Re: QB64 on RPI4 (4gb)
« Reply #4 on: May 27, 2020, 06:30:35 pm »
@awkutchins
you need to install freeglut3-dev and mesa-utils, from the terminal
sudo apt install freeglut3-dev
sudo apt install mesa-utils
after that
./setup_lnx.sh
it should without a problem, however, when tried to compile QB64/programs/samples/misc/3dballs.bas it failed to compile with the error
objcopy: architecture i386 unknown
g++: error: ../temp/data.o: No such file or directory

but acalc.bas compiled and run ok
« Last Edit: May 27, 2020, 06:40:52 pm by jack »

Offline awkutchins

  • Newbie
  • Posts: 12
    • View Profile
Re: QB64 on RPI4 (4gb)
« Reply #5 on: May 27, 2020, 06:37:03 pm »
Thank you so much. I will try this when I get home and give an update.
Did you have to update this line in the setup_lnx.sh:

elif [ "$DISTRO" == "linuxmint" ] || [ "$DISTRO" == "ubuntu" ] || [ "$DISTRO" == "debian" ] || [ "$DISTRO" == "raspbian" ] || [ "$DISTRO" == "zorin" ]; then
  echo "Debian based distro detected."

Offline jack

  • Seasoned Forum Regular
  • Posts: 408
    • View Profile
Re: QB64 on RPI4 (4gb)
« Reply #6 on: May 27, 2020, 06:42:40 pm »
no I didn't

Offline awkutchins

  • Newbie
  • Posts: 12
    • View Profile
Re: QB64 on RPI4 (4gb)
« Reply #7 on: May 27, 2020, 06:51:02 pm »
Is there any libraries for qb64 to gain access to the gpio pins? I wanted to run some status leds from the rpi since it will be running in the background without a monitor.

Offline jack

  • Seasoned Forum Regular
  • Posts: 408
    • View Profile
Re: QB64 on RPI4 (4gb)
« Reply #8 on: May 27, 2020, 07:02:29 pm »
I hardly ever play with the PI, don't know if wiring-pi or something like that is still available, may I suggest that you visit the PI forum https://www.raspberrypi.org/forums/index.php

Offline jack

  • Seasoned Forum Regular
  • Posts: 408
    • View Profile
Re: QB64 on RPI4 (4gb)
« Reply #9 on: May 27, 2020, 07:07:00 pm »
a lot of programs in the misc folder fail to compile, however one program that failed to compile compiled ok after installing libsdl1.2-dev
the program name is audio.bas, don't know if more programs will compile if certain libraries are installed

Offline awkutchins

  • Newbie
  • Posts: 12
    • View Profile
Re: QB64 on RPI4 (4gb)
« Reply #10 on: May 28, 2020, 11:34:37 am »
So I downloaded the three libraries you said (freeglut3-dev, mesa-utils, and libsdl1.2-dev) and it is running. I'm trying to compile some of my old programs with much success and I'm ready for the next step of my project. If I get the gpio pins working I will explain what I did for others. If I run into a problem where I need to download another library (like in the case of libsdl1.2-dev), is there a list somewhere I can use as reference to find what I need?

Ps: Is there a linux version of ctrl+break for linux? I'm not sure if it's the keyboard I'm using for it requiring fn to get to break but I've been using ctrl+alt+d to go to the desktop then closing the app.

Pss: Thank you so much for your help. I am so relieved it is working

Offline jack

  • Seasoned Forum Regular
  • Posts: 408
    • View Profile
Re: QB64 on RPI4 (4gb)
« Reply #11 on: May 28, 2020, 11:56:37 am »
Hi awkutchins
I am glad that it's working for you, as for break, try ctrl+c
as for possible needed libraries, I don't know enough about QB64 to answer that but you can get most libraries via apt
« Last Edit: May 28, 2020, 11:59:22 am by jack »

Offline jack

  • Seasoned Forum Regular
  • Posts: 408
    • View Profile
Re: QB64 on RPI4 (4gb)
« Reply #12 on: May 28, 2020, 01:00:41 pm »
the PI4 with 8GB RAM is available https://www.pishop.us/product-category/special-offers/new-raspberry-pi-4-8gb/
that should be adequate for a 64-bit OS