Raspberry Pi install. Conflicting help is puzzling me.

Linux specific questions.
guymark
Posts: 3
Joined: Oct 01, 2018 7:45

Raspberry Pi install. Conflicting help is puzzling me.

Postby guymark » Oct 01, 2018 8:37

Hi.

I am new to the Raspberry Pi - though have played around with FreeBasic before on a PC some time ago. It worked well and I like it.

The Raspberry Pi however is taking a little getting used to. I worked with unix and xenix about 30 years ago but forgot most of it. I have downloaded files from the "Nightly Build" which I have been told is the best for the Pi - and followed the installation notes. Others have then said I need to download an assortment of libraries and I have done this too.

Despite best efforts (and changing permissions to 777 everywhere (security of my Raspberry Pi is not a chief concern at the moment), it still comes up with one fault after another.

If I start again with a clean install of Rasperbian, is there a link I can follow and simply download a list of things at THAT location and know that I should then be able to do the classic:-

print "hello world"
save "helloworld.bas"

fbc helloworld.bas

and have it work?

Due to many kind folks offering constructive suggestions, I now have several copies of various libraries in assorted folders, the compiler itself has ended up in three of them.

Current compile errors are:-
ld: cannot find /usr/local/bin/../lib/freebasic/linux-arm/fbextra.x: Permission denied
ld: cannot find /usr/local/bin/../lib/freebasic/linux-arm/fbrt0.o: Permission denied
ld: cannot find -lfb
ld: cannot find -lncurses


I don't understand the meaning of the dots .. between /usr/local/bin and /lib/freebasic/linux-arm/fbextra.x

Is there a simple file I can download, install and it pokes the bare essentials there they need to be, in order to let the compiler work please - and ideally lets the permissions be whatever they need to be to let it work?

If not, is there a way to tell the compiler to get all its libraries from a specified directory and I can just dump everything in there and it can drag out what it wants?

FreeBasic seems awesome, but making it run on the Raspberry Pi is proving "interesting" :)

Perfectly happy to start from another clean install of Raspberian - just struggling to find the right combination of assorted things to download and run a little confusing. I suspect I am 99% there - but after spending a few hours going around in circles, I think it is time to admit I am struggling.

Any comments welcome (constructive ones even more so!)

Many thanks
Mark
counting_pine
Site Admin
Posts: 5956
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: Raspberry Pi install. Conflicting help is puzzling me.

Postby counting_pine » Oct 01, 2018 12:43

Huh, just noticed the daily builds in http://users.freebasic-portal.de/stw/builds/ are all using zip files. I don't think they preserve file permissions..

Anyway, in the main folder of the zip file, you should see an install.sh file. If you run ./install.sh -i, it should install it to the default location, which is /usr/local/ . You'll have to run it with sudo to do that, which I'm guessing you're fine with.

I guess before running it, you should give execute permissions to bin/fbc and install.sh, because they won't be set in the zip file. (I think fbc is the only thing there that needs it.)

To answer your other question, '..' means the parent directory. So /usr/local/bin/../lib/ is the same as /usr/local/lib/. In this case, it probably means that fbc is in /usr/local/bin/, and it's looking for a library in '../lib/' (i.e. the subfolder 'lib/' in its parent folder).
guymark
Posts: 3
Joined: Oct 01, 2018 7:45

Re: Raspberry Pi install. Conflicting help is puzzling me.

Postby guymark » Oct 01, 2018 12:47

Awesome, thank you for that.

I will try to find out where I have gone wrong now I have a better idea as to what to look out for.

Thank you again. :)
St_W
Posts: 1381
Joined: Feb 11, 2009 14:24
Location: Austria
Contact:

Re: Raspberry Pi install. Conflicting help is puzzling me.

Postby St_W » Oct 01, 2018 13:00

Yeah, all the automatic packaging is done on the host (running Windows), where I don't see any possibility to create an archive with Linux file permissions. So you need to make the install script executable first, running "chmod +x install.sh", followed by "./install -i". Or you can launch the script by calling your shell application explicitly e.g.: "bash install.sh -i". Note that root priviledges are required for the default install location, so you probably want to use "sudo".

I thought about creating deb packages, as this would simplify the whole thing for beginners, but this would not be possible to build on the Windows host either. So I'll probably need to move the packaging away from the host to the build machines at some time or use WSL ...
counting_pine
Site Admin
Posts: 5956
Joined: Jul 05, 2005 17:32
Location: Manchester, Lancs

Re: Raspberry Pi install. Conflicting help is puzzling me.

Postby counting_pine » Oct 01, 2018 13:15

Hmm, apparently .zip might support permissions to a limited extent. If you can get Python working on the packaging server, you might be able to use the zipfile module to set some executable permissions within the zip file: https://stackoverflow.com/a/434689/446106 https://stackoverflow.com/a/48435482/446106.
(Not sure if it works for updating existing files..)

EDIT: I realise this is probably a big hassle, so take this as a suggestion rather than a "you should ..." sort of post.
guymark
Posts: 3
Joined: Oct 01, 2018 7:45

Re: Raspberry Pi install. Conflicting help is puzzling me.

Postby guymark » Oct 06, 2018 12:52

Thank you for the helpful comments.

I am going to start over with another fresh install of Raspberian. If other are able to do it, then sooner or later I will get it right!
TJF
Posts: 3355
Joined: Dec 06, 2009 22:27
Location: N47°, E15°

Re: Raspberry Pi install. Conflicting help is puzzling me.

Postby TJF » Oct 10, 2018 14:57

@guymark

If you have an RPi with armhf achitecture (> 1, ARM7) you can install freebasic by the package manager. Just execute

Code: Select all

sudo apt-get install freebasic
Therefor the PPA from Arend Lammertink has to be in your file /etc/apt/sources.list, see this documentation for details.

Return to “Linux”

Who is online

Users browsing this forum: No registered users and 1 guest