Release C/C++ Development Tools


OK. So we may have stumbled on a bug/feature of PNDs or Union filesystems (either will do, because then I get to blame someone else).


If I create a PND and run it, then that PND can do



Code:
touch test

touch usr/bin/test

and appdata will look like



Code:
test

usr/bin/test

i.e. it will create the 'test' files, but also the 'usr' and the 'bin' directories.


But if I create a PND and *you* run it, it can create the initial 'test' file, but refuses to create the 'usr' and 'bin' directories. Likewise, if you tried to untar PandoraWakeBreaker.tar in 'mysrc', it will refuse to create the directory, but for *me* it will happily create mysrc/PandoraWakeBreaker_1.0/ in appdata.


And it's not like the PND can just do 'mkdir -p usr/bin', because as far as the system is concerned, they already exist. And I can't change the permissions of usr/bin, because they're part of a read-only filesystem. Grrrr....


Anyways, I'm 97% sure I've got around this. All the files that the PND wants to create are now in a new directory called 'init', and things like /usr/bin/gcc are symlinks to ../../init/gcc.


Please could somebody try out this new version and report back?


http://www.mediafire.com/?2ak2oe3ptapvk0q


If you've got a appdata/cdevtools directory from before, please remove it first.


Thank you.


p.s. configure scripts don't work on fat32 filesystems, so if you want to use them, the source needs to be on media that's formatted to ext2.
 
But if I create a PND and *you* run it, it can create the initial 'test' file, but refuses to create the 'usr' and 'bin' directories. Likewise, if you tried to untar PandoraWakeBreaker.tar in 'mysrc', it will refuse to create the directory, but for *me* it will happily create mysrc/PandoraWakeBreaker_1.0/ in appdata.


And it's not like the PND can just do 'mkdir -p usr/bin', because as far as the system is concerned, they already exist. And I can't change the permissions of usr/bin, because they're part of a read-only filesystem. Grrrr....
this have been released specifically to fix that issue ;)
 
Last edited by a moderator:
Ah brills. Thanks sebt, that's reassuring to know. I'll be able to change my pnd back to more normal behaviour when your script gets integrated.


In the meantime, can someone give the new version a try? (2 posts up!)
 
Ah brills. Thanks sebt, that's reassuring to know. I'll be able to change my pnd back to more normal behaviour when your script gets integrated.


In the meantime, can someone give the new version a try? (2 posts up!)

It compiled my project fine. That's only testing g++ with SDL and SDL_ttf, but it's better than the last version was!
 
Tried the updated PND, works perfectly on the terminal window that is opened in the setup. But when I try to run any other command on a new terminal window I get the same bash: gcc not found error.
 
which version of pkg-config is included? As I'm getting a less than 0.7 error
 
But when I try to run any other command on a new terminal window I get the same bash: gcc not found error.
because the path variable is on a per shell basis

gfrancisdev is correct. You have to start the pnd, then navigate to where-ever your code is. If you *have* to open another terminal window for some reason, you should be able to get it working by exporting PATH as /mnt/utmp/cdevtools/usr/bin:$PATH. There's also a PKG_CONFIG_PATH to export as well (as /mnt/utmp/cdevtools/usr/lib/pkgconfig). To see how the pnd does it, have a look in /mnt/utmp/cdevtools/.newrc or scroll the terminal back up when it starts.

which version of pkg-config is included? As I'm getting a less than 0.7 error

The version included is 0.22 (the very latest version is 0.25). I'm guessing you're getting the error from a configure script - this is due a bug in pkg-config (or rather, a bug in how a lot of configure scripts test its version). I'm going to fix this for the next release, but for now, it can be resolved by editing the configure script. Find the line that says



Code:
if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version

and replace it with



Code:
if $PKG_CONFIG --atleast-pkgconfig-version=$_pkg_min_version

i.e. change the space to an equals sign.
 
Thanks for your great work, this makes compiling on the go a lot easier! :)


One problem I have though: I'm trying to compile an XFCE plugin and get the following error:


configure: error: Library requirements (xfce4-panel-1.0 >= 4.20) not met; consider adjusting the PKG_CONFIG_PATH


How do I find the missing library on the Pandora to link to?
 
Is PandoraWakebreaker properly building with this now?
 
Is PandoraWakebreaker properly building with this now?
Yes. I included the code with the pnd, partly as a demo, and partly because I changed it a tiny bit. In Base.h I commented out #include <bfd.h> (because I haven't included binutils-dev and WakeBreaker didn't seem to need it) and I added the lines #define TRUE true and #define FALSE false. But other than that, it builds with a simple 'make' command.
 
Thanks for your great work, this makes compiling on the go a lot easier! :)


One problem I have though: I'm trying to compile an XFCE plugin and get the following error:


configure: error: Library requirements (xfce4-panel-1.0 >= 4.20) not met; consider adjusting the PKG_CONFIG_PATH


How do I find the missing library on the Pandora to link to?
I included lots of dev libraries, but as you've just found out, there's still lots missing. It's still early days yet; I'll be updating this pnd on a regular basis, shoving in more libraries each time.


In the meantime though, it's possible for you to add any libraries you want yourself. For XFCE plugins, you'll need at least xfce4-panel-dev, libxfce4util-dev, and libxfcegui4-dev from the angstrom repo. Here's the links:


http://us.feeds.angstrom-distribution.org/feeds/unstable/ipk/glibc/armv7a/base/xfce4-panel-dev_4.6.4-r0.6_armv7a.ipk


http://us.feeds.angstrom-distribution.org/feeds/unstable/ipk/glibc/armv7a/base/libxfce4util-dev_4.6.2-r0.6_armv7a.ipk


http://us.feeds.angstrom-distribution.org/feeds/unstable/ipk/glibc/armv7a/base/libxfcegui4-dev_4.6.4-r0.6_armv7a.ipk


Save these ipk files into your appdata/cdevtools directory, and open a terminal there. Then, for xfce4-panel do:



Code:
sudo bash

ar -x xfce4-panel-dev_4.6.4-r0.6_armv7a.ipk

tar xvf data.tar.gz

cd usr/lib/pkgconfig

mousepad libxfce4panel-1.0.pc

Change 'exec_prefix=/usr' to 'exec_prefix=${prefix}'

Change 'libdir=/usr/lib' to 'libdir=${prefix}/lib'

Change 'includedir=/usr/include' to 'includedir=${prefix}/include'

Save and exit

cd ..

ln -sf /usr/lib/libxfce4panel.so.1 libxfce4panel.so



Then repeat for libxfce4util and libxfcegui4. For extra tediousness, one of them even includes an additional .pc file and library. For the last line of the above - creating the symlinks - I use tab-completion to get the first reference to the library I want in /usr/lib/.



This will give you a directory structure of:



Code:
appdata/cdevtools/usr/

appdata/cdevtools/usr/include

  (loads of header files)

appdata/cdevtools/usr/lib

  libxfce4panel.so -> /usr/lib/libxfce4panel.so.1

  libxfce4kbd-private.so -> /usr/lib/libxfce4kbd-private.so.5

  libxfce4util.so -> /usr/lib/libxfce4util.so.4

  libxfcegui4.so ->  /usr/lib/libxfcegui4.so.4

appdata/cdevtools/usr/lib/pkgconfig

  (4 .pc files)



Now, when you open the pnd again, the pnd's 'usr/include' will have merged with appdata's 'usr/include', and likewise for 'usr/lib' and 'usr/lib/pkgconfig', so the libraries you want should be available.


*----*


I did try the above with a couple of xfce plugins but didn't have a lot of luck: the 'eyes' plugin had some wonky libtool error I need to figure out some other time, and the 'screenshooter' plugin needed 3 additional dev libraries, and after I'd done all that, it complained that it needed a newer version of libsoup than the one available on the Pandora (or at the angstrom repo for that matter). If you let me know what XFCE plugin you're trying to compile, I'll have a crack at it if you've still got problems.
 
For anyone getting errors in configure scripts about pkg-config's version not being high enough, you can edit the configure script as described a few posts above, or you can edit appdata/cdevtools/init/pkg-config and replace the contents with:



Code:
#!/bin/bash


i=0

for j in "$@"; do

	if [ "$j" == "--atleast-pkgconfig-version" ]; then

		args[i]=$j"="

	else

		args[i]+=$j

		let i++

	fi

done


pkg-config.cdevtools --define-variable=prefix=/mnt/utmp/cdevtools/usr "${args[@]}"


I'll have a proper go at supporting xfce4-plugin compilation soon, but first I need to add qmake. I'm going to go out and steal someone's wifi, and then download sebt3's toolchain and steal all his ideas. Mwah ha ha.


edit: changed line 5 of pkg-config script from $j to "$j"
 
Last edited by a moderator:
Sorry if I've missed something, but when I try and run qmake, it says "bash: qmake: command not found"


Any ideas?


Cheers
 
Sorry if I've missed something, but when I try and run qmake, it says "bash: qmake: command not found"


Any ideas?


Cheers

qmake is in the latest version, but I haven't uploaded it yet because I came across a separate issue where the pnd wouldn't unmount cleanly if there was another instance of bash running before you launched it. That's resolved now, so I'll be able to upload the version with qmake later today.
 
Updated to 0.0.37. Added qmake and some extra dev libs. Fixed problem with pkg-config and configure scripts not getting the minimum version right.


For best performance, don't start the PND if you've already got a terminal window open, as then it has to go into a loop and wait to avoid returning to pnd_run too early (I think it's only me that does this to be honest).


I'm planning on supporting compilation of xfce4 plugins next, plus some usage tutorials for the wiki.
 
Thank you sooo much! :D


I get a missing file "X11/extensions/XTest.h" when compiling KeePass, which is true; my Pandora doesn't have that file. But I have libx11-dev, xproto, xproto-dev, xextproto, xextproto-dev etc. installed.


Any suggestions?
 
Last edited by a moderator:
I downloaded the source for KeePass. I realise it's supposed to be cross-platform, but the source seems brutally windows-specific. Do you have a link for a link for the sources of the Linux port? Or are you trying to compile KeePassX?


Anyways, Xtest.h is in libxtst-dev, which also needs recordproto-dev. I tried including these for KeePassX but then it says it needs xtestconst.h (which is in xextproto-dev) and Xinput (which is in libxi-dev). So I've packaged up that lot and uploaded them here: http://www.mediafire.com/?1as446vyo3mp4g9


You can add them by saving the file to appdata/cdevtools/ and doing



Code:
sudo tar xvf libsforkeypassx.tar


Then if you close the terminal and relaunch the pnd, compiling KeePassX doesn't complain about missing headers.


HOWEVER: it does error on compiling mainwindow.cpp, saying that QSessionManager is an incomplete type and that qapplication.h has a forward declaration of it. I don't yet know how to resolve this to be honest. It might be a bug in Angstrom's build of QT (Gentoo had the same problem once), or there might be a NO_SESSION_MANAGER define somewhere, or it might be something else. I need to learn more about QT and C++ and play around with some test cases. Does anyone have any ideas?
 
Or are you trying to compile KeePassX?
Yeah, KeePassX

Anyways, Xtest.h is in libxtst-dev, which also needs recordproto-dev. I tried including these for KeePassX but then it says it needs xtestconst.h (which is in xextproto-dev) and Xinput (which is in libxi-dev). So I've packaged up that lot and uploaded them here: http://www.mediafire.com/?1as446vyo3mp4g9


You can add them by saving the file to appdata/cdevtools/ and doing



Code:
sudo tar xvf libsforkeypassx.tar


Then if you close the terminal and relaunch the pnd, compiling KeePassX doesn't complain about missing headers.

You're amazing :wub: :wub:

HOWEVER: it does error on compiling mainwindow.cpp, saying that QSessionManager is an incomplete type and that qapplication.h has a forward declaration of it. I don't yet know how to resolve this to be honest. It might be a bug in Angstrom's build of QT (Gentoo had the same problem once), or there might be a NO_SESSION_MANAGER define somewhere, or it might be something else. I need to learn more about QT and C++ and play around with some test cases. Does anyone have any ideas?

I (think I) managed to fix all the code errors when trying to compile from sebt3's VM, but it was struggling to produce the binary, hence why I tried your tools; So fingers crossed I should be able to fix this one.


Thanking you
 
Last edited by a moderator:
Back
Top