Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 09-19-2012, 04:40 AM   #676
Kai771
Just a Noob
Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.
 
Kai771's Avatar
 
Posts: 145
Karma: 162610
Join Date: Aug 2011
Device: Kindle 3
@knc1
I never said 5.2 and 5.1 are fully compatible, in every little detail. I said that luajit source comes with some scripts that run during compilation process of luajit, and that lua5.2 executes those scripts correctly. Weather they're written in lua 5.1 or lua 5.2 syntax, or even klingon is irrelevant - the fact is that lua 5.2 executes them correctly, and it properly compiles luajit. Lua 5.2 is ONLY used to execute those scripts during the compilation of luajit. EVERYTHING ELSE is executed with luajit. At least this is how I see it. I might be wrong though. Noob's opinions aren't worth much .

As for testing - I did test, and kindlepdfviewer compiled following instructions in the guide, using lua5.2 to compile luajit, does work properly, both in emulation mode and on the kindle. However, to be as "kosher" as possible , I changed the guide to use lua5.1 now. (Yes, I tested this too... it works).

FWIW, I believe that it would also work if you used some other version of luajit (sudo apt-get install luajit instead of sudo-apt-get install lua5.1), but I didn't test this.

If you look in the luajit Makefile (the one in src dir), you'll find this text:

Code:
# NOTE: The LuaJIT distribution comes with pre-generated buildvm_*.h files.
# You DO NOT NEED an installed copy of (plain) Lua 5.1 to run DynASM unless
# you want to MODIFY the corresponding *.dasc file. You can also use LuaJIT
# itself (bootstrapped from a pre-generated file) to run DynASM of course.
Since I didn't modify anything, (I just ran make fetchthirdparty), I assume someone on luajit github did this, since kpdfview gets it's luajit src from github, and that's why we need lua installed now. Might be fixed soon (maybe already is, idk). Even if it is, it doesn't hurt to have lua installed.
Kai771 is offline   Reply With Quote
Old 09-19-2012, 04:49 AM   #677
knc1
Going Viral
knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.knc1 ought to be getting tired of karma fortunes by now.
 
knc1's Avatar
 
Posts: 17,212
Karma: 18210809
Join Date: Feb 2012
Location: Central Texas
Device: No K1, PW2, KV, KOA
No need for any defense or attack.

Your post was (in approximate words): "to build LuaJIT requires Lua to be installed"
Based on the limited knowledge in that post, the only advice possible was to recommend that you match versions.

If your post had been (as it now is): "Lua is required to run parts of the build process"
Then the answer would have been different.

I.E: Garbage in, garbage out.
knc1 is offline   Reply With Quote
Old 09-19-2012, 05:30 AM   #678
Kai771
Just a Noob
Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.
 
Kai771's Avatar
 
Posts: 145
Karma: 162610
Join Date: Aug 2011
Device: Kindle 3
Quote:
Originally Posted by knc1 View Post
No need for any defense or attack.
Sorry if my previous post came out as offensive... I was actually going for "witty" or "funny"... I guess I'm easily misunderstood.
Kai771 is offline   Reply With Quote
Old 09-19-2012, 05:55 AM   #679
tigran
Zealot
tigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austen
 
Posts: 140
Karma: 23528
Join Date: Nov 2009
Location: London
Device: Kobo Aura One,HD,H2O,Touch,Mini,Kindle 3+DXG,Nook Simple Touch
Quote:
Originally Posted by dracodoc View Post
I thought how the emulator or kpv works should be irrelevant with screen resolution, i.e. the changes made for kpv with emulator running in 600x800 should also work for DX. So this is not the case? Even if the emulator have to run for some device target, why can't we just emulate the DX for keys, but with a different resolution?
For example, create a virtual device named DX_small, which is identical to DX except the resolution is 600x800. I think this could work since the resolution number should not be hard coded everywhere.

Panning with virtual space seemed a unneeded effort to me.
No, it is not irrelevant, because ideally (and that is how it is done now) the emulator should reproduce every tiny detail of the program's output, namely the position of every glyph on the screen for every font face used. If you change the resolution then either these would change OR you have to scale the fonts down and not only fonts but also all the direct geometrical measures like lengths, widths, etc.

So, panning virtual monitor is a needed effort and for a very good reason. There is no way to avoid it without losing the exactness of the reproduction of the program's behaviour on the target devices (kindle 3 or DXG).
tigran is offline   Reply With Quote
Old 09-20-2012, 07:34 AM   #680
tigran
Zealot
tigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austen
 
Posts: 140
Karma: 23528
Join Date: Nov 2009
Location: London
Device: Kobo Aura One,HD,H2O,Touch,Mini,Kindle 3+DXG,Nook Simple Touch
I have some good news --- on Fedora Core 7 64 bit (to which I switched my entire system) the emulation mode compiles and runs just fine. I just had to install lots of packages (yum install):

gcc g++ glibc.i686 libzip.i686 fontconfig.i686 SDL SDL-devel cmake patch

However, compiling for arm still fails with lots of errors, but I hope to sort them out. If not, I'll install FC17 32bit in VirtualBox just for arm compilation (but do the main development in the emulator in FC17 64bit as I am very pleased with its speed and fully using core-i3 processor's capabilities...)
tigran is offline   Reply With Quote
Old 09-20-2012, 07:42 AM   #681
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299991
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
64 bit... hmm... I did not enjoy my experience x-compiling with a 64 bit system.

Hope you get it sorted
twobob is offline   Reply With Quote
Old 09-20-2012, 07:56 AM   #682
tigran
Zealot
tigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austentigran has memorized the entire works of Homer, Shakespeare, and Jane Austen
 
Posts: 140
Karma: 23528
Join Date: Nov 2009
Location: London
Device: Kobo Aura One,HD,H2O,Touch,Mini,Kindle 3+DXG,Nook Simple Touch
Yes, all sorted out now: both emulation and arm compilation (and the result actually works on Kindle, tested!) now works. Another package I had to yum install is libgcc.i686. So you can add all these to the Development Guide and remove the need to install 32bit OS in a VirtualBox, just work directly in 64bit FC17 (and probably others too, but I'll stay with FC as I am used to it).

In fact, today's build of kpdfdjview was produced entirely with Fedora Core 17 64bit.

Last edited by tigran; 09-20-2012 at 05:27 PM.
tigran is offline   Reply With Quote
Old 09-20-2012, 05:42 PM   #683
Kai771
Just a Noob
Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.
 
Kai771's Avatar
 
Posts: 145
Karma: 162610
Join Date: Aug 2011
Device: Kindle 3
Hi,

I went to http://www.mentor.com/embedded-software/codesourcery and downloaded ALL versions of toolchains and tried them ALL with kindlepdfviewer. These are my findings.

First, I tried the oldest, 2005q1b. Luajit reported error - it needed at least gcc 4.2. So, I skipped versions before 2007q1-10, since the 2007q1-10 was the first to have gcc 4.2. All other versions, 2007q1-10 to 2012.03-57 compiled without errors, with the exception of 2008q1-126. It didn't compile at all. It reported this:

Spoiler:
Code:
make -C mupdf CC="gcc" build/debug/cmapdump
make[1]: Entering directory `/home/kai771/kindlepdfviewer_test/mupdf'
    MKDIR build/debug
    CC build/debug/cmapdump.o
    LINK build/debug/cmapdump
make[1]: Leaving directory `/home/kai771/kindlepdfviewer_test/mupdf'
cp -a mupdf/build/debug/cmapdump mupdf/cmapdump.host
make -C mupdf clean
make[1]: Entering directory `/home/kai771/kindlepdfviewer_test/mupdf'
rm -rf build/debug
make[1]: Leaving directory `/home/kai771/kindlepdfviewer_test/mupdf'
make -C mupdf CC="gcc" build/debug/fontdump
make[1]: Entering directory `/home/kai771/kindlepdfviewer_test/mupdf'
    MKDIR build/debug
    CC build/debug/fontdump.o
    LINK build/debug/fontdump
make[1]: Leaving directory `/home/kai771/kindlepdfviewer_test/mupdf'
cp -a mupdf/build/debug/fontdump mupdf/fontdump.host
make -C mupdf clean
make[1]: Entering directory `/home/kai771/kindlepdfviewer_test/mupdf'
rm -rf build/debug
make[1]: Leaving directory `/home/kai771/kindlepdfviewer_test/mupdf'
# build only thirdparty libs, libfitz and pdf utils, which will care for libmupdf.a being built
CFLAGS="-O3  -march=armv6 -DNOBUILTINFONT" make -C mupdf CC="arm-none-linux-gnueabi-gcc" CMAPDUMP=cmapdump.host FONTDUMP=fontdump.host MUPDF= MU_APPS= BUSY_APP= XPS_APPS= verbose=1
make[1]: Entering directory `/home/kai771/kindlepdfviewer_test/mupdf'
mkdir -p build/debug
arm-none-linux-gnueabi-gcc -O3  -march=armv6 -DNOBUILTINFONT -Ifitz -Ipdf -Ixps -Icbz -Iscripts -Wall -pipe -g -Ithirdparty/freetype-2.4.10/include -Ithirdparty/jbig2dec -Ithirdparty/jpeg-9 -Ithirdparty/openjpeg-1.5.0-patched/libopenjpeg -Ithirdparty/zlib-1.2.7 -Dverbose=-1 -o build/debug/ft_ftbase.o -c thirdparty/freetype-2.4.10/src/base/ftbase.c -DFT2_BUILD_LIBRARY -DDARWIN_NO_CARBON '-DFT_CONFIG_MODULES_H="slimftmodules.h"' '-DFT_CONFIG_OPTIONS_H="slimftoptions.h"'
thirdparty/freetype-2.4.10/src/base/ftrfork.c:409: warning: 'ft_raccess_rule_by_darwin_vfs' defined but not used
thirdparty/freetype-2.4.10/src/base/ftobjs.c: In function 'FT_Match_Size':
thirdparty/freetype-2.4.10/src/base/ftobjs.c:2524: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:https://support.codesourcery.com/GNUToolchain/> for instructions.
make[1]: *** [build/debug/ft_ftbase.o] Error 1
make[1]: Leaving directory `/home/kai771/kindlepdfviewer_test/mupdf'
make: *** [mupdf/build/debug/libfitz.a] Error 2


Of those that did compile, zips compiled with 2007q1-10, 2007q1-21 and 2007q3-51 worked on Kindle "out of the box". The rest of them didn't (I suppose they need sysroot).

I also tested linaro that comes with Ubuntu again. This time it compiled (thanks to dave2008's Makefile fix), but of course, it didn't work on Kindle (Again, I suppose it needs sysroot).

Since twobob said that 2008q1 is "the last TC that compiles natively (Runs applications without replacing the onboard system libraries) for the Kindle 3", any idea why it is the only version that didn't work with kpdfview?

Last edited by Kai771; 09-21-2012 at 06:19 AM. Reason: added link
Kai771 is offline   Reply With Quote
Old 09-20-2012, 06:56 PM   #684
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@Kai771: It's been a while since I checked, but last time I built kpdfview with my self-built tc (gcc 4.7/glibc 2.9), the only thing I had to make sure of, after tweaking the Makefiles a bit, was that stack-smashing protec/fortify was disabled, as usual with gcc >= 4.3 / glibc >= 2.8. (-fno-stack-protector in CFLAGS & -U_FORTIFY_SOURCE in CPPFLAGS. I might have needed to put everything in CFLAGS to make luajit's insane buildsystem happy). Oh, and -fno-use-cxa-atexit in CXXFLAGS, too (but that might just be my TC).

I'll check again on a recent checkout...

Last edited by NiLuJe; 09-20-2012 at 08:29 PM.
NiLuJe is offline   Reply With Quote
Old 09-20-2012, 07:44 PM   #685
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@Kai771:

FWIW, my Makefile tweaks/TC info are in the kindle-x-compile-tc.tar.gz attachment of the fonts/ss thread.

And here's a build of the current git master, which looks okay (readelf wise), and apparently works fine.
Attached Files
File Type: zip kindlepdfviewer-13d686f.zip (4.77 MB, 190 views)

Last edited by NiLuJe; 10-01-2012 at 12:48 PM.
NiLuJe is offline   Reply With Quote
Old 09-21-2012, 12:56 AM   #686
dracodoc
Connoisseur
dracodoc has a complete set of Star Wars action figures.dracodoc has a complete set of Star Wars action figures.dracodoc has a complete set of Star Wars action figures.dracodoc has a complete set of Star Wars action figures.
 
Posts: 83
Karma: 322
Join Date: Mar 2009
Device: Kindle DXG, Sony T1
OK, Got it.
Quote:
Originally Posted by tigran View Post
No, it is not irrelevant, because ideally (and that is how it is done now) the emulator should reproduce every tiny detail of the program's output, namely the position of every glyph on the screen for every font face used. If you change the resolution then either these would change OR you have to scale the fonts down and not only fonts but also all the direct geometrical measures like lengths, widths, etc.

So, panning virtual monitor is a needed effort and for a very good reason. There is no way to avoid it without losing the exactness of the reproduction of the program's behaviour on the target devices (kindle 3 or DXG).
dracodoc is offline   Reply With Quote
Old 09-21-2012, 03:04 PM   #687
Kai771
Just a Noob
Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.
 
Kai771's Avatar
 
Posts: 145
Karma: 162610
Join Date: Aug 2011
Device: Kindle 3
@NiLuJe
Thanks for replying. While I still don't understand why only 2008q1-126 version of CS/MG toolchain doesn't compile kpdfview, while both earlier and later versions do, without touching the Makefile, your post gave me a lot of ideas to try (feel free to laugh if you find any of my actions particularly dumb).

I took a look inside your version of Makefile for kpdfview (actually, a diff file). I don't know why you made so many changes to it. KPDFView compiles with default Makefile without problems if I use either arm-kindle-linux-gnueabi from x-tools-glibc2.5-gcc4.2.4.tar.gz or arm-none-linux-gnueabi from CS/MG 2007q3-51, and they both work on kindle. I can only asume that you made a newer arm-kindle-linux-gnueabi, and that it was needed in your version.

I first tried simpler approach: I changed default Makefile like this:

Code:
-CFLAGS:=-O3 $(SYSROOT)
-CXXFLAGS:=-O3 $(SYSROOT)
+CFLAGS:=-O3 -fno-stack-protector -U_FORTIFY_SOURCE $(SYSROOT)
+CXXFLAGS:=-O3 -fno-stack-protector -U_FORTIFY_SOURCE $(SYSROOT)
and tried compiling it using CS/MG 2012.03, hoping it will make it work on kindle. It compiled without errors, but it didn't work on kindle. Then I changed last line to:

Code:
CXXFLAGS:=-O3 -fno-stack-protector -U_FORTIFY_SOURCE -fno-use-cxa-atexit $(SYSROOT)
Again, compiled ok, but didn't work on kindle. Then I put in all your changes from the patch file, keeping only HOST:=arm-none-linux-gnueabi unchanged, since I used that compiler. Again, same results. It compiled, but didn't work on kindle.

I reverted back to original Makefile, then went to my kindle, and typed:

$ tar -cf lib.tar /lib
$ tar -cf usrlib.tar /usr/lib

I transfered those files to PC, and unpacked them under /usr/local/k3/sysroot. I typed:
Code:
export SYSROOT=/usr/local/k3/sysroot
and tried compiling it again. This time it didn't compile.

Code:
arm-none-linux-gnueabi-gcc: warning: /usr/local/k3/sysroot: linker input file unused because linking not done
AR        libluajit.a
CC        luajit.o
arm-none-linux-gnueabi-gcc: warning: /usr/local/k3/sysroot: linker input file unused because linking not done
BUILDVM   ../lib/vmdef.lua
DYNLINK   libluajit.so
/usr/local/k3/sysroot: file not recognized: Is a directory
collect2: ld returned 1 exit status
make[2]: *** [libluajit.so] Error 1
make[2]: Leaving directory `/home/kai771/kindlepdfviewer/luajit-2.0/src'
make[1]: *** [default] Error 2
make[1]: Leaving directory `/home/kai771/kindlepdfviewer/luajit-2.0'
make: *** [luajit-2.0/src/libluajit.a] Error 2
This didn't surprise me. I wasn't really expecting it to work. So I deleted /usr/local/k3/sysroot, and copied sysroot folder from x-tools-glibc2.5-gcc4.2.4.tar.gz at the same place. I tried compiling again, and I got the same result as above.

There are still things I need to read and try, but if someone is willing to help me save time, please do so. The goal is to make kpdfview compile with CS/MG 2012.03 and work on kindle. I have no other reason for doing this except curiosity, so if you're busy, please just ignore this.

Oh, and btw, I updated the guide to include instructions for CS/MG 2007q3.

Last edited by Kai771; 09-21-2012 at 03:10 PM. Reason: typo
Kai771 is offline   Reply With Quote
Old 09-21-2012, 03:43 PM   #688
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@Kai771: 2008q1-126 is a known 'bad' release, with a buggy GCC that throws ICE in a lot of known conditions .

I tweaked it somewhat more extensively than needed because I'm using a 'bleeding-edge' TC that uses a vastly more recent GCC & glibc combo than what's used on the Kindle (and than the TC used by the devs), so I *need* some of this stuff to actually avoid pulling incompatible stuff from those newer versions (most notably the glibc's fortify support, and gcc's stack smashing protection I mentioned in my previous message).

There's also a few changes related to building mupdf in release mode, not debug, and not breaking the build of stuff targeted at the host system because I have an ARM march in the default CFLAGS, which obviously my host's x86 GCC would throw a fit about .

I could be wrong, because I'm always putting my minimal self-built system in the searchpaths (via CPPFLAGS & LDFLAGS), but I'm not sure kpdf actually needs anything out of its tree (other than a proper glibc TC), so, I personally don't tweak/set SYSROOT, and don't use stuff from the Kindle's FS or the tarball alluded to.

All that said, take a look at your binaries built with MG 2012.03 via readelf (especially the .gnu.version* sections, via readelf -V for example). That should give you a good hint of what's wrong (shouldn't pull anything more recent than glibc 2.5 & gcc 4.1).

