GLBasic forum

Main forum => GLBasic - en => Topic started by: S.O.P.M. on 2011-Feb-23

Title: Compiling on the Pandora still fails
Post by: S.O.P.M. on 2011-Feb-23
Hi,

is there anyone who has a Pandora and can actually compile on it with the current GLBasic version? This person could possibly help!

I recently got the new firmware so I had to reinstall gcc. The _install_gcc.sh script seemed to work, after 20 minutes I got the message "Download complete. All done!"

Now when I run the compile script I get the following error(s):

Code (glbasic) Select
/usr/lib/gcc/arm-angstrom-linux-gnueabi/4.3.3/../../../../arm-angstrom-linux-gnueabi/bin/ld: cannot find -lSDL
collect2: ld returned 1 exit status


And no program.bin file is created.

I assume there is something incomplete so it would be really helpful if someone can tell me his folder contents of usr/lib/gcc/ or the size of it. My gcc folder there has a size of 1,1 MB with 39 items. Also there is the arm-angstrom-linux-gnueabi folder in usr/ with a size of 1,5 MB by 9 items. Can someone confirm this data?

Thank you!
Title: Re: Compiling on the Pandora still fails
Post by: Kitty Hello on 2011-Feb-23
it did not install the libSDL.a file.
Darn. This device is about to be a nightmare for me. Can anyone try to download the libSDL, please?

Here's what I try:
Code (glbasic) Select

gksudo "opkg install --force-downgrade libsdl-1.2-dev libsdl-mixer-1.2-dev"

Title: Re: Compiling on the Pandora still fails
Post by: S.O.P.M. on 2011-Feb-23
I think it's not the Pandora itself that's a nightmare but rather the way to get the needed files for compiling. No, I don't want to criticize you here but to me it's hard to believe why there's no smarter way for GLBasic to output a .bin file for the device. Either this gcc stuff should be already included in future firmware images or the ideal way would be, surely, the final output file can be generated by GLBasic.
Title: Re: Compiling on the Pandora still fails
Post by: Kitty Hello on 2011-Feb-23
Yes. But they don't still provide a windows hosted cross compiler.
Title: Re: Compiling on the Pandora still fails
Post by: S.O.P.M. on 2011-Feb-26
Hello,

I just found the secret place where the needed files are located!

http://www.angstrom-distribution.org/feeds/unstable/ipk/glibc/armv7a/base/

There you can find a massive list of compressed Debian packages.

Code (glbasic) Select
gksudo "opkg install --force-downgrade libsdl-1.2-dev libsdl-mixer-1.2-dev"

For example, this command downloads  libsdl-1.2-dev_1.2.14-r7.6_armv7a.ipk  and  libsdl-mixer-1.2-dev_1.2.11-r7.6_armv7a.ipk  from this list.

Now you may offer an offline installation for the future. A secure way to get these files installed. I really would appreciate it.
Title: Re: Compiling on the Pandora still fails
Post by: Kitty Hello on 2011-Feb-28
can you make a zip that has all dependancy files required? :D
Title: Re: Compiling on the Pandora still fails
Post by: S.O.P.M. on 2011-Feb-28
That's not funny. I was hoping to help to handle the "Pandora nightmare" and you seem not to take me serious. Sure, that given list is huge but it's not that I don't want to help finding the right files. I've a lot of time and in fact I would like to collect all files required but I have to know where and how to start!

So, again, here is your script:
Quote#!/bin/bash


if zenity --question --text="This installs GLBasic compiler. Needs a Wifi connection. Start?"; then
(
   gksudo "opkg update"
   gksudo "opkg install libstdcdev cpp gcc g cpp-symlinks gsymlinks gcc-symlinks libgles-omap3-dev"
   gksudo "opkg install --force-downgrade libsdl-1.2-dev libsdl-mixer-1.2-dev"
) | tee >(zenity --text-info --width=640 --height=480) >/tmp/glbinstall.txt

if [ -f /usr/bin/gcc ]; then
zenity --info --text="Download complete. All done!"
else
zenity --info --text="GCC seems *NOT* installed. Please report bugs."
gedit /tmp/glbinstall.txt
fi
fi
I colored all the packages red. So I assume we need the following packages first:

and also


Is that right??

Here is a package browser:
http://www.angstrom-distribution.org/repo/

