Author Topic: Trying to join the QB64 on Linux crowd. Error installing QB64. Need advice.  (Read 4787 times)

0 Members and 1 Guest are viewing this topic.

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Just installed Linux Mint 20 cinnamon on a T430s laptop I picked up used for $89.  I wanted to use QB64 for Linux to help test my QB64 programs.  I'm trying to install QB64 but I get errors.  I assume I need to install a package first, but not sure what or how.  I'm a totall Linux idiot, but willing to learn.  Here's the output I get when running setuo_lnx.sh from the terminal.

- Dav

Quote
Compiling and installing QB64...
Building library 'LibQB'
./setup_build.sh: 2: g++: not found
Building library 'FreeType'
./setup_build.sh: 2: g++: not found
Building library 'Core:FreeGLUT'
In file included from ../../src/freeglut.h:17,
                 from ../../src/freeglut_callbacks.c:31:
../../src/freeglut_std.h:122:10: fatal error: GL/gl.h: No such file or directory
  122 | #include <GL/gl.h>
      |          ^~~~~~~~~
compilation terminated.
In file included from ../../src/freeglut.h:17,
                 from ../../src/freeglut_cursor.c:31:
../../src/freeglut_std.h:122:10: fatal error: GL/gl.h: No such file or directory
  122 | #include <GL/gl.h>
      |          ^~~~~~~~~
compilation terminated.
In file included from ../../src/freeglut.h:17,
                 from ../../src/freeglut_display.c:31:
../../src/freeglut_std.h:122:10: fatal error: GL/gl.h: No such file or directory
  122 | #include <GL/gl.h>
      |          ^~~~~~~~~
compilation terminated.
In file included from ../../src/freeglut.h:17,
                 from ../../src/freeglut_ext.c:32:
../../src/freeglut_std.h:122:10: fatal error: GL/gl.h: No such file or directory
  122 | #include <GL/gl.h>
      |          ^~~~~~~~~
compilation terminated.
In file included from ../../src/freeglut.h:17,
                 from ../../src/freeglut_font.c:31:
../../src/freeglut_std.h:122:10: fatal error: GL/gl.h: No such file or directory
  122 | #include <GL/gl.h>
      |          ^~~~~~~~~
compilation terminated.
In file included from ../../src/freeglut.h:17,
                 from ../../src/freeglut_font_data.c:56:
../../src/freeglut_std.h:122:10: fatal error: GL/gl.h: No such file or directory
  122 | #include <GL/gl.h>
      |          ^~~~~~~~~
compilation terminated.
In file included from ../../src/freeglut.h:17,
                 from ../../src/freeglut_gamemode.c:31:
../../src/freeglut_std.h:122:10: fatal error: GL/gl.h: No such file or directory
  122 | #include <GL/gl.h>
      |          ^~~~~~~~~
compilation terminated.
In file included from ../../src/freeglut.h:17,
                 from ../../src/freeglut_geometry.c:31:
../../src/freeglut_std.h:122:10: fatal error: GL/gl.h: No such file or directory
  122 | #include <GL/gl.h>
      |          ^~~~~~~~~
compilation terminated.
In file included from ../../src/freeglut_glutfont_definitions.c:65:
../../src/freeglut_std.h:122:10: fatal error: GL/gl.h: No such file or directory
  122 | #include <GL/gl.h>
      |          ^~~~~~~~~
compilation terminated.
In file included from ../../src/freeglut.h:17,
                 from ../../src/freeglut_init.c:32:
../../src/freeglut_std.h:122:10: fatal error: GL/gl.h: No such file or directory
  122 | #include <GL/gl.h>
      |          ^~~~~~~~~
compilation terminated.
In file included from ../../src/freeglut.h:17,
                 from ../../src/freeglut_input_devices.c:38:
../../src/freeglut_std.h:122:10: fatal error: GL/gl.h: No such file or directory
  122 | #include <GL/gl.h>
      |          ^~~~~~~~~
compilation terminated.
In file included from ../../src/freeglut.h:17,
                 from ../../src/freeglut_joystick.c:37:
../../src/freeglut_std.h:122:10: fatal error: GL/gl.h: No such file or directory
  122 | #include <GL/gl.h>
      |          ^~~~~~~~~
compilation terminated.
In file included from ../../src/freeglut.h:17,
                 from ../../src/freeglut_main.c:32:
../../src/freeglut_std.h:122:10: fatal error: GL/gl.h: No such file or directory
  122 | #include <GL/gl.h>
      |          ^~~~~~~~~
compilation terminated.
In file included from ../../src/freeglut.h:17,
                 from ../../src/freeglut_menu.c:32:
../../src/freeglut_std.h:122:10: fatal error: GL/gl.h: No such file or directory
  122 | #include <GL/gl.h>
      |          ^~~~~~~~~
compilation terminated.
In file included from ../../src/freeglut.h:17,
                 from ../../src/freeglut_misc.c:31:
../../src/freeglut_std.h:122:10: fatal error: GL/gl.h: No such file or directory
  122 | #include <GL/gl.h>
      |          ^~~~~~~~~
