clearlinux / distribution

Placeholder repository to allow filing of general bugs/issues/etc against the Clear Linux OS for Intel Architecture linux distribution
521 stars 29 forks source link

Add SikuliX (GUI Automation Tool) as bundle #925

Open sriiora opened 5 years ago

sriiora commented 5 years ago

I had followed the instructions in https://sikulix-2014.readthedocs.io/en/latest/basicinfo.html#sikulix-on-linux to setup Sikulix but fail. This is needed for UI test development on Clear Linux OS.

lebensterben commented 5 years ago

@sriiora Have you followed the instructions here?

sriiora commented 5 years ago

@sriiora Have you followed the instructions here?

Yes I had followed, but I could not successfully compiled the tesseract library.

lebensterben commented 5 years ago

@sriiora Do you have libleptonica library installed? As far as I know it's not available via swupd.

For testing, you can download a deb archive from here: https://packages.debian.org/sid/amd64/libleptonica-dev/download

Then extract it as a archive, and you'll see a data.tar.xz. Move contents of ./include to /usr/local/include Move contents of ./usr/lib/x86_64-linux-gnu to /usr/lib64.

Modify /usr/lib64/pkgconfig/lept.pc as the following

prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib64
includedir=${prefix}/include/leptonica

Name: leptonica
Description: An open source C library for efficient image processing and image analysis operations
Version: 1.78.0
Libs: -L${libdir} -llept
Libs.private: -lz -lpng16 -lz -ljpeg -lgif -ltiff -lwebp
Cflags: -I${includedir}
sriiora commented 5 years ago

@sriiora Do you have libleptonica library installed? As far as I know it's not available via swupd.

For testing, you can download a deb archive from here: https://packages.debian.org/sid/amd64/libleptonica-dev/download

Then extract it as a archive, and you'll see a data.tar.xz. Move contents of ./include to /usr/local/include Move contents of ./usr/lib/x86_64-linux-gnu to /usr/lib64.

Modify /usr/lib64/pkgconfig/lept.pc as the following

prefix=/usr
exec_prefix=${prefix}
libdir=${prefix}/lib64
includedir=${prefix}/include/leptonica

Name: leptonica
Description: An open source C library for efficient image processing and image analysis operations
Version: 1.78.0
Libs: -L${libdir} -llept
Libs.private: -lz -lpng16 -lz -ljpeg -lgif -ltiff -lwebp
Cflags: -I${includedir}

Thanks for the hint, I helps. Btw, I build leptonica from source instead of using the debian package. After successfully 'make' and 'make install', I manually did the following to steps:-

  1. sudo cp -rf /usr/local/lib/* /usr/lib64
  2. Modify /usr/lib64/pkgconfig/lept.pc as the following (minor different on 'includedir'
prefix=/usr
exec_prefix=${prefix}
libdir=${exec_prefix}/lib64
includedir=${prefix}/local/include/leptonica

Name: leptonica
Description: An open source C library for efficient image processing and image analysis operations
Version: 1.74.4
Libs: -L${libdir} -llept
Libs.private: -lz -lpng16 -lz -ljpeg  -ltiff -lwebp
Cflags: -I${includedir}
lebensterben commented 5 years ago

@sriiora So is SikuliX up and running now?

sriiora commented 5 years ago

Not yet test, missing wmctrl and libopencv_java. Do you know Clear Linux has these 2 packages ready?

lebensterben commented 5 years ago

@sriiora I'm away from my computer so I don't know for sure.

Try this, swupd search wmctrl and swupd search opencv and if you don't see any result, then find one for other system like Debian or Linux. And look for what are the files included in those packages. Then use swupd search-file FILENAME to look for that. If there's no search hit, then you need to compile them yourself, or try to use the prebuilt package for other distro.


Just remember to put the xxx.pc file under /usr/lib64/pkgconfig and modify its contents accordingly. Hopefully this will work.

If the dev team does include this package, that's even better. But at least you would have it running now and don't need to wait if you can build it. Good luck.

Sent with GitHawk

sriiora commented 5 years ago

For wmctrl I had downloaded the source and compiled without problem. But fail to compile libopencv_javaXYZ from source. I can compiled and produced all libopencv from source except libopencv_javaXYZ.

I'm debugging the build configuration issue (miss match) generated by 'cmake'

/bin/ant: 第 160 行:cd: /bin/../share/ant/bin/..: 没有那个文件或目录
Error: Could not find or load main class org.apache.tools.ant.launch.Launcher
-- Could NOT find JNI (missing: JAVA_AWT_LIBRARY JAVA_JVM_LIBRARY JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 JAVA_AWT_INCLUDE_PATH) 
--   OpenCV modules:
--     To be built:                 calib3d core dnn features2d flann highgui imgcodecs imgproc ml objdetect photo python2 python3 shape stitching superres ts video videoio videostab

The above missing java and java_bindings_generator

--   Java:                          
--     ant:                         NO
--     JNI:                         NO
--     Java wrappers:               NO
--     Java tests:                  NO

I wish Clear Linux bundle also build and provide libopencv_javaXYZ as well since they already provide other libopencv. These libopencv* can be build from same source.

lebensterben commented 5 years ago

@sriiora As for Error: Could not find or load main class org.apache.tools.ant.launch.Launcher

Set the environment variable export ANT_HOME=/usr/share/ant

You will see another error about JNI, and you need to export JAVA_HOME=/usr/lib/jvm/java-1.9.0-openjdk (the version may vary).

Then you will see VTK not found, and I guess you need to compile it from the source.

AthenasJimenez commented 4 years ago

@sriiora what is the current status? Do you still need help with this?

sriiora commented 4 years ago

I can build the library but it would be great if Clear Linux make it as one of the distributed bundle.