Now I can input all the names from the packages listed above. I start with libstdcdev. There is no result, so I try libstdc and get libstdc++-dev. Then I pick the file with the latest version from the armv7a architecture. Is this the way I have to go? And if the package details tell me the dependences, I do the same with the stated packages, right?
Title: Re: Compiling on the Pandora still fails
Post by: Kitty Hello on 2011-Feb-28
I have no idea. Really, Linux and packages is not my strength. I asked in a pandora IRC, but I got no reply. Maybe the gp32x.com forums is a better place to ask?
I did take you serious. I would really appreciate if you could provide an offline installation method. But I can't be of much help here. I will host it, though.
Title: Re: Compiling on the Pandora still fails
Post by: S.O.P.M. on 2011-Feb-28
Ok! Then I'll see what I can do.
Title: Re: Compiling on the Pandora still fails
Post by: S.O.P.M. on 2011-Mar-05
I have to inform you that actually it's not possible to install the compiler properly. I was able to execute the script completely again but after that the OS was broken. I read somewhere there're some corrupt libraries at the moment and they caused the OS to stop working. You cannot execute anything after the installation and when you reboot the device the message "Failed to execute login command" so the Pandora is not longer usable until you reflash it which means that the installed compiler is lost.

So the nightmare continues and you have no force to chance this. It's sad but true. Maybe drop the Pandora support for GLBasic?
Title: Re: Compiling on the Pandora still fails
Post by: MrTAToad on 2011-Mar-06
It might be worth waiting to see if they resolve it...

Have you tried looking for libncurses ?
Title: Re: Compiling on the Pandora still fails
Post by: S.O.P.M. on 2011-Mar-06
libncurses, yes. There were other people with the same problem someone told about libncurses and claimed it is fixable but I was not able to understand what exactly I have to do. At the moment I really don't want to break it again what means that I'll not try to install gcc again in the next time. Maybe I'll move to Python.
Title: Re: Compiling on the Pandora still fails
Post by: Kitty Hello on 2011-Mar-07
if you install the SDK with the VBox emulator image, the script to compile should run, also.
Title: Re: Compiling on the Pandora still fails
Post by: S.O.P.M. on 2011-Mar-07
Sorry but I have no idea what are you speaking about. VBox is a virtualizer for x86 hardware and I see no use for this issue.
Title: Re: Compiling on the Pandora still fails
Post by: Kitty Hello on 2011-Mar-07
http://blogs.distant-earth.com/wp/?p=109 (http://blogs.distant-earth.com/wp/?p=109)
Title: Re: Compiling on the Pandora still fails
Post by: S.O.P.M. on 2011-Mar-07
Oh this looks very interesting! In my understanding it would be, at least theoretical, already possible to let GLBasic output a ready-to-use binary with this. But that's not the point here, I know... I think I'll have trouble to do the necessary steps right but I'll give it a try probably. Thank you.
Title: Re: Compiling on the Pandora still fails
Post by: MrTAToad on 2011-Mar-07
Might be worth asking on the Pandora forums to see if someone has written/could write a script for you.
Title: Re: Compiling on the Pandora still fails
Post by: WizardStan on 2011-Mar-08
Hi,
someone directed me here from the Pandora forum. :)
I've got a Pandora that I frequently compile on, as well I've got a full cross compiler setup on my desktop.  What is it you need, how can I help?
Title: Re: Compiling on the Pandora still fails
Post by: Kitty Hello on 2011-Mar-08
DUDE!!! Zip up the whole compiler dir and host it on rapidshare or so, then send me a PM for that link. It would be really awesome it we could compile on windows then.
Title: Re: Compiling on the Pandora still fails
Post by: Minion on 2011-Mar-08
Quote from: Kitty Hello on 2011-Mar-08
DUDE!!! Zip up the whole compiler dir and host it on rapidshare or so, then send me a PM for that link. It would be really awesome it we could compile on windows then.

I second that ... I have so much stuff ready to roll out on the pandy, and unable to compile for it !
Title: Re: Compiling on the Pandora still fails
Post by: S.O.P.M. on 2011-Mar-08
Quote from: KittyIt would be really awesome it we could compile on windows then.
Absolutely, yes. *thumbs up* But he didn't say he uses this on a windows desktop ;o)

Quote from: WizardStan[...] I've got a Pandora that I frequently compile on, as well I've got a full cross compiler setup on my desktop.  What is it you need, how can I help?
This is what I want to do now and maybe I need help then. It's not that easy for me to get a full working cross compiler installed. First I need to install a Linux distribution but I don't want to destroy my windows system. I have a Knoppix and a XUbuntu Live CD here and first I have to figure out how to install this on my harddisk in a way to have a multiboot machine. And then install the toolchain and SDK properly on it, uuuhh... :/
Title: Re: Compiling on the Pandora still fails
Post by: torpor on 2011-Mar-08
Hi!  I am torpor, the author of the following thread:

