Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remoteinkd: How to "BUILD=emu" : issues and helps #10

Closed
calcreg opened this issue Aug 25, 2018 · 1 comment
Closed

Remoteinkd: How to "BUILD=emu" : issues and helps #10

calcreg opened this issue Aug 25, 2018 · 1 comment

Comments

@calcreg
Copy link

calcreg commented Aug 25, 2018

How to manage the "build=emu" on compiling the executable (of remoteinkd) for emulation of a pocketbook application under linux.

Sound easy but you might encounter problems. That is to say the BUILD=gnueabi works fine, but when it is time to compile the application with BUILD=emu for emulation and test it on linux desktop, lots of problems occur.

  1. Doesn't find the libinkview.so, problems of freetype/freetype.h, ft2build.h, etc.
    exemple : inkview.h:25:22: fatal error: ft2build.h: Aucun fichier ou dossier de ce type

  2. in the linkers'pass, it just doesn't have the dependancies with other libraries or can't find them..

  3. Once he application is compiled fine : when it is time to run it, it just doesn't find the shared libray libinkview.so .

The idea is to start from scratch with the SDK downloadable from github for pocketbook (link).
Assuming you have placed the SDK in the drawer : $HOME/project

ls $HOME/project may give you more or less something like :
development ldconfig.txt readme.txt sources
FRSCSDK ldconf.txt PBSDK releases system

PBSDK/lib contains the important shared library : libinkview.so .

For compiling, you will need to know where to find the freetype on your computer.
Use : freetype-config --cflags
on my config i get : -I/usr/include/freetype2
for linker's pass :
Use : freetype-config --libs
on my config i get : -L/usr/lib/i386-linux-gnu -lfreetype -lz -lpng12

if you don't have freetype-config installed, just do : sudo apt-get install freetype-config

for the compiler to locate inkview.h  : -I$(SDKDIR)/FRSCSDK/include/

Therefore the file common.mk has to be updated with the following changes : ---------------------

Make sure SDKDIR points to the right drawer SDKDIR=…/project

ifeq ($(BUILD), emu)
PROJECT = $(OBJDIR)/$(OUT)
LIBS += -linkview
INCLUDES += -I$(SDKDIR)/FRSCSDK/include/ `freetype-config --cflags`
CC = gcc
CFLAGS += -O0 -D__EMU__ -DIVSAPP -g -m32
CXX = g++
CXXFLAGS += -O0 -D__EMU__ -DIVSAPP -g -m32
LD = g++
LDFLAGS += -m32
endif


When compiled correctly, launch the executable file found in ./obj_emu
If it doesn't find the shared library libinkview.so then you will need to copy libinkview.so to a directory where the program is looking for it.
To know where, just type in a terminal :

export LD_DEBUG=libs

Then launch the program in the terminal. You will see all the locations where it is searching for the library. Just find one place and copy libinkview.so from PBSDK to this new location.

One of the locations where you can copy libinkview.so is :
/usr/lib

(export LD_DEBUG = ) to remove the option.

Your emulation of the application for pocketbook should launch correctly now.

@calcreg calcreg closed this as completed Aug 25, 2018
@calcreg calcreg reopened this Aug 25, 2018
@calcreg calcreg closed this as completed Aug 25, 2018
borzunov added a commit that referenced this issue Aug 26, 2018
@borzunov
Copy link
Owner

Thank you! I've added a link to these instructions to the readme.

borzunov added a commit that referenced this issue Aug 26, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants