View Single Post
Old 05-05-2012, 11:37 AM   #154
ixtab
(offline)
ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.ixtab ought to be getting tired of karma fortunes by now.
 
ixtab's Avatar
 
Posts: 2,907
Karma: 6736092
Join Date: Dec 2011
Device: K3, K4, K5, KPW, KPW2
Quote:
Originally Posted by NiLuJe View Post
@JustAMan: You're welcome to try my KindleTool fork, if you're on a Linux box, it should (hopefully) work, and if it doesn't, I'll try to fix it . I haven't checked K4/K5 packages yet, but I've successfully built (and ran) my old K2/K3 stuff with it, so, either way, I'd be glad for some feedback .
Thanks for taking the initiative! So, here you go with the feedback

I'm on Ubuntu 10.4.2 64-bit.

First: version.sh throws loads of errors because of "[[" syntax. I tried changing #!/bin/sh to #!/bin/bash, but that doesn't help either. So I replaced these double-brackets by single-brackets, and at least that stage goes through without errors. I'm attaching a diff, but please verify that the result is actually sensible. What is that "[[" thing about anyway?

Second: even after applying that, I get the following errors when running "make":

Code:
$ make

KT_VERSION = v0.5-9-g7db0dfa-dirty (GCC 4.4.3)
mkdir -p Release
gcc -Llib -Iincludes -O2 -fomit-frame-pointer -march=native -pipe -Wall -D_FILE_OFFSET_BITS=64 -DKT_VERSION='"v0.5-9-g7db0dfa-dirty (GCC 4.4.3)"' -o Release/kindle_tool.o -c kindle_tool.c
gcc -Llib -Iincludes -O2 -fomit-frame-pointer -march=native -pipe -Wall -D_FILE_OFFSET_BITS=64 -DKT_VERSION='"v0.5-9-g7db0dfa-dirty (GCC 4.4.3)"' -o Release/create.o -c create.c
create.c: In function ‘kindle_create_package_archive’:
create.c:119: warning: implicit declaration of function ‘archive_write_set_format_gnutar’
create.c:133: warning: implicit declaration of function ‘archive_read_disk_open’
create.c:188: warning: implicit declaration of function ‘archive_read_disk_descend’
create.c:247: warning: format ‘%lld’ expects type ‘long long int’, but argument 6 has type ‘__off_t’
create.c:352: warning: implicit declaration of function ‘archive_read_free’
create.c: In function ‘kindle_create_main’:
create.c:897: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’
create.c:897: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 4 has type ‘uint64_t’
gcc -Llib -Iincludes -O2 -fomit-frame-pointer -march=native -pipe -Wall -D_FILE_OFFSET_BITS=64 -DKT_VERSION='"v0.5-9-g7db0dfa-dirty (GCC 4.4.3)"' -o Release/convert.o -c convert.c
convert.c: In function ‘kindle_convert_ota_update_v2’:
convert.c:97: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’
convert.c:100: warning: format ‘%llu’ expects type ‘long long unsigned int’, but argument 3 has type ‘uint64_t’
convert.c: In function ‘libarchive_extract’:
convert.c:491: warning: implicit declaration of function ‘archive_read_free’
convert.c:493: warning: implicit declaration of function ‘archive_write_free’
gcc -Llib -Iincludes -O2 -fomit-frame-pointer -march=native -pipe -Wall -D_FILE_OFFSET_BITS=64 -DKT_VERSION='"v0.5-9-g7db0dfa-dirty (GCC 4.4.3)"' -Wl,-O1 -Wl,--as-needed Release/kindle_tool.o Release/create.o Release/convert.o -lcrypto -larchive -oRelease/kindletool
Release/create.o: In function `kindle_create_package_archive':
create.c:(.text+0x4f6): undefined reference to `archive_write_set_format_gnutar'
create.c:(.text+0x560): undefined reference to `archive_read_disk_open'
create.c:(.text+0x6e8): undefined reference to `archive_read_disk_descend'
create.c:(.text+0x97f): undefined reference to `archive_read_disk_open'
create.c:(.text+0xa68): undefined reference to `archive_read_disk_descend'
create.c:(.text+0xc42): undefined reference to `archive_read_free'
Release/convert.o: In function `libarchive_extract':
convert.c:(.text+0x30e): undefined reference to `archive_read_free'
convert.c:(.text+0x320): undefined reference to `archive_write_free'
collect2: ld returned 1 exit status
make: *** [kindletool] Fehler 1
I assume that this due to an older libarchive version or so?
Code:
$ apt-cache policy libarchive-dev

libarchive-dev:
  Installiert: 2.8.0-2ubuntu0.1
  Kandidat: 2.8.0-2ubuntu0.1
  Versions-Tabelle:
 *** 2.8.0-2ubuntu0.1 0
        500 http://ch.archive.ubuntu.com/ubuntu/ lucid-updates/main Packages
        500 http://security.ubuntu.com/ubuntu/ lucid-security/main Packages
        100 /var/lib/dpkg/status
     2.8.0-2 0
        500 http://ch.archive.ubuntu.com/ubuntu/ lucid/main Packages
Searching online for "archive_write_set_format_gnutar" didn't give a lot of insight either.

Could you look into that please?
Attached Files
File Type: txt version.sh.diff.txt (1.5 KB, 264 views)
ixtab is offline   Reply With Quote