Compiling Error in C++ API and Python Wrapper

Hi,
I've tried to run the make command after cloning the repo. Unfortunately it ends up in a compiling error. my current clang version is 3.8.0-2 and I'm running a x86 Debian system. My current g++ version is 5.4.0 20160609. While running make (just as well as make CXX=g++) ends with this error:
In file included from src/metawear/dfu/cpp/file_operations.cpp:9:0:
src/metawear/dfu/cpp/miniz.c: In function ‘void tdefl_find_match(tdefl_compressor*, mz_uint, mz_uint, mz_uint, mz_uint*, mz_uint*)’:
src/metawear/dfu/cpp/miniz.c:2264:59: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
#define TDEFL_READ_UNALIGNED_WORD(p) (const mz_uint16)(p)
^
src/metawear/dfu/cpp/miniz.c:2270:19: note: in expansion of macro ‘TDEFL_READ_UNALIGNED_WORD’
mz_uint16 c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]), s01 = TDEFL_READ_UNALIGNED_WORD(s);
^
src/metawear/dfu/cpp/miniz.c:2264:59: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
#define TDEFL_READ_UNALIGNED_WORD(p) (const mz_uint16)(p)
^
src/metawear/dfu/cpp/miniz.c:2281:13: note: in expansion of macro ‘TDEFL_READ_UNALIGNED_WORD’
if (TDEFL_READ_UNALIGNED_WORD(&d->m_dict[probe_pos + match_len - 1]) == c01) break;
^
src/metawear/dfu/cpp/miniz.c:2282:7: note: in expansion of macro ‘TDEFL_PROBE’
TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE;
^
src/metawear/dfu/cpp/miniz.c:2264:59: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
#define TDEFL_READ_UNALIGNED_WORD(p) (const mz_uint16)(p)
^
src/metawear/dfu/cpp/miniz.c:2281:13: note: in expansion of macro ‘TDEFL_READ_UNALIGNED_WORD’
if (TDEFL_READ_UNALIGNED_WORD(&d->m_dict[probe_pos + match_len - 1]) == c01) break;
^
src/metawear/dfu/cpp/miniz.c:2282:20: note: in expansion of macro ‘TDEFL_PROBE’
TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE;
^
src/metawear/dfu/cpp/miniz.c:2264:59: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
#define TDEFL_READ_UNALIGNED_WORD(p) (const mz_uint16)(p)
^
src/metawear/dfu/cpp/miniz.c:2281:13: note: in expansion of macro ‘TDEFL_READ_UNALIGNED_WORD’
if (TDEFL_READ_UNALIGNED_WORD(&d->m_dict[probe_pos + match_len - 1]) == c01) break;
^
src/metawear/dfu/cpp/miniz.c:2282:33: note: in expansion of macro ‘TDEFL_PROBE’
TDEFL_PROBE; TDEFL_PROBE; TDEFL_PROBE;
^
src/metawear/dfu/cpp/miniz.c:2264:59: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
#define TDEFL_READ_UNALIGNED_WORD(p) (const mz_uint16)(p)
^
src/metawear/dfu/cpp/miniz.c:2294:13: note: in expansion of macro ‘TDEFL_READ_UNALIGNED_WORD’
c01 = TDEFL_READ_UNALIGNED_WORD(&d->m_dict[pos + match_len - 1]);
^
cc1plus: all warnings being treated as errors
Makefile:64: recipe for target 'build/x64/release/src/metawear/dfu/cpp/file_operations.o' failed
make: *** [build/x64/release/src/metawear/dfu/cpp/file_operations.o] Error 1
While running: g++ -MMD -MP -MF "build/x64/release/src/metawear/dfu/cpp/file_operations.d" -c -o build/x64/release/src/metawear/dfu/cpp/file_operations.o -std=c++11 -fPIC -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Werror -Isrc -DMETAWEAR_DLL -DMETAWEAR_DLL_EXPORTS -O3 -m64 src/metawear/dfu/cpp/file_operations.cpp
Since it runs the same command compiling the python wrapper, it has the same problem.
cheers,
ThiefOfTime

Comments

This discussion has been closed.