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 07-25-2016, 10:32 AM   #1
Hanspeter
Enthusiast
Hanspeter began at the beginning.
 
Posts: 40
Karma: 12
Join Date: Jul 2014
Device: Kindel PW1
xmahjongg for Kindle as Kual extension

With help of the good team here we found a solution. The final version, when writing this update, is 0.7 and can be found here in two versions:
http://www.mobileread.com/forums/sho...8&postcount=64

and a new version 08 from an other developer:
http://www.mobileread.com/forums/sho...6&postcount=80

HaPe

------------------- Original Post for documentation -----------------

Hi,

since a long time I'm searching for a Mahjong game for my PW1.

I saw sguerrini97 was able to compile GTKSudoku for the Kindle PW I started searching for an open source GTK based Mahjong implementation..

I found the following source;
https://github.com/passcod/mah-jong

Could someone with a running cross compiler give it a try if it is possible to get it compiled ?

Thanks in advance
Hanspeter

Last edited by Hanspeter; 11-24-2016 at 04:05 AM. Reason: Added final Solution
Hanspeter is offline   Reply With Quote
Old 07-25-2016, 01:14 PM   #2
eschwartz
Ex-Helpdesk Junkie
eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.eschwartz ought to be getting tired of karma fortunes by now.
 
eschwartz's Avatar
 
Posts: 19,148
Karma: 82980001
Join Date: Nov 2012
Location: The Beaten Path, USA, Roundworld, This Side of Infinity
Device: Kindle Touch fw5.3.7 (Wifi only)
You can set up a cross-compiler yourself, see NiLuJe's snapshots thread for his configs.
eschwartz is offline   Reply With Quote
Old 07-26-2016, 04:50 AM   #3
Hanspeter
Enthusiast
Hanspeter began at the beginning.
 
Posts: 40
Karma: 12
Join Date: Jul 2014
Device: Kindel PW1
Thanks eschwartz, found it: http://www.mobileread.com/forums/sho...d.php?t=276410
I will give it a try when I find the time.

Hanspeter
Hanspeter is offline   Reply With Quote
Old 07-26-2016, 08:38 AM   #4
knc1
Ex-Helpdesk Addict
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: 12,235
Karma: 12451893
Join Date: Feb 2012
Location: Central Texas
Device: No PW2, KV, KOA
Getting the server and connections to remote Mahjong players working may be a bit tricky on a Kindle.
Kindles have a very strict firewall that will probably require dealing with in some fashion.
knc1 is offline   Reply With Quote
Old 07-26-2016, 10:56 AM   #5
Cinisajoy
Just a Yellow Smiley.
Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.
 
Cinisajoy's Avatar
 
Posts: 10,394
Karma: 60148717
Join Date: Jul 2015
Location: Texas
Device: K4, K5, fire, kobo, galaxy
4 handed Mahjongg or Mahjongg solitaire?
Cinisajoy is online now   Reply With Quote
Old 07-26-2016, 11:03 AM   #6
knc1
Ex-Helpdesk Addict
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: 12,235
Karma: 12451893
Join Date: Feb 2012
Location: Central Texas
Device: No PW2, KV, KOA
that program does 4 handed.
computer or a remote player for each of the three other hands.
knc1 is offline   Reply With Quote
Old 07-26-2016, 11:09 AM   #7
Cinisajoy
Just a Yellow Smiley.
Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.Cinisajoy ought to be getting tired of karma fortunes by now.
 
Cinisajoy's Avatar
 
Posts: 10,394
Karma: 60148717
Join Date: Jul 2015
Location: Texas
Device: K4, K5, fire, kobo, galaxy
I was wondering which the OP was looking for.
I only do the solitaire.
Cinisajoy is online now   Reply With Quote
Old 07-29-2016, 05:17 AM   #8
Hanspeter
Enthusiast
Hanspeter began at the beginning.
 
Posts: 40
Karma: 12
Join Date: Jul 2014
Device: Kindel PW1
Quote:
Originally Posted by knc1 View Post
that program does 4 handed.
computer or a remote player for each of the three other hands.
Ups, I didn't realized that, as I only knew the solitaire version until now.

