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 12-28-2019, 06:32 AM   #1
Roker2
PW->PW3
Roker2 began at the beginning.
 
Roker2's Avatar
 
Posts: 25
Karma: 10
Join Date: Nov 2017
Location: Belarus, Minsk
Device: Kindle PaperWhite 1/3
Compiling program for terminal

Hi! I found C++ Tetris and want to port it to my PW3.
1) I downloaded gcc-linaro-7.5.0-2019.12-i686-mingw32_arm-linux-gnueabihf toolchain
2) I added making variant to Makefile
3) Compile
Code:
make pw3
4) Run program in kterm
5) I got
Code:
line 1: syntax error: unexpected "("
I don't understand what does it want.
Sources.
FW - 5.12.2
Roker2 is offline   Reply With Quote
Old 12-28-2019, 10:07 AM   #2
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
Show the code or keycode(s) you used for step 4 please.
knc1 is offline   Reply With Quote
Advert
Old 12-28-2019, 12:26 PM   #3
Roker2
PW->PW3
Roker2 began at the beginning.
 
Roker2's Avatar
 
Posts: 25
Karma: 10
Join Date: Nov 2017
Location: Belarus, Minsk
Device: Kindle PaperWhite 1/3
Quote:
Originally Posted by knc1 View Post
Show the code or keycode(s) you used for step 4 please.
Code:
./blocks
blocks is compiled code.
Roker2 is offline   Reply With Quote
Old 12-28-2019, 01:01 PM   #4
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 Roker2 View Post
Code:
./blocks
blocks is compiled code.
Check the contents of your current directory ;
Make sure that 'blocks' is present there.


Most likely it is not and the error message is from kterm itself.
knc1 is offline   Reply With Quote
Old 12-28-2019, 01:30 PM   #5
Roker2
PW->PW3
Roker2 began at the beginning.
 
Roker2's Avatar
 
Posts: 25
Karma: 10
Join Date: Nov 2017
Location: Belarus, Minsk
Device: Kindle PaperWhite 1/3
Quote:
Originally Posted by knc1 View Post
Check the contents of your current directory ;
Make sure that 'blocks' is present there.


Most likely it is not and the error message is from kterm itself.
Does you want to say, that 'blocks' is not executable file?
I go to 'extensions' folder (cd ..), wrote
Code:
./blocks
and got
Code:
./blocks: not found
Roker2 is offline   Reply With Quote
Advert
Old 12-28-2019, 07:09 PM   #6
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: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Double-check that it's actually built for ARM and you're not simply trying to run an x86_64 binary .

(Or, I guess, worse, a PE binary, since your host appears to be Windows?)
NiLuJe is offline   Reply With Quote
Old 12-28-2019, 07:10 PM   #7
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: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Oh, also: that's a hard-float TC, which wouldn't produce viable binaries for the Kindle anyway.

Drop your Windows host (somehow, don't care), and join the dark side.
NiLuJe is offline   Reply With Quote
Old 12-29-2019, 11:09 AM   #8
Roker2
PW->PW3
Roker2 began at the beginning.
 
Roker2's Avatar
 
Posts: 25
Karma: 10
Join Date: Nov 2017
Location: Belarus, Minsk
Device: Kindle PaperWhite 1/3
Quote:
Originally Posted by NiLuJe View Post
Double-check that it's actually built for ARM and you're not simply trying to run an x86_64 binary .

(Or, I guess, worse, a PE binary, since your host appears to be Windows?)
Mmm, I use Manjaro. Manjaro Cinnamon.
Roker2 is offline   Reply With Quote
Old 12-29-2019, 11:09 AM   #9
Roker2
PW->PW3
Roker2 began at the beginning.
 
Roker2's Avatar
 
Posts: 25
Karma: 10
Join Date: Nov 2017
Location: Belarus, Minsk
Device: Kindle PaperWhite 1/3
Quote:
Originally Posted by NiLuJe View Post
Oh, also: that's a hard-float TC, which wouldn't produce viable binaries for the Kindle anyway.

Drop your Windows host (somehow, don't care), and join the dark side.
Yes, maybe need to change toolchain. I will try.
Roker2 is offline   Reply With Quote
Old 12-29-2019, 11:13 AM   #10
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: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
Quote:
Originally Posted by Roker2 View Post
Mmm, I use Manjaro. Manjaro Cinnamon.
Then you're definitely doing something wrong, as (even if you forget the comparatively "minor" hardfloat issue) that's a Win -> Linux cross TC.

(Which explains all the .exe in there )
NiLuJe is offline   Reply With Quote
Old 12-31-2019, 05:17 AM   #11
Roker2
PW->PW3
Roker2 began at the beginning.
 
Roker2's Avatar
 
Posts: 25
Karma: 10
Join Date: Nov 2017
Location: Belarus, Minsk
Device: Kindle PaperWhite 1/3
So, I used compiling command for not arm
So, I changed command and got
Code:
/home/dmitry/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabi/arm-linux-gnueabi/include/c++/7.5.0/arm-linux-gnueabi/bits/os_defines.h:39:10: fatal error: features.h: No such file or directory
 #include <features.h>
UPD: But Manjaro has it in /usr/include/features.h

Last edited by Roker2; 12-31-2019 at 05:31 AM.
Roker2 is offline   Reply With Quote
Old 12-31-2019, 09:25 AM   #12
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: 26047190
Join Date: Jun 2010
Location: Paris, France
Device: Kindle 2i, 3g, 4, 5w, PW, PW2, PW5; Kobo H2O, Forma, Elipsa, Sage, C2E
I can't vouch for the binary releases, because I've never used them, but that should *definitely* be shipped somewhere by the cross TC.

It certainly is when building from source:

Code:
find ~/x-tools/arm-kindlepw2-linux-gnueabi -name features.h                                                                                                                                                                                                                                                                       
/home/niluje/x-tools/arm-kindlepw2-linux-gnueabi/arm-kindlepw2-linux-gnueabi/include/c++/7.5.0/parallel/features.h
/home/niluje/x-tools/arm-kindlepw2-linux-gnueabi/arm-kindlepw2-linux-gnueabi/sysroot/usr/include/features.h
You do *NOT* want to be using your host's version of that.
NiLuJe is offline   Reply With Quote
Old 01-07-2020, 05:29 AM   #13
Roker2
PW->PW3
Roker2 began at the beginning.
 
Roker2's Avatar
 
Posts: 25
Karma: 10
Join Date: Nov 2017
Location: Belarus, Minsk
Device: Kindle PaperWhite 1/3
Quote:
Originally Posted by NiLuJe View Post
I can't vouch for the binary releases, because I've never used them, but that should *definitely* be shipped somewhere by the cross TC.

It certainly is when building from source:

Code:
find ~/x-tools/arm-kindlepw2-linux-gnueabi -name features.h                                                                                                                                                                                                                                                                       
/home/niluje/x-tools/arm-kindlepw2-linux-gnueabi/arm-kindlepw2-linux-gnueabi/include/c++/7.5.0/parallel/features.h
/home/niluje/x-tools/arm-kindlepw2-linux-gnueabi/arm-kindlepw2-linux-gnueabi/sysroot/usr/include/features.h
You do *NOT* want to be using your host's version of that.
Does you have the same file?
Roker2 is offline   Reply With Quote
Old 01-07-2020, 09:01 AM   #14
Roker2
PW->PW3
Roker2 began at the beginning.
 
Roker2's Avatar
 
Posts: 25
Karma: 10
Join Date: Nov 2017
Location: Belarus, Minsk
Device: Kindle PaperWhite 1/3
So, I built KOReader toolchain, remake makefile, but I have the same error.
Code:
/home/dmitry/x-tools/arm-kindlepw2-linux-gnueabi/arm-kindlepw2-linux-gnueabi/include/c++/7.4.1/arm-kindlepw2-linux-gnueabi/bits/os_defines.h:39:10: fatal error: features.h: No such file or directory
 #include <features.h>
https://github.com/Roker2/blocks/blo...8/Makefile#L15
Roker2 is offline   Reply With Quote
Old 01-07-2020, 09:10 AM   #15
Roker2
PW->PW3
Roker2 began at the beginning.
 
Roker2's Avatar
 
Posts: 25
Karma: 10
Join Date: Nov 2017
Location: Belarus, Minsk
Device: Kindle PaperWhite 1/3
But if I remove LPATH, I get
Code:
src/main.cpp:3:10: fatal error: ncurses.h: No such file or directory
 #include <ncurses.h>
Roker2 is offline   Reply With Quote
Reply

Tags
c++


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Terminal program for PB622/623 jtt PocketBook Developer's Corner 92 12-22-2024 05:39 PM
Aura HD Serial terminal program for use on Kobo? Ken Maltby Kobo Developer's Corner 22 12-25-2016 05:26 AM
Compiling 0.9.5 with Qt 5.6.0 CJMiller Sigil 20 03-27-2016 03:21 PM
Terminal program for PB622/PB623 jtt PocketBook 3 09-03-2013 08:41 PM
Compiling for Lubuntu (regarding compiling instructions) jgratero Sigil 5 07-15-2012 07:54 PM


All times are GMT -4. The time now is 07:22 AM.


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