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

Installation instructions clarifications: step 4- Building libjam-mt #4

Open
shacharoz opened this issue Aug 22, 2019 · 3 comments
Open

Comments

@shacharoz
Copy link

shacharoz commented Aug 22, 2019

1: go to a library and command git clone https://github.com/shahbaz-man/libjam-mt.git
if you dont have git installed, first do
sudo apt install git

2: close terminal. reopen it from the library libjam-mt that was created

3: write these commands
chmod +x compile
chmod +x native/assemble
chmod +x run
chmod +x cr
chmod +x frc

4: supposed to run setup with
sudo ./frc

but it fails and returns

./assemble: 3: ./assemble: gcc: not found
./assemble: 4: ./assemble: gcc: not found
cp: cannot create regular file '/t3/lib/': No such file or directory
./compile: 3: ./compile: javac: not found
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libutouch-evemu.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/arm-linux-gnueabihf/libutouch-frame.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
ERROR: ld.so: object '/usr/lib/libmtdev.so' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.
Error: Could not find or load main class com.asdev.libjam.mt.TouchHandler
Caused by: java.lang.ClassNotFoundException: com.asdev.libjam.mt.TouchHandler

@shacharoz
Copy link
Author

i need to check these points one by one:

  • You need to set the -Djava.library.path to the library location
    
  • You will need to change the jdk include paths. In the script assemble, replace -I/opt/jdk/include with /path/to/jdk/include and -I/opt/jdk/include/linux to -I/path/to/jdk/include/linux
    
  • You may need a reboot.
    
  • You must run as root because the C lib needs access to /dev/input/eventX
    
  • You may need to change the /dev/input/eventX number. You can change this in ./run. In the line java -D... the last parameter should be replaced with your event device number
    

@shacharoz
Copy link
Author

shacharoz commented Aug 23, 2019

extra steps:
the three important scripts are assemble, compile and run (in the correct order of execution)

do all these before step 3 from the top issue:

  1. start your terminal as a super user: sudo su
    write the following commands in this mode.

ASSEMBLE

  1. check that command gcc is recognized by your system.
    if not, install c compiler with sudo apt install gcc
  2. write the path to the java and linux libraries
    gcc -c -Wall -fPIC TouchHandlerImpl.c -o libjam-mt.o -I. -I/usr/include/ -I/usr/lib/jvm/java-8-openjdk-amd64/include/ -I/usr/lib/jvm/java-8-openjdk-amd64/include/linux/

-- THE ASSEMBLE FAILS TO ME due to missing libraries

COMPILE

  1. check that command javac is recognized by your system.
    if not, install openjdk sudo apt-get install openjdk-8-jdk
  2. edit compile command to have sudo before each rm command (i will try to commit these changes into the repository in the future)

RUN

  1. add sudo and write the path to the libjam.mt library
    sudo java -Djava.library.path=/home/giano/Documents/libjam-mt/ com.asdev.libjam.mt.TouchHandler 5
  2. set the number at end of that line to match the device number from the evemu-record command

COMPILE AND RUNNING
now we can compile and supposed to run
3: write these commands

chmod +x native/assemble
chmod +x compile
chmod +x run
chmod +x cr
chmod +x frc

4: supposed to run setup with
sudo ./frc

@shacharoz
Copy link
Author

shacharoz commented Aug 24, 2019

ASSEMBLE gets compilation error with missing file frame-mtdev.h

In file included from TouchHandlerImpl.c:4:0:
./mtview.h:27:10: fatal error: utouch/frame-mtdev.h: No such file or directory
#include <utouch/frame-mtdev.h>

i found it here:
http://upstream.rosalinux.ru/compat_reports/utouch-frame/2.2.3_to_2.4.4/abi_compat_report.html

but cant find this library anywhere else

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

1 participant