then i ran make
which outputs:
make all-recursive
make[1]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4'
Making all in src
make[2]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src'
Making all in liblzma
make[3]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/liblzma'
Making all in api
make[4]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/liblzma/api'
make[4]: Nothing to be done for 'all'.
make[4]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/liblzma/api'
make[4]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/liblzma'
make[4]: Nothing to be done for 'all-am'.
make[4]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/liblzma'
make[3]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/liblzma'
Making all in xzdec
make[3]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/xzdec'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/xzdec'
Making all in xz
make[3]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/xz'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/xz'
Making all in lzmainfo
make[3]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/lzmainfo'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/lzmainfo'
Making all in scripts
make[3]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/scripts'
make[3]: Nothing to be done for 'all'.
make[3]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/scripts'
make[3]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src'
make[3]: Nothing to be done for 'all-am'.
make[3]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src'
make[2]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src'
Making all in po
make[2]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/po'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/po'
Making all in tests
make[2]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/tests'
make[2]: Nothing to be done for 'all'.
make[2]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/tests'
make[2]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4'
make[2]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4'
make[1]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4'
then i ran sudo make install
which outputs:
Making install in src
make[1]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src'
Making install in liblzma
make[2]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/liblzma'
Making install in api
make[3]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/liblzma/api'
make[4]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/liblzma/api'
make[4]: Nothing to be done for 'install-exec-am'.
/bin/mkdir -p '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/include'
/bin/mkdir -p '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/include/lzma'
/usr/bin/install -c -m 644 lzma/base.h lzma/bcj.h lzma/block.h lzma/check.h lzma/container.h lzma/delta.h lzma/filter.h lzma/hardware.h lzma/index.h lzma/index_hash.h lzma/lzma12.h lzma/stream_flags.h lzma/version.h lzma/vli.h '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/include/lzma'
/usr/bin/install -c -m 644 lzma.h '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/include/.'
make[4]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/liblzma/api'
make[3]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/liblzma/api'
make[3]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/liblzma'
make[4]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/liblzma'
/bin/mkdir -p '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/lib'
/bin/bash ../../libtool --mode=install /usr/bin/install -c liblzma.la '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/lib'
libtool: install: /usr/bin/install -c .libs/liblzma.so.5.2.4 /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/lib/liblzma.so.5.2.4
libtool: install: (cd /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/lib && { ln -s -f liblzma.so.5.2.4 liblzma.so.5 || { rm -f liblzma.so.5 && ln -s liblzma.so.5.2.4 liblzma.so.5; }; })
libtool: install: (cd /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/lib && { ln -s -f liblzma.so.5.2.4 liblzma.so || { rm -f liblzma.so && ln -s liblzma.so.5.2.4 liblzma.so; }; })
libtool: install: /usr/bin/install -c .libs/liblzma.lai /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/lib/liblzma.la
libtool: install: /usr/bin/install -c .libs/liblzma.a /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/lib/liblzma.a
libtool: install: chmod 644 /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/lib/liblzma.a
libtool: install: ranlib /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/lib/liblzma.a
libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin:/sbin" ldconfig -n /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/lib
----------------------------------------------------------------------
Libraries have been installed in:
/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/lib
If you ever happen to want to link against installed libraries
in a given directory, LIBDIR, you must either use libtool, and
specify the full pathname of the library, or use the '-LLIBDIR'
flag during linking and do at least one of the following:
- add LIBDIR to the 'LD_LIBRARY_PATH' environment variable
during execution
- add LIBDIR to the 'LD_RUN_PATH' environment variable
during linking
- use the '-Wl,-rpath -Wl,LIBDIR' linker flag
- have your system administrator add LIBDIR to '/etc/ld.so.conf'
See any operating system documentation about shared libraries for
more information, such as the ld(1) and ld.so(8) manual pages.
----------------------------------------------------------------------
/bin/mkdir -p '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/lib/pkgconfig'
/usr/bin/install -c -m 644 liblzma.pc '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/lib/pkgconfig'
make[4]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/liblzma'
make[3]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/liblzma'
make[2]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/liblzma'
Making install in xzdec
make[2]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/xzdec'
make[3]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/xzdec'
/bin/mkdir -p '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/bin'
/bin/bash ../../libtool --mode=install /usr/bin/install -c xzdec lzmadec '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/bin'
libtool: install: /usr/bin/install -c .libs/xzdec /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/bin/xzdec
libtool: install: /usr/bin/install -c .libs/lzmadec /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/bin/lzmadec
/bin/mkdir -p '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/man/man1'
/usr/bin/install -c -m 644 xzdec.1 '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/man/man1'
make install-data-hook
make[4]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/xzdec'
cd /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/man/man1 && \
target=`echo xzdec | sed 's,x,x,'` && \
link=`echo lzmadec | sed 's,x,x,'` && \
rm -f $link.1 && \
ln -s $target.1 $link.1
make[4]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/xzdec'
make[3]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/xzdec'
make[2]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/xzdec'
Making install in xz
make[2]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/xz'
make[3]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/xz'
/bin/mkdir -p '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/bin'
/bin/bash ../../libtool --mode=install /usr/bin/install -c xz '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/bin'
libtool: install: /usr/bin/install -c .libs/xz /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/bin/xz
make install-exec-hook
make[4]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/xz'
cd /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/bin && \
target=`echo xz | sed 's,x,x,'` && \
for name in unxz xzcat lzma unlzma lzcat; do \
link=`echo $name | sed 's,x,x,'` && \
rm -f $link && \
ln -s $target $link; \
done
make[4]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/xz'
/bin/mkdir -p '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/man/man1'
/usr/bin/install -c -m 644 xz.1 '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/man/man1'
make install-data-hook
make[4]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/xz'
cd /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/man/man1 && \
target=`echo xz | sed 's,x,x,'` && \
for name in unxz xzcat lzma unlzma lzcat; do \
link=`echo $name | sed 's,x,x,'` && \
rm -f $link.1 && \
ln -s $target.1 $link.1; \
done
make[4]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/xz'
make[3]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/xz'
make[2]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/xz'
Making install in lzmainfo
make[2]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/lzmainfo'
make[3]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/lzmainfo'
/bin/mkdir -p '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/bin'
/bin/bash ../../libtool --mode=install /usr/bin/install -c lzmainfo '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/bin'
libtool: install: /usr/bin/install -c .libs/lzmainfo /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/bin/lzmainfo
/bin/mkdir -p '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/man/man1'
/usr/bin/install -c -m 644 lzmainfo.1 '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/man/man1'
make[3]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/lzmainfo'
make[2]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/lzmainfo'
Making install in scripts
make[2]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/scripts'
make[3]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/scripts'
/bin/mkdir -p '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/bin'
/usr/bin/install -c xzdiff xzgrep xzmore xzless '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/bin'
make install-exec-hook
make[4]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/scripts'
cd /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/bin && \
for pair in xzdiff-xzcmp xzgrep-xzegrep xzgrep-xzfgrep xzdiff-lzdiff xzdiff-lzcmp xzgrep-lzgrep xzgrep-lzegrep xzgrep-lzfgrep xzmore-lzmore xzless-lzless; do \
target=`echo $pair | sed 's/-.*$//' | sed 's,x,x,'` && \
link=`echo $pair | sed 's/^.*-//' | sed 's,x,x,'` && \
rm -f $link && \
ln -s $target $link; \
done
make[4]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/scripts'
/bin/mkdir -p '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/man/man1'
/usr/bin/install -c -m 644 xzdiff.1 xzgrep.1 xzmore.1 xzless.1 '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/man/man1'
make install-data-hook
make[4]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/scripts'
cd /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/man/man1 && \
for pair in xzdiff-xzcmp xzgrep-xzegrep xzgrep-xzfgrep xzdiff-lzdiff xzdiff-lzcmp xzgrep-lzgrep xzgrep-lzegrep xzgrep-lzfgrep xzmore-lzmore xzless-lzless; do \
target=`echo $pair | sed 's/-.*$//' | sed 's,x,x,'` && \
link=`echo $pair | sed 's/^.*-//' | sed 's,x,x,'` && \
rm -f $link.1 && \
ln -s $target.1 $link.1; \
done
make[4]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/scripts'
make[3]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/scripts'
make[2]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src/scripts'
make[2]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src'
make[3]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src'
make[3]: Nothing to be done for 'install-exec-am'.
make[3]: Nothing to be done for 'install-data-am'.
make[3]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src'
make[2]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src'
make[1]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/src'
Making install in po
make[1]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/po'
installing cs.gmo as /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/locale/cs/LC_MESSAGES/xz.mo
installing de.gmo as /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/locale/de/LC_MESSAGES/xz.mo
installing fr.gmo as /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/locale/fr/LC_MESSAGES/xz.mo
installing it.gmo as /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/locale/it/LC_MESSAGES/xz.mo
installing pl.gmo as /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/locale/pl/LC_MESSAGES/xz.mo
installing vi.gmo as /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/locale/vi/LC_MESSAGES/xz.mo
if test "xz" = "gettext-tools"; then \
/bin/mkdir -p /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/gettext/po; \
for file in Makefile.in.in remove-potcdate.sin quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot Makevars.template; do \
/usr/bin/install -c -m 644 ./$file \
/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/gettext/po/$file; \
done; \
for file in Makevars; do \
rm -f /home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/gettext/po/$file; \
done; \
else \
: ; \
fi
make[1]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/po'
Making install in tests
make[1]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/tests'
make[2]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/tests'
make[2]: Nothing to be done for 'install-exec-am'.
make[2]: Nothing to be done for 'install-data-am'.
make[2]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/tests'
make[1]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/tests'
make[1]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4'
make[2]: Entering directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4'
make[2]: Nothing to be done for 'install-exec-am'.
/bin/mkdir -p '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/doc/xz'
/usr/bin/install -c -m 644 AUTHORS COPYING COPYING.GPLv2 NEWS README THANKS TODO doc/faq.txt doc/history.txt doc/xz-file-format.txt doc/lzma-file-format.txt '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/doc/xz'
/bin/mkdir -p '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/doc/xz/examples'
/usr/bin/install -c -m 644 doc/examples/00_README.txt doc/examples/01_compress_easy.c doc/examples/02_decompress.c doc/examples/03_compress_custom.c doc/examples/04_compress_easy_mt.c doc/examples/Makefile '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/doc/xz/examples'
/bin/mkdir -p '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/doc/xz/examples_old'
/usr/bin/install -c -m 644 doc/examples_old/xz_pipe_comp.c doc/examples_old/xz_pipe_decomp.c '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4/install/share/doc/xz/examples_old'
make[2]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4'
make[1]: Leaving directory '/home/rui/go/src/github.com/mendersoftware/mender/xz-5.2.4'
then i go back to mender main project path: ~/go/src/github.com/mendersoftware/mender
and ran
make CGO_CFLAGS="-I${LIBLZMA_INSTALL_PATH}/include" CGO_LDFLAGS="-L${LIBLZMA_INSTALL_PATH}/lib" CGO_ENABLED=1 GOOS=linux GOARCH=arm
which appears errors like i described:
go build -ldflags "-X github.com/mendersoftware/mender/conf.Version=412268f"
# github.com/mendersoftware/mender/vendor/github.com/remyoudompheng/go-liblzma
vendor/github.com/remyoudompheng/go-liblzma/reader.go:9:10: fatal error: lzma.h: No such file or directory
#include <lzma.h>
^~~~~~~~
compilation terminated.
# net
/usr/local/go/src/net/cgo_linux.go:10:10: fatal error: netdb.h: No such file or directory
#include <netdb.h>
^~~~~~~~~
compilation terminated.
# os/user
/usr/local/go/src/os/user/cgo_lookup_unix.go:20:10: fatal error: unistd.h: No such file or directory
#include <unistd.h>
^~~~~~~~~~
compilation terminated.
# github.com/mendersoftware/mender/vendor/github.com/bmatsuo/lmdb-go/lmdb
vendor/github.com/bmatsuo/lmdb-go/lmdb/cursor.go:4:10: fatal error: stdlib.h: No such file or directory
#include <stdlib.h>
^~~~~~~~~~
compilation terminated.
Makefile:75: recipe for target 'mender' failed
make: *** [mender] Error 2
Edit: @mirzak: formatting