compilation terminated.
In file included from ../../src/freeglut.h:17,
                 from ../../src/freeglut_overlay.c:31:
../../src/freeglut_std.h:122:10: fatal error: GL/gl.h: No such file or directory
  122 | #include <GL/gl.h>
      |          ^~~~~~~~~
compilation terminated.
In file included from ../../src/freeglut.h:17,
                 from ../../src/freeglut_spaceball.c:13:
../../src/freeglut_std.h:122:10: fatal error: GL/gl.h: No such file or directory
  122 | #include <GL/gl.h>
      |          ^~~~~~~~~
compilation terminated.
In file included from ../../src/freeglut.h:17,
                 from ../../src/freeglut_state.c:31:
../../src/freeglut_std.h:122:10: fatal error: GL/gl.h: No such file or directory
  122 | #include <GL/gl.h>
      |          ^~~~~~~~~
compilation terminated.
In file included from ../../src/freeglut.h:17,
                 from ../../src/freeglut_stroke_mono_roman.c:34:
../../src/freeglut_std.h:122:10: fatal error: GL/gl.h: No such file or directory
  122 | #include <GL/gl.h>
      |          ^~~~~~~~~
compilation terminated.
In file included from ../../src/freeglut.h:17,
                 from ../../src/freeglut_stroke_roman.c:34:
../../src/freeglut_std.h:122:10: fatal error: GL/gl.h: No such file or directory
  122 | #include <GL/gl.h>
      |          ^~~~~~~~~
compilation terminated.
In file included from ../../src/freeglut.h:17,
                 from ../../src/freeglut_structure.c:31:
../../src/freeglut_std.h:122:10: fatal error: GL/gl.h: No such file or directory
  122 | #include <GL/gl.h>
      |          ^~~~~~~~~
compilation terminated.
In file included from ../../src/freeglut.h:17,
                 from ../../src/freeglut_videoresize.c:31:
../../src/freeglut_std.h:122:10: fatal error: GL/gl.h: No such file or directory
  122 | #include <GL/gl.h>
      |          ^~~~~~~~~
compilation terminated.
In file included from ../../src/freeglut.h:17,
                 from ../../src/freeglut_window.c:46:
../../src/freeglut_std.h:122:10: fatal error: GL/gl.h: No such file or directory
  122 | #include <GL/gl.h>
      |          ^~~~~~~~~
compilation terminated.
In file included from ../../src/freeglut.h:17,
                 from ../../src/freeglut_xinput.c:7:
../../src/freeglut_std.h:122:10: fatal error: GL/gl.h: No such file or directory
  122 | #include <GL/gl.h>
      |          ^~~~~~~~~
compilation terminated.
ar: temp/freeglut_callbacks.o: No such file or directory
Building 'QB64'
./setup_lnx.sh: line 139: g++: command not found
~/qb64
It appears that the qb64 executable file was not created, this is usually an indication of a compile failure (You probably saw lots of error messages pop up on the screen)
Usually these are due to missing packages needed for compilation. If you're not running a distro supported by this compiler, please note you will need to install the packages listed above.
If you need help, please feel free to post on the QB64 Forums detailing what happened and what distro you are using.
Also, please tell them the exact contents of this next line:
DISTRO: linuxmint

Thank you for using the QB64 installer.

Offline SMcNeill

  • QB64 Developer
  • Forum Resident
  • Posts: 3972
    • View Profile
    • Steve’s QB64 Archive Forum
Give these steps a go first:

Step 1 of 3: In terminal window, log in as root
In your terminal window type the following at the command prompt: su
You will be prompted to enter the root password. Enter that password.
Your terminal window should now display a "#" (hash mark) prompt. This indicates you are logged in as root!

Step 2 of 3: In terminal window, type the following command as root
First we need to update our cache of software libraries that are available to install or update.
In your terminal window type the following at the command prompt (you should be root): apt-get update

Step 3 of 3: In terminal window, type the following command as root
In your terminal window type the following at the command prompt (you should be root): apt-get install freeglut3 freeglut3-dev libxmu-dev libxmu-headers libxi-dev

You now have the freeGLUT OpenGL libraries installed!
https://github.com/SteveMcNeill/Steve64 — A github collection of all things Steve!

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Hey thanks, Steve. Appreciate it.   Well, I tried it.  Wouldn't accept a password, I thought I must have forgotten it, so just re-installed Linux Mint.  This time however I allowed an internet connection when installing.  It must have downloaded extra packages when installing this time, because I just ran the QB64 setup again and it worked!   Can't seem to resize the IDE font yet, but I'll play around with it.

Pretty amazed with Linux Mint so far.  It loads quick and runs smooooth.  Sure beats the Win10 the laptop came with.

Thanks for your help.

EDIT: Ahh, I just figured out, I have to type 'sudo' before 'su' to go root.  That's why it wouldn't take a password. Also I copied the lucon.ttf to the qb64 dir and now I can resize the IDE font ok. 

- Dav
« Last Edit: November 18, 2021, 10:42:18 am by Dav »

Offline Richard Frost

  • Seasoned Forum Regular
  • Posts: 316
  • Needle nardle noo. - Peter Sellers
    • View Profile
I recommend my chess program as an example of accommodating Windows or Linux Mint -
the version in the Forums, not the outdated one in Games.

1) As I need to rename,delete, and edit files (saved games), I've defined variables
   for these commands and assign them in an "$IF WIN" block.  In the same block I
   also set a variable called minty to true for Linux, for later use.

2) Windows libraries don't work with Linux.  SMcNeill's getCPUload function is for
   Windows.  Under Linux I use the sensors command instead.

3) Linux really cares about file case.  For chess I've made all resource files
   lowercase, but can handle a user renaming a log file using upper or mixed case.

4) Linux uses / in pathnames.  Windows uses \ in pathnames.  So create a constant or
   variable called "slash".

5) Filename dates are a little different in Mint.  The year is not shown unless the
   file is older than 6 months.  Keep that in mind if you read directories and need
   that info.

6) I haven't gotten icons to work at all, with $EXEICON or _ICON.

I'm pretty new to Linux Mint too, having been given a machine containing it about 2
months ago and only working on getting my chess program fully compatible with it
for the past week.

There are likely a lot of other differences a compatible program should handle.  The
above are the problems I've had so far.
It works better if you plug it in.

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Thank you , @Richard Frost for those valuable tips.  Will sure check out your latest chess program.

I tried Linux mint years ago, some version in the single digits, but didn’t keep it. Sure has come a long way since then. I’m keeping it.

- Dav

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Dav,

I started using Ubuntu, in 2005?, when it was version 5.10...  A nightmare to install... If only I knew then what I know now... lol   Switched to Linux Mint at version 13.04 which was about 8 years back...  I am NO wizard with Linux, but if you need any help, I will do my best to assist...

J
Logic is the beginning of wisdom.

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Thank you kindly, @johnno56.  I'll remember that.   I have to say that Linux Mint 20 was the quickest and most trouble free OS install I can remember doing. Setup recognized all my hardware and everything worked from the start (ran setup off a USB boot disk).  The OS boots up quick.  Now I'm installing some cool apps to play with...

- Dav

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
I have found Mint quite reliable... There were a few hiccups over the years, but overall, reliable. Not the fastest Linux OS out there, but for what I use it for, it's a good OS. So far, all the hardware I throw at it - printer, hdd's, joystick etc, not a problem. Have fun.
Logic is the beginning of wisdom.

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
I'm currently re-doing my FileSelect Function that fails under Linux.  The way I was getting the directories and files is not valid under linux after all (I though it would be).  After reading some online I'm using the following  now, and it seems to work in Linux Mint, but is this something that would work on other Linux ditros?

Code: QB64: [Select]
  1. 'output directories list to a file...
  2. SHELL _HIDE "find . -maxdepth 1 -type d > TeMP_DIR_LIST.txt"
  3.  
  4. 'output list of .BAS files in current dir to a file ...
  5. FileSpec$ = "*.bas"
  6. SHELL _HIDE "find " + Filespec$ + " -maxdepth 1 -type f > TeMP_FILE_LIST.txt"
  7.  

- Dav

Offline luke

  • Administrator
  • Seasoned Forum Regular
  • Posts: 324
    • View Profile
1) I recommend putting temporary files in the /tmp directory, just in case the current location is read-only or similar. Maybe put a random number or timestamp in the temp file name just in case.
2) For second command you want
Code: [Select]
find -maxdepth 1 -type f -name '*.bas*'I use the -name option to specify only files with a name matching that pattern, and use single quotes to prevent the shell expanding it and causing problems.

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: Trying to join the QB64 on Linux crowd. Error installing QB64. Need advice.
« Reply #10 on: November 19, 2021, 08:07:06 am »
Thanks, @luke !

Here's what I'm doing now..

Code: QB64: [Select]
  1.     '=== Generate a unique temp filename to use based on date + timer
  2.     tmp$ = "_qb64_" + DATE$ + "_" + LTRIM$(STR$(INT(TIMER))) + ".tmp"
  3.     IF INSTR(_OS$, "LINUX") THEN tmp$ = "/tmp/" + tmp$
  4.  

EDIT: On a side issue -- is there anyway to speed up the keyrate in the QB64 IDE under Linux?  It's much slower scrolling through code than the Windows version. 

- Dav
« Last Edit: November 19, 2021, 08:22:34 am by Dav »

Offline luke

  • Administrator
  • Seasoned Forum Regular
  • Posts: 324
    • View Profile
Re: Trying to join the QB64 on Linux crowd. Error installing QB64. Need advice.
« Reply #11 on: November 19, 2021, 08:33:36 am »
No.

Offline Dav

  • Forum Resident
  • Posts: 792
    • View Profile
Re: Trying to join the QB64 on Linux crowd. Error installing QB64. Need advice.
« Reply #12 on: November 22, 2021, 07:58:57 am »
Hey @SMcNeill, thanks for those detailed steps to manually install the compiler. Although I didn’t need it for Linux Mint, I have for other distros I’ve been trying out, and those steps worked perfectly getting QB64 working.

- Dav