04-24-2024, 03:11 AM | #1 |
Mr. Developer
Posts: 24
Karma: 10
Join Date: Feb 2024
Device: Kindle Voyage
|
How to use my custom Shared object(.so) file in Koreader
Hi there guys. I wanted to use my custom .so file in koreader. Is there any way I can achieve it. I tried putting the file inside of "koreader\base\build\x86_64-linux-gnu-debug\libs" and that works, but just in development.
When I try to put into the file to the libs folder of the actual release version that is installed into my kindle it doesn't work. Note: I included ffi.load to get the .so file. Here is an extract of how I am trying to use it (actual code is not in this exact sequence): Code:
local example = ffi.load("libexample.so") ffi.cdef("void hello();") example.hello() Anyone for help please. |
04-24-2024, 04:40 AM | #2 |
Mr. Developer
Posts: 24
Karma: 10
Join Date: Feb 2024
Device: Kindle Voyage
|
Am I putting the file under wrong directory?
|
Advert | |
|
04-24-2024, 04:26 PM | #3 |
Wizard
Posts: 1,675
Karma: 730583
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
When you say "the file," do you mean the exact same file in both cases?
By which I mean the file should be different for amd64 vs arm. |
04-24-2024, 08:58 PM | #4 |
Mr. Developer
Posts: 24
Karma: 10
Join Date: Feb 2024
Device: Kindle Voyage
|
Yeah, the same .so file. Firstly, I built the .so file with Golang selecting the OS as linux and architecture as 32 bit/386 (was getting an error in the emulator that 64 bit .so file is not supported).
Everything works fine in the emulator, the .so works exactly as expected but, my kindle says something like: Code:
Failed to load dynamic library libs/libexample.so. No such file or directory. |
04-25-2024, 06:45 AM | #5 |
Wizard
Posts: 1,675
Karma: 730583
Join Date: Oct 2014
Location: Antwerp
Device: Kobo Aura H2O
|
Kindle requires an ARM 32-bit build.
I don't know Go, but a quick check locally shows: Code:
go tool dist list | grep linux linux/386 linux/amd64 linux/arm linux/arm64 linux/loong64 linux/mips linux/mips64 linux/mips64le linux/mipsle linux/ppc64 linux/ppc64le linux/riscv64 linux/s390x |
Advert | |
|
04-29-2024, 09:36 PM | #6 |
Mr. Developer
Posts: 24
Karma: 10
Join Date: Feb 2024
Device: Kindle Voyage
|
|
Tags |
developement, kindle, koreader |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
error metawidget file object has no attribute ''opf file'' | noemiri | Conversion | 5 | 01-10-2024 03:52 PM |
Help with "Shared Universe" custom column | zaroz | Library Management | 3 | 11-24-2021 12:30 PM |
Koreader/Nickel Shared Folders | jbenwell | KOReader | 17 | 06-09-2021 12:35 PM |
Error message: Invalid image: cannot identify image file <_io.BytesIO object at 0x000 | bkleine | Calibre | 0 | 12-11-2020 05:39 PM |
HD where is the shared file located? | renswic | Kindle Fire | 0 | 07-10-2013 12:18 AM |