EDIT: Well, the runtime error you get when running it on the Kindle helps, too, but readelf is faster/more detailed .

Code:
Version needs section '.gnu.version_r' contains 6 entries:
 Addr: 0x000000000000a6fc  Offset: 0x0026fc  Link: 5 (.dynstr)
  000000: Version: 1  File: libgcc_s.so.1  Cnt: 2
  0x0010:   Name: GCC_3.0  Flags: none  Version: 9
  0x0020:   Name: GCC_3.5  Flags: none  Version: 7
  0x0030: Version: 1  File: libdl.so.2  Cnt: 1
  0x0040:   Name: GLIBC_2.4  Flags: none  Version: 6
  0x0050: Version: 1  File: libstdc++.so.6  Cnt: 2
  0x0060:   Name: CXXABI_1.3  Flags: none  Version: 8
  0x0070:   Name: GLIBCXX_3.4  Flags: none  Version: 5
  0x0080: Version: 1  File: libc.so.6  Cnt: 1
  0x0090:   Name: GLIBC_2.4  Flags: none  Version: 4
  0x00a0: Version: 1  File: libpthread.so.0  Cnt: 1
  0x00b0:   Name: GLIBC_2.4  Flags: none  Version: 3
  0x00c0: Version: 1  File: libm.so.6  Cnt: 1
  0x00d0:   Name: GLIBC_2.4  Flags: none  Version: 2

