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 03-11-2025, 08:11 AM   #1
RedOnion
Junior Member
RedOnion began at the beginning.
 
Posts: 9
Karma: 10
Join Date: Mar 2025
Device: Kindle PW
Compile Zig programs for Kindle?

I hacked my old kindle (10th gen) and jailbreaked (jailbroken?) it. I cross compiled the hello world program using:

Code:
zig build-exe .\tiny-hello.zig -O ReleaseSmall -fstrip -fsingle-threaded -target arm-linux-gnueabi
It worked as expected. I used this guide here

With this success I went on to compile the following HTTP client:

https://zig.news/andrewgossage/easy-...lientfetch-k43

It however failed with the following error:

Code:
[root@kindle apps]# ./hello-web

URL: https://jsonplaceholder.typicode.com/posts/1 GET
Sending request...
error: CertificateBundleLoadFailure

curl works for the same URL, which rules out the device and network.

Code:
[root@kindle us]# curl -s https://jsonplaceholder.typicode.com/posts/1
{
  "userId": 1,
  "id": 1,
  "title": "sunt aut facere repellat provident occaecati excepturi optio reprehenderit",
  "body": "quia et suscipit\nsuscipit recusandae consequuntur expedita et cum\nreprehenderit molestiae ut ut quas totam\nnostrum rerum est autem sunt rem eveniet architecto"
}

Zig people told me to check if I can use strace to debug. Is there a way this could work?
RedOnion is offline   Reply With Quote
Old 03-12-2025, 04:51 AM   #2
Marek
Groupie
Marek ought to be getting tired of karma fortunes by now.Marek ought to be getting tired of karma fortunes by now.Marek ought to be getting tired of karma fortunes by now.Marek ought to be getting tired of karma fortunes by now.Marek ought to be getting tired of karma fortunes by now.Marek ought to be getting tired of karma fortunes by now.Marek ought to be getting tired of karma fortunes by now.Marek ought to be getting tired of karma fortunes by now.Marek ought to be getting tired of karma fortunes by now.Marek ought to be getting tired of karma fortunes by now.Marek ought to be getting tired of karma fortunes by now.
 
Marek's Avatar
 
Posts: 194
Karma: 1512344
Join Date: Jul 2023
Device: PW3, PW4 :(, KT5, PW5, KLC
I assume the problem is in https://ziglang.org/documentation/0....undle.zig.html (function rescanLinux), the kindle doesn't store the ssl certs in any of the paths mentioned, so zig isnt able to find them, they are stored in /etc/ssl/certs/, so you would need to modify the mentioned functions or copy/link the cert files to one of the expected paths
Marek is offline   Reply With Quote
Advert
Reply

Tags
compile, debugging


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
[HELP] Compile Linux Apps For Kindle CaesarW Kindle Developer's Corner 6 10-08-2017 08:39 AM
Is it possible to compile assembly on kindle? mcmay Kindle Developer's Corner 2 07-06-2013 07:54 PM
does anyone develop/compile for kindle on a mac? hippy dave Kindle Developer's Corner 15 09-08-2012 05:04 PM
How to compile for Kindle DX? cdisou Kindle Developer's Corner 5 10-22-2011 07:30 AM
Free Book (Kindle) - The One Year Daily Insights with Zig Ziglar koland Deals and Resources (No Self-Promotion or Affiliate Links) 4 06-19-2010 07:07 AM


All times are GMT -4. The time now is 05:08 PM.


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