So I found a simple solitaire version for GTK, that I was able to compile on my Ubuntu box. Now I need to find the time to set-up the toolchain an try to compile it for the Kinde.

https://sourceforge.net/projects/llk-linux/

Hanspeter
Hanspeter is offline   Reply With Quote
Old 07-29-2016, 11:55 AM   #9
knc1
Ex-Helpdesk Addict
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: 12,235
Karma: 12451893
Join Date: Feb 2012
Location: Central Texas
Device: No PW2, KV, KOA
I am having some problems with the instructions:
http://llk-linux.sourceforge.net/
knc1 is offline   Reply With Quote
Old 07-31-2016, 12:40 PM   #10
Hanspeter
Enthusiast
Hanspeter began at the beginning.
 
Posts: 40
Karma: 12
Join Date: Jul 2014
Device: Kindel PW1
Quote:
Originally Posted by knc1 View Post
I am having some problems with the instructions:
http://llk-linux.sourceforge.net/
Oh, I'm getting crasy with this. This is still not the Solitaire Mahjong I was searching for. It is an adoption of a other Mahjong inspired game.

After a lot of research I found the following candidates:
1) A python based collection of Solitaire games
http://pysolfc.sourceforge.net/
Not sure if the python package is able to run it or all libs are there (e.g. https://code.google.com/archive/p/python-ttk/)
Would be nice to get it working as it implements about 1000 Solitaire card and Mahjong based games.
2) xmahjongg
Looks like a simple implementation in C with only basic requirements. No idea what lib is used for graphic output. For me it looks like it only uses direct X11 calls.
http://www.lcdf.org/xmahjongg/
Compiles on Ubuntu without problems. Need to be started with parameter -B that points the the share directory (e.g. ./xmahjongg -B '/home/user/Dokumente/Kindle/Mahjongg/xmahjongg-3.7/sahre')
3) Lopan
A simple SDL based Version. The homepage is gone, but archive.org has a copy of the latest src archive.
http://web.archive.org/web/201603100....com/sdllopan/

So that’s my research results for today
Hanspeter
Hanspeter is offline   Reply With Quote
Old 08-03-2016, 05:05 AM   #11
Hanspeter
Enthusiast
Hanspeter began at the beginning.
 
Posts: 40
Karma: 12
Join Date: Jul 2014
Device: Kindel PW1
I need some help to compile xmahjongg. To complile it it fo ubuntu I need to do the following:
Quote:
export LDFLAGS="-lpthread -lX11"
./conigure
make
The compiler do not find the x11 header files without the LDFLAGS statement.
../include/lcdfgif/gifx.h:22:22: fatal error: X11/Xlib.h: No such file or directory

Now I set up the tool-chain as described here: http://www.mobileread.com/forums/sho...d.php?t=276410 worked without problems.

