Release C/C++ Development Tools


freamon

Active Member
Joined
Apr 13, 2011
Messages
562
EDIT!


version 0.0.39 (updated 09/07/2011)


http://repo.openpandora.org/?page=detail&app=cdevtools.freamon.40n8e


It includes libraries for X11, SDL, Allegro, QT and GTK+


I've tested it with:


torpor's PandoraWakeBreaker (uses SDL and openGLES)


bZaR's wars:commando (uses QT)


Minitube (uses QT)


Sword of Forgoal (Allegro)


Atomic Tanks (Allegro)


WordWarVi (uses GTK+ and PortAudio)


Guvcview (uses GTK+ and PortAudio)


wxWidgets (uses GTK+)


MediaInfo (uses wxWidgets and lots of dependencies)


Quake1 (with GLES driver)


Quake2 (with SDL driver)


vim


PickleLauncher (downloaded via svn)


Mousepad (downloaded via git, uses xdt-autogen)


Notes and Weather Xfce4-plugins (uses iconv and xdt-autogen)


various GNU programs like GNUChess, diction, hello (use ./configure && make setup. Can be completely rebuilt using autoreconf)


Please let me know what you think, and if there's any improvements to be made.


Very first version:


http://www.mediafire.com/?wjdm8sq050d6qx9
 
Last edited by a moderator:
Cheers for this. I just got put the toolchain on my PC, but I'm definitely interested in native compilation. Will let you know how I get on.
 
Awesome fraemon. I'll give it a quick test tonight (hello world anyone? :p )


EDIT: Tested it last night, works very nicely! I dug out an old SDL experiment I wrote last year, and once I remembered to add "-lSDL" to the compile command it just compiled straight away B) I don't know any OpenGL ES yet so I think it will be a while before I get to test that, but I like it so far!
 
Last edited by a moderator:
Finally got round to giving this a go. Works great except SDL_mixer isn't installed (I know nothing about SDL, but I assume it's available for the Pandora?)


Very cool being able to write code anywhere now. Cheers!
 
...


make Makefiles - torpor's PandoraWakeBreaker is included in the "mysrc" directory as an example.


Please be aware though that 'make' is an alias for 'make -e', so it will use CFLAGS from the environment, not from the Makefile.


...


but I wanted a PND that didn't touch the NAND at all ideally. I'm hoping to be able to fix this by recompiling cc1 with static libraries, but this'll take time (especially on a Pandora).

Does "make install" install to the NAND (for installing things like the aspell dictionary)?


Thank you for doing this!
 
I get a "C++ compiler cannot create executables" error when running a configure script
 
Finally got round to giving this a go. Works great except SDL_mixer isn't installed (I know nothing about SDL, but I assume it's available for the Pandora?)
I'm going to release a new version in a few hours from now which includes SDL_mixer.

Does "make install" install to the NAND (for installing things like the aspell dictionary)?
By default, make install shoves stuff in "/usr/local/" which doesn't exist on the Pandora.


You'd need to either edit the Makefile or run ./configure with a prefix. Either



Code:
./configure --prefix=/usr
if you wanted it on the NAND, or



Code:
./configure --prefix=/media/mmcblk0p1/myappp/
if your didn't.

I get a "C++ compiler cannot create executables" error when running a configure script
I know - this version's a bit rubbish. I put it on mediafire (rather than the repo) out of pure embarrassment. There's stuff in my first post about how you can fix this, but it'd better to wait for the new version as it's much less fudgey.
 
As promised, I've upped the new and improved version to the repo. Please see the first post in this thread for info.
 
As promised, I've upped the new and improved version to the repo. Please see the first post in this thread for info.

I've just tested out the new version fraemon. I like the blurb you get telling you which compilers and libraries are available, but I can't actually run gcc or g++. It just says "command not found".


Any idea why that might be?
 
I've just tested out the new version fraemon. I like the blurb you get telling you which compilers and libraries are available, but I can't actually run gcc or g++. It just says "command not found".


Any idea why that might be?

Well that's embarrassing. It'll probably be the same for anyone who's 'upgraded'. It creates gcc and g++ if it detects that it's running for the first time (it looks for a .firstrun file), but this isn't happening for you because you have a .firstrun file from the previous pnd. Sorry dude.


Solution is to do something like:



Code:
rm /media/mmcblk0p1/pandora/appdata/cdevtools/.firstrun

or even better: (if you don't any source files in there you want to keep)



Code:
rm -r /media/mmcblk0p1/pandora/appdata/cdevtools/


and then re-run the pnd.
 
Last edited by a moderator:
I've removed my .fisrtrun and it fails on recreating. I believe on testing ability to find libraries, right before where it asks for my sudo password. Rerunning the pnd again does not change this even though the "testing ability" is now successful.
 
I've removed my .fisrtrun and it fails on recreating. I believe on testing ability to find libraries, right before where it asks for my sudo password. Rerunning the pnd again does not change this even though the "testing ability" is now successful.

Hi. Sorry - I'm a bit tired at the moment: can you help me understand exactly what it is that is failing. Does 'gcc' not work? The test for finding libraries will fail everytime you reboot (because it relies on /var/volatile/run/ld.so.cache, and /var is a temporary file-system that's recreated on every boot). It's designed that way: i.e. - if test fails, run sudo ldconfig (so it will be able to find its libraries), but it is succeeds, there's no need to bother you for your password.


I've ballsed up a bit here: I tested it on my system, and then I booted from a SD card with a fresh firmware to try to simulate what it would be like for other users. But I forgot about uses who'd tried out the initial 'mediafire' version and so had stuff left over from that.


As a general solution, I'd say:


1) Make sure the pnd exited cleanly last time (i.e. there's no /mnt/utmp/cdevtools). If, not reboot.


2) Completely remove the 'cdevtools' directory in appdata.


3) Start the pnd.


On the first run, it output loads of stuff about what it's doing: 'Creating gcc' etc, so if you scroll back up the screen, you should be able to see any error messages if it fails to create them.
 
Last edited by a moderator:
I've removed my .fisrtrun and it fails on recreating. I believe on testing ability to find libraries, right before where it asks for my sudo password. Rerunning the pnd again does not change this even though the "testing ability" is now successful.

Hi. Sorry - I'm a bit tired at the moment: can you help me understand exactly what it is that is failing. Does 'gcc' not work? The test for finding libraries will fail everytime you reboot (because it relies on /var/volatile/run/ld.so.cache, and /var is a temporary file-system that's recreated on every boot). It's designed that way: i.e. - if test fails, run sudo ldconfig (so it will be able to find its libraries), but it is succeeds, there's no need to bother you for your password.


I've ballsed up a bit here: I tested it on my system, and then I booted from a SD card with a fresh firmware to try to simulate what it would be like for other users. But I forgot about uses who'd tried out the initial 'mediafire' version and so had stuff left over from that.


As a general solution, I'd say:


1) Make sure the pnd exited cleanly last time (i.e. there's no /mnt/utmp/cdevtools). If, not reboot.


2) Completely remove the 'cdevtools' directory in appdata.


3) Start the pnd.


On the first run, it output loads of stuff about what it's doing: 'Creating gcc' etc, so if you scroll back up the screen, you should be able to see any error messages if it fails to create them.

I just shut off my pandora, stuck my SD card onto my pc and removed pandora/appdata/cdevtools directory, put my SD card back into my pandora, booted it up and ran your dev tools. This was my output:



Code:
--------------------------------------------------------------

Setting PATH to /mnt/utmp/cdevtools/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/games

--------------------------------------------------------------

Setting PKG_CONFIG_PATH to /mnt/utmp/cdevtools/usr/lib/pkgconfig

--------------------------------------------------------------

Running for the first time.

--------------------------------------------------------------

Creating gcc: echo "arm-angstrom-linux-gnueabi-gcc -I/mnt/utmp/cdevtools/usr/include "$@"" > usr/bin/gcc

bash: usr/bin/gcc: Operation not permitted

chmod 0777 usr/bin/gcc

chmod: cannot access `usr/bin/gcc': No such file or directory

--------------------------------------------------------------

Creating g++: echo "arm-angstrom-linux-gnueabi-g++ -I/mnt/utmp/cdevtools/usr/include "$@"" > usr/bin/g++

bash: usr/bin/g++: Operation not permitted

chmod 0777 usr/bin/g++

chmod: cannot access `usr/bin/g++': No such file or directory

--------------------------------------------------------------

Creating pkg-config: echo "pkg-config.cdevtools --define-variable=prefix=/mnt/utmp/cdevtools/usr "$@"" > usr/bin/pkg-config

bash: usr/bin/pkg-config: Operation not permitted

chmod 0777 usr/bin/pkg-config

chmod: cannot access `usr/bin/pkg-config': No such file or directory

--------------------------------------------------------------

Creating libc.so: 

echo "/* GNU ld script

   Use the shared library, but some functions are only in

   the static library, so try that secondarily.  */

OUTPUT_FORMAT(elf32-littlearm)

GROUP ( /lib/libc.so.6 /mnt/utmp/cdevtools/usr/lib/libc_nonshared.a  AS_NEEDED ( /lib/ld-linux.so.3 ) )" > usr/lib/libc.so

bash: usr/lib/libc.so: Operation not permitted

--------------------------------------------------------------

Creating libpthread.so

echo "/* GNU ld script

   Use the shared library, but some functions are only in

   the static library, so try that secondarily.  */

OUTPUT_FORMAT(elf32-littlearm)

GROUP ( /lib/libpthread.so.0 /mnt/utmp/cdevtools/usr/lib/libpthread_nonshared.a )" > usr/lib/libpthread.so

bash: usr/lib/libpthread.so: Operation not permitted

--------------------------------------------------------------

Creating ld.so.conf

echo "/mnt/utmp/cdevtools/usr/lib" > ld.so.conf

--------------------------------------------------------------

First-run stuff complete.  Creating .firstrun

--------------------------------------------------------------

Testing ability to find libraries: ldd usr/bin/testld - failed

Running sudo ldconfig -f ld.so.conf

Password: 

--------------------------------------------------------------

--------------------------------------------------------------

Hi there.  The following is now available for use:

Binaries:

	gcc	(for C programs)

	g++	(for C++ programs)

	make, m4, pkg-config

Libraries:

	X11, X11-xcb

	SDL, SDL-image, SDL-ttf, SDL-mixer. SDL-net, SDL-gfx

	GLES

	Allegro

	QTCore, QTGui

	GTK+ 2.0

	Portaudio2


Please type 'exit' when finished.

--------------------------------------------------------------

/mnt/utmp/cdevtools/mysrc$
 

I'm having the exact same problem. That is also the same as my output upon executing the pnd in a clean environment as described.


The gravamen of the issue seems to be "usr/bin/gcc: Operation not permitted" and the other similar errors.


This pnd is an awesome idea, and it will save me from having to buy an additional SD card on which to install my OS, if it works.
 
Same problem as others here, with same output. This is after deleting the appdata dir and the symbolic links from before!
 
Thanks everyone. It's either a file permissions thing, or I need to create usr/bin and usr/lib first (because otherwise its strange that it lets me create ld.so.conf). What a shitty thing to be tripped up by. I have to go to work (it'll give me something to think about while I'm there I suppose), but I'll fix it when I get back. Sorry.
 
I am really looking forward to try this out. When I run the pnd, I the installer says that the commands are ready for use but when I try to run gcc or g++ I get: bash: gcc: command not found.


Its strange because I can run the rest (make, etc.). I am no noob but no guru either so I really dont know why this happens.
 
I am really looking forward to try this out. When I run the pnd, I the installer says that the commands are ready for use but when I try to run gcc or g++ I get: bash: gcc: command not found.


Its strange because I can run the rest (make, etc.). I am no noob but no guru either so I really dont know why this happens.

It's because I'm a idiot, mate. So far, the PND only works if you happen to be me. This is proving to be an unpopular feature (see the posts above yours), and it will be removed in the next release (hopefully a few hours from now).
 
I am really looking forward to try this out. When I run the pnd, I the installer says that the commands are ready for use but when I try to run gcc or g++ I get: bash: gcc: command not found.


Its strange because I can run the rest (make, etc.). I am no noob but no guru either so I really dont know why this happens.

Really? You couldn't have tried looking at the thread before posting that? Everyone's having the same problem. If you're eager to try it out look for the crossed out link at the very bottom of the first post. I was able to compile SDL stuff with that perfectly fine.
 
Back
Top