http://www.gp32x.com/board/index.php?/topic/53964-cross-compiling-is-bollocks-toolchains-are-bollocks-use-your-pandora-to-build-apps/

.. about how to set up a compiler on your Pandora.

I'd like to help you solve the problem so you can use your Pandora to build whatever you want.  Some things need to be cleared up first:

1: There is currently a problem with the latest Hotfix#5 not quite being ready to have the compiler/development environment onboard.  We are currently investigating this issue, and you can keep track of our progress in this thread:

http://www.gp32x.com/board/index.php?/topic/58909-unable-to-install-gcc-and-friends-since-hf5/page__pid__942270__st__0&#entry942270

.. when we figure it out, this thread will be updated with the solution.

In the meantime you *can* revert your firmware back to the earlier Hotfix and use the instructions in the "Cross-compiling is bollocks" thread (see above) to set up a proper build environment.  This method does work - I myself have two Pandoras, one for User testing and one for Development, and my Development Pandora is crammed to the gills with onboard compiler tools, making it a 'normal Linux workstation' for development purposes, and with this configuration I have successfully built quite a few Pandora packages already (PandOricutron, FlipClock, WakeBreaker, xsynth, puredata, and so on..)

So, I will help you get this sorted out so you can build GLBasic.  But first, go back to an earlier firmware (I'm currently using HF#4 on my Dev Pandora, and HF#5 on my User-testing Pandora) and then follow the instructions in the "bollocks" thread above .. let me know how you get on, and I will help all you need.  Also, we can meet in #openpandora in the evenings, European Standard Time (I am in Vienna, Austria) if you want more direct assistance.
Title: Re: Compiling on the Pandora still fails
Post by: S.O.P.M. on 2011-Mar-08
What I can tell for sure is that I'm not willing to downgrade my firmware on the Pandora. This may sound ignorant but to be serious, I see no reason why compiling on the Pandora when I can do this on my desktop PC, where it's much faster and with far more memory available. But I would appreciate some help setting up a cross compiler. Today I have installed XUbuntu bootable parallel to Windows. The next step is the really critical one.
Title: Re: Compiling on the Pandora still fails
Post by: S.O.P.M. on 2011-Mar-09
Now I need help. As expected the problems begin. I followed exactly this guide to install the toolchain:

http://blogs.distant-earth.com/wp/?p=109

Until it comes to compiling all seemed to work fine. To remember I have running the Linux distribution Ubuntu. While I want to compile the test example from the guide I get the following error:
Code (glbasic) Select
/usr/local/angstrom/arm/libexec/gcc/arm-angstrom-linux-gnueabi/4.3.3/cc1:
error while loading shared libraries: libmpfr.so.1: cannot open shared object file: No such file or directory


So the first question is why I have no access to the libraries or they are missing?

The guide says that the toolchain comes with a version of Ångström's package manager opkg. But by trying to use it (because I surely need to install additional packages) I get this error:
Code (glbasic) Select
/usr/local/angstrom/arm/bin/opkg-cl:
error while loading shared libraries: libcurl.so.4: cannot open shared object file: No such file or directory


My Ubuntu distribution seems not to have some essential libraries I assume. It comes with dpkg but this packet manager is different so better not to replace "opkg" by "dpkg" in the command line. The second question is how can I install the missing libraries first? I need to use opkg to add packages to the toolchain, it is pre-configured therefore.
Title: Re: Compiling on the Pandora still fails
Post by: Kitty Hello on 2011-Mar-09
Don't bother! I got a compiler set up!!! Wooot!
Title: Re: Compiling on the Pandora still fails
Post by: WizardStan on 2011-Mar-09
Congratulations :)
I hope it goes well.  If you have any other problems, feel free to stop into the official (http://boards.openpandora.org/) or unofficial (http://www.gp32x.com/board/index.php?/forum/61-pandora/) forums.  Plenty of good people there always willing to help :)
Title: Re: Compiling on the Pandora still fails
Post by: S.O.P.M. on 2011-Mar-09
A nightmare has become a dream! Have replied on the german Pandora board, Gernot. A big thank especially to WizardStan :) All is working fine!