Now to compile it for the kindle I used:
Quote:
export PATH=$PATH:$HOME/x-tools/arm-kindle5-linux-gnueabi/bin
export LDFLAGS="-lpthread -lX11"
CC=arm-kindle5-linux-gnueabi-gcc ./configure --host=arm-kindle5-linux-gnueabi
and receive the following error:
checking for C compiler default output file name... configure: error: C compiler cannot create executables
See `config.log' for more details.

config.log:
Quote:
gcc version 5.4.1 20160606 (crosstool-NG crosstool-ng-1.22.0-195-g17658f4)
configure:2089: $? = 0
configure:2091: arm-kindle5-linux-gnueabi-gcc -V </dev/null >&5
arm-kindle5-linux-gnueabi-gcc: error: unrecognized command line option '-V'
arm-kindle5-linux-gnueabi-gcc: fatal error: no input files
compilation terminated.
configure:2094: $? = 1
configure:2117: checking for C compiler default output file name
configure:2120: arm-kindle5-linux-gnueabi-gcc -lpthread -lX11 conftest.c >&5
/home/hjochman/x-tools/arm-kindle5-linux-gnueabi/lib/gcc/arm-kindle5-linux-gnueabi/5.4.1/../../../../arm-kindle5-linux-gnueabi/bin/ld.bfd: cannot find -lX11
./configure works Without the -lX11 flag, but then the error "../include/lcdfgif/gifx.h:22:22: fatal error: X11/Xlib.h: No such file or directory" in the make command is back.

I expect that I need to add the header files or the libs from the kindle to the TC, but I was not able to find how to do that.

Can someone point me to the right place?

Hanspeter

Last edited by Hanspeter; 08-03-2016 at 05:07 AM.
Hanspeter is offline   Reply With Quote
Old 08-03-2016, 08:00 AM   #12
knc1
Ex-Helpdesk Addict
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: 12,235
Karma: 12451893
Join Date: Feb 2012
Location: Central Texas
Device: No PW2, KV, KOA
Use -I flag to add the include path in the build command(s) to wherever you put them.
You didn't see that error during the native compile because your native install has them in the native compiler's default search path.

It also reads as if you need to do something about that default output test in configure.
It isn't compatible with your gcc version.
So:
Search if it has been fixed by someone (probably just using a recent auto-reconfigure to regenerate the configure file will do);
Fix it yourself ;
Skip it by forcing the correct answer ;
Use an older compiler (for instance, the version used to build the Kindle firmware);

I would suggest diving into Buildroot see how they fixed auto-configure for the newer compiler versions.

It will be a rather old fix (2013?), because:
Code:
$ gcc -V </dev/null
gcc: error: unrecognized option ‘-V’
That is gcc-4.6 and the current gcc is 6.something.

Last edited by knc1; 08-03-2016 at 08:54 AM.
knc1 is offline   Reply With Quote
Old 08-03-2016, 08:49 AM   #13
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: 6,973
Karma: 6556573
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, (PW) & PW2; Kobo H2O
That error message is fairly straightforward: your app depends on libX11.

You need to build libX11 . Which may or may not depend on a full XOrg install, can't recall, and not on a Linux box to check right now.

Once it's installed, it should be in a standard path (provided you configured it with the right --prefix), and you won't have to tinker (more than usual) with CPPFLAGS/LDFLAGS.

Did I mention that building GUI stuff risked getting hairy fairly rapidly? ^^.
NiLuJe is offline   Reply With Quote
Old 08-03-2016, 08:59 AM   #14
geekmaster
Carpe diem, c'est la vie.
geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.geekmaster ought to be getting tired of karma fortunes by now.
 
geekmaster's Avatar
 
Posts: 6,430
Karma: 10764602
Join Date: Nov 2011
Location: Multiverse 6627A
Device: K1 to PW3
For SDL versions of Mahjong, twobob ported SDL awhile back:

https://github.com/twobob/buildroot-...ild/sdl-1.2.15
geekmaster is offline   Reply With Quote
Old 08-03-2016, 09:01 AM   #15
knc1
Ex-Helpdesk Addict
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: 12,235
Karma: 12451893
Join Date: Feb 2012
Location: Central Texas
Device: No PW2, KV, KOA
Quote:
Originally Posted by NiLuJe View Post
That error message is fairly straightforward: your app depends on libX11.

You need to build libX11 . Which may or may not depend on a full XOrg install, can't recall, and not on a Linux box to check right now.

Once it's installed, it should be in a standard path (provided you configured it with the right --prefix), and you won't have to tinker (more than usual) with CPPFLAGS/LDFLAGS.

Did I mention that building GUI stuff risked getting hairy fairly rapidly? ^^.
Cross-compiling can always be a 'learning experience' and cross-compiling something that hasn't been maintained in a decade just adds to the fun.
knc1 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
kual extension to open a book shoelesshunter Kindle Developer's Corner 14 08-16-2016 01:30 PM
Tools Is there a Kual Extension/add-on for cloud eduardomb Kindle Developer's Corner 19 07-08-2016 06:43 PM
Tools CPU Governor Menu (KUAL extension) knc1 Kindle Developer's Corner 36 05-26-2016 08:58 AM
Tools is there any KUAL extension development guide? fangzi Kindle Developer's Corner 2 01-02-2014 11:11 AM


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


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