Register Guidelines E-Books Today's Posts Search

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

Notices

Reply
 
Thread Tools Search this Thread
Old 02-11-2016, 07:35 PM   #61
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
Quote:
Originally Posted by jue View Post
You are absolutely right, the gargoyle.sh file I uploaded in my previous post is exactly your original file. Sorry, I did not pay attention. So it suffices to just add the two .so files in the lib folder.

Unfortunately, it does not work with your recompiled libgarglk.so. It just prints 'Segmentation fault' in the terminal. Is there a way to get debug information on a kindle?

ldd shows both the new and old libgarglk.so are dynamically linked to libpng16, which it finds on the kindle (/usr/lib/libpng16.so.16). Why does it need both versions 12 and 16? Could this be a problem?
It will do no harm if both are present, the symbols are versioned.
Note: That there are (for instance) two builds of kTerm, one uses the old libraries, one uses the new libraries.

baf posted that he had linked the libraries in, staticly.
Something may have gone wrong in that process.

To debug:
Set the environment variable:
LD_DEBUG=all
(all possible information)
LD_DEBUG=help
(other possible settings)
knc1 is offline   Reply With Quote
Old 02-12-2016, 04:49 AM   #62
jue
Junior Member
jue is on a distinguished road
 
Posts: 8
Karma: 62
Join Date: Feb 2016
Location: Germany
Device: kindle PW2 9017
Quote:
Originally Posted by knc1 View Post
To debug:
Set the environment variable:
LD_DEBUG=all
(all possible information)
LD_DEBUG=help
(other possible settings)


I attached the complete output (stdout and stderr incl. debug info). Maybe a trained eye can make something out of it.

(my previous text, not so promising: )
Spoiler:
This is the part just before the segfault (but debug output continues afterwards):
Code:
      5620:	symbol=strsignal;  lookup in file=/bin/sh [0]
      5620:	symbol=strsignal;  lookup in file=/usr/lib/libenvload.so [0]
      5620:	symbol=strsignal;  lookup in file=/lib/libm.so.6 [0]
      5620:	symbol=strsignal;  lookup in file=/lib/libc.so.6 [0]
      5620:	binding file /bin/sh [0] to /lib/libc.so.6 [0]: normal symbol `strsignal' [GLIBC_2.4]
      5620:	symbol=__vsnprintf_chk;  lookup in file=/bin/sh [0]
      5620:	symbol=__vsnprintf_chk;  lookup in file=/usr/lib/libenvload.so [0]
      5620:	symbol=__vsnprintf_chk;  lookup in file=/lib/libm.so.6 [0]
      5620:	symbol=__vsnprintf_chk;  lookup in file=/lib/libc.so.6 [0]
      5620:	binding file /bin/sh [0] to /lib/libc.so.6 [0]: normal symbol `__vsnprintf_chk' [GLIBC_2.4]
      5620:	symbol=fputs;  lookup in file=/bin/sh [0]
      5620:	symbol=fputs;  lookup in file=/usr/lib/libenvload.so [0]
      5620:	symbol=fputs;  lookup in file=/lib/libm.so.6 [0]
      5620:	symbol=fputs;  lookup in file=/lib/libc.so.6 [0]
      5620:	binding file /bin/sh [0] to /lib/libc.so.6 [0]: normal symbol `fputs' [GLIBC_2.4]
Segmentation fault


update: Now I also attached my gdb output.
some interesting lines:
Code:
...
Reading symbols from /lib/libpthread.so.0...Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /lib/libpthread.so.0]
...
Reading symbols from /lib/libgcc_s.so.1...Error while reading shared library symbols:
Dwarf Error: wrong version in compilation unit header (is 4, should be 2) [in module /lib/libgcc_s.so.1]
...
Core was generated by `./gargoyle'.
Program terminated with signal 11, Segmentation fault.
#0  0x40e84dd4 in png_set_longjmp_fn ()
   from /usr/lib/libpng16.so.16
(gdb) bt full
#0  0x40e84dd4 in png_set_longjmp_fn ()
   from /usr/lib/libpng16.so.16
No symbol table info available.
#1  0x411bc08c in ?? ()
   from /usr/lib/gtk-2.0/2.10.0/loaders/libpixbufloader-png.so
No symbol table info available.
I hope this is helpful
Attached Files
File Type: gz debug_all.tar.gz (297.4 KB, 229 views)
File Type: gz gdb.log.tar.gz (1.2 KB, 231 views)

Last edited by jue; 02-12-2016 at 05:49 AM.
jue is offline   Reply With Quote
Advert
Old 02-12-2016, 05:50 AM   #63
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
did you get anything before the line numbered 1 in the archive?