Last edited by NiLuJe; 09-21-2012 at 03:51 PM.
NiLuJe is offline   Reply With Quote
Old 09-21-2012, 04:45 PM   #689
Kai771
Just a Noob
Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.Kai771 can program the VCR without an owner's manual.
 
Kai771's Avatar
 
Posts: 145
Karma: 162610
Join Date: Aug 2011
Device: Kindle 3
Thanks for being so patient with me. I did as you suggested, and this is the result:

Code:
$ arm-none-linux-gnueabi-readelf -V kpdfview 

Version symbols section '.gnu.version' contains 245 entries:
 Addr: 000000000000a14a  Offset: 0x00214a  Link: 4 (.dynsym)
  000:   0 (*local*)       2 (GLIBC_2.4)     3 (GLIBC_2.4)     4 (GLIBC_2.4)  
  004:   4 (GLIBC_2.4)     4 (GLIBC_2.4)     5 (GLIBCXX_3.4)   4 (GLIBC_2.4)  
  008:   3 (GLIBC_2.4)     3 (GLIBC_2.4)     3 (GLIBC_2.4)     2 (GLIBC_2.4)  
  00c:   4 (GLIBC_2.4)     2 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)  
  010:   6 (CXXABI_ARM_1.3.3)      4 (GLIBC_2.4)     2 (GLIBC_2.4)     4 (GLIBC_2.4)  
  014:   7 (GLIBC_2.4)     4 (GLIBC_2.4)     3 (GLIBC_2.4)     4 (GLIBC_2.4)  
  018:   4 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)  
  01c:   4 (GLIBC_2.4)     5 (GLIBCXX_3.4)   4 (GLIBC_2.4)     2 (GLIBC_2.4)  
  020:   4 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)  
  024:   4 (GLIBC_2.4)     8 (GCC_3.5)       4 (GLIBC_2.4)     9 (CXXABI_1.3) 
  028:   2 (GLIBC_2.4)     4 (GLIBC_2.4)     2 (GLIBC_2.4)     9 (CXXABI_1.3) 
  02c:   4 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)     2 (GLIBC_2.4)  
  030:   4 (GLIBC_2.4)     3 (GLIBC_2.4)     7 (GLIBC_2.4)     4 (GLIBC_2.4)  
  034:   4 (GLIBC_2.4)     3 (GLIBC_2.4)     2 (GLIBC_2.4)     4 (GLIBC_2.4)  
  038:   4 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)     9 (CXXABI_1.3) 
  03c:   4 (GLIBC_2.4)     2 (GLIBC_2.4)     9 (CXXABI_1.3)    4 (GLIBC_2.4)  
  040:   4 (GLIBC_2.4)     2 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)  
  044:   4 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)     3 (GLIBC_2.4)  
  048:   4 (GLIBC_2.4)     2 (GLIBC_2.4)     9 (CXXABI_1.3)    9 (CXXABI_1.3) 
  04c:   4 (GLIBC_2.4)     3 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)  
  050:   4 (GLIBC_2.4)     2 (GLIBC_2.4)     3 (GLIBC_2.4)     4 (GLIBC_2.4)  
  054:   3 (GLIBC_2.4)     4 (GLIBC_2.4)     5 (GLIBCXX_3.4)   3 (GLIBC_2.4)  
  058:   4 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)     2 (GLIBC_2.4)  
  05c:   4 (GLIBC_2.4)     2 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)  
  060:   4 (GLIBC_2.4)     2 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)  
  064:   4 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)     7 (GLIBC_2.4)  
  068:   4 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)     3 (GLIBC_2.4)  
  06c:   4 (GLIBC_2.4)     4 (GLIBC_2.4)     3 (GLIBC_2.4)     4 (GLIBC_2.4)  
  070:   3 (GLIBC_2.4)     5 (GLIBCXX_3.4)   4 (GLIBC_2.4)     2 (GLIBC_2.4)  
  074:   2 (GLIBC_2.4)     a (GLIBC_2.7)     4 (GLIBC_2.4)     4 (GLIBC_2.4)  
  078:   3 (GLIBC_2.4)     2 (GLIBC_2.4)     3 (GLIBC_2.4)     4 (GLIBC_2.4)  
  07c:   3 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)     3 (GLIBC_2.4)  
  080:   4 (GLIBC_2.4)     3 (GLIBC_2.4)     8 (GCC_3.5)       2 (GLIBC_2.4)  
  084:   4 (GLIBC_2.4)     2 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)  
  088:   9 (CXXABI_1.3)    3 (GLIBC_2.4)     0 (*local*)       4 (GLIBC_2.4)  
  08c:   2 (GLIBC_2.4)     4 (GLIBC_2.4)     2 (GLIBC_2.4)     4 (GLIBC_2.4)  
  090:   4 (GLIBC_2.4)     5 (GLIBCXX_3.4)   9 (CXXABI_1.3)    3 (GLIBC_2.4)  
  094:   4 (GLIBC_2.4)     3 (GLIBC_2.4)     4 (GLIBC_2.4)     3 (GLIBC_2.4)  
  098:   4 (GLIBC_2.4)     3 (GLIBC_2.4)     4 (GLIBC_2.4)     3 (GLIBC_2.4)  
  09c:   4 (GLIBC_2.4)     4 (GLIBC_2.4)     3 (GLIBC_2.4)     2 (GLIBC_2.4)  
  0a0:   5 (GLIBCXX_3.4)   4 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)  
  0a4:   4 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)  
  0a8:   4 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)     9 (CXXABI_1.3) 
  0ac:   4 (GLIBC_2.4)     4 (GLIBC_2.4)     3 (GLIBC_2.4)     2 (GLIBC_2.4)  
  0b0:   4 (GLIBC_2.4)     2 (GLIBC_2.4)     2 (GLIBC_2.4)     4 (GLIBC_2.4)  
  0b4:   4 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)  
  0b8:   2 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)     3 (GLIBC_2.4)  
  0bc:   b (GCC_3.0)       4 (GLIBC_2.4)     2 (GLIBC_2.4)     4 (GLIBC_2.4)  
  0c0:   8 (GCC_3.5)       4 (GLIBC_2.4)     4 (GLIBC_2.4)     9 (CXXABI_1.3) 
  0c4:   4 (GLIBC_2.4)     9 (CXXABI_1.3)    4 (GLIBC_2.4)     4 (GLIBC_2.4)  
  0c8:   8 (GCC_3.5)       3 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)  
  0cc:   4 (GLIBC_2.4)     9 (CXXABI_1.3)    4 (GLIBC_2.4)     4 (GLIBC_2.4)  
  0d0:   2 (GLIBC_2.4)     3 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)  
  0d4:   4 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)     9 (CXXABI_1.3) 
  0d8:   1 (*global*)      4 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)  
  0dc:   4 (GLIBC_2.4)     8 (GCC_3.5)       9 (CXXABI_1.3)    4 (GLIBC_2.4)  
  0e0:   a (GLIBC_2.7)     4 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)  
  0e4:   2 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)  
  0e8:   7 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)     0 (*local*)    
  0ec:   4 (GLIBC_2.4)     9 (CXXABI_1.3)    2 (GLIBC_2.4)     4 (GLIBC_2.4)  
  0f0:   3 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)     4 (GLIBC_2.4)  
  0f4:   2 (GLIBC_2.4)  

Version needs section '.gnu.version_r' contains 6 entries:
 Addr: 0x000000000000a334  Offset: 0x002334  Link: 5 (.dynstr)
  000000: Version: 1  File: libgcc_s.so.1  Cnt: 2
  0x0010:   Name: GCC_3.0  Flags: none  Version: 11
  0x0020:   Name: GCC_3.5  Flags: none  Version: 8
  0x0030: Version: 1  File: libdl.so.2  Cnt: 1
  0x0040:   Name: GLIBC_2.4  Flags: none  Version: 7
  0x0050: Version: 1  File: libstdc++.so.6  Cnt: 3
  0x0060:   Name: CXXABI_1.3  Flags: none  Version: 9
  0x0070:   Name: CXXABI_ARM_1.3.3  Flags: none  Version: 6
  0x0080:   Name: GLIBCXX_3.4  Flags: none  Version: 5
  0x0090: Version: 1  File: libc.so.6  Cnt: 2
  0x00a0:   Name: GLIBC_2.7  Flags: none  Version: 10
  0x00b0:   Name: GLIBC_2.4  Flags: none  Version: 4
  0x00c0: Version: 1  File: libpthread.so.0  Cnt: 1
  0x00d0:   Name: GLIBC_2.4  Flags: none  Version: 3
  0x00e0: Version: 1  File: libm.so.6  Cnt: 1
  0x00f0:   Name: GLIBC_2.4  Flags: none  Version: 2
And these are runtime errors:

Code:
./kpdfview: /usr/lib/libstdc++.so.6: version `CXXABI_ARM_1.3.3' not found (required by ./kpdfview)
./kpdfview: /lib/libc.so.6: version `GLIBC_2.7' not found (required by ./kpdfview)
Now I see the problem (well, I saw it before too - I saw runtime errors, but didn't know about readelf). The question is, how to prevent it from using GLIBC_2.7 and CXXABI_ARM_1.3.3 and make it use only GLIBC_2.4 and CXXABI_1.3? Other than to use 2007q3, that is .
Kai771 is offline   Reply With Quote
Old 09-21-2012, 05:12 PM   #690
NiLuJe
BLAM!
NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.NiLuJe ought to be getting tired of karma fortunes by now.
 
NiLuJe's Avatar
 
Posts: 13,477
Karma: 26012492
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
@Kai771: Now you can look at the full output of readelf -a (pipe it to a file or your favorite pager), and search for GLIBC_2.7 & CXXABI_ARM_1.3.3, that should get you the name of the symbols causing problems. (Which then helps fixing it ^^).
NiLuJe is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
KOReader: a document reader for PDF, DJVU, EPUB, FB2, HTML, ... (GPLv3) hawhill Kindle Developer's Corner 1269 02-27-2024 11:49 AM
Librerator - multi-format e-reader, fork of KPV Kai771 Kindle Developer's Corner 432 10-06-2017 12:20 PM
Yet another PDF viewer (muPDF based) melihron PocketBook 66 09-02-2014 03:03 AM
Text-based PDF to Mobi, etc./Kindle 3 kidblue Calibre 41 07-20-2012 03:19 PM
muPDF on Kindle DX!! DairyKnight Kindle Developer's Corner 8 03-21-2010 03:39 AM


All times are GMT -4. The time now is 09:52 AM.


MobileRead.com is a privately owned, operated and funded community.