Release C/C++ Development Tools


'target-list' is what you want qemu to emulate, not the build architecture, so Kamui_kan is right with 'i386-softmmu' (although I doubt x86-64 would work, since the Pandora's cpu is 32-bit). You may want to add "-march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp -D__SOFTFP__" as --extra-cflags though (assuming qemu has some arm/neon optimizations), as cdevtools doesn't automatically add these (as cross-compilation tools tend to).


Are you using the latest version of cdevtools? Because I downloaded your link and tried it, and 'configure' worked okay (it's currently plodding through 'make' as I type this).


Incidentally, I'm assuming you know qemu was already ported as part of the Re-Birth compo ... (ah, I see you do).


edit: Eeek!! also looks like you'll need to allocate some swap space too, 'cos I just ran out of memory during 'make'.
 
Last edited by a moderator:
Ah my mistake, I swear I saw the --target-list flags used with other configure files..
 
Last edited by a moderator:
Strange. I'm on Super-Zaxxon 1.52 aswell.


What happens if you type



Code:
pkg-config --atleast-version=2.12 gthread-2.0

echo $?
 
EDIT: oops, wait 2 seconds I'm checking :p


Is this 2 lines ? after typing these in the terminal I get "0"
 
Last edited by a moderator:
It's 2 lines, yeah. "0" is good (glib version is 2.24, so it's correctly showing that 2.12 is less, if you did pkg-config --atleast-version=2.25, it would report '1')


I'm struggling to think why it will configure for me and not for you.
 
ok thanks ^^


btw I'm actually running : sudo ./configure


I don't know if this change something...
 
Last edited by a moderator:
Aha! 'sudo' will mess things up. You only need 'sudo' at the 'make install' stage.


Please try it without sudo, and it should work.
 
oops :p


Well I used sudo because without it I have a lot of "operation not permited" on some files, I though that this was a permission problem -.-
 
to be precise, I have this kind of errors:


ln: creating symbolic link 'libuser/Makefile': Operation not permitted


And a lot of similar messages
 
Are you getting those errors because you're compiling on a fat-32 sd card? You're very likely to need an ext-2 formatted sd card for the compile to succeed.
 
ok, I'm willing to try this. Just to make sure I don't mess up my NAND, I'm going to ask a few stupid questions (just checking if I understood everything correctly).

(Yes: I'm basically doing this for the first time ever and no: I'm not sure what I'm doing yet :p )

1) if the procedure would be


$ ./configure
$ make
$ make install
it would (by default) compile things and write the binaries to /usr/local/<subdir>, so I have to use


$ ./configure --prefix=/media/mycard/there-you-go
and that's where everything will end up, is that correct?

2) I could also fool any compiler with a symlink


sudo ln -s /media/mycard/there-you-go /usr/local
with a similar result? Is this link permanent or just for this session?

3) Is that really it? Am I (reasonably) save with one of these two options?

(sure, if the software I compile does weird things that's another problem ...)

4) So in an ideal case I just have to wrap what I find in  /media/mycard/there-you-go into a .PND and it should run (or I will come back here and ask more questions because some dependencies are missing)?

Thanks!
 
-- hang on a sec, this forum is broken --
 
Last edited by a moderator:
It would be better to set the prefix to where the pnd will be mounted later.


Like --prefix=/mnt/utmp/programname
 
ok, I'm willing to try this. Just to make sure I don't mess up my NAND, I'm going to ask a few stupid questions (just checking if I understood everything correctly).
(Yes: I'm basically doing this for the first time ever and no: I'm not sure what I'm doing yet :p )

1) if the procedure would be


$ ./configure
$ make
$ make install
it would (by default) compile things and write the binaries to /usr/local/<subdir>, so I have to use


$ ./configure --prefix=/media/mycard/there-you-go
and that's where everything will end up, is that correct?
This is correct.  Writing to NAND will always required the use of 'sudo', so if you just type 'make install' and it works without errors, then you know its only installed to your SD card, as intended.


If you intending to ultimately make a PND, it's perhaps better to do this:


./configure --prefix=/


make


make DESTDIR=/media/mycard/there-you-go install


This is supported by the majority of build setups.  The advantage of this method is that it avoids the possibility of "/media/sdcard/there-you-go" getting hard-coded into your application.  This would result in a PND that works for you, but fails for everybody else.

2) I could also fool any compiler with a symlink

sudo ln -s /media/mycard/there-you-go /usr/local
with a similar result? Is this link permanent or just for this session?
This would be a permanent change.  It fools the whole OS, not just the compiler.  It's mostly useful for when you just want an application for yourself, not for something you're planning to make a PND out of.  The advantage of this method is that the /usr/local file hierarchy is already established in Linux (e.g. /usr/local/bin in already in the PATH, /usr/local/share is already in XDG_DATA_DIRS etc), so it's less effort to get it running after the 'make install' stage.  One thing you will need to do though, is create a file in /etc called 'ld.so.conf', containing the line '/usr/local/lib', and reboot.

Personally, when trying new apps, I first compile it so it installs into /usr/local/, to confirm that it will run on the Pandora without issues, then I delete it, and compile it again to install into "/media/mycard/there-you-go", and try to get it working in a portable way.

3) Is that really it? Am I (reasonably) save with one of these two options?
(sure, if the software I compile does weird things that's another problem ...)
Yeah.  If you never type 'sudo', then you can be reassured that you're not writing to NAND.

4) So in an ideal case I just have to wrap what I find in  /media/mycard/there-you-go into a .PND and it should run (or I will come back here and ask more questions because some dependencies are missing)?

Thanks!
Ideally, yes.  Well-written applications will look in the PATH for binaries, and in XDG_DATA_DIRS for their data, so if you set these up in a start-up script, it should run okay.  However, some applications find their data by setting the path at compile-time, based on the prefix.  So if you did "./configure --prefix=/media/mycard/there-you-go", you might notice a line when compiling stating something like "-DAPPS_DATA_DIR=/media/mycard/there-you-go/share".  These programs will need their source code changing before you can put them in a PND.

==================

In response to mcobit (who responded whilst I was typing this): I don't really agree with doing it like that, but I accept that the majority of existing PNDs have been set up like that.  Also, if you have the problem mentioned above (of applications defining their data directories at compile-time), it will solve it without changing the source code. 
 
Lots of usefull hints there, thanks a lot!

Let's see if I can find something simple enough so it just compiles without issues.

(Plan A failed because of a missing perl module ... never used perl, so I'm going to look for something simpler first ...)
 
In general, I do what Mcobit sugested, point ./configure with --prefix to where the pnd will be.

so, the complete sequence is, for a pnd named "my-new-game", starting where sources are.


./configure --prefix=/mnt/utmp/my-new-game
Then, I do a 


sudo mkdir /mnt/utmp/my-furture-pnd
sudo mount -n --bind /media/MYSDCARD/path/to/my-new-games-sources /mnt/utmp/my-future-pnd
Then, you're good to go with


make
make install

and it should be installed...

you can run some tests (don't forget to use SnapSnap timer to get some screenshots for latter packaging), copy so library somewhere, etc...

don't forget to unmount

with


sudo umount /mnt/utmp/my-new-game

you can add screenshot, icon, PXML, runscript, and package...
 
Seems like there's hardly anything out there which doesn't require to install additional packages :wacko:

I want to add SDL_Image, so I got it from the web and untared it on my ext2 formated partition on my SD card.

I change to the directory and do


./configure --prefix=$CDEVROOT/usr
sudo make
which works fine, but


sudo make install
fails with


/usr/bin/install: cannot create regular file `/mnt/utmp/cdevtools1000/usr/lib/libSDL_image-1.2.so.0.8.4': Operation not permitted
So what am I doing wrong?

Does the cdevtools.pnd have to be on an ext2 partition in order for this to work?
 
Everything inside a PND a read-only. You cannot add or modify thing inside the $CDEVROOT/usr  as it is in the pnd.

You may try to prefix elsewhere (somewhere in your SDCard, but you may have difficulties with pkgconfig, I'm not sure) or try other dev tools.
 
Back
Top