at the command line, Run:
/lib/libc.so.6
copy and paste the **entire** output here.

Yes, it is an executable.
You may have to mark it executable (Lab126's build system evidently blindly removes the execute bit on anything lib*).

Remember to do the remount rw - remount ro dance in order to run the chmod command.

Last edited by knc1; 02-12-2016 at 06:17 AM.
knc1 is offline   Reply With Quote
Old 02-12-2016, 06:29 AM   #64
jue
Junior Member
jue is on a distinguished road
 
Posts: 8
Karma: 62
Join Date: Feb 2016
Location: Germany
Device: kindle PW2 9017
Quote:
Originally Posted by knc1 View Post
did you get anything before the line numbered 1 in the archive?
No, I didn't get anything before and didn't edit anything I attached. I was wondering myself why the output started with 5620.

The /lib/libc.so.6 output looks fine (directed stdout and stderr to file, nothing removed):
Code:
GNU C Library (EGLIBC) stable release version 2.19, by Roland McGrath et al.
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.8.3 20140401 (prerelease).
Compiled on a Linux 2.6.35 system on 2014-09-03.
Available extensions:
	crypt add-on version 2.1 by Michael Glad and others
	Native POSIX Threads Library by Ulrich Drepper et al
	BIND-8.2.3-T5B
libc ABIs: UNIQUE
For bug reporting instructions, please see:
<http://www.eglibc.org/issues/>.
but the libc thing might have been a bad lead. See my updated previous post.
jue is offline   Reply With Quote
Old 02-12-2016, 08:01 AM   #65
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
Quote:
Originally Posted by jue View Post
No, I didn't get anything before and didn't edit anything I attached. I was wondering myself why the output started with 5620.

The /lib/libc.so.6 output looks fine (directed stdout and stderr to file, nothing removed):
Code:
GNU C Library (EGLIBC) stable release version 2.19, by Roland McGrath et al.
Copyright (C) 2014 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
Compiled by GNU CC version 4.8.3 20140401 (prerelease).
Compiled on a Linux 2.6.35 system on 2014-09-03.
Available extensions:
    crypt add-on version 2.1 by Michael Glad and others
    Native POSIX Threads Library by Ulrich Drepper et al
    BIND-8.2.3-T5B
libc ABIs: UNIQUE
For bug reporting instructions, please see:
<http://www.eglibc.org/issues/>.
but the libc thing might have been a bad lead. See my updated previous post.
5620 was the process id.

The libc is 2.19, which **should** have all symbols required since the highest the program needs is 2.17.
**but**
The Kindle is running the specialized Ubuntu fork of glibc, eglibc.
(The two projects have since been merged together.)
So there is a possiblity of a mis-match, depending what baf built against.

You could do a 'readelf -a ...' on the files he built, but that would, at most, only tell us exactly what is wrong.

The conclusion is the same - the attempt at a static build has errors in it.
fail this build and let baf re-build it.
knc1 is offline   Reply With Quote
Advert
Old 02-12-2016, 09:42 AM   #66
jue
Junior Member
jue is on a distinguished road
 
Posts: 8
Karma: 62
Join Date: Feb 2016
Location: Germany
Device: kindle PW2 9017
Quote:
Originally Posted by knc1 View Post
The conclusion is the same - the attempt at a static build has errors in it.
fail this build and let baf re-build it.
Yes, I know a rebuild is inevitable. My intention was to find the reason for the segfault to help baf fix it, since he doesn't own a PW2 himself, where the error occured. Now I'll wait until baf is back.

Thanks a lot for your help so far, knc1!
jue is offline   Reply With Quote
Old 02-12-2016, 09:53 AM   #67
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
Quote:
Originally Posted by jue View Post
Yes, I know a rebuild is inevitable. My intention was to find the reason for the segfault to help baf fix it, since he doesn't own a PW2 himself, where the error occured. Now I'll wait until baf is back.

Thanks a lot for your help so far, knc1!
Then do the readelf -a thing and post it.
PS: What firmware version on your PW-2?
knc1 is offline   Reply With Quote
Old 02-12-2016, 10:08 AM   #68
pete330
Connoisseur
pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.
 
Posts: 66
Karma: 200233
Join Date: Aug 2013
Device: Kindle Paperwhite
Hi, I built baf's port of gargoyle (many thanks for the kindle port!) for use with my PW3 and firmware 5.7.2 (including git, glulxe and bocfel interpreters updated to the latest versions). This could work for you, too, if you use the same OS version.
Attached Files
File Type: bz2 gargoyle-2011.1-updatedTerps-KindlePW3-Fw572.tar.bz2 (2.06 MB, 206 views)
pete330 is offline   Reply With Quote
Old 02-12-2016, 11:28 AM   #69
jue
Junior Member
jue is on a distinguished road
 
Posts: 8
Karma: 62
Join Date: Feb 2016
Location: Germany
Device: kindle PW2 9017
Quote:
Originally Posted by knc1 View Post
Then do the readelf -a thing and post it.
PS: What firmware version on your PW-2?
No readelf on Kindle. Did a readelf on my ubuntu system, but I guess should be same on every system, if I understand correctly. File attached.

My firmware version is 5.6.5.

pete330, your build works on my Kindle, too, thank you!
Attached Files
File Type: gz libgarglk_readelf.out.tar.gz (37.1 KB, 229 views)
jue is offline   Reply With Quote
Old 02-12-2016, 11:38 AM   #70
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
Elf is Elf is Elf is Elf ....

Here is the problem:
Tag_ABI_HardFP_use: SP and DP

It was built for hardware floating point and the stock Kindles are software floating point.
One of the ways to spell: segfault

(I do have posted a thread on running hard float on Kindles, but this application was not intended to run under that add-in. )
knc1 is offline   Reply With Quote
Old 02-12-2016, 01:15 PM   #71
baf
Evangelist
baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.baf ought to be getting tired of karma fortunes by now.
 
Posts: 404
Karma: 2200000
Join Date: May 2012
Device: kt
Thanks to all for feedback.

I messed something with static linking. The problematic function (png_set_longjmp_fn) is not present in libpng12 which I staticly linked.

Code:
Program terminated with signal 11, Segmentation fault.
#0  0x40e84dd4 in png_set_longjmp_fn ()
   from /usr/lib/libpng16.so.16
Following tag is not a problem. All my binaries (and also Pete330's one) have this entry.
Quote:
Originally Posted by knc1 View Post
Here is the problem:
Tag_ABI_HardFP_use: SP and DP
As we have working, updated package from Pete330 (thanks!) I will give up now.
I assume it also works for 5.6.5 firmware. Could someone check that?
@Pete330 I hope you don't mind if I share your package on my website.
baf is offline   Reply With Quote
Old 02-12-2016, 02:12 PM   #72
pete330
Connoisseur
pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.
 
Posts: 66
Karma: 200233
Join Date: Aug 2013
Device: Kindle Paperwhite
Hi baf, I don't mind at all. Thanks for providing the webspace!
pete330 is offline   Reply With Quote
Old 02-12-2016, 04:00 PM   #73
jue
Junior Member
jue is on a distinguished road
 
Posts: 8
Karma: 62
Join Date: Feb 2016
Location: Germany
Device: kindle PW2 9017
Quote:
Originally Posted by baf View Post
I assume it also works for 5.6.5 firmware. Could someone check that?
Yes, I have a Kindle PW2 with 5.6.5 firmware and can confirm it works very well!

I am very happy this could be solved! Now everyone can find gargoyle in the "helpful list of Extensions for KUAL" and from there arrive directly at the working build.
Thanks baf, pete330, knc1 and eschwartz, you guys are great!
jue is offline   Reply With Quote
Old 07-07-2016, 06:12 PM   #74
pete330
Connoisseur
pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.pete330 ought to be getting tired of karma fortunes by now.
 
Posts: 66
Karma: 200233
Join Date: Aug 2013
Device: Kindle Paperwhite
Anyone interested in the most current version of gargoyle with an early version of TADS 3.1.3 integration (code from this branch: https://github.com/cspiegel/garglk/t...3-tads-upgrade), let me know. I have a version running on my PW3.
pete330 is offline   Reply With Quote
Old 07-10-2016, 02:21 PM   #75
BeagleBoy
Junior Member
BeagleBoy began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Jul 2016
Device: Kindle Voyage
I haven't tried any graphical games, yet, but I wanted to mention that the "5.6.5" version runs without problems on the Voyage.
BeagleBoy is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Free Book (Kindle/Nook/Ellora's Cave/AllRomanceeBooks) - Curse of the Gargoyle koland Deals and Resources (No Self-Promotion or Affiliate Links) 8 10-18-2011 02:59 AM
Interactive Fiction with Gargoyle for the Iliad Adam B. iRex 68 09-01-2011 04:49 AM
Gargoyle, an interactive fiction player, is ported to Open Inkpot hrashk OpenInkpot 7 06-22-2011 10:31 PM
PRS-650 Music Player kcdownunder Sony Reader 2 10-23-2010 03:34 PM
Classic Audio Player ssbkt Barnes & Noble NOOK 1 12-18-2009 11:00 AM


All times are GMT -4. The time now is 02:10 AM.


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