01-12-2017, 09:58 AM | #1 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jan 2017
Device: Kindle Touch (K5)
|
Having problems compiling gtk code for kindle touch
I have a jailbroken kindle touch. I want to write native apps (for example a reddit client), so I searched for how to compile gtk code for it and found this post: https://www.mobileread.com/forums/sh...d.php?t=189372.
Everything goes fine and I can compile it with regular gcc for my laptop. I've gotten the libs from the kindle and followed the tutorial all the way up to cross compiling the test program. When I run the long command starting with arm-linux-gnueabi-gcc I get output that looks like this: Code:
In file included from /usr/lib/x86_64-linux-gnu/glib-2.0/include/glibconfig.h:9:0, from /usr/include/glib-2.0/glib/gtypes.h:32, from /usr/include/glib-2.0/glib/galloca.h:32, from /usr/include/glib-2.0/glib.h:30, from /usr/include/glib-2.0/gobject/gbinding.h:28, from /usr/include/glib-2.0/glib-object.h:23, from /usr/include/glib-2.0/gio/gioenums.h:28, from /usr/include/glib-2.0/gio/giotypes.h:28, from /usr/include/glib-2.0/gio/gio.h:26, from /usr/include/gtk-2.0/gdk/gdkapplaunchcontext.h:30, from /usr/include/gtk-2.0/gdk/gdk.h:32, from /usr/include/gtk-2.0/gtk/gtk.h:32, from gtktest.c:1: /usr/include/glib-2.0/glib/gtypes.h: In function ‘_GLIB_CHECKED_ADD_U64’: /usr/include/glib-2.0/glib/gmacros.h:232:53: error: size of array ‘_GStaticAssertCompileTimeAssertion_0’ is negative #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED ^ /usr/include/glib-2.0/glib/gmacros.h:229:47: note: in definition of macro ‘G_PASTE_ARGS’ #define G_PASTE_ARGS(identifier1,identifier2) identifier1 ## identifier2 ^ /usr/include/glib-2.0/glib/gmacros.h:232:44: note: in expansion of macro ‘G_PASTE’ #define G_STATIC_ASSERT(expr) typedef char G_PASTE (_GStaticAssertCompileTimeAssertion_, __COUNTER__)[(expr) ? 1 : -1] G_GNUC_UNUSED ^ /usr/include/glib-2.0/glib/gtypes.h:423:3: note: in expansion of macro ‘G_STATIC_ASSERT’ G_STATIC_ASSERT(sizeof (unsigned long long) == sizeof (guint64)); ^ Info about my os and packages: I am using debian linux stretch (I think it's also called testing, since sid is what unstable is called). The arm-linux-gnueabi I have is arm-linux-gnueabi-5, because the version in the tutorial isn't in my apt repos. |
01-12-2017, 10:17 AM | #2 |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Just follow the directions without the changes you have introduced.
The directions are five years old and so is your Kindle Touch - they match. Use the versions as described. You can not expect current software to match what is on your Kindle Touch. |
01-12-2017, 10:19 AM | #3 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jan 2017
Device: Kindle Touch (K5)
|
I think the only change I made was to use different version of gcc. So, if I use that exact version of gcc-armeabi, then that will most likely solve my problem?
|
01-12-2017, 10:35 AM | #4 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
If not, repeat, carefully, what is written. The very first line of the code you quoted tells you the source of your problem and one of the things you are doing differently. We really don't have anyone here with the time to teach programming or direction following. |
|
01-12-2017, 11:23 AM | #5 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jan 2017
Device: Kindle Touch (K5)
|
So, I ran pkg-config by its self, and figured out that is where the x86_64 stuff is coming from. So, right now I'm going though all of those -I includes and replacing them with the ones in the lib from the touch. Some things aren't there though, so I'll see how that works when it's done. I just have no idea where to get a glibconfig.h that is for arm. I'm just going to edit the one in the x86_64 libs and try that.
Alright, those were bad ideas, but maybe if install debian armel in qemu, I could just compile there. So, that's my next trial. Last edited by jacobr8893; 01-12-2017 at 11:55 AM. |
01-12-2017, 12:17 PM | #6 | |
Going Viral
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
|
Quote:
IIRC, you want Debian/Wheezy (or maybe one release newer - check libc versions to be sure). |
|
01-12-2017, 01:41 PM | #7 |
Junior Member
Posts: 4
Karma: 10
Join Date: Jan 2017
Device: Kindle Touch (K5)
|
It works!
If anyone else wants to know, I got all the qemu stuff to run debian arm here: http://http://https://people.debian....32/qemu/armel/ I used debian weezy, all the versions seemed to match up and everything ran. Then just run the vm, install everything, compile the gtk app the normal way, and transfer to the kindle touch. Last edited by jacobr8893; 01-12-2017 at 01:51 PM. |
Tags |
compiling, error, gtk, gtk+, kindle touch |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Compiling Android for Kindle Touch | thatworkshop | Kindle Developer's Corner | 26 | 12-17-2013 11:28 PM |
here's how to compile a gtk native app for the kindle touch | chris_c | Kindle Developer's Corner | 9 | 12-21-2012 12:01 AM |
Regarding Calibre source code compiling | shivas | Introduce Yourself | 4 | 12-23-2009 09:52 AM |
iLiad Problems porting GTK apps | robinwatts | iRex Developer's Corner | 6 | 03-22-2008 06:19 AM |
iLiad Compiling GTK apps for iliad | rudysplif | iRex Developer's Corner | 3 | 03-17-2008 12:59 PM |