-
Notifications
You must be signed in to change notification settings - Fork 24
lzma xz 5.2.1.mk
Mark Johnson edited this page Mar 9, 2018
·
10 revisions
liblzma from xz-5.2.1 - for Spatialite and Rasterlite2
The original source code archive can be found in the archive
directory
Note:
- Version 5.2.3 cannot be compiled
ndk-r16b/toolchains/llvm/prebuilt/linux-x86_64/lib64/clang/5.0.300080/include/mmintrin.h:539:12: error:
invalid conversion between vector type '__m64' (vector of 1 'long long' value) and integer type 'int' of different size
2015-06-25: compiled and linked properly
./configure --host=arm-linux-androideabi --target=arm-linux-androideabi
--enable-static --with-pic --disable-xz --disable-xzdec --disable-lzmainfo
--disable-scripts --disable-lzmadec --disable-shared
lzma_flags := \
-DHAVE_CONFIG_H \
-g -O2 \
-std=gnu99
What follows will be left for future reference, but otherwise ignore it
- Note: all the errors below were resolve when using the following in
lzma-xz-5.2.1.mk
lzma_flags := \
-DHAVE_CONFIG_H \
-E \
-std=gnu99
- as was done in the
Makefile
created with-
./configure --build=x86_64-pc-linux-gnu --host=arm-linux-eabi
- with
make
it had compiled properly
- with
-
link errors
/obj/local/armeabi/liblzma.a: no archive symbol table (run ranlib)
Will be left for future reference, but otherwise ignore it
/* definition to expand macro then apply to pragma message */
#define VALUE_TO_STRING(x) #x
#define VALUE(x) VALUE_TO_STRING(x)
#define VAR_NAME_VALUE(var) #var "=" VALUE(var)
// print out values
#pragma message(VAR_NAME_VALUE(UINT_MAX))
#pragma message(VAR_NAME_VALUE(UINT_MAX))
/*
note: #pragma message: UINT32_C=UINT32_C
// this is being defined in limits.h: with
// #define UINT_MAX 0xffffffffU /* max value for an unsigned int */
note: #pragma message: UINT_MAX=0xffffffffU
#define UINT_MAX UINT32_C(4294967295)
note: #pragma message: UINT_MAX=4294967295U
*/
compile errors
-
lzma <= check.c
xz-5.2.1/src/common/mythread.h
:85:1:error: unknown type name 'sigset_t'
-
sigset_t
is however defined in androidarch-arm/usr/include/asm/signal.h:typedef unsigned long sigset_t;
-
cause
-
-DMYTHREAD_ENABLED=1
inlzma-xz-5.2.1.mk
was not being set
-
--
xz-5.2.1/src/common/sysdefs.h
:58:4: error: #error UINT32_C is not defined and unsigned int is not 32-bit.
:122:4: error: #error size_t is not 32-bit or 64-bit
:126:3: error: #error size_t is not 32-bit or 64-bit
-
cause
-
-DHAVE_STDINT_H=1
inlzma-xz-5.2.1.mk
was not being set -
-DHAVE_LIMITS_H=1
inlzma-xz-5.2.1.mk
was not being set- this does not resolve the
check.c:13
problem -
stdint.h
is being read, souint8_t
is known -
limits.h
is being read, soSIZE_MAX
is known#line 46 "stdint.h being read\n"
- this does not resolve the
-
value of UINT_MAX=0xffffffffU
-
#define UINT_MAX UINT32_C(4294967295)
- removed errors 58:4,122:4 and 126:3
-
-
--
xz-5.2.1/src/liblzma/check/check.c:13
src/liblzma/common/common.h:112:27: error: expected ';', ',' or ')' before 'in'
// 'in' is a 'const uint8_t *restrict', which may be caused by the above '58.4' error
src/liblzma/common/common.h:155:2: error: unknown type name 'lzma_code_function'
// 155 is caused by 112
src/liblzma/common/common.h:267:51: error: expected ';', ',' or ')' before 'in'
// 'in' is a 'const uint8_t *restrict', which may be caused by the above '58.4' error
-
uint8_c
is defined insrc/liblzma/api/lzma.h
-
typedef unsigned __int8 uint8_t
- but only when
-
UINT32_C
is not defined and- is
_WIN32
or_MSC_VER
- which is not the case
- is
-
- but only when
-
-
same problem as in [--> 'libcurl-7.36.0.mk'] (libcurl-7.36.0.mk#error_cause)
-
code changes
-
xz-5.2.1/src/common/sysdefs.h
:#define UINT_MAX UINT32_C(4294967295)
-
2015-06-27: Mark Johnson, Berlin Germany