Author Topic: New install script for QB64, InForm & vWATCH64 all together on Linux.  (Read 4319 times)

0 Members and 1 Guest are viewing this topic.

Offline Fifi

  • Forum Regular
  • Posts: 181
    • View Profile
    • My small QB64 contribution
Hi all,

I made a new version of my multilingual install script for Linux which all installs QB64, Inform and vWATCH64 together.

This version # 32 fixes the problem of starters that are not "launchable" with the latest version of Gnome (mainly on Debian and Ubuntu).

As always, it is available on my dedicated page: [url] http://www.as2.com [/ url].

Thank you in advance for your comments and suggestions.

Kind regards.
« Last Edit: May 09, 2021, 05:04:11 pm by Fifi »
It's better to look like an idiot for a short time while asking something obvious to an expert than pretending to be smart all your life. (C) Me.

Offline doppler

  • Forum Regular
  • Posts: 241
    • View Profile
Did you fix the script for the quirks of Raspberry install?
Namely linux version ID (not ID'ed as Debian) and floating point math emulation.

Offline Fifi

  • Forum Regular
  • Posts: 181
    • View Profile
    • My small QB64 contribution
Hi doppler,

Did you fix the script for the quirks of Raspberry install?
Namely linux version ID (not ID'ed as Debian) and floating point math emulation.

Never been aware of such problems before your post above.

Can you post some screen captures?

Further, I can't fix any of what you said since I don't have a Raspberry.

Further, I'm even surprised you can use my install script on such systems.

BTW, is there any way to emulate a Raspberry via a VM on any OS (Linux, macOS or even worst: Windows 10)?

Now, with regard to the floating point math emulation, it's a problem to post to the QB64 team (that I'm not part of).

Looking forward.
It's better to look like an idiot for a short time while asking something obvious to an expert than pretending to be smart all your life. (C) Me.

Offline doppler

  • Forum Regular
  • Posts: 241
    • View Profile
Actually you can search for my posts on the subject in the forum. (search for raspberry compile failure)  There is more than 1 post.

I outlined changes needed to ID the O/S as well as the Floating point change pointed out by another member. The problem with floating point is simple.  8087 floating point is only available in 86' processors.  A compile flag must be set when raspberry is detected to use the simulation floating routines.  IE: floating point math the hard way in RISC processors.  So it's not a QB64 team problem.

Fix the two small changes then things start to work right.  If you want to make your script official you will need the changes.

Offline Fifi

  • Forum Regular
  • Posts: 181
    • View Profile
    • My small QB64 contribution
Hi again doppler,

Thanx for your responses.

Actually you can search for my posts on the subject in the forum. (search for raspberry compile failure)  There is more than 1 post.

As you can check, I'm not always logged in here and usually only come when there are changes in major versions of QB64, InForm or vWATCH64.

So, sorry if I missed your previous posts.

I outlined changes needed to ID the O/S as well as the Floating point change pointed out by another member. The problem with floating point is simple.  8087 floating point is only available in 86' processors.  A compile flag must be set when raspberry is detected to use the simulation floating routines.  IE: floating point math the hard way in RISC processors.  So it's not a QB64 team problem.

As said before, I don't have a Pi and I don't even intend to get one because I don't use such a "pico" system, which for sure can be very efficient and useful for hundreds of thousands of other users, but not me.

So if your Raspberry is running a derivative of Debian (from what I've heard of), can you please send me the results from the following command lines:

Code: QB64: [Select]
  1. ~ uname - s
  2. ~ uname - r
  3. ~ uname - m
  4. ~ uname - i
  5. ~ uname - p
  6. ~ uname - o
  7. ~ lsb_release -si
  8. ~ lsb_release -sr
  9. ~ lsb_release -sc
  10. ~ lsb_release -sd
  11. ~ echo $XDG_CURRENT_DESKTOP
  12. ~ echo $GDMSESSION
  13. ~ sudo grep -i Xsession /var/lib/AccountsService/users/fYOUR_USER_NAME

Also, since I am not familiar with your system, can you please tell me which flag should be set if a Raspberry is detected to resolve the floating point issue, a problem which I guess is also present in the old setup_lnx.sh script as I didn't see any Raspberry notes on it?

Fix the two small changes then things start to work right.  If you want to make your script official you will need the changes.

My goal is not to become the official installation script (which could become the case if the development team decides) but simply to make the installation of QB64, InForm and vWATCH64 simultaneous because it seems to me that these three tools are inseparable from each other and this for the best of the diffusion of this programming language on Linux boxes (baremetal or VMs).

And I think it would be desirable for the same to be true for macOS (which I think I will deal with very soon) and also Windows (there, I'll see when I retire. Ha good, I'm already at retirement for 5 years? Time flies. LoL)

While awaiting your responses, I will do my best to respond favorably and ASAP to your legitimate requests.

Looking forward.

Cheers.
Fifi


Edit:

PS: Ho, I just gave a look at this: https://gist.github.com/fm4dd/c663217935dc17f0fc73c9c81b0aa845

So, I understand that the GCC compiler options for the ARM processor family are different depending on the processor model. Then try to help me more with the correct flag for your own processor and even better for each processor model in the Raspberry family as long as there is a way to identify each one using a bash command line.
« Last Edit: May 11, 2021, 06:58:48 pm by Fifi »
It's better to look like an idiot for a short time while asking something obvious to an expert than pretending to be smart all your life. (C) Me.

Offline doppler

  • Forum Regular
  • Posts: 241
    • View Profile
This could get you what you need.  The ID part is easy (I gave the correction).  The conditional compile option I did not figure out.  Not a Linux script person.  I just hardcoded the floating point flag.

https://www.qb64.org/forum/index.php?topic=1550.0

If you are good with Linux scripts you won't need a PI.  If you feel you have good substitution script(s), someone may have an interest to try it for you.

FYI: For all who may try.  I don't recommend using less than 2GB PI4.  The compiler is memory intensive.  Beside having more than 1GB started with PI 4's.  Once back with V1.3 (or earlier) I got it to compile (pi3).  V1.4 not much success.  It was lethargic on the pi3, so a pi4 would be better.  Especially using the GUI.

Hope they take your script as official.  Since it needs updating.  There are other ARM Linux systems out there beside PI.  They would have the same problem.  Not being an ARM maven, I don't know if there is a floating point chip for ARM.


Offline Fifi

  • Forum Regular
  • Posts: 181
    • View Profile
    • My small QB64 contribution
Hi doppler,

This could get you what you need.  The ID part is easy (I gave the correction).

https://www.qb64.org/forum/index.php?topic=1550.0

If you are good with Linux scripts you won't need a PI.

Thanx for the link.

However, since I don't have a Pi nor plan to get one, if you don't answer to my questions using the full set of  command lines I gave you, I've no way to figure out what command line will respond with the name of your machine nor what is the other command line that will respond raspbian.

So, please run the full set of command lines I repeat below in a terminal session (I hope the Pi OS provides one) and please give me all the results.

Code: QB64: [Select]
  1.     ~ uname - s
  2.     ~ uname - r
  3.     ~ uname - m
  4.     ~ uname - i
  5.     ~ uname - p
  6.     ~ uname - o
  7.     ~ lsb_release -si // this command is very important and useful foe the script
  8.     ~ lsb_release -sr
  9.     ~ lsb_release -sc
  10.     ~ lsb_release -sd
  11.     ~ echo $XDG_CURRENT_DESKTOP
  12.     ~ echo $GDMSESSION
  13.     ~ sudo grep -i Xsession /var/lib/AccountsService/users/YOUR_USER_NAME

Once I'll get the answers, first I'll add the support for the raspbian ID (that's the easy part), then I'll give you a beta to test the suggestion that Jack posted as of july 31, 2019  (edit the file common.cpp and add #define QB64_NOT_X86).

Then, we'll see if this fix the problem of the floating point.

And if not, I'll will make some searches on different ARM fora to find what combination of flags must be used.

But for now, I can't go further without the answers to my first questions.

Ho, BTW, how did you "hard coded" to get the qblib compilation to work ?

I could also do the same specific "work around" for the Pi when you'll answer to my first question.

Looking forward.

Fifi

PS: the first version of my script was available since 2016-2017 or so on the old forum [abandoned, outdated and now likely malicious qb64 dot net website - don’t go there]. So, why did you take so long to call me? I'ld have try to fix it since. ;)
« Last Edit: May 13, 2021, 07:48:13 pm by Fifi »
It's better to look like an idiot for a short time while asking something obvious to an expert than pretending to be smart all your life. (C) Me.

Offline doppler

  • Forum Regular
  • Posts: 241
    • View Profile
 ~ uname - s

Linux

 ~ uname - r

5.10.17-v7l+

 ~ uname - m

armv7l

 ~ uname - i

unkown

 ~ uname - p

unkown

 ~ uname - o

GNU/Linux

 ~ lsb_release -si // this command is very important and useful foe the script

Raspbian

 ~ lsb_release -sr

10

 ~ lsb_release -sc

buster

 ~ lsb_release -sd

Raspbian GNU/Linux 10 (buster)

 ~ echo $XDG_CURRENT_DESKTOP

LXDE

 ~ echo $GDMSESSION

lightdm-xsession

 ~ sudo grep -i Xsession /var/lib/AccountsService/users/
^^^^ This did not have a path^^^^ to AccountsService


Offline Fifi

  • Forum Regular
  • Posts: 181
    • View Profile
    • My small QB64 contribution
Hi doppler,

~ uname -s Linux
 ~ uname -r 5.10.17-v7l+
 ~ uname -m armv7l
 ~ uname -i unkown
 ~ uname -p unkown
 ~ uname -o GNU/Linux
 ~ lsb_release -si Raspbian
 ~ lsb_release -sr 10
 ~ lsb_release -sc buster
 ~ lsb_release -sd Raspbian GNU/Linux 10 (buster)
 ~ echo $XDG_CURRENT_DESKTOP LXDE
 ~ echo $GDMSESSION lightdm-xsession
 ~ sudo grep -i Xsession /var/lib/AccountsService/users/ ^^^^ This did not have a path^^^^ to AccountsService

That's COOL. Thanx ;)

Now can you please tell me how you fixed (hardcoded) the compilation (of what part) to resolve the floating point problem encountered with building qblib, then making QB64?

If you read my script from line #1355 to #1510 you will see that I am not using any of the original internal .sh scripts but doing everything step by step. So it would not be too difficult to include the necessary step for the raspbian operating system with a conditional test (if [$VENDOR =" raspbian"] then .... elif .... fi).

Now if you have already created a working qblib_setup.o library for raspbian, since I don't have the answer on which flag to put with gcc and where yet, until I have a way to test it myself ([i ]I am currently looking to install a Pi emulator in a VM[/ i]), can you please send me this library and I will temporarily include it until I get the response from you ([ i]how you hardcoded it[/ i]) or from the QB64 development team (see https://www.qb64.org/forum/index.php?topic=3903.0 ).

However, this second option would be just a temporary job as I don't know if your library would work with all versions of raspbian (I would rather do it myself via the script to be OK with any version of the OS).

You can send me your libqb_setup.o library via my e-mail: pckb @ wanadoo.fr (without spaces).

As soon as I get your answer, I will edit the script and send it to you for testing before making it available as version #33 of my script (which can be done by this weekend).

Looking forward.

Cheers.
Fifi

PS: As a reward for your participation, like everyone else who helped me out, you will be named in the acknowledgment at the top of the script when this is done for the raspbian operating system.
« Last Edit: May 15, 2021, 08:28:53 am by Fifi »
It's better to look like an idiot for a short time while asking something obvious to an expert than pretending to be smart all your life. (C) Me.

Offline doppler

  • Forum Regular
  • Posts: 241
    • View Profile
FIFI:
Actually everything to make it work was in the link: https://www.qb64.org/forum/index.php?topic=1550.0

Compare setup_lnx.sh to my message to see the distro ID stuff. This part needs to be squeezed in | [ "$DISTRO" == "raspbian" ] | so the ID is set for debian.
The hard coding is just a define in "QB64/internal/c/common.h" #define QB64_NOT_X86

Hard coding a definitely is a bad idea.
Should be a block conditional based on "lsb_release -si" which ID's Raspbian

I investigated Arm floating point.  Seems that some arm processors do contain IEEE compliant floating point instructions.  Instructions are different from Intel/AMD needing different compile instructions.  Things run right when ARM and Intel Linux box'es are coded correctly.

Offline Fifi

  • Forum Regular
  • Posts: 181
    • View Profile
    • My small QB64 contribution
Hi doppler,

FIFI:
Actually everything to make it work was in the link: https://www.qb64.org/forum/index.php?topic=1550.0

Compare setup_lnx.sh to my message to see the distro ID stuff. This part needs to be squeezed in | [ "$DISTRO" == "raspbian" ] | so the ID is set for debian.
The hard coding is just a define in "QB64/internal/c/common.h" #define QB64_NOT_X86

I made the requested modifications in my multi lingual installation script rev #33 accordingly to your information.

Please can you test it on your Raspberry Pi?

You can download it as usual on my dedicated homepage www.as2.com.

Click on the download button and save the file QB64_install.tar.bz2, then unpack the file with the command:

Code: QB64: [Select]
  1. tar -xjf QB64_install.tar.bz2

Then launch the script:

Code: QB64: [Select]
  1. sudo ./QB64_install.sh

and follow the instruction on the screen.

For the test, at the question "Do you want to keep the temp folder to check what was done during the installation?", please respond "Y" or "y" (for yes).

In case of problem during the installation, I'll ask you to make some investigation for me in the folder /opt/qb64-tmp.

Pleae let me know your returns by e-mail: pckb@wanadoo.fr

Hard coding a definitely is a bad idea.
Should be a block conditional based on "lsb_release -si" which ID's Raspbian

I aggree 100%.

However, it's not on my hands.

Ask to the dev team members and see if they plan to support the Pi?

I investigated Arm floating point.  Seems that some arm processors do contain IEEE compliant floating point instructions.  Instructions are different from Intel/AMD needing different compile instructions.  Things run right when ARM and Intel Linux box'es are coded correctly.

Unfortunately, I can't make any test since I don't have nor plan to have a Pi but I think it not could be too hard to find what flag must be used to take care of the floating point issue when you're a member of some Pi fora.

Let me know if you find the answser and I'll modify my script.

Looking forward.

Cheers.
Fifi
It's better to look like an idiot for a short time while asking something obvious to an expert than pretending to be smart all your life. (C) Me.