Allegro-4.4.3.1 on Beaglebone Console. [SOLVED]

Linux specific questions.
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: incomplete Type ZBuffer

Post by TJF »

First: now the freebasic package works (with headers @ /usr/incude/freebasic)!
Dinosaur wrote:Copied cgui.bi from working Debian Stretch GUI disk to usr/include/freebasic
Copied libcgui.so from working Debian Stretch GUI disk to usr/lib/arm-linux-gnueabihf/

cd/Projects/SmartPlug
fbc -v -w all SmartPlug.bas
No errors
./SmartPlug
Error installing Allegro
Which error? You didn't execute

sudo ld_config

after installing a library.
Dinosaur
Posts: 1481
Joined: Jul 24, 2005 1:13
Location: Hervey Bay (.au)

Re: incomplete Type ZBuffer

Post by Dinosaur »

Hi All

Firstly TJF, thank you for taking the time.
sudo ld_config

after installing a library.
I did a reboot between each step.
Which error?
That's just it, when I execute my program ./SmartPlug that message
Error installing Allegro
is the only error message.EDIT: confusion is probably my src file folder has the same name as the executable.

There is no error log from Allegro.

I am rewriting the micro SD again and will compile the cgui library to see if that is the cause.

Regards
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: incomplete Type ZBuffer

Post by TJF »

Dinosaur wrote:
sudo ld_config

after installing a library.
I did a reboot between each step.
Reboot doesn't help. The ld_config command updates the cache for the linker.
This resulted in:
...
usr/lib/arm-linux-gnueabihf/ contained liballeg.so liballeg.so.4.4 liballeg.so.4.4.2
The linker will not find that copies until executing ld_config.

Anyhow, when you build from source the makefile should invoke ld_config in the install target.
systemctl
Posts: 182
Joined: Mar 27, 2020 5:15

Re: incomplete Type ZBuffer

Post by systemctl »

@TJF: ldconfig, not ld_config

@OP: you used an old version of fbc and it's not provided by us. Remove this version and install the official version from us. You can compile fbc from source. We do provide a bootstrap package (generated C source code). Otherwise, it's not our problem to help you.
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: incomplete Type ZBuffer

Post by MrSwiss »

systemctl wrote:@OP: you used an old version of fbc and it's not provided by us.
@systemctrl,
If you don't know (precisely) what this is all about: then please, just "shut up".

This is about the ARM-Linux distribution of FBC ...
badidea
Posts: 2591
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: incomplete Type ZBuffer

Post by badidea »

Dinosaur wrote:"incomplete Type ZBUFFER" and the lines in the .bi file are shown below.
Any chance you have a conflicting ZBUFFER or BITMAP, like last time with LINE?
Last edited by badidea on May 11, 2020 23:00, edited 1 time in total.
systemctl
Posts: 182
Joined: Mar 27, 2020 5:15

Re: incomplete Type ZBuffer

Post by systemctl »

MrSwiss wrote:
systemctl wrote:@OP: you used an old version of fbc and it's not provided by us.
@systemctrl,
If you don't know (precisely) what this is all about: then please, just "shut up".

This is about the ARM-Linux distribution of FBC ...
If this is so then our ARM-Linux distribution sucks. The packager didn't know what he has done. He didn't understand the file system hier and messed it up. Confused between /usr and /usr/local. Get another better packager!

Anyway, version 1.05 is very old. I just pointed out the fact.

p/s: Don't said this packager is you! Given the way you acted I think I really have reason to believe so.
systemctl
Posts: 182
Joined: Mar 27, 2020 5:15

Re: incomplete Type ZBuffer

Post by systemctl »

@MrSwiss:

There's no official package for linux on arm. This is third party package:

https://freebasic.net/forum/viewtopic.php?f=5&t=25266

So I'm nothing wrong when said we have nothing to do with this since it's not our official package.

I suggested him to build fbc from source: https://documentation.help/FreeBASIC/DevBuildLinux.html

I'm nothing wrong. I wonder why the Admins still let @sshole like you to wander on the forum and fsck anyone you don't agree with.

p/s: Foe added.
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: incomplete Type ZBuffer

Post by MrSwiss »

systemctl wrote:p/s: Don't said this packager is you! Given the way you acted I think I really have reason to believe so.
Well, you see: you're wrong again. The package is, IIRC from: TJF
systemctl wrote:Get another better packager!
It's exactly this kind of "NOOB" comment, that we don't need, around here!
(DO IT YOURSELF and only then, make a big noise about it.)
Dinosaur
Posts: 1481
Joined: Jul 24, 2005 1:13
Location: Hervey Bay (.au)

