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 09-03-2019, 10:36 PM   #1
kelmscott
Junior Member
kelmscott began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2019
Device: kindle 3
getopt problems when compiling with TCC on kindle 3

Hey everyone - new forum member,

I'm using the tinycc (tcc) package created by geekmaster to compile a small C program which plays the game oware in the console (MyTs) on a kindle 3. Everything seems to work fine except that when I execute the binary none of the arguments seem to be passed to the compiled program. I'm not a programmer but assume this has something to do with getopt.

On my laptop running Arch Linux I've compiled the same program with an x86-64 version of tcc using the include files that come in the kindle-tcc package and the arguments work.

So I'm wondering if either anyone might have a clue what the issue is, or might have the necessary tool-chain built to cross-compile the attached file (awale.txt - I had to use txt for it to upload but it is a C program).

Thanks in advance for any help.
Attached Files
File Type: txt awale.txt (23.2 KB, 125 views)
kelmscott is offline   Reply With Quote
Old 09-04-2019, 07:35 AM   #2
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,506
Karma: 26047202
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
You can run an attachment search on me, I have a post with up to date tcc binaries that I update periodically.

There's a good chance the issue was fixed upstream, as such, newer binaries would do the trick.

EDIT: On the off-chance it's a weird tcc issue, here's a one built w/ gcc.
Attached Files
File Type: gz awale-k3.tar.gz (15.5 KB, 107 views)

Last edited by NiLuJe; 09-04-2019 at 08:36 AM. Reason: Direct link, now I'm no longer on mobile.
NiLuJe is offline   Reply With Quote
Advert
Old 09-04-2019, 09:03 AM   #3
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 kelmscott View Post
Hey everyone - new forum member,

I'm using the tinycc (tcc) package created by geekmaster to compile a small C program which plays the game oware in the console (MyTs) on a kindle 3. Everything seems to work fine except that when I execute the binary none of the arguments seem to be passed to the compiled program. I'm not a programmer but assume this has something to do with getopt.

On my laptop running Arch Linux I've compiled the same program with an x86-64 version of tcc using the include files that come in the kindle-tcc package and the arguments work.

So I'm wondering if either anyone might have a clue what the issue is, or might have the necessary tool-chain built to cross-compile the attached file (awale.txt - I had to use txt for it to upload but it is a C program).

Thanks in advance for any help.
How are you executing your Kindle program (the one which "does not work")?
Are you using KUAL? A terminal (which one)? ssh? telnet? Something else?


Note: It is very hard to answer a "does not work" question.
knc1 is offline   Reply With Quote
Old 09-04-2019, 07:59 PM   #4
kelmscott
Junior Member
kelmscott began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2019
Device: kindle 3
Quote:
Originally Posted by knc1 View Post
How are you executing your Kindle program (the one which "does not work")?
Are you using KUAL? A terminal (which one)? ssh? telnet? Something else?


Note: It is very hard to answer a "does not work" question.
I tried - from my original post:

Quote:
plays the game oware in the console (MyTs) on a kindle 3.
Maybe not enough info?
kelmscott is offline   Reply With Quote
Old 09-05-2019, 12:30 AM   #5
kelmscott
Junior Member
kelmscott began at the beginning.
 
Posts: 3
Karma: 10
Join Date: Sep 2019
Device: kindle 3
Quote:
Originally Posted by NiLuJe View Post
You can run an attachment search on me, I have a post with up to date tcc binaries that I update periodically.

There's a good chance the issue was fixed upstream, as such, newer binaries would do the trick.

EDIT: On the off-chance it's a weird tcc issue, here's a one built w/ gcc.
I want to thank you for trying to help. Unfortunately I'm still running into problems. When I try to use the binary you cross compiled I get:

./awale: /lib/libc.so.6: version `GLIBC_2.7' not found (required by ./awale)

When I try to compile using the newer tcc on the kindle I get:

awale.c:414 error:incompatible types for redefinition of 'best_move'

I've never gotten this error compiling with either gcc or tcc on my laptop, and I know a little C, and can't see where the problem is.

Again, thank you so much for trying.
kelmscott is offline   Reply With Quote
Advert
Reply

Tags
tcc, tinycc


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Having problems compiling gtk code for kindle touch jacobr8893 Kindle Developer's Corner 6 01-12-2017 01:41 PM
Glo Problems compiling Qt for Kobo Glo j4GGy Kobo Developer's Corner 6 08-03-2013 09:25 AM
Problems compiling calibre DOMBlogger Development 2 01-23-2012 04:48 AM
Problems compiling unkilbeeg Sigil 1 09-13-2009 01:49 PM
Problems compiling eb1150 on Ubuntu Intrepid luqmaninbmore Fictionwise eBookwise 10 01-15-2009 07:14 PM


All times are GMT -4. The time now is 12:59 PM.


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