Jump to content


Photo

C/C++ Development Tools


  • Please log in to reply
192 replies to this topic

#1 OFFLINE   freamon

freamon

    Advanced Member

  • Members
  • PipPipPip
  • 465 posts
  • Local time: 09:01 AM
  • LocationHuddersfield, UK

Posted 17 May 2011 - 08:46 AM

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

Edited by freamon, 09 July 2011 - 02:50 PM.


#2 OFFLINE   Tam Toucan

Tam Toucan

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 17 May 2011 - 09:01 AM

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.

#3 OFFLINE   ManlyStump

ManlyStump

    Advanced Member

  • Members
  • PipPipPip
  • 163 posts
  • Local time: 09:01 AM
  • LocationHampshire

Posted 17 May 2011 - 09:30 AM

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!

#4 OFFLINE   Tam Toucan

Tam Toucan

    Advanced Member

  • Members
  • PipPipPip
  • 96 posts

Posted 27 May 2011 - 09:16 AM

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!

#5 OFFLINE   dgame

dgame

    Advanced Member

  • Members
  • PipPipPip
  • 388 posts
  • Local time: 05:01 AM

Posted 27 May 2011 - 02:12 PM

...
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!
GP2X-F100, GP2X-F200, JXD 301, DS Lite, Dingoo A-320, Pandora (CC), GameGadget, Pandora 1GHz

#6 OFFLINE   Edglex

Edglex

    Advanced Member

  • Members
  • PipPipPip
  • 151 posts
  • Local time: 09:01 AM

Posted 27 May 2011 - 04:28 PM

I get a "C++ compiler cannot create executables" error when running a configure script

#7 OFFLINE   freamon

freamon

    Advanced Member

  • Members
  • PipPipPip
  • 465 posts
  • Local time: 09:01 AM
  • LocationHuddersfield, UK

Posted 28 May 2011 - 05:29 AM

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
./configure --prefix=/usr
if you wanted it on the NAND, or
./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.

#8 OFFLINE   freamon

freamon

    Advanced Member

  • Members
  • PipPipPip
  • 465 posts
  • Local time: 09:01 AM
  • LocationHuddersfield, UK

Posted 28 May 2011 - 10:52 AM

As promised, I've upped the new and improved version to the repo. Please see the first post in this thread for info.

#9 OFFLINE   Farox

Farox

    Advanced Member

  • Members
  • PipPipPip
  • 678 posts
  • Local time: 10:01 AM
  • LocationItaly

Donator

Posted 28 May 2011 - 04:59 PM

Thank's a lot for this ;)
Read also my Blog http://farox.rbnet.it/

#10 OFFLINE   ManlyStump

ManlyStump

    Advanced Member

  • Members
  • PipPipPip
  • 163 posts
  • Local time: 09:01 AM
  • LocationHampshire

Posted 29 May 2011 - 07:21 AM

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?

#11 OFFLINE   freamon

freamon

    Advanced Member

  • Members
  • PipPipPip
  • 465 posts
  • Local time: 09:01 AM
  • LocationHuddersfield, UK

Posted 29 May 2011 - 11:18 AM

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:
rm /media/mmcblk0p1/pandora/appdata/cdevtools/.firstrun
or even better: (if you don't any source files in there you want to keep)
rm -r /media/mmcblk0p1/pandora/appdata/cdevtools/

and then re-run the pnd.

#12 OFFLINE   eyecreate

eyecreate

    Advanced Member

  • Members
  • PipPipPip
  • 206 posts
  • Local time: 05:01 AM

Donator

Posted 29 May 2011 - 01:56 PM

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.

#13 OFFLINE   freamon

freamon

    Advanced Member

  • Members
  • PipPipPip
  • 465 posts
  • Local time: 09:01 AM
  • LocationHuddersfield, UK

Posted 29 May 2011 - 02:59 PM

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.

#14 OFFLINE   ManlyStump

ManlyStump

    Advanced Member

  • Members
  • PipPipPip
  • 163 posts
  • Local time: 09:01 AM
  • LocationHampshire

Posted 29 May 2011 - 04:23 PM


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:

--------------------------------------------------------------
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$ 


#15 OFFLINE   jbr

jbr

    Member

  • Members
  • PipPip
  • 12 posts
  • Local time: 05:01 AM

Posted 29 May 2011 - 06:17 PM

*snip*


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.

#16 OFFLINE   Edglex

Edglex

    Advanced Member

  • Members
  • PipPipPip
  • 151 posts
  • Local time: 09:01 AM

Posted 29 May 2011 - 06:43 PM

Same problem as others here, with same output. This is after deleting the appdata dir and the symbolic links from before!

#17 OFFLINE   freamon

freamon

    Advanced Member

  • Members
  • PipPipPip
  • 465 posts
  • Local time: 09:01 AM
  • LocationHuddersfield, UK

Posted 29 May 2011 - 08:21 PM

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.

#18 OFFLINE   south87

south87

    Newbie

  • Members
  • Pip
  • 4 posts
  • Local time: 03:01 AM

Posted 29 May 2011 - 09:04 PM

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.

#19 OFFLINE   freamon

freamon

    Advanced Member

  • Members
  • PipPipPip
  • 465 posts
  • Local time: 09:01 AM
  • LocationHuddersfield, UK

Posted 30 May 2011 - 03:59 AM

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).

#20 OFFLINE   ManlyStump

ManlyStump

    Advanced Member

  • Members
  • PipPipPip
  • 163 posts
  • Local time: 09:01 AM
  • LocationHampshire

Posted 30 May 2011 - 06:58 AM

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.


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users