canselcik / libremarkable

The only public framework for developing applications with native refresh support for Remarkable Tablet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Ubuntu 19.10 Installation

vsenderov opened this issue · comments

Hello, and thank you for starting this wonderful project.

I'm trying to compile the examples so that I can run the live demo as I want to view the remarkable screen on my computer screen.

I used this comment to install the dependencies #5 (comment). There were no errors and I could follow all steps.

However, when I run the last step I get the following error:

$ make
cargo build --release --target=armv7-unknown-linux-gnueabihf
    Finished release [optimized + debuginfo] target(s) in 0.10s
cargo build --examples --release --target=armv7-unknown-linux-gnueabihf
   Compiling libremarkable v0.3.2 (/home/viktsend/Programs/libremarkable)
warning: use of deprecated item 'std::sync::ONCE_INIT': the `new` function is now preferred
   --> examples/spy.rs:106:1
    |
106 | / hook! {
107 | |   unsafe fn ioctl(fd: c_int, request: NativeWidthType, p1: intptr_t, p2: intptr_t, p3: intptr_t, p4: intptr_t) -> c_int => ioctl_hook {
108 | |     if request == FBIOPUT_VSCREENINFO {
109 | |         let info = p1 as *mut VarScreeninfo;
...   |
142 | |   }
143 | | }
    | |_^
    |
    = note: `#[warn(deprecated)]` on by default
    = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: use of deprecated item 'std::sync::ONCE_INIT': the `new` function is now preferred
   --> examples/spy.rs:106:1
    |
106 | / hook! {
107 | |   unsafe fn ioctl(fd: c_int, request: NativeWidthType, p1: intptr_t, p2: intptr_t, p3: intptr_t, p4: intptr_t) -> c_int => ioctl_hook {
108 | |     if request == FBIOPUT_VSCREENINFO {
109 | |         let info = p1 as *mut VarScreeninfo;
...   |
142 | |   }
143 | | }
    | |_^
    |
    = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

error: lto can only be run for executables, cdylibs and static library outputs

error: aborting due to previous error; 2 warnings emitted

error: could not compile `libremarkable`.

To learn more, run the command again with --verbose.
make: *** [Makefile:7: examples] Error 101

17:18 viktsend@stealth
~/Programs/libremarkable
$ 

I'm running Ubuntu 19.10. Any help will be much appreciated.

Best
V

Hi,

error: lto can only be run for executables, cdylibs and static library outputs

Makes me think it might be related to the latest commit that was merged, allowing truly static builds and linking with musl-libc.

Could you try doing git checkout a71f389e970df79ce8fba826fc658df54e4d6dbf and then building? Let me know how it works for you.

Compilation works. Will try running the demos now

$ git checkout a71f389e970df79ce8fba826fc658df54e4d6dbf
Note: checking out 'a71f389e970df79ce8fba826fc658df54e4d6dbf'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b <new-branch-name>

HEAD is now at a71f389 Minor Maintenance (#26)

10:33 viktsend@stealth
~/Programs/libremarkable
$ make
cargo build --release --target=armv7-unknown-linux-gnueabihf
warning: unused manifest key: build
warning: unused manifest key: package.is-it-maintained-issue-resolution
warning: unused manifest key: package.is-it-maintained-open-issues
warning: unused manifest key: package.maintenance
   Compiling autocfg v1.0.0
   Compiling libc v0.2.69
   Compiling cfg-if v0.1.10
   Compiling lazy_static v1.4.0
   Compiling rand_core v0.4.2
   Compiling autocfg v0.1.7
   Compiling byteorder v1.3.4
   Compiling maybe-uninit v2.0.0
   Compiling proc-macro2 v0.4.30
   Compiling rustc-serialize v0.3.24
   Compiling unicode-xid v0.1.0
   Compiling scopeguard v1.1.0
   Compiling bitflags v1.2.1
   Compiling rayon-core v1.7.0
   Compiling glob v0.3.0
   Compiling memchr v2.3.3
   Compiling syn v0.15.44
   Compiling pkg-config v0.3.17
   Compiling num-derive v0.2.5
   Compiling adler32 v1.0.4
   Compiling log v0.4.8
   Compiling either v1.5.3
   Compiling lzw v0.10.0
   Compiling bitflags v0.7.0
   Compiling cgmath v0.17.0
   Compiling color_quant v1.0.1
   Compiling void v1.0.2
   Compiling regex-syntax v0.6.17
   Compiling remove_dir_all v0.5.2
   Compiling quick-error v1.2.3
   Compiling fixedbitset v0.1.9
   Compiling fnv v1.0.6
   Compiling libc v0.1.12
   Compiling bitflags v0.8.2
   Compiling termcolor v1.1.0
   Compiling scoped_threadpool v0.1.9
   Compiling atomic v0.4.5
   Compiling ioctl-gen v0.1.1
   Compiling thread_local v1.0.1
   Compiling rand_core v0.3.1
   Compiling rand_jitter v0.1.4
   Compiling inflate v0.4.5
   Compiling gif v0.10.3
   Compiling humantime v1.3.0
   Compiling aabb-quadtree v0.1.0
   Compiling rand_hc v0.1.0
   Compiling rand_xorshift v0.1.1
   Compiling rand_isaac v0.1.1
   Compiling rand_pcg v0.1.2
   Compiling rand_chacha v0.1.1
   Compiling rand v0.6.5
   Compiling num-traits v0.2.11
   Compiling num-integer v0.1.42
   Compiling crossbeam-utils v0.7.2
   Compiling memoffset v0.5.4
   Compiling num-iter v0.1.40
   Compiling crossbeam-epoch v0.8.2
   Compiling num-rational v0.2.4
   Compiling aho-corasick v0.7.10
   Compiling rand v0.4.6
   Compiling num_cpus v1.13.0
   Compiling rand_os v0.1.3
   Compiling nix v0.8.1
   Compiling atty v0.2.14
   Compiling epoll v4.1.0
   Compiling jobserver v0.1.21
   Compiling deflate v0.7.20
   Compiling stb_truetype v0.3.1
   Compiling quote v0.6.13
   Compiling cc v1.0.52
   Compiling regex v1.3.7
   Compiling tempdir v0.3.7
   Compiling mmap v0.1.1
   Compiling num-complex v0.1.43
   Compiling approx v0.3.2
   Compiling num-traits v0.1.43
   Compiling ordered-float v1.0.2
   Compiling crossbeam-queue v0.2.1
   Compiling env_logger v0.7.1
   Compiling line_drawing v0.8.0
   Compiling num-bigint v0.1.44
   Compiling rusttype v0.8.3
   Compiling crossbeam-deque v0.7.3
   Compiling png v0.14.1
   Compiling num-rational v0.1.42
   Compiling num v0.1.42
   Compiling rayon v1.3.0
   Compiling evdev v0.10.1
   Compiling stopwatch v0.0.7
   Compiling zstd-sys v1.4.15+zstd.1.4.4
   Compiling lua52-sys v0.1.2
   Compiling jpeg-decoder v0.1.19
   Compiling tiff v0.2.2
   Compiling image v0.21.3
   Compiling hlua v0.4.1
   Compiling zstd-safe v2.0.3+zstd.1.4.4
   Compiling zstd v0.5.1+zstd.1.4.4
   Compiling libremarkable v0.3.2 (/home/viktsend/Programs/libremarkable)
warning: unnecessary braces around `for` iterator expression
  --> src/framebuffer/draw.rs:84:18
   |
84 |         for y in { (-search_distance)..search_distance } {
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these braces
   |
   = note: `#[warn(unused_braces)]` on by default

warning: 1 warning emitted

    Finished release [optimized + debuginfo] target(s) in 50.75s
cargo build --examples --release --target=armv7-unknown-linux-gnueabihf
warning: unused manifest key: build
warning: unused manifest key: package.is-it-maintained-issue-resolution
warning: unused manifest key: package.is-it-maintained-open-issues
warning: unused manifest key: package.maintenance
   Compiling matches v0.1.8
   Compiling smallvec v1.4.0
   Compiling percent-encoding v1.0.1
   Compiling chunked_transfer v0.3.1
   Compiling ascii v0.8.7
   Compiling time v0.1.43
   Compiling redhook v1.0.0
warning: unnecessary braces around `for` iterator expression
  --> src/framebuffer/draw.rs:84:18
   |
84 |         for y in { (-search_distance)..search_distance } {
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these braces
   |
   = note: `#[warn(unused_braces)]` on by default

warning: 1 warning emitted

   Compiling unicode-bidi v0.3.4
   Compiling unicode-normalization v0.1.12
   Compiling chrono v0.4.11
   Compiling idna v0.1.5
   Compiling url v1.7.2
   Compiling tiny_http v0.6.2
   Compiling libremarkable v0.3.2 (/home/viktsend/Programs/libremarkable)
warning: use of deprecated item 'std::sync::ONCE_INIT': the `new` function is now preferred
   --> examples/spy.rs:106:1
    |
106 | / hook! {
107 | |   unsafe fn ioctl(fd: c_int, request: NativeWidthType, p1: intptr_t, p2: intptr_t, p3: intptr_t, p4: intptr_t) -> c_int => ioctl_hook {
108 | |     if request == FBIOPUT_VSCREENINFO {
109 | |         let info = p1 as *mut VarScreeninfo;
...   |
142 | |   }
143 | | }
    | |_^
    |
    = note: `#[warn(deprecated)]` on by default
    = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: use of deprecated item 'std::sync::ONCE_INIT': the `new` function is now preferred
   --> examples/spy.rs:106:1
    |
106 | / hook! {
107 | |   unsafe fn ioctl(fd: c_int, request: NativeWidthType, p1: intptr_t, p2: intptr_t, p3: intptr_t, p4: intptr_t) -> c_int => ioctl_hook {
108 | |     if request == FBIOPUT_VSCREENINFO {
109 | |         let info = p1 as *mut VarScreeninfo;
...   |
142 | |   }
143 | | }
    | |_^
    |
    = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: 2 warnings emitted

    Finished release [optimized + debuginfo] target(s) in 9.65s

Demo didn't run, unfortunately:

$ make run
cargo build --examples --release --target=armv7-unknown-linux-gnueabihf
warning: unused manifest key: build
warning: unused manifest key: package.is-it-maintained-issue-resolution
warning: unused manifest key: package.is-it-maintained-open-issues
warning: unused manifest key: package.maintenance
warning: unnecessary braces around `for` iterator expression
  --> src/framebuffer/draw.rs:84:18
   |
84 |         for y in { (-search_distance)..search_distance } {
   |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove these braces
   |
   = note: `#[warn(unused_braces)]` on by default

warning: 1 warning emitted

warning: use of deprecated item 'std::sync::ONCE_INIT': the `new` function is now preferred
   --> examples/spy.rs:106:1
    |
106 | / hook! {
107 | |   unsafe fn ioctl(fd: c_int, request: NativeWidthType, p1: intptr_t, p2: intptr_t, p3: intptr_t, p4: intptr_t) -> c_int => ioctl_hook {
108 | |     if request == FBIOPUT_VSCREENINFO {
109 | |         let info = p1 as *mut VarScreeninfo;
...   |
142 | |   }
143 | | }
    | |_^
    |
    = note: `#[warn(deprecated)]` on by default
    = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: use of deprecated item 'std::sync::ONCE_INIT': the `new` function is now preferred
   --> examples/spy.rs:106:1
    |
106 | / hook! {
107 | |   unsafe fn ioctl(fd: c_int, request: NativeWidthType, p1: intptr_t, p2: intptr_t, p3: intptr_t, p4: intptr_t) -> c_int => ioctl_hook {
108 | |     if request == FBIOPUT_VSCREENINFO {
109 | |         let info = p1 as *mut VarScreeninfo;
...   |
142 | |   }
143 | | }
    | |_^
    |
    = note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)

warning: 2 warnings emitted

    Finished release [optimized + debuginfo] target(s) in 0.11s
ssh root@"10.11.99.1" 'kill -9 `pidof demo` || true; systemctl stop xochitl || true'
root@10.11.99.1's password: 
Permission denied, please try again.
root@10.11.99.1's password: 
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
scp ./target/armv7-unknown-linux-gnueabihf/release/examples/demo root@"10.11.99.1":~/
root@10.11.99.1's password: 
demo                                                                                                                                                                               100%   46MB   6.3MB/s   00:07    
ssh root@"10.11.99.1" './demo'
root@10.11.99.1's password: 
./demo: /lib/libm.so.6: version `GLIBC_2.29' not found (required by ./demo)
./demo: /lib/libc.so.6: version `GLIBC_2.28' not found (required by ./demo)
make: *** [Makefile:41: deploy-demo] Error 1

10:38 viktsend@stealth
~/Programs/libremarkable
$ make start-xochitl
ssh root@"10.11.99.1" 'kill -9 `pidof demo` || true; systemctl start xochitl'
root@10.11.99.1's password: 
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]


I have the following files on the remarkable now:

remarkable: ~/ ls
demo         log.txt      log.txt.old
remarkable: ~/ pwd
/home/root

If you wish I can forward the logs. I was wondering if demo the only file that I need to delete to clean-up?

Best

LTO cannot be enabled for the spy example as it uses a dynamically loaded library. To build the demo example you have to explicitly build only that example.

@vsenderov could you try the instructions from #34 please? I've tried it on Debian, but I'd hope it works on your system too.