Pandora Trying to port something to the Pandora for the first time and having trouble. Do I have the right


Odd4Life

Still Fresh
Joined
May 20, 2013
Messages
16
Location
USA
I downloaded the Jumanji browser for my Pandora and really liked it, but I was curious about why it's been over 2 years without an update.  I saw that the developers started over (or something like that), so I figured I might as well see if I can compile it for the Pandora since no one else seems to want to.  I tried using the guide on PandoraLive that showed you how to port Arkanoid as a reference, but it hasn't been much help.  Please note that I don't know how to code, and that I'm mainly a Windows person, but my time with my Pandora has gotten me used to fiddling with command line stuff.  If it turns out that I'll have to modify code to get Jumanji working on the OpenPandora, I'll probably just end up giving up on this.

Anyway, when I first tried compiling Jumanji with "make" on Code Blocks (the SD card I'm using it on is 8GB and formatted to ext2) I got messages stating that girara-gtk3, webkitgtk-3.0, and javascriptcoregtk-3.0 were not found in the pkg-config search path.  It also said that it couldn't find "girara/datastructures.h" so I downloaded the Girara 0.1.9 source code as well (Girara is developed by the same people and is called a "user interface library").  I tried compiling it with make (the Jumanji website says that you need Girara installed to compile Jumanji, but I figured I could just tell it to look wherever the compiled version of Girara was on my SD card for that), but I ran into another issue.  This time it said it couldn't find "glib.h" in the exact same format Jumanji had an error with "girara/datastructures.h"

Are either of these types of problems common for beginners?  Searching around on DuckDuckGo for a few hours total hasn't given me any help that worked.

I'm at a loss now, but I'd really like to get this working because this version of Jumanji supports Adblock Plus filter lists and Userscripts, and I can't use a browser without the former - it's too annoying.
 
Hum, seems you will have to compile Girara first (probably using a


./configure --prefix=/mnt/utmp/codeblocks
make
make install

kind-of sequence.

And hope it works. But it seems you'll need gtk3 also, so not sure it work.

PS: Note that tuto in pandoralive is for software based on a Makefile only. Many open sources used a "configure" based Makefile, so before launching Make you have to "configure" it (use --help) to have the list of option. There are many other build systems like cmake (use "ccmake ." to configure interactively before make), Scons, Jam, etc...
 
Last edited by a moderator:
I took a look at the other files in the directories that the Girara and Jumanji sources were extracted to and it seems that both use a file named "config.mk" in the compilation process.  Girara's config.mk has an option to use GTK 2 instead of GTK 3.  Am I correct in understanding from your post that the Pandora doesn't have access to or has issues with GTK 3?

In any case, the config.mk files both specify a PREFIX variable and LIBDIR and INCLUDEDIR variables.  The latter two start with the prefix (using that ${} thing), then tack on the rest of the file path as specified.  I changed PREFIX to /mnt/utmp/codeblocks and LIBDIR and INCLUDEDIR to use the all the lib and include directories Code Blocks shows at startup, or at least for the lib ones.  I found include directories everywhere there was a lib directory except for the root of my Pandora.

It also has a variable for a LOCALEDIR, but a search in /mnt/utmp/codeblocks shows so many directories named "locale" with a few others named "Locale."  I don't know which ones I need in general.

There is also a common/mk file, but it doesn't seem to have anything editable.

I edited Girara's config.mk to the best of my ability (as described above) and still got the error saying glib.h wasn't found, and the version of GTK used didn't matter.
 
You could build GTK3 for Pandora, but since the Pandora runs XFCE it only uses GTK2 as per the firmware.

Can't help you on codeblocks stuff, not used it myself.
 
To build gtk3 you need a newer glib. Good luck with that ;)
 
You should check if what ever you are compiling has a configure flag that allows it to use gtk2 instead of gtk3.. I wasn't so lucky in the latest thing I wanted to port..
 

you can check if there are any optional flags that can be set by:

Code:
./configure --help
 
I had a go at Jumanji and Zathura once. Now, I'm completely incompetent (almost) at this "porting" thing and didn't get very far, but I seem to remember that the people behind them don't believe in ./configure - There's a makefile, and you're expected to understand and deal with configuration and missing libs yourself. It made things more complicated.
 
I believe I mentioned that I tried it with both GTK 2 and 3, but I still got an error stating glib.h couldn't be found.  Where is it located in the first place?  Does the Pandora have a version as well as Code Blocks?  Anyone know?

EDIT: Found glib.h in /mnt/utmp/codeblocks/usr/include/glib-2.0

Now I want to know why Code Blocks won't use it.

EDIT 2: Can't believe I forgot to read the readme file.  It says gtk2 version 2.18.6 or higher is required, or gtk3 version 3.2 or higher, as well as something called intltool.  What version of gtk2 does the Pandora have?  It also says that a working pkg-config installation is required.  If there isn't one, I'll have to set the GTK_INC and GTK_LIB environment variables manually.  More information for those who are interested.

EDIT 3: Both Girara and Jumanji have the option to be built with GTK 2 instead of GTK 3.  Tried to build Jumanji using GTK 2 by editing the config.mk - there are comments in it that say to comment out some lines and uncomment others to do this, which I followed.  Without Girara installed, I got two errors.  One was about missing Girara compiled with GTK 2 (expected) and the other was about missing webkit-1.0 (unexpected).  For now I'll focus solely on Girara until I get it compiled properly, though.
 
Last edited by a moderator:
I don't mean to be annoying/impolite/impatient, but does anyone have an idea of what could be going wrong?  I figured I should edit my last post instead of double posting, but it seems no one has really viewed this topic in the past day or two, if my memory of the view count is correct, so I'm putting this in a new message.  I just don't want to give up on this without even getting it started.
 
Getting webkit compiled is a major pain, at least if you want a recent version. I think libwebkitgtk-1.6.1 was the last one that was *relatively* painless to compile for the openpandora. But the newer versions requires you to upgrade just about every package on the entire system. This is why I stopped porting midori.
 
Last edited by a moderator:
I don't mean to be annoying/impolite/impatient, but does anyone have an idea of what could be going wrong?  I figured I should edit my last post instead of double posting, but it seems no one has really viewed this topic in the past day or two, if my memory of the view count is correct, so I'm putting this in a new message.  I just don't want to give up on this without even getting it started.
Trying to compile something non-standard as a first try is not advisable I must say.

The package you need (glib and so one) are not easy to grab without the magic of a "./configure" or "cmake".

Edit by hand your .mk files and try to add some

`pkg-config glib --cflags`

to the CFLAGS section (where other -I/usr.... are)

and

`pkg-config glib --libs`

for the libs

Try the command in a Codeblocks terminal to see the result.

Good luck.
 
When I do those it responds with this for each:

"Package glib was not found in the pkg-config search path.

Perhaps you should ad the directory containing 'glib.pc' to the PKG_CONFIG_PATH environment variable

No package 'glib' found

From browsing around in the codeblocks utmp folder, it seems there is a "glib-2.0.pc" file, but not a "glib.pc" file.  Trying


`pkg-config glib-2.0 --cflags`
results in "bash: -I/mnt/utmp/codeblocks/usr/include/glib-2.0: No such file or directory" while


`pkg-config glib-2.0 --libs`
results in "bash: -lglib-2.0: command not found"

I've checked the file path resulting from the --cflags commnd I tried and found that the directory does indeed exist.  I have no clue why Code Blocks isn't recognizing it.  A few DuckDuckGo searches said something about needing glib-2.0-dev, which doesn't seem to be displayed in the package lists when searching through opkg, but I tried the info command and found that it can be installed to the OpenPandora.  Any thoughts?
 
hum, yes, it is glib-2.0, and I even tried that on my pandora before writting, but still, I wrote it wrong (I now have a glib.pc also in codeblocks, but it's a 1.2 version, not the one you are looking for)...

So, on command line, just type


pkg-config glib-2.0 --cflags

whitout the backquote

but in the makefile (or th .mk), leave the backquote, so the command is actualy executed and the result is taken into account.

Also, my glib-2.0.pc is like this:

Code:
prefix=/mnt/utmp/codeblocks/usr
exec_prefix=/usr
libdir=${prefix}/lib
includedir=${prefix}/include
 
glib_genmarshal=glib-genmarshal
gobject_query=gobject-query
glib_mkenums=glib-mkenums
 
Name: GLib
Description: C Utility Library
Version: 2.24.0
Libs: -L${libdir} -lglib-2.0 
Libs.private: 
Cflags: -I${includedir}/glib-2.0 -I${libdir}/glib-2.0/include 
 
Last edited by a moderator:
If it needs glib2.0 ver. 2.26, then you are out of luck as we have ver. 2.24 on the Pandora system I think.


You would need .next or compile pretty much a new system.
 
nice to know someone is tryng to update jumanji, used to be my fav browser but due to instabilities, switched to luakit; maybe luakit maybe easier to compile on pandora?
 
Our glib-2.0.pc files match up completely, ptitSeb.  Trying what you suggested without the backticks results in these two include paths:

-I/mnt/utmp/codeblocks/usr/include/glib-2.0

-I/mtn/utmp/codeblocks/usr/lib/glib-2.0/include

As for what you said, mcobit, is there a way to determine what version of a library a program needs to compile?  If I am indeed out of luck with glib2.0 version 2.24, would it be possible to put .next on an SD card, compile it on that or something, then add the libraries to the PND rather than have it use the ones on SZ 1.60 or something?  I believe I saw some sort of thing like that mentioned in one of the PND creation tutorials - adding libraries to the PND, I mean.
 
The problem with glib is that a lot of the os depends on it. Of course you can include those libs all in a pnd after updating, but you would need to ship half of the rootfs with every pnd it uses.
 
I believe the issue is indeed the version of glib available on the Pandora.  I was curious if compiling Zathura (a document viewer by the same group) might work, and checking the readme showed that it needed glib 2.28 at minimum.  So... I guess I'm out of luck, then?
 
Back
Top