OESF Portables Forum
Model Specific Forums => Sharp Zaurus => Zaurus - pdaXrom => Topic started by: Armagon on March 22, 2006, 04:37:41 pm
-
Update: I've made a dependency finder script, see post 8 (https://www.oesf.org/forums/index.php?showtopic=18410&view=findpost&p=120038), and let me know if it works for you.
--
Hi.
I'm looking for a handy script that'll take a pdaXrom executable, and tell me what the package dependencies are (so that I can put that in the ipk control file.) Does anyone have such a beast?
I assume that it'd have to use the output of ldd on the Zaurus, or the output of
armv5tel-cacko-linux-objdump -x executable_filename | grep NEEDED
when you cross-compile. I also presume that it'd need to use (possibly several) Filelist files, from the feeds that contain the dependancies.
So, again, does anyone have such a script, or a similar solution? (Barring that, would anyone write such a script?)
Thanks,
Armagon
-
Hi.
I'm looking for a handy script that'll take a pdaXrom executable, and tell me what the package dependancies are (so that I can put that in the ipk control file.) Does anyone have such a beast?
I assume that it'd have to use the output of ldd on the Zaurus, or the output of
armv5tel-cacko-linux-objdump -x executable_filename | grep NEEDED
when you cross-compile. I also presume that it'd need to use (possibly several) Filelist files, from the feeds that contain the dependancies.
So, again, does anyone have such a script, or a similar solution? (Barring that, would anyone write such a script?)
[div align=\"right\"][a href=\"index.php?act=findpost&pid=119828\"][{POST_SNAPBACK}][/a][/div]
OpenEmbedded
-
Hi.
I'm looking for a handy script that'll take a pdaXrom executable, and tell me what the package dependancies are (so that I can put that in the ipk control file.) Does anyone have such a beast?
I assume that it'd have to use the output of ldd on the Zaurus, or the output of
armv5tel-cacko-linux-objdump -x executable_filename | grep NEEDED
when you cross-compile. I also presume that it'd need to use (possibly several) Filelist files, from the feeds that contain the dependancies.
So, again, does anyone have such a script, or a similar solution? (Barring that, would anyone write such a script?)
[div align=\"right\"][a href=\"index.php?act=findpost&pid=119828\"][{POST_SNAPBACK}][/a][/div]
OpenEmbedded
[div align=\"right\"][a href=\"index.php?act=findpost&pid=119830\"][{POST_SNAPBACK}][/a][/div]
In theory. In practice firefox won't install on OZ on my freshly flashed 6000l using the simple command"ipkg -d sd install firefox" It downloads firefox,whips up a bunch dependencies, decides it should install thunderbird, can't find thunderbird, and stops. I didn't request thunderbird there, and firefox isn't dependant on thunderbird. I would view this as indicative of a not-quite-stable-at-best solution for managing dependecies.
I hate to say stuff like this. I really do. gpe 2.7 is gorgeous, the minibrowser is cool, even if a lot of sites crash it, and the work that went into OZ and openembedded, the idea of a unified handheld OS, is to be commended.
On the other hand OZ guys posting OZ or OE propaganda in pdaXrom threads is really not too cool. Especially when their stuff still doesn't seem to work as well as pdaXrom. proof: If I type "ipkg -d sd install firefox" on pdaxrom on my 6000 I get firefox working on my 6000. If I do it in OZ/GPE I get a failed attempt to install Thunderbird.
Which do you think constitutes a better fit to any reasonable definition of "working?"
I realize Armegon was talking about ipkg generation, not installation, but wasn't it OE that generated the firefox ipkg that thinks it needs thunderbird?
Firefox is not some bit of useless exotica. If I want to access any of my work sites, or do online banking, the gpe browser won't do it. It is a pretty standard piece of software with widely known dependencies that should NOT be a problem to install.
I'm not trying to flame here. I really think OZ has improved. But let's not kid ourselves. OE is not (yet at least) the solution the dev team would like it to be. Maybe it is a case of too much familiarity (no pun intended). To someone working on OE and with OZ constantly, misbehaviours of the sort I cited must look pretty trivial.
But to me, at least, this pushing OE stuff is kinda like the guy at the office who forces everybody to look at baby pictures. you know?
-
Hi.
I'm looking for a handy script that'll take a pdaXrom executable, and tell me what the package dependancies are (so that I can put that in the ipk control file.)Â Does anyone have such a beast?
I assume that it'd have to use the output of ldd on the Zaurus, or the output of
armv5tel-cacko-linux-objdump -x executable_filename | grep NEEDED
when you cross-compile. I also presume that it'd need to use (possibly several) Filelist files, from the feeds that contain the dependancies.
So, again, does anyone have such a script, or a similar solution? (Barring that, would anyone write such a script?)
[div align=\"right\"][a href=\"index.php?act=findpost&pid=119828\"][{POST_SNAPBACK}][/a][/div]
OpenEmbedded
[div align=\"right\"][a href=\"index.php?act=findpost&pid=119830\"][{POST_SNAPBACK}][/a][/div]
In theory. In practice firefox won't install on OZ on my freshly flashed 6000l using the simple command"ipkg -d sd install firefox" It downloads firefox,whips up a bunch dependencies, decides it should install thunderbird, can't find thunderbird, and stops. I didn't request thunderbird there, and firefox isn't dependant on thunderbird. I would view this as indicative of a not-quite-stable-at-best solution for managing dependecies.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=119847\"][{POST_SNAPBACK}][/a][/div]
That error was being caused by some person removing stuff form the feeds without checking if it was needed. As expected, it blew up.
-
FWIW, the content of the control file of the firefox I've just built:
Package: firefox
Version: 1.5-r0
Depends: libc6 (>= 2.4), libgcc1 (>= 4.1.0), libstdc++6 (>= 4.1.0), libidl-2-0 (>= 0.8.6), libglib-2.0-0 (>= 2.8.4), gtk+ (>= 2.8.9), libatk-1.0-0 (>= 1.10.1), pango (>= 1.10.2), libcairo2 (>= 1.0.4), libxt6 (>= 1.0.0), libx11-6 (>= X11R7.0-1.0.0), libxft2 (>= 2.1.8.2), libxrender1 (>= 0.9.0.2), libfontconfig1 (>= 2.2.95), libfreetype6 (>= 2.1.10), libz1 (>= 1.2.3)
Section: x11/utils
Architecture: armv5te
Maintainer: OpenEmbedded Team
MD5Sum: c143c380313bd4f1818e53cb81435beb
Size: 8308680
Filename: firefox_1.5-r0_armv5te.ipk
Source: http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.5/source/firefox-1.5-source.tar.bz2 file://xptcstubs.patch;patch=1 file://no-xmb.patch;patch=1 file://jsautocfg.h file://extensions-hack.patch;patch=1 file://mozconfig file://mozilla-firefox.png file://mozilla-firefox.desktop
Description: Version 1.5-r0 of package firefox
-
Package: firefox
Version: 1.0.6-r0
Depends: libc6 (>= 2.3.5+cvs20050627), libgcc1 (>= 3.4.4), libstdc++6 (>= 3.4.4), libidl-2-0 (>= 0.8.6), libglib-2.0-0 (>= 2.6.4), gtk+ (>= 2.6.10), libatk-1.0-0 (>= 1.9.0), pango (>= 1.8.1), libxt6 (>= 0.1.5), libx11-6 (>= 6.2.1), libxft2 (>= 2.1.6), libfreetype6 (>= 2.1.10), libz1 (>= 1.2.3), libxrender1 (>= 0.8.4), libfontconfig1 (>= 2.2.95), gconf-dbus (>= 0.0cvs20060102), dbus-1 (>= 0.23.4), gnome-vfs-dbus (>= 2.8.4.4), libgnome (>= 2.12.0.1), libpopt0 (>= 1.7), libbonobo (>= 2.10.0), orbit2 (>= 2.10.2)
Status: install user unpacked
Section: x11/utils
Architecture: arm
maintainer: OpenEmbedded Team
MD5Sum: 33d200b0ded7b809daf662d0880510d0
Size: 8283430
Filename: firefox_1.0.6-r0_arm.ipk
Source: http://ftp.mozilla.org/pub/mozilla.org/firefox/releases/1.0.6/source/firefox-1.0.6-source.tar.bz2 file://xptcstubs.patch;patch=1 file://no-xmb.patch;patch=1 file://firefox-cc-fix.patch;patch=1 file://jsautocfg.h file://extensions-hack.patch;patch=1 file://mozconfig file://mozilla-firefox.png file://mozilla-firefox.desktop
Description: Version 1.0.6-r0 of package firefox
Thats updated firefox in OZ 3.5.4 feed - I had to clean a bit feeds after 'world' build.
-
Hi.
I'm looking for a handy script that'll take a pdaXrom executable, and tell me what the package dependancies are (so that I can put that in the ipk control file.) Does anyone have such a beast?
I assume that it'd have to use the output of ldd on the Zaurus, or the output of
armv5tel-cacko-linux-objdump -x executable_filename | grep NEEDED
when you cross-compile. I also presume that it'd need to use (possibly several) Filelist files, from the feeds that contain the dependancies.
So, again, does anyone have such a script, or a similar solution? (Barring that, would anyone write such a script?)
[div align=\"right\"][a href=\"index.php?act=findpost&pid=119828\"][{POST_SNAPBACK}][/a][/div]
OpenEmbedded
[div align=\"right\"][a href=\"index.php?act=findpost&pid=119830\"][{POST_SNAPBACK}][/a][/div]
OE can generate dependencies by looking executable file???!!! Look into it;)
-
I'm looking for a handy script that'll take a pdaXrom executable, and tell me what the package dependancies are (so that I can put that in the ipk control file.) Does anyone have such a beast?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=119828\"][{POST_SNAPBACK}][/a][/div]
OK, I've written one. I want to put it up here before I go to bed tonight. It may still have bugs, and I'm sure it can be improved.
You'll need to remove the .txt extension, and make the attached python script executable. You will also need to download a filelist (such as the one for the C700 feed), and edit a couple of lines. I suspect this'll work natively if you change objdump = "armv5tel-cacko-linux-objdump"
to objdump = "objdump"
.
Sample Output
This is sample output, when I'm in a subshell of runsdk.sh.
user@desktop:~/Zaurus/Cross/install/bin$ ./depfind.py inkscape
PACKAGE : MEETS DEPENDANCIES FOR
atk : libatk-1.0.so.0;
fontconfig : libfontconfig.so.1;
freetype : libfreetype.so.6;
gconf : libgconf-2.so.4;
glib2 : libglib-2.0.so.0; libgmodule-2.0.so.0; libgobject-2.0.so.0; libgthread-2.0.so.0;
glibc : libpthread.so.0; libdl.so.2; libc.so.6; libm.so.6;
gnome-vfs : libgnomevfs-2.so.0;
gtk2 : libgdk-x11-2.0.so.0; libgdk_pixbuf-2.0.so.0; libgtk-x11-2.0.so.0;
libbonobo : libbonobo-2.so.0; libbonobo-activation.so.4;
libgcc : libgcc_s.so.1;
libiconv : libiconv.so.2;
libpng : libpng12.so.0;
libstdcxx : libstdc++.so.6;
libxml2 : libxml2.so.2;
libxslt : libxslt.so.1;
libz : libz.so.1;
orbit2 : libORBit-2.so.0;
pango : libpango-1.0.so.0; libpangoft2-1.0.so.0; libpangox-1.0.so.0; libpangoxft-1.0.so.0;
popt : libpopt.so.0;
xfree : libXrender.so.1; libXft.so.2;
THE FOLLOWING LIBRARIES HAVE UNMET DEPENDANCIES
libgtkmm-2.4.so.1
libgdkmm-2.4.so.1
libatkmm-1.6.so.1
libpangomm-1.4.so.1
libglibmm-2.4.so.1
libsigc-2.0.so.0
libgc.so.1
Dependancies: atk fontconfig freetype gconf glib2 glibc gnome-vfs gtk2 libbonobo libgcc libiconv libpng libstdcxx libxml2 libxslt libz orbit2 pango popt xfree
[Those unmet dependancies, are, of course, in my feed.]
Good luck!
-
I didn't notice that Armagon had already solved this but I whipped up a quick shell script to list the dependencies for any given binary.
The script was originally a one-liner so it's a tad ugly and crude but it works. It uses ldd to find the list of required libraries so I'm not sure how this compares to objdump. It also requires the /usr/lib/ipkg/info/* files so will need to be run on your Zaurus or this could be changed to read a feed file list.
The list of dependencies is pruned to be as compact as possible by removing any packages that are already covered by others. For example if your binary uses Zlib and SDL then only "sdl" will be listed as SDL depends on xfree and xfree depends on libz. I have also hardcoded it to remove glibc and libgcc from the depends list as they are provided with the base install of pdaXrom.
#!/bin/sh
BINARY=$1
if [ -z "$BINARY" ]; then
echo "Usage: $(basename $0) [package to ignore...]"
exit 1
fi
shift
IGNORE="glibc libgcc $*"
PKGS=$(for file in $(for lib in $(ldd $BINARY | awk '{ print($3) }'); do grep -l "^${lib}$" /usr/lib/ipkg/info/*; done | sort | uniq); do basename $file | sed 's/.list$//'; done)
IGNORE="$IGNORE $(for pkg in $(echo $PKGS | tr ' ' '\n'); do ipkg info $pkg Depends | cut -f2- -d\ | grep -v ^Depends | sed 's/, /\n/g' | sort | uniq; done)"
DEPENDS=$(echo $PKGS | tr ' ' '\n' | grep -v $(for pkg in $(echo $IGNORE | tr ' ' '\n'); do echo "-e $pkg "; done))
echo $DEPENDS | sed 's/ /, /g'
-
I didn't notice that Armagon had already solved this but I whipped up a quick shell script to list the dependencies for any given binary.
Awesome! Thank you, rgrep.
How did people figure out the dependencies before this?
Armagon
-
A lot of people don't list dependencies at all or only list the ones they can think of. I used to do it manually using ldd and "ipkg search <lib.so>". I don't know if the pdaXrom builder scripts do anything clever to calculate the dependencies or if they are entered manually in the ipkg control file. It's common practise (in Debian, BitBake, etc) to calculate them dynamically when the package is built.