Re: incomplete Type ZBuffer

Post by Dinosaur »

Hi All

@TJF
Reboot doesn't help. The ld_config command updates the cache for the linker.
That's really helpful to know. I see so may times the statement " ldconfig or reboot".

@badidea
Any change you have a conflicting ZBUFFER or BITMAP, like last time with LINE?
Believe it or not I actually learn from my mistakes.
Sometimes it takes two go's, but never 3. I think TJF's comment on installing the xserver solved that problem.(although I don't know how).
ps: The BBB is installed in the museum and working perfectly (with full Debian gui). The only issue is battery backup of Date/Time.

Thinking about my "error installing allegro" , I am more convinced that it is a cgui error message when it tries to load allegro for my first call
to a cgui function.Today will compile cgui library.

Regards
TJF
Posts: 3809
Joined: Dec 06, 2009 22:27
Location: N47°, E15°
Contact:

Re: incomplete Type ZBuffer

Post by TJF »

MrSwiss wrote:
systemctl wrote:p/s: Don't said this packager is you! Given the way you acted I think I really have reason to believe so.
Well, you see: you're wrong again. The package is, IIRC from: TJF
The package isn't from me:
Dinosaur wrote:sudo apt-get install freebasic
It's the package from the official Debian distro for the BeagleBone hardware. It's available since 2018. The package maintainer RCN build it from the github source. There's nothing wrong with this package.
Dinosaur
Posts: 1481
Joined: Jul 24, 2005 1:13
Location: Hervey Bay (.au)

Re: incomplete Type ZBuffer

Post by Dinosaur »

Hi All

After compiling and installing both allegro & cgui libraries, I still have the same problem.
So, I communicated with the author of CGUI (he is retired now) and he suggested that the problem lies with
the initialization of Allegro , not the installation.

The check I performed confirms this.

Code: Select all

Print allegro_init()

returns -1

I hope I am not being a pioneer here and hope someone else has installed (Joshy ??) it on console BBB.
Otherwise my next step is to read allegro forums and then perhaps post a question.

Many thanks for the help.

Regards

EDIT: Tried Debian 10 as well, however Freebasic not in depository.
Dinosaur
Posts: 1481
Joined: Jul 24, 2005 1:13
Location: Hervey Bay (.au)

Re: Allegro-4.4.3.1 on Beaglebone Console.

Post by Dinosaur »

Hi All

After a week of browsing / learning /testing I have managed to achieve what I was ultimately after.
(Just as well I am retired)
I am detailing this as others (and probably me) will go looking for this solution.
Changing the title helps in a Google search.

I wanted to boot the Beaglebone Black without a window manager and straight into my SmartPlug application
without logging in.

To do that I had to compile Allegro after which I could compile CGUI.
Allegro-4.4.3.1 will not work on Debian console, it needs an X system installed.

I experimented and posted on Allegro forum , but finally found the easiest way.

Code: Select all

sudo apt-get install   'the following
cmake
lxqt-core				'easier then trying to find all the dependencies.
libqt0-dev
xorg
xinit
lxqt-plugin

freebasic  				'which then needed.
libglu-dev
libxcursor-dev
-y libxpm-dev
Then extracted Allegro to a folder in which the following commands were executed.

Code: Select all

cmake .
sudo make
sudo make install
export ALLEGRO=~/allegro-4.4.3.1	'so cgui build can find it.
Then extracted cgui into a folder , then the commands

Code: Select all

./fix.sh unix
make
sudo make install
Copy libcgui.so from /Allegro-4.4.3.1/lib/unix to /usr/lib/arm-linux-gnueabihf

Now to automate the login.
Edited /home/debian/.xsessionrc and added
./SmartPlug 'my application name

Then created a .service file by;
/lib/systemd/system/smarty.service which contained

Code: Select all

[Unit]
Description=blah blah
After=getty.target		'telling it when to start this script

[Service]
Type=simple
ExecStart=/usr/bin/xinit /home/debian/SmartPlug

[Install]
WantedBy=multi-user.target
Tested the service by:
systemctl daemon-reload
systemctl start smarty.service

Once happy with it:
systemctl enable smarty.service
Reboot

Hopefully this will save someone else some time.

EDIT:Because the boot process on the BBB is slow, it will sit on the login: for some time before it runs my application.
Took some time for me to realise this and kept thinking it wasn't working, and thus I logged in, only to find the app opening anyway.


Regards
Post Reply