Hello everyone!
I'm trying to compile some external libraries as a prerequisite for compiling source of MESHLAB (a tool for 3d mesh processing).
First I use the "qmake" command to generate the Makefile from my project file (external.pro). After that when I run nmake on the generated Makefile, I encounter the following error :
Makefile(14) : fatal error U1001: syntax error : illegal character '{' in macro
Stop.
NMAKE : fatal error U1077: 'cd' : return code '0x2'
Stop.
Line 14 is as follows :
MKDIR = mkdir
But there is no '{' charachter in the Makefile. Here is external.pro and Makefile :
external.pro :
config += debug_and_release
TEMPLATE = subdirs
SUBDIRS = lib3ds-1.3.0/lib3ds \
bzip2-1.0.5/bzip2-1.0.5.pro \
muparser_v132/src \
levmar-2.3/levmar-2.3.pro \
# structuresynth/structuresynth.pro \
OpenCTM-1.0.3/openctm.pro \
jhead-2.95/jhead-2.95.pro
# openkinect/openkinect.pro
Makefile :
#############################################################################
# Makefile for building: external
# Generated by qmake (2.01a) (Qt 4.7.2) on: Thu Jul 12 19:28:51 2012
# Project: external.pro
# Template: subdirs
# Command: c:\Qt\4.7.2\bin\qmake.exe -o Makefile external.pro
#############################################################################
first: make_default
MAKEFILE = Makefile
QMAKE = c:\Qt\4.7.2\bin\qmake.exe
DEL_FILE = del
CHK_DIR_EXISTS= if not exist
MKDIR = mkdir
COPY = copy /y
COPY_FILE = $(COPY)
COPY_DIR = xcopy /s /q /y /i
INSTALL_FILE = $(COPY_FILE)
INSTALL_PROGRAM = $(COPY_FILE)
INSTALL_DIR = $(COPY_DIR)
DEL_FILE = del
SYMLINK =
DEL_DIR = rmdir
MOVE = move
CHK_DIR_EXISTS= if not exist
MKDIR = mkdir
SUBTARGETS = \
sub-lib3ds-1-3-0-lib3ds \
sub-bzip2-1-0-5-bzip2-1-0-5-pro \
sub-muparser_v132-src \
sub-levmar-2-3-levmar-2-3-pro \
sub-OpenCTM-1-0-3-openctm-pro \
sub-jhead-2-95-jhead-2-95-pro
lib3ds-1.3.0\lib3ds\$(MAKEFILE):
#$(CHK_DIR_EXISTS) lib3ds-1.3.0\lib3ds\ $(MKDIR) lib3ds-1.3.0\lib3ds\
cd lib3ds-1.3.0\lib3ds\ && $(QMAKE) c:\devel\meshlab\src\external\lib3ds-1.3.0\lib3ds\lib3ds.pro -o $(MAKEFILE)
sub-lib3ds-1-3-0-lib3ds-qmake_all: FORCE
#$(CHK_DIR_EXISTS) lib3ds-1.3.0\lib3ds\ $(MKDIR) lib3ds-1.3.0\lib3ds\
cd lib3ds-1.3.0\lib3ds\ && $(QMAKE) c:\devel\meshlab\src\external\lib3ds-1.3.0\lib3ds\lib3ds.pro -o $(MAKEFILE)
sub-lib3ds-1-3-0-lib3ds: lib3ds-1.3.0\lib3ds\$(MAKEFILE) FORCE
cd lib3ds-1.3.0\lib3ds\ && $(MAKE) -f $(MAKEFILE)
sub-lib3ds-1-3-0-lib3ds-make_default: lib3ds-1.3.0\lib3ds\$(MAKEFILE) FORCE
cd lib3ds-1.3.0\lib3ds\ && $(MAKE) -f $(MAKEFILE)
sub-lib3ds-1-3-0-lib3ds-make_first: lib3ds-1.3.0\lib3ds\$(MAKEFILE) FORCE
cd lib3ds-1.3.0\lib3ds\ && $(MAKE) -f $(MAKEFILE) first
sub-lib3ds-1-3-0-lib3ds-all: lib3ds-1.3.0\lib3ds\$(MAKEFILE) FORCE
cd lib3ds-1.3.0\lib3ds\ && $(MAKE) -f $(MAKEFILE) all
sub-lib3ds-1-3-0-lib3ds-clean: lib3ds-1.3.0\lib3ds\$(MAKEFILE) FORCE
cd lib3ds-1.3.0\lib3ds\ && $(MAKE) -f $(MAKEFILE) clean
sub-lib3ds-1-3-0-lib3ds-distclean: lib3ds-1.3.0\lib3ds\$(MAKEFILE) FORCE
cd lib3ds-1.3.0\lib3ds\ && $(MAKE) -f $(MAKEFILE) distclean
sub-lib3ds-1-3-0-lib3ds-install_subtargets: lib3ds-1.3.0\lib3ds\$(MAKEFILE) FORCE
cd lib3ds-1.3.0\lib3ds\ && $(MAKE) -f $(MAKEFILE) install
sub-lib3ds-1-3-0-lib3ds-uninstall_subtargets: lib3ds-1.3.0\lib3ds\$(MAKEFILE) FORCE
cd lib3ds-1.3.0\lib3ds\ && $(MAKE) -f $(MAKEFILE) uninstall
bzip2-1.0.5\$(MAKEFILE):
#$(CHK_DIR_EXISTS) bzip2-1.0.5\ $(MKDIR) bzip2-1.0.5\
cd bzip2-1.0.5\ && $(QMAKE) c:\devel\meshlab\src\external\bzip2-1.0.5\bzip2-1.0.5.pro -o $(MAKEFILE)
sub-bzip2-1-0-5-bzip2-1-0-5-pro-qmake_all: FORCE
#$(CHK_DIR_EXISTS) bzip2-1.0.5\ $(MKDIR) bzip2-1.0.5\
cd bzip2-1.0.5\ && $(QMAKE) c:\devel\meshlab\src\external\bzip2-1.0.5\bzip2-1.0.5.pro -o $(MAKEFILE)
sub-bzip2-1-0-5-bzip2-1-0-5-pro: bzip2-1.0.5\$(MAKEFILE) FORCE
cd bzip2-1.0.5\ && $(MAKE) -f $(MAKEFILE)
sub-bzip2-1-0-5-bzip2-1-0-5-pro-make_default: bzip2-1.0.5\$(MAKEFILE) FORCE
cd bzip2-1.0.5\ && $(MAKE) -f $(MAKEFILE)
sub-bzip2-1-0-5-bzip2-1-0-5-pro-make_first: bzip2-1.0.5\$(MAKEFILE) FORCE
cd bzip2-1.0.5\ && $(MAKE) -f $(MAKEFILE) first
sub-bzip2-1-0-5-bzip2-1-0-5-pro-all: bzip2-1.0.5\$(MAKEFILE) FORCE
cd bzip2-1.0.5\ && $(MAKE) -f $(MAKEFILE) all
sub-bzip2-1-0-5-bzip2-1-0-5-pro-clean: bzip2-1.0.5\$(MAKEFILE) FORCE
cd bzip2-1.0.5\ && $(MAKE) -f $(MAKEFILE) clean
sub-bzip2-1-0-5-bzip2-1-0-5-pro-distclean: bzip2-1.0.5\$(MAKEFILE) FORCE
cd bzip2-1.0.5\ && $(MAKE) -f $(MAKEFILE) distclean
sub-bzip2-1-0-5-bzip2-1-0-5-pro-install_subtargets: bzip2-1.0.5\$(MAKEFILE) FORCE
cd bzip2-1.0.5\ && $(MAKE) -f $(MAKEFILE) install
sub-bzip2-1-0-5-bzip2-1-0-5-pro-uninstall_subtargets: bzip2-1.0.5\$(MAKEFILE) FORCE
cd bzip2-1.0.5\ && $(MAKE) -f $(MAKEFILE) uninstall
muparser_v132\src\$(MAKEFILE):
#$(CHK_DIR_EXISTS) muparser_v132\src\ $(MKDIR) muparser_v132\src\
cd muparser_v132\src\ && $(QMAKE) c:\devel\meshlab\src\external\muparser_v132\src\src.pro -o $(MAKEFILE)
sub-muparser_v132-src-qmake_all: FORCE
#$(CHK_DIR_EXISTS) muparser_v132\src\ $(MKDIR) muparser_v132\src\
cd muparser_v132\src\ && $(QMAKE) c:\devel\meshlab\src\external\muparser_v132\src\src.pro -o $(MAKEFILE)
sub-muparser_v132-src: muparser_v132\src\$(MAKEFILE) FORCE
cd muparser_v132\src\ && $(MAKE) -f $(MAKEFILE)
sub-muparser_v132-src-make_default: muparser_v132\src\$(MAKEFILE) FORCE
cd muparser_v132\src\ && $(MAKE) -f $(MAKEFILE)
sub-muparser_v132-src-make_first: muparser_v132\src\$(MAKEFILE) FORCE
cd muparser_v132\src\ && $(MAKE) -f $(MAKEFILE) first
sub-muparser_v132-src-all: muparser_v132\src\$(MAKEFILE) FORCE
cd muparser_v132\src\ && $(MAKE) -f $(MAKEFILE) all
sub-muparser_v132-src-clean: muparser_v132\src\$(MAKEFILE) FORCE
cd muparser_v132\src\ && $(MAKE) -f $(MAKEFILE) clean
sub-muparser_v132-src-distclean: muparser_v132\src\$(MAKEFILE) FORCE
cd muparser_v132\src\ && $(MAKE) -f $(MAKEFILE) distclean
sub-muparser_v132-src-install_subtargets: muparser_v132\src\$(MAKEFILE) FORCE
cd muparser_v132\src\ && $(MAKE) -f $(MAKEFILE) install
sub-muparser_v132-src-uninstall_subtargets: muparser_v132\src\$(MAKEFILE) FORCE
cd muparser_v132\src\ && $(MAKE) -f $(MAKEFILE) uninstall
levmar-2.3\$(MAKEFILE):
#$(CHK_DIR_EXISTS) levmar-2.3\ $(MKDIR) levmar-2.3\
cd levmar-2.3\ && $(QMAKE) c:\devel\meshlab\src\external\levmar-2.3\levmar-2.3.pro -o $(MAKEFILE)
sub-levmar-2-3-levmar-2-3-pro-qmake_all: FORCE
#$(CHK_DIR_EXISTS) levmar-2.3\ $(MKDIR) levmar-2.3\
cd levmar-2.3\ && $(QMAKE) c:\devel\meshlab\src\external\levmar-2.3\levmar-2.3.pro -o $(MAKEFILE)
sub-levmar-2-3-levmar-2-3-pro: levmar-2.3\$(MAKEFILE) FORCE
cd levmar-2.3\ && $(MAKE) -f $(MAKEFILE)
sub-levmar-2-3-levmar-2-3-pro-make_default: levmar-2.3\$(MAKEFILE) FORCE
cd levmar-2.3\ && $(MAKE) -f $(MAKEFILE)
sub-levmar-2-3-levmar-2-3-pro-make_first: levmar-2.3\$(MAKEFILE) FORCE
cd levmar-2.3\ && $(MAKE) -f $(MAKEFILE) first
sub-levmar-2-3-levmar-2-3-pro-all: levmar-2.3\$(MAKEFILE) FORCE
cd levmar-2.3\ && $(MAKE) -f $(MAKEFILE) all
sub-levmar-2-3-levmar-2-3-pro-clean: levmar-2.3\$(MAKEFILE) FORCE
cd levmar-2.3\ && $(MAKE) -f $(MAKEFILE) clean
sub-levmar-2-3-levmar-2-3-pro-distclean: levmar-2.3\$(MAKEFILE) FORCE
cd levmar-2.3\ && $(MAKE) -f $(MAKEFILE) distclean
sub-levmar-2-3-levmar-2-3-pro-install_subtargets: levmar-2.3\$(MAKEFILE) FORCE
cd levmar-2.3\ && $(MAKE) -f $(MAKEFILE) install
sub-levmar-2-3-levmar-2-3-pro-uninstall_subtargets: levmar-2.3\$(MAKEFILE) FORCE
cd levmar-2.3\ && $(MAKE) -f $(MAKEFILE) uninstall
OpenCTM-1.0.3\$(MAKEFILE).openctm:
#$(CHK_DIR_EXISTS) OpenCTM-1.0.3\ $(MKDIR) OpenCTM-1.0.3\
cd OpenCTM-1.0.3\ && $(QMAKE) c:\devel\meshlab\src\external\OpenCTM-1.0.3\openctm.pro -o $(MAKEFILE).openctm
sub-OpenCTM-1-0-3-openctm-pro-qmake_all: FORCE
#$(CHK_DIR_EXISTS) OpenCTM-1.0.3\ $(MKDIR) OpenCTM-1.0.3\
cd OpenCTM-1.0.3\ && $(QMAKE) c:\devel\meshlab\src\external\OpenCTM-1.0.3\openctm.pro -o $(MAKEFILE).openctm
sub-OpenCTM-1-0-3-openctm-pro: OpenCTM-1.0.3\$(MAKEFILE).openctm FORCE
cd OpenCTM-1.0.3\ && $(MAKE) -f $(MAKEFILE).openctm
sub-OpenCTM-1-0-3-openctm-pro-make_default: OpenCTM-1.0.3\$(MAKEFILE).openctm FORCE
cd OpenCTM-1.0.3\ && $(MAKE) -f $(MAKEFILE).openctm
sub-OpenCTM-1-0-3-openctm-pro-make_first: OpenCTM-1.0.3\$(MAKEFILE).openctm FORCE
cd OpenCTM-1.0.3\ && $(MAKE) -f $(MAKEFILE).openctm first
sub-OpenCTM-1-0-3-openctm-pro-all: OpenCTM-1.0.3\$(MAKEFILE).openctm FORCE
cd OpenCTM-1.0.3\ && $(MAKE) -f $(MAKEFILE).openctm all
sub-OpenCTM-1-0-3-openctm-pro-clean: OpenCTM-1.0.3\$(MAKEFILE).openctm FORCE
cd OpenCTM-1.0.3\ && $(MAKE) -f $(MAKEFILE).openctm clean
sub-OpenCTM-1-0-3-openctm-pro-distclean: OpenCTM-1.0.3\$(MAKEFILE).openctm FORCE
cd OpenCTM-1.0.3\ && $(MAKE) -f $(MAKEFILE).openctm distclean
sub-OpenCTM-1-0-3-openctm-pro-install_subtargets: OpenCTM-1.0.3\$(MAKEFILE).openctm FORCE
cd OpenCTM-1.0.3\ && $(MAKE) -f $(MAKEFILE).openctm install
sub-OpenCTM-1-0-3-openctm-pro-uninstall_subtargets: OpenCTM-1.0.3\$(MAKEFILE).openctm FORCE
cd OpenCTM-1.0.3\ && $(MAKE) -f $(MAKEFILE).openctm uninstall
jhead-2.95\$(MAKEFILE):
#$(CHK_DIR_EXISTS) jhead-2.95\ $(MKDIR) jhead-2.95\
cd jhead-2.95\ && $(QMAKE) c:\devel\meshlab\src\external\jhead-2.95\jhead-2.95.pro -o $(MAKEFILE)
sub-jhead-2-95-jhead-2-95-pro-qmake_all: FORCE
#$(CHK_DIR_EXISTS) jhead-2.95\ $(MKDIR) jhead-2.95\
cd jhead-2.95\ && $(QMAKE) c:\devel\meshlab\src\external\jhead-2.95\jhead-2.95.pro -o $(MAKEFILE)
sub-jhead-2-95-jhead-2-95-pro: jhead-2.95\$(MAKEFILE) FORCE
cd jhead-2.95\ && $(MAKE) -f $(MAKEFILE)
sub-jhead-2-95-jhead-2-95-pro-make_default: jhead-2.95\$(MAKEFILE) FORCE
cd jhead-2.95\ && $(MAKE) -f $(MAKEFILE)
sub-jhead-2-95-jhead-2-95-pro-make_first: jhead-2.95\$(MAKEFILE) FORCE
cd jhead-2.95\ && $(MAKE) -f $(MAKEFILE) first
sub-jhead-2-95-jhead-2-95-pro-all: jhead-2.95\$(MAKEFILE) FORCE
cd jhead-2.95\ && $(MAKE) -f $(MAKEFILE) all
sub-jhead-2-95-jhead-2-95-pro-clean: jhead-2.95\$(MAKEFILE) FORCE
cd jhead-2.95\ && $(MAKE) -f $(MAKEFILE) clean
sub-jhead-2-95-jhead-2-95-pro-distclean: jhead-2.95\$(MAKEFILE) FORCE
cd jhead-2.95\ && $(MAKE) -f $(MAKEFILE) distclean
sub-jhead-2-95-jhead-2-95-pro-install_subtargets: jhead-2.95\$(MAKEFILE) FORCE
cd jhead-2.95\ && $(MAKE) -f $(MAKEFILE) install
sub-jhead-2-95-jhead-2-95-pro-uninstall_subtargets: jhead-2.95\$(MAKEFILE) FORCE
cd jhead-2.95\ && $(MAKE) -f $(MAKEFILE) uninstall
Makefile: external.pro ..\..\..\..\Qt\4.7.2\mkspecs\win32-msvc2008\qmake.conf ..\..\..\..\Qt\4.7.2\mkspecs\qconfig.pri \
..\..\..\..\Qt\4.7.2\mkspecs\modules\qt_webkit_version.pri \
..\..\..\..\Qt\4.7.2\mkspecs\features\qt_functions.prf \
..\..\..\..\Qt\4.7.2\mkspecs\features\qt_config.prf \
..\..\..\..\Qt\4.7.2\mkspecs\features\exclusive_builds.prf \
..\..\..\..\Qt\4.7.2\mkspecs\features\default_pre.prf \
..\..\..\..\Qt\4.7.2\mkspecs\features\win32\default_pre.prf \
..\..\..\..\Qt\4.7.2\mkspecs\features\debug.prf \
..\..\..\..\Qt\4.7.2\mkspecs\features\debug_and_release.prf \
..\..\..\..\Qt\4.7.2\mkspecs\features\default_post.prf \
..\..\..\..\Qt\4.7.2\mkspecs\features\win32\default_post.prf \
..\..\..\..\Qt\4.7.2\mkspecs\features\win32\rtti.prf \
..\..\..\..\Qt\4.7.2\mkspecs\features\win32\exceptions.prf \
..\..\..\..\Qt\4.7.2\mkspecs\features\win32\stl.prf \
..\..\..\..\Qt\4.7.2\mkspecs\features\shared.prf \
..\..\..\..\Qt\4.7.2\mkspecs\features\win32\embed_manifest_exe.prf \
..\..\..\..\Qt\4.7.2\mkspecs\features\win32\embed_manifest_dll.prf \
..\..\..\..\Qt\4.7.2\mkspecs\features\warn_on.prf \
..\..\..\..\Qt\4.7.2\mkspecs\features\qt.prf \
..\..\..\..\Qt\4.7.2\mkspecs\features\win32\thread.prf \
..\..\..\..\Qt\4.7.2\mkspecs\features\moc.prf \
..\..\..\..\Qt\4.7.2\mkspecs\features\win32\windows.prf \
..\..\..\..\Qt\4.7.2\mkspecs\features\resources.prf \
..\..\..\..\Qt\4.7.2\mkspecs\features\uic.prf \
..\..\..\..\Qt\4.7.2\mkspecs\features\yacc.prf \
..\..\..\..\Qt\4.7.2\mkspecs\features\lex.prf \
..\..\..\..\Qt\4.7.2\mkspecs\features\include_source_dir.prf
$(QMAKE) -o Makefile external.pro
..\..\..\..\Qt\4.7.2\mkspecs\qconfig.pri:
..\..\..\..\Qt\4.7.2\mkspecs\modules\qt_webkit_version.pri:
..\..\..\..\Qt\4.7.2\mkspecs\features\qt_functions.prf:
..\..\..\..\Qt\4.7.2\mkspecs\features\qt_config.prf:
..\..\..\..\Qt\4.7.2\mkspecs\features\exclusive_builds.prf:
..\..\..\..\Qt\4.7.2\mkspecs\features\default_pre.prf:
..\..\..\..\Qt\4.7.2\mkspecs\features\win32\default_pre.prf:
..\..\..\..\Qt\4.7.2\mkspecs\features\debug.prf:
..\..\..\..\Qt\4.7.2\mkspecs\features\debug_and_release.prf:
..\..\..\..\Qt\4.7.2\mkspecs\features\default_post.prf:
..\..\..\..\Qt\4.7.2\mkspecs\features\win32\default_post.prf:
..\..\..\..\Qt\4.7.2\mkspecs\features\win32\rtti.prf:
..\..\..\..\Qt\4.7.2\mkspecs\features\win32\exceptions.prf:
..\..\..\..\Qt\4.7.2\mkspecs\features\win32\stl.prf:
..\..\..\..\Qt\4.7.2\mkspecs\features\shared.prf:
..\..\..\..\Qt\4.7.2\mkspecs\features\win32\embed_manifest_exe.prf:
..\..\..\..\Qt\4.7.2\mkspecs\features\win32\embed_manifest_dll.prf:
..\..\..\..\Qt\4.7.2\mkspecs\features\warn_on.prf:
..\..\..\..\Qt\4.7.2\mkspecs\features\qt.prf:
..\..\..\..\Qt\4.7.2\mkspecs\features\win32\thread.prf:
..\..\..\..\Qt\4.7.2\mkspecs\features\moc.prf:
..\..\..\..\Qt\4.7.2\mkspecs\features\win32\windows.prf:
..\..\..\..\Qt\4.7.2\mkspecs\features\resources.prf:
..\..\..\..\Qt\4.7.2\mkspecs\features\uic.prf:
..\..\..\..\Qt\4.7.2\mkspecs\features\yacc.prf:
..\..\..\..\Qt\4.7.2\mkspecs\features\lex.prf:
..\..\..\..\Qt\4.7.2\mkspecs\features\include_source_dir.prf:
qmake: qmake_all FORCE
#$(QMAKE) -o Makefile external.pro
qmake_all: sub-lib3ds-1-3-0-lib3ds-qmake_all sub-bzip2-1-0-5-bzip2-1-0-5-pro-qmake_all sub-muparser_v132-src-qmake_all sub-levmar-2-3-levmar-2-3-pro-qmake_all sub-OpenCTM-1-0-3-openctm-pro-qmake_all sub-jhead-2-95-jhead-2-95-pro-qmake_all FORCE
make_default: sub-lib3ds-1-3-0-lib3ds-make_default sub-bzip2-1-0-5-bzip2-1-0-5-pro-make_default sub-muparser_v132-src-make_default sub-levmar-2-3-levmar-2-3-pro-make_default sub-OpenCTM-1-0-3-openctm-pro-make_default sub-jhead-2-95-jhead-2-95-pro-make_default FORCE
make_first: sub-lib3ds-1-3-0-lib3ds-make_first sub-bzip2-1-0-5-bzip2-1-0-5-pro-make_first sub-muparser_v132-src-make_first sub-levmar-2-3-levmar-2-3-pro-make_first sub-OpenCTM-1-0-3-openctm-pro-make_first sub-jhead-2-95-jhead-2-95-pro-make_first FORCE
all: sub-lib3ds-1-3-0-lib3ds-all sub-bzip2-1-0-5-bzip2-1-0-5-pro-all sub-muparser_v132-src-all sub-levmar-2-3-levmar-2-3-pro-all sub-OpenCTM-1-0-3-openctm-pro-all sub-jhead-2-95-jhead-2-95-pro-all FORCE
clean: sub-lib3ds-1-3-0-lib3ds-clean sub-bzip2-1-0-5-bzip2-1-0-5-pro-clean sub-muparser_v132-src-clean sub-levmar-2-3-levmar-2-3-pro-clean sub-OpenCTM-1-0-3-openctm-pro-clean sub-jhead-2-95-jhead-2-95-pro-clean FORCE
distclean: sub-lib3ds-1-3-0-lib3ds-distclean sub-bzip2-1-0-5-bzip2-1-0-5-pro-distclean sub-muparser_v132-src-distclean sub-levmar-2-3-levmar-2-3-pro-distclean sub-OpenCTM-1-0-3-openctm-pro-distclean sub-jhead-2-95-jhead-2-95-pro-distclean FORCE
-$(DEL_FILE) Makefile
install_subtargets: sub-lib3ds-1-3-0-lib3ds-install_subtargets sub-bzip2-1-0-5-bzip2-1-0-5-pro-install_subtargets sub-muparser_v132-src-install_subtargets sub-levmar-2-3-levmar-2-3-pro-install_subtargets sub-OpenCTM-1-0-3-openctm-pro-install_subtargets sub-jhead-2-95-jhead-2-95-pro-install_subtargets FORCE
uninstall_subtargets: sub-lib3ds-1-3-0-lib3ds-uninstall_subtargets sub-bzip2-1-0-5-bzip2-1-0-5-pro-uninstall_subtargets sub-muparser_v132-src-uninstall_subtargets sub-levmar-2-3-levmar-2-3-pro-uninstall_subtargets sub-OpenCTM-1-0-3-openctm-pro-uninstall_subtargets sub-jhead-2-95-jhead-2-95-pro-uninstall_subtargets FORCE
sub-lib3ds-1-3-0-lib3ds-sub_Debug: lib3ds-1.3.0\lib3ds\$(MAKEFILE)
cd lib3ds-1.3.0\lib3ds\ && $(MAKE) debug
sub-bzip2-1-0-5-bzip2-1-0-5-pro-sub_Debug: bzip2-1.0.5\$(MAKEFILE)
cd bzip2-1.0.5\ && $(MAKE) debug
sub-muparser_v132-src-sub_Debug: muparser_v132\src\$(MAKEFILE)
cd muparser_v132\src\ && $(MAKE) debug
sub-levmar-2-3-levmar-2-3-pro-sub_Debug: levmar-2.3\$(MAKEFILE)
cd levmar-2.3\ && $(MAKE) debug
sub-OpenCTM-1-0-3-openctm-pro-sub_Debug: OpenCTM-1.0.3\$(MAKEFILE).openctm
cd OpenCTM-1.0.3\ && $(MAKE) -f $(MAKEFILE).openctm debug
sub-jhead-2-95-jhead-2-95-pro-sub_Debug: jhead-2.95\$(MAKEFILE)
cd jhead-2.95\ && $(MAKE) debug
debug: sub-lib3ds-1-3-0-lib3ds-sub_Debug sub-bzip2-1-0-5-bzip2-1-0-5-pro-sub_Debug sub-muparser_v132-src-sub_Debug sub-levmar-2-3-levmar-2-3-pro-sub_Debug sub-OpenCTM-1-0-3-openctm-pro-sub_Debug sub-jhead-2-95-jhead-2-95-pro-sub_Debug
sub-lib3ds-1-3-0-lib3ds-sub_Release: lib3ds-1.3.0\lib3ds\$(MAKEFILE)
cd lib3ds-1.3.0\lib3ds\ && $(MAKE) release
sub-bzip2-1-0-5-bzip2-1-0-5-pro-sub_Release: bzip2-1.0.5\$(MAKEFILE)
cd bzip2-1.0.5\ && $(MAKE) release
sub-muparser_v132-src-sub_Release: muparser_v132\src\$(MAKEFILE)
cd muparser_v132\src\ && $(MAKE) release
sub-levmar-2-3-levmar-2-3-pro-sub_Release: levmar-2.3\$(MAKEFILE)
cd levmar-2.3\ && $(MAKE) release
sub-OpenCTM-1-0-3-openctm-pro-sub_Release: OpenCTM-1.0.3\$(MAKEFILE).openctm
cd OpenCTM-1.0.3\ && $(MAKE) -f $(MAKEFILE).openctm release
sub-jhead-2-95-jhead-2-95-pro-sub_Release: jhead-2.95\$(MAKEFILE)
cd jhead-2.95\ && $(MAKE) release
release: sub-lib3ds-1-3-0-lib3ds-sub_Release sub-bzip2-1-0-5-bzip2-1-0-5-pro-sub_Release sub-muparser_v132-src-sub_Release sub-levmar-2-3-levmar-2-3-pro-sub_Release sub-OpenCTM-1-0-3-openctm-pro-sub_Release sub-jhead-2-95-jhead-2-95-pro-sub_Release
sub-lib3ds-1-3-0-lib3ds-check: lib3ds-1.3.0\lib3ds\$(MAKEFILE)
cd lib3ds-1.3.0\lib3ds\ && $(MAKE) check
sub-bzip2-1-0-5-bzip2-1-0-5-pro-check: bzip2-1.0.5\$(MAKEFILE)
cd bzip2-1.0.5\ && $(MAKE) check
sub-muparser_v132-src-check: muparser_v132\src\$(MAKEFILE)
cd muparser_v132\src\ && $(MAKE) check
sub-levmar-2-3-levmar-2-3-pro-check: levmar-2.3\$(MAKEFILE)
cd levmar-2.3\ && $(MAKE) check
sub-OpenCTM-1-0-3-openctm-pro-check: OpenCTM-1.0.3\$(MAKEFILE).openctm
cd OpenCTM-1.0.3\ && $(MAKE) -f $(MAKEFILE).openctm check
sub-jhead-2-95-jhead-2-95-pro-check: jhead-2.95\$(MAKEFILE)
cd jhead-2.95\ && $(MAKE) check
check: sub-lib3ds-1-3-0-lib3ds-check sub-bzip2-1-0-5-bzip2-1-0-5-pro-check sub-muparser_v132-src-check sub-levmar-2-3-levmar-2-3-pro-check sub-OpenCTM-1-0-3-openctm-pro-check sub-jhead-2-95-jhead-2-95-pro-check
mocclean: compiler_moc_header_clean compiler_moc_source_clean
mocables: compiler_moc_header_make_all compiler_moc_source_make_all
install: install_subtargets FORCE
uninstall: uninstall_subtargets FORCE
FORCE:
Yes, but this makefile also runs qmake as the first thing it does (I tried it). Any of the makefiles built by qmake recursively could contain the rogue "{" character caused by the parameters passed to qmake.
As I don't have your installaion of qmake and 3d mesh it hard to reproduce the error. You need to extract more detail from what you have to supply a problem we can answer.....
Related
I'm trying to install the following GitHub Repository in my machine:
Br-Altlas
The instructions tell me to install Gdal before clonning it, and then run npm install and run the command "make".
When I run the make command in the Git Bash, I have the following response:
mkdir -p geo/
ogr2ogr -f GeoJSON geo/ac-municipalities.json tmp/ac-municipalities/map.shp
process_begin: CreateProcess(NULL, ogr2ogr -f GeoJSON geo/ac-municipalities.json tmp/ac-municipalities/map.shp, ...) failed.
make (e=2):The system cannot find the specified file.
make: *** [Makefile:70: geo/ac-municipalities.json] Error 2
And when I run the same command in the Windows Power Shell, my answer is this:
mkdir -p zip/
Command syntax is incorrect.
make: *** [Makefile:48: zip/ac-municipalities.zip] Error 1
I found some simmilar issues, but couldn't find a solution that solves it for me.
The content of the MakerFile is this:
# -- Configurations
# TopoJSON configurations
TOPOJSON = node --max_old_space_size=8192 node_modules/.bin/topojson -q 1e6
# All Brazilian states
STATES = \
ac al am ap ba ce df es go ma \
mg ms mt pa pb pe pi pr rj rn \
ro rr rs sc se sp to
all: \
node_modules \
$(addprefix topo/,$(addsuffix -municipalities.json,$(STATES))) \
$(addprefix topo/,$(addsuffix -micro.json,$(STATES))) \
$(addprefix topo/,$(addsuffix -meso.json,$(STATES))) \
$(addprefix topo/,$(addsuffix -state.json,$(STATES))) \
permission
# Install dependencies
node_modules:
npm install
# Add execute permission
permission:
chmod +x scripts/merge.py
# .SECONDARY with no dependencies marks all file targets mentioned in the makefile as secondary.
.SECONDARY:
# -- Downloading and extracting IBGE files
# Downloads the zip files
# ftp://geoftp.ibge.gov.br/malhas_digitais/municipio_2010/
zip/%.zip:
$(eval STATE := $(patsubst %-municipalities,%,$*))
$(eval STATE := $(patsubst %-micro,%,$(STATE)))
$(eval STATE := $(patsubst %-meso,%,$(STATE)))
$(eval STATE := $(patsubst %-state,%,$(STATE)))
$(eval FILENAME := $(subst -municipalities,_municipios,$*))
$(eval FILENAME := $(subst -micro,_microrregioes,$(FILENAME)))
$(eval FILENAME := $(subst -meso,_mesorregioes,$(FILENAME)))
$(eval FILENAME := $(subst -state,_unidades_da_federacao,$(FILENAME)))
mkdir -p $(dir $#)
curl 'ftp://geoftp.ibge.gov.br/organizacao_do_territorio/malhas_territoriais/malhas_municipais/municipio_2010/$(STATE)/$(FILENAME).zip' -o $#.download
mv $#.download $#
# Extracts the files
tmp/%/: zip/%.zip
rm -rf $(basename $#)
mkdir -p $(dir $#)
unzip -d tmp/$* $<
$(eval REGION := $(patsubst %-municipalities,municipalities,$*))
$(eval REGION := $(patsubst %-micro,micro,$*))
$(eval REGION := $(patsubst %-meso,meso,$*))
$(eval REGION := $(patsubst %-state,state,$*))
mv $#/*.shp $#/map.shp
mv $#/*.shx $#/map.shx
mv $#/*.dbf $#/map.dbf
mv $#/*.prj $#/map.prj
# -- Generate GeoJSON files
geo/%.json: tmp/%/
mkdir -p $(dir $#)
ogr2ogr -f GeoJSON $# tmp/$*/map.shp
iconv -f ISO-8859-1 -t UTF-8 $# > $#.utf8
mv $#.utf8 $#
touch $#
# -- Generating TopoJSON files for each state
# For individual states, municipality level
topo/%-municipalities.json: geo/%-municipalities.json
mkdir -p $(dir $#)
$(TOPOJSON) --id-property=CD_GEOCODM -p name=NM_MUNICIP -o $# municipalities=$^
touch $#
# For individual states, micro-region level
topo/%-micro.json: geo/%-micro.json
mkdir -p $(dir $#)
$(TOPOJSON) --id-property=NM_MICRO -p name=NM_MICRO -o $# micro=$^
touch $#
# For individual states, meso-region level
topo/%-meso.json: geo/%-meso.json
mkdir -p $(dir $#)
$(TOPOJSON) --id-property=NM_MESO -p name=NM_MESO -o $# meso=$^
touch $#
# For individual states, state level:
topo/%-state.json: geo/%-state.json
mkdir -p $(dir $#)
$(TOPOJSON) --id-property=CD_GEOCODU -p name=NM_ESTADO -p region=NM_REGIAO -o $# state=$^
touch $#
# -- Generating TopoJSON files for Brazil
# For Brazil with municipalities
topo/br-municipalities.json: $(addprefix geo/,$(addsuffix -municipalities.json,$(STATES)))
mkdir -p $(dir $#)
$(TOPOJSON) --id-property=CD_GEOCODM -p name=NM_MUNICIP -o $# -- $^
./scripts/merge.py $# > $#.merged
mv $#.merged $#
# For Brasil with states
topo/br-states.json: $(addprefix geo/,$(addsuffix -state.json,$(STATES)))
mkdir -p $(dir $#)
$(TOPOJSON) --id-property=CD_GEOCODU -p name=NM_ESTADO -p region=NM_REGIAO -o $# -- $^
./scripts/merge.py $# > $#.merged
mv $#.merged $#
# Simplified version of state file
topo/br-states.min.json: topo/br-states.json
$(TOPOJSON) -p --simplify-proportion=.2 -o $# -- $^
# -- Clean
# Clean temporary files
clean-tmp:
rm -rf tmp
# Clean extra files
clean-extra:
rm -rf zip
rm -rf tmp
# Clean result files
clean-result:
rm -rf shp
rm -rf geo
rm -rf topo
# Clean everything
clean: clean-tmp clean-result clean-extra
I am trying to create a docker image for BBMAP (https://sourceforge.net/projects/bbmap/files/latest/download) shell script suite available online along with samtools and picard.jar. I was able to run samtools and picard, but for some reason I am not able to add bbmap below. Can someone please let me know what I am missing here?
I am trying to add shell scripts to bin to run them as executables.
In my docker file below, this is where I need help:
&& wget -q https://sourceforge.net/projects/bbmap/files/latest/download \
&& tar -xjvf /tmp/download \
&& cp -av /tmp/bbmap/* /usr/bin/ \
Dockerfile:
FROM openjdk:8-jre
LABEL maintainer="AN <XXX#wustl.edu>"
LABEL org.label-schema.schema-version="1.0"
# LABEL org.label-schema.build-date=$BUILD_DATE
LABEL org.label-schema.name="an/samtofastq"
LABEL org.label-schema.description="Image for Reverting .bam"
ENV SAMTOOLS_VERSION 1.9
ENV PICARD_VERSION 2.20.8
WORKDIR /tmp
RUN apt-get update -y \
&& apt-get install --no-install-recommends -y \
make \
gcc \
g++ \
libz-dev \
libbz2-dev \
liblzma-dev \
ncurses-dev \
bc \
libnss-sss \
time \
&& cd /tmp \
&& wget -q https://github.com/samtools/samtools/releases/download/${SAMTOOLS_VERSION}/samtools-${SAMTOOLS_VERSION}.tar.bz2 \
&& tar xjvf samtools-${SAMTOOLS_VERSION}.tar.bz2 \
&& cd /tmp/samtools-${SAMTOOLS_VERSION}/ \
&& make \
&& cp -av /tmp/samtools-${SAMTOOLS_VERSION}/samtools /usr/bin/ \
&& wget -q -O /usr/bin/picard.jar https://github.com/broadinstitute/picard/releases/download/${PICARD_VERSION}/picard.jar \
&& wget -q https://sourceforge.net/projects/bbmap/files/latest/download \
&& tar -xjvf /tmp/download \
&& cp -av /tmp/bbmap/* /usr/bin/ \
&& ln -sf /usr/share/zoneinfo/America/Chicago /etc/localtime \
&& echo "America/Chicago" > /etc/timezone \
&& dpkg-reconfigure --frontend noninteractive tzdata \
&& apt-get clean all \
&& rm -rfv /var/lib/apt/lists/* /tmp/* /var/tmp/*
# COPY ./entrypoint.sh /usr/local/bin/
ENV PICARD /usr/bin/picard.jar
## Add ENV for Shell scripts from BBMAP
# ENV DEMUX /usr/bin/demuxbyname.sh
# ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["/bin/bash"]
This is the error I am getting:
tar (child): /tmp/download: Cannot open: No such file or directory
tar (child): Error is not recoverable: exiting now
tar: Child returned status 2
tar: Error is not recoverable: exiting now
Earlier in your script, you run:
cd /tmp/samtools-${SAMTOOLS_VERSION}/
So when you run this:
wget -q https://sourceforge.net/projects/bbmap/files/latest/download
The resulting file is:
/tmp/samtools-${SAMTOOLS_VERSION}/download
That means that when you run your tar command:
tar -xjvf /tmp/download
...it doesn't find the file because it isn't in /tmp.
Either change the path on the tar command, or add a cd /tmp to your script before downloading the file. Or pass something like -O /tmp/download.tar to your wget invocation.
I have a python selenium script that needs to be run in GitLab CI/CD. Script is running perfectly in local but the only issue is of chrome driver path in gitlab.
Do I also need to add the script to download the chrome?
I am new to gitlab CI/CD.Need help!!
Thanks
Create a Dockerfile which install all the browsers and their web drivers. Create that image and call that image in gitlab to run your tests. Here is the sample dockerfile.
FROM ubuntu:bionic
RUN apt-get update && apt-get install -y \
python3 python3-pip \
fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 \
libnspr4 libnss3 lsb-release xdg-utils libxss1 libdbus-glib-1-2 \
curl unzip wget \
xvfb
# install geckodriver and firefox
RUN GECKODRIVER_VERSION=`curl https://github.com/mozilla/geckodriver/releases/latest | grep -Po 'v[0-9]+.[0-9]+.[0-9]+'` && \
wget https://github.com/mozilla/geckodriver/releases/download/$GECKODRIVER_VERSION/geckodriver-$GECKODRIVER_VERSION-linux64.tar.gz && \
tar -zxf geckodriver-$GECKODRIVER_VERSION-linux64.tar.gz -C /usr/local/bin && \
chmod +x /usr/local/bin/geckodriver && \
rm geckodriver-$GECKODRIVER_VERSION-linux64.tar.gz
RUN FIREFOX_SETUP=firefox-setup.tar.bz2 && \
apt-get purge firefox && \
wget -O $FIREFOX_SETUP "https://download.mozilla.org/?product=firefox-latest&os=linux64" && \
tar xjf $FIREFOX_SETUP -C /opt/ && \
ln -s /opt/firefox/firefox /usr/bin/firefox && \
rm $FIREFOX_SETUP
# install chromedriver and google-chrome
RUN CHROMEDRIVER_VERSION=`curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE` && \
wget https://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip && \
unzip chromedriver_linux64.zip -d /usr/bin && \
chmod +x /usr/bin/chromedriver && \
rm chromedriver_linux64.zip
RUN CHROME_SETUP=google-chrome.deb && \
wget -O $CHROME_SETUP "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb" && \
dpkg -i $CHROME_SETUP && \
apt-get install -y -f && \
rm $CHROME_SETUP
# install phantomjs
RUN wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2 && \
tar -jxf phantomjs-2.1.1-linux-x86_64.tar.bz2 && \
cp phantomjs-2.1.1-linux-x86_64/bin/phantomjs /usr/local/bin/phantomjs && \
rm phantomjs-2.1.1-linux-x86_64.tar.bz2
RUN pip3 install selenium
RUN pip3 install pyvirtualdisplay
RUN pip3 install Selenium-Screenshot
ENV LANG C.UTF-8
ENV LC_ALL C.UTF-8
ENV PYTHONUNBUFFERED=1
ENV APP_HOME /usr/src/app
WORKDIR /$APP_HOME
COPY . $APP_HOME/
CMD tail -f /dev/null
CMD python3 example.py
[UPDATE2] qt 5.7 seems to have issues cross compiling under the windows environment (cygwin/mingw). qt 5.5 can be cross compiled relatively easily.
I am cross compiling qt 5.7.0 to armv7 linux target on raspberry pi using a toolchain I generated with crosstool-ng on cygwin.
Host: cygwin
Toolchain: armv7-rpi2-linux-gnueabihf (generated via crosstool-ng)
Target : armv7 linux
I downloaded and extracted qt 5.7.0 tarball and extracted it under the cygwin directory structure from within the cygwin shell (i.e I didnt use winzip/7zip to extract the files).
configure command:
~/qtpi]$ ./configure -prefix /cygdrive/c/qt5pi -debug-and-release -no-accessibility -device
linux-rpi3-g++ -opensource -confirm-license -make libs -platform cygwin-g++
-device-option CROSS_COMPILE=/cygdrive/c/cygwin64/home/admin/x-tools/armv7-rpi2-linux-gnueabihf/bin/armv7-rpi2-linux-gnueabihf-
-sysroot /cygdrive/c/cygwin64/home/admin/x-tools/armv7-rpi2-linux-gnueabihf/armv7-rpi2-linux-gnueabihf/sysroot -v
configure completes as follows...
...
...
xkbcommon-x11........... no
xkbcommon-evdev......... no
zlib ................... yes (bundled copy)
NOTE: Qt is using double for qreal on this system. This is binary
incompatible against Qt 5.1. Configure with '-qreal float' to create a build
that is binary compatible with 5.1.
Qt is now configured for building. Just run 'make'. Once everything is
built, you must run 'make install'. Qt will be installed into
/cygdrive/c/qt5pi
Prior to reconfiguration, make sure you remove any leftovers from the
previous build.
At this point running make give the following error:
~/qtpi]$ make
cd qtbase/ && ( test -e Makefile || /home/admin/qtpi/qtbase/bin/qmake /home/admin/qtpi/qtbase/qtbase.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile ) && /usr/bin/make -f Makefile
make[1]: Entering directory '/home/admin/qtpi/qtbase'
/bin/sh: -c: line 1: syntax error: unexpected end of file
make[1]: *** [Makefile:43: sub-src-make_first] Error 1
make[1]: Leaving directory '/home/admin/qtpi/qtbase'
make: *** [Makefile:78: module-qtbase-make_first] Error 2
I am stuck here for half a day. AFAIK this does not seem to be related to dos-unix line endings or mingw shell ( I get the same error via mingw too)
[UPDATE1] here is the first 200+ lines of /home/admin/qtpi/qtbase/Makefile for reference.
#############################################################################
# Makefile for building: qtbase
# Generated by qmake (3.0) (Qt 5.7.0)
# Project: qtbase.pro
# Template: subdirs
# Command: /home/admin/qtpi/qtbase/bin/qmake -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile qtbase.pro
#############################################################################
MAKEFILE = Makefile
first: make_first
QMAKE = /home/admin/qtpi/qtbase/bin/qmake
DEL_FILE = del
CHK_DIR_EXISTS= if not exist
MKDIR = mkdir
COPY = copy /y
COPY_FILE = copy /y
COPY_DIR = xcopy /s /q /y /i
INSTALL_FILE = copy /y
INSTALL_PROGRAM = copy /y
INSTALL_DIR = xcopy /s /q /y /i
DEL_FILE = del
SYMLINK = ln -f -s
DEL_DIR = rmdir
MOVE = move
SUBTARGETS = \
sub-src \
sub-examples \
sub-tests \
sub-qmake-qmake-aux-pro
sub-src-qmake_all: FORCE
#if not exist src/ mkdir src/ & if not exist src/ exit 1
cd src/ && $(QMAKE) /home/admin/qtpi/qtbase/src/src.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile
#set MAKEFLAGS=$(MAKEFLAGS)
cd src/ && $(MAKE) -f Makefile qmake_all
sub-src: FORCE
#if not exist src/ mkdir src/ & if not exist src/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd src/ && ( if not exist Makefile $(QMAKE) /home/admin/qtpi/qtbase/src/src.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile ) && $(MAKE) -f Makefile
sub-src-make_first: FORCE
#if not exist src/ mkdir src/ & if not exist src/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd src/ && ( if not exist Makefile $(QMAKE) /home/admin/qtpi/qtbase/src/src.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile ) && $(MAKE) -f Makefile
sub-src-all: FORCE
#if not exist src/ mkdir src/ & if not exist src/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd src/ && ( if not exist Makefile $(QMAKE) /home/admin/qtpi/qtbase/src/src.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile ) && $(MAKE) -f Makefile all
sub-src-clean: FORCE
#if not exist src/ mkdir src/ & if not exist src/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd src/ && ( if not exist Makefile $(QMAKE) /home/admin/qtpi/qtbase/src/src.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile ) && $(MAKE) -f Makefile clean
sub-src-distclean: FORCE
#if not exist src/ mkdir src/ & if not exist src/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd src/ && ( if not exist Makefile $(QMAKE) /home/admin/qtpi/qtbase/src/src.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile ) && $(MAKE) -f Makefile distclean
sub-src-install_subtargets: FORCE
#if not exist src/ mkdir src/ & if not exist src/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd src/ && ( if not exist Makefile $(QMAKE) /home/admin/qtpi/qtbase/src/src.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile ) && $(MAKE) -f Makefile install
sub-src-uninstall_subtargets: FORCE
#if not exist src/ mkdir src/ & if not exist src/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd src/ && ( if not exist Makefile $(QMAKE) /home/admin/qtpi/qtbase/src/src.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile ) && $(MAKE) -f Makefile uninstall
sub-examples-qmake_all: sub-src-qmake_all FORCE
#if not exist examples/ mkdir examples/ & if not exist examples/ exit 1
cd examples/ && $(QMAKE) /home/admin/qtpi/qtbase/examples/examples.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile
#set MAKEFLAGS=$(MAKEFLAGS)
cd examples/ && $(MAKE) -f Makefile qmake_all
sub-examples: sub-src FORCE
#if not exist examples/ mkdir examples/ & if not exist examples/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd examples/ && ( if not exist Makefile $(QMAKE) /home/admin/qtpi/qtbase/examples/examples.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile ) && $(MAKE) -f Makefile
sub-examples-make_first: sub-src-make_first FORCE
#if not exist examples/ mkdir examples/ & if not exist examples/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd examples/ && ( if not exist Makefile $(QMAKE) /home/admin/qtpi/qtbase/examples/examples.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile ) && $(MAKE) -f Makefile
sub-examples-all: sub-src-all FORCE
#if not exist examples/ mkdir examples/ & if not exist examples/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd examples/ && ( if not exist Makefile $(QMAKE) /home/admin/qtpi/qtbase/examples/examples.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile ) && $(MAKE) -f Makefile all
sub-examples-clean: sub-src-clean FORCE
#if not exist examples/ mkdir examples/ & if not exist examples/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd examples/ && ( if not exist Makefile $(QMAKE) /home/admin/qtpi/qtbase/examples/examples.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile ) && $(MAKE) -f Makefile clean
sub-examples-distclean: sub-src-distclean FORCE
#if not exist examples/ mkdir examples/ & if not exist examples/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd examples/ && ( if not exist Makefile $(QMAKE) /home/admin/qtpi/qtbase/examples/examples.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile ) && $(MAKE) -f Makefile distclean
sub-examples-install_subtargets: sub-src-install_subtargets FORCE
#if not exist examples/ mkdir examples/ & if not exist examples/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd examples/ && ( if not exist Makefile $(QMAKE) /home/admin/qtpi/qtbase/examples/examples.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile ) && $(MAKE) -f Makefile install
sub-examples-uninstall_subtargets: sub-src-uninstall_subtargets FORCE
#if not exist examples/ mkdir examples/ & if not exist examples/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd examples/ && ( if not exist Makefile $(QMAKE) /home/admin/qtpi/qtbase/examples/examples.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile ) && $(MAKE) -f Makefile uninstall
sub-tests-qmake_all: sub-src-qmake_all FORCE
#if not exist tests/ mkdir tests/ & if not exist tests/ exit 1
cd tests/ && $(QMAKE) /home/admin/qtpi/qtbase/tests/tests.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile
#set MAKEFLAGS=$(MAKEFLAGS)
cd tests/ && $(MAKE) -f Makefile qmake_all
sub-tests: sub-src FORCE
#if not exist tests/ mkdir tests/ & if not exist tests/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd tests/ && ( if not exist Makefile $(QMAKE) /home/admin/qtpi/qtbase/tests/tests.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile ) && $(MAKE) -f Makefile
sub-tests-make_first: sub-src-make_first FORCE
#if not exist tests/ mkdir tests/ & if not exist tests/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd tests/ && ( if not exist Makefile $(QMAKE) /home/admin/qtpi/qtbase/tests/tests.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile ) && $(MAKE) -f Makefile
sub-tests-all: sub-src-all FORCE
#if not exist tests/ mkdir tests/ & if not exist tests/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd tests/ && ( if not exist Makefile $(QMAKE) /home/admin/qtpi/qtbase/tests/tests.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile ) && $(MAKE) -f Makefile all
sub-tests-clean: sub-src-clean FORCE
#if not exist tests/ mkdir tests/ & if not exist tests/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd tests/ && ( if not exist Makefile $(QMAKE) /home/admin/qtpi/qtbase/tests/tests.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile ) && $(MAKE) -f Makefile clean
sub-tests-distclean: sub-src-distclean FORCE
#if not exist tests/ mkdir tests/ & if not exist tests/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd tests/ && ( if not exist Makefile $(QMAKE) /home/admin/qtpi/qtbase/tests/tests.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile ) && $(MAKE) -f Makefile distclean
sub-tests-install_subtargets: sub-src-install_subtargets FORCE
#if not exist tests/ mkdir tests/ & if not exist tests/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd tests/ && ( if not exist Makefile $(QMAKE) /home/admin/qtpi/qtbase/tests/tests.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile ) && $(MAKE) -f Makefile install
sub-tests-uninstall_subtargets: sub-src-uninstall_subtargets FORCE
#if not exist tests/ mkdir tests/ & if not exist tests/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd tests/ && ( if not exist Makefile $(QMAKE) /home/admin/qtpi/qtbase/tests/tests.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile ) && $(MAKE) -f Makefile uninstall
sub-qmake-qmake-aux-pro-qmake_all: FORCE
#if not exist qmake/ mkdir qmake/ & if not exist qmake/ exit 1
cd qmake/ && $(QMAKE) /home/admin/qtpi/qtbase/qmake/qmake-aux.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile.qmake-aux
#set MAKEFLAGS=$(MAKEFLAGS)
cd qmake/ && $(MAKE) -f Makefile.qmake-aux qmake_all
sub-qmake-qmake-aux-pro: FORCE
#if not exist qmake/ mkdir qmake/ & if not exist qmake/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd qmake/ && ( if not exist Makefile.qmake-aux $(QMAKE) /home/admin/qtpi/qtbase/qmake/qmake-aux.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile.qmake-aux ) && $(MAKE) -f Makefile.qmake-aux
sub-qmake-qmake-aux-pro-make_first: FORCE
#if not exist qmake/ mkdir qmake/ & if not exist qmake/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd qmake/ && ( if not exist Makefile.qmake-aux $(QMAKE) /home/admin/qtpi/qtbase/qmake/qmake-aux.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile.qmake-aux ) && $(MAKE) -f Makefile.qmake-aux
sub-qmake-qmake-aux-pro-all: FORCE
#if not exist qmake/ mkdir qmake/ & if not exist qmake/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd qmake/ && ( if not exist Makefile.qmake-aux $(QMAKE) /home/admin/qtpi/qtbase/qmake/qmake-aux.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile.qmake-aux ) && $(MAKE) -f Makefile.qmake-aux all
sub-qmake-qmake-aux-pro-clean: FORCE
#if not exist qmake/ mkdir qmake/ & if not exist qmake/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd qmake/ && ( if not exist Makefile.qmake-aux $(QMAKE) /home/admin/qtpi/qtbase/qmake/qmake-aux.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile.qmake-aux ) && $(MAKE) -f Makefile.qmake-aux clean
sub-qmake-qmake-aux-pro-distclean: FORCE
#if not exist qmake/ mkdir qmake/ & if not exist qmake/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd qmake/ && ( if not exist Makefile.qmake-aux $(QMAKE) /home/admin/qtpi/qtbase/qmake/qmake-aux.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile.qmake-aux ) && $(MAKE) -f Makefile.qmake-aux distclean
sub-qmake-qmake-aux-pro-install_subtargets: FORCE
#if not exist qmake/ mkdir qmake/ & if not exist qmake/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd qmake/ && ( if not exist Makefile.qmake-aux $(QMAKE) /home/admin/qtpi/qtbase/qmake/qmake-aux.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile.qmake-aux ) && $(MAKE) -f Makefile.qmake-aux install
sub-qmake-qmake-aux-pro-uninstall_subtargets: FORCE
#if not exist qmake/ mkdir qmake/ & if not exist qmake/ exit 1
#set MAKEFLAGS=$(MAKEFLAGS)
cd qmake/ && ( if not exist Makefile.qmake-aux $(QMAKE) /home/admin/qtpi/qtbase/qmake/qmake-aux.pro -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile.qmake-aux ) && $(MAKE) -f Makefile.qmake-aux uninstall
Makefile: qtbase.pro .qmake.conf .qmake.cache mkspecs/win32-msvc2012/qmake.conf mkspecs/features/spec_pre.prf \
mkspecs/common/angle.conf \
mkspecs/common/msvc-base.conf \
mkspecs/common/msvc-desktop.conf \
mkspecs/qconfig.pri \
mkspecs/features/qt_functions.prf \
mkspecs/features/qt_config.prf \
mkspecs/features/win32/qt_config.prf \
mkspecs/win32-msvc2012/qmake.conf \
mkspecs/features/spec_post.prf \
mkspecs/qmodule.pri \
mkspecs/features/qt_build_config.prf \
.qmake.conf \
.qmake.stash \
mkspecs/features/exclusive_builds.prf \
mkspecs/features/default_pre.prf \
mkspecs/features/win32/default_pre.prf \
mkspecs/features/qt_parts.prf \
mkspecs/modules/qt_tool_syncqt.pri \
mkspecs/features/resolve_config.prf \
mkspecs/features/exclusive_builds_post.prf \
mkspecs/features/default_post.prf \
mkspecs/features/exceptions_off.prf \
mkspecs/features/qt_example_installs.prf \
mkspecs/features/qt_docs_targets.prf \
mkspecs/features/precompile_header.prf \
mkspecs/features/warn_on.prf \
mkspecs/features/file_copies.prf \
mkspecs/features/qt_build_extra.prf \
mkspecs/features/win32/windows.prf \
mkspecs/features/win32/rtti_off.prf \
mkspecs/features/testcase_targets.prf \
mkspecs/features/yacc.prf \
mkspecs/features/lex.prf \
qtbase.pro
$(QMAKE) -qtconf /home/admin/qtpi/qtbase/bin/qt.conf -o Makefile qtbase.pro
mkspecs/features/spec_pre.prf:
mkspecs/common/angle.conf:
mkspecs/common/msvc-base.conf:
mkspecs/common/msvc-desktop.conf:
mkspecs/qconfig.pri:
mkspecs/features/qt_functions.prf:
mkspecs/features/qt_config.prf:
mkspecs/features/win32/qt_config.prf:
mkspecs/win32-msvc2012/qmake.conf:
mkspecs/features/spec_post.prf:
mkspecs/qmodule.pri:
mkspecs/features/qt_build_config.prf:
.qmake.conf:
.qmake.stash:
mkspecs/features/exclusive_builds.prf:
mkspecs/features/default_pre.prf:
mkspecs/features/win32/default_pre.prf:
mkspecs/features/qt_parts.prf:
mkspecs/modules/qt_tool_syncqt.pri:
mkspecs/features/resolve_config.prf:
mkspecs/features/exclusive_builds_post.prf:
mkspecs/features/default_post.prf:
mkspecs/features/exceptions_off.prf:
mkspecs/features/qt_example_installs.prf:
mkspecs/features/qt_docs_targets.prf:
mkspecs/features/precompile_header.prf:
mkspecs/features/warn_on.prf:
mkspecs/features/file_copies.prf:
mkspecs/features/qt_build_extra.prf:
mkspecs/features/win32/windows.prf:
mkspecs/features/win32/rtti_off.prf:
mkspecs/features/testcase_targets.prf:
mkspecs/features/yacc.prf:
mkspecs/features/lex.prf:
qtbase.pro:
qmake: FORCE
Please help me get past this!
https://forum.qt.io/topic/69482/cannot-compile-qmake-for-win32-g-cross-compiling
in this link from qt support forum, looks like qt 5.7 has some issues for compiling it on windows.
I'm using version 5.5 that has no problems
Based on cannot-compile-qmake-for-win32-g-cross-compiling pointed out by #Torugobeck, I tried cross compiling Qt5.5 and it seems to have gone through the motions and completed 'make' and 'make install' under Cygwin - but with a cygwin-g++ platform ( instead of win32-g++ platform option under mingw )
Configure succeeded in 2 stages as outlined in the above link.
Start with this configure command :
./configure -prefix /cygdrive/c/qtpi5 -debug-and-release -no-accessibility
-opensource -confirm-license -make libs -platform cygwin-g++
-device linux-rasp-pi2-g++ -sysroot /cygdrive/c/cygwin64/home/admin/x-tools/armv7-rpi2-linux-gnueabihf/armv7-rpi2-linux-gnueabihf/sysroot -v
This succeeded in generating the qmake binary for windows.
Then edit the /qtbase/configure file as outlined in the above link.
Continue with this configure command :
./configure -prefix /cygdrive/c/qtpi5 -debug-and-release -no-accessibility
-opensource -confirm-license -make libs -platform cygwin-g++
-device linux-rasp-pi2-g++ -sysroot /cygdrive/c/cygwin64/home/admin/x-tools/armv7-rpi2-linux-gnueabihf/armv7-rpi2-linux-gnueabihf/sysroot
-v -device-option CROSS_COMPILE=/cygdrive/c/cygwin64/home/admin/x-tools/armv7-rpi2-linux-gnueabihf/bin/armv7-rpi2-linux-gnueabihf-
There was a windows version detection related failure in function /home/admin/qtpi/qtbase/src/corelib/global/qglobal.cpp:determineWinOsVersionPost8
I forced the function to return true and fillout relevant OS version information on the out param.
After this configure completed. 'make' took just 4 hrs and completed without errors - as did 'make install' next.
I compiled a minimal GUI program qith qt5 and was able to execute it on the target - raspberry PI/arm7-linux.
In short, cygwin was able to cross compile qt 5.5 successfully using a linux-armv7 cross compiler generated using crosstool-ng - also under cygwin- see UPDATE3.
p.s the GUI executable fails to launch the GUI and seems to just hang there with the following warning...
libEGL warning: DRI2: failed to authenticate
I am investigating this.
I'm trying to compile gnutls for arm on my x86 machine (Ubuntu 11.04 under VirtualBox). Right now I'm stuck compiling libnettle. ./configure script can't find -lgmp and produces nettle without public key cryptography (no libhogweed) which I need. Message in config.log is as follows:
For x86:
configure:6976: checking for __gmpz_getlimbn in -lgmp
configure:7001: gcc -o conftest -L"/home/xena/gnutls/out/x86/lib/" conftest.c -lgmp >&5
/usr/bin/ld: cannot find -lgmp
collect2: ld returned 1 exit status
configure:7001: $? = 1
And for ARM:
configure:6976: checking for __gmpz_getlimbn in -lgmp
configure:7001: arm-none-linux-gnueabi-gcc -o conftest -L"/home/xena/gnutls/out/arm/lib/" -mcpu=arm926ej-s -mthumb conftest.c -lgmp >&5
/usr/local/codesourcery/bin/../lib/gcc/arm-none-linux-gnueabi/4.7.3/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lgmp
collect2: error: ld returned 1 exit status
configure:7001: $? = 1
Those libraries are there:
xena#xena-VirtualBox:~/gnutls$ ls /home/xena/gnutls/out/x86/lib/ | grep libgmp
libgmp.a
libgmp.la
libgmp.so
libgmp.so.10
libgmp.so.10.1.2
xena#xena-VirtualBox:~/gnutls$ ls /home/xena/gnutls/out/arm/lib/ | grep libgmp
libgmp.a
libgmp.la
libgmp.so
libgmp.so.10
libgmp.so.10.1.2
And they work outside of ./configure:
xena#xena-VirtualBox:~/gnutls$ gedit conftest.c
xena#xena-VirtualBox:~/gnutls$ gcc -o conftest -L"/home/xena/gnutls/out/x86/lib/" conftest.c -lgmp
xena#xena-VirtualBox:~/gnutls$ ls | grep conftest
conftest
conftest.c
xena#xena-VirtualBox:~/gnutls$ rm conftest
xena#xena-VirtualBox:~/gnutls$ gedit conftest.c
xena#xena-VirtualBox:~/gnutls$ arm-none-linux-gnueabi-gcc -o conftest -L"/home/xena/gnutls/out/arm/lib/" -mcpu=arm926ej-s -mthumb conftest.c -lgmp
xena#xena-VirtualBox:~/gnutls$ ls | grep conftest
conftest
conftest.c
xena#xena-VirtualBox:~/gnutls$ rm conftest
Here is my build environment:
xena#xena-VirtualBox:~/gnutls$ pwd
/home/xena/gnutls
xena#xena-VirtualBox:~/gnutls$ ls
build.sh clean.sh gmp-5.1.2.tar.xz gmp-help.txt gnutls-3.2.2.tar.xz gnutls-help.txt nettle-2.7.1.tar.gz nettle-help.txt
And my build script:
ROOT=/home/xena/gnutls
mkdir -p $ROOT/out
tar -xf gmp-5.1.2.tar.xz; cd gmp-5.1.2/
./configure --prefix=$ROOT/out/x86 && make && make install
cd ..; mv gmp-5.1.2 gmp-5.1.2.x86
tar -xf gmp-5.1.2.tar.xz; cd gmp-5.1.2/
./configure --prefix=$ROOT/out/arm --host=arm-none-linux-gnueabi CFLAGS="-mcpu=arm926ej-s -mthumb" && make && make install
cd ..; mv gmp-5.1.2 gmp-5.1.2.arm
tar -xf nettle-2.7.1.tar.gz; cd nettle-2.7.1/
./configure --prefix=$ROOT/out/x86 --disable-openssl --enable-shared CFLAGS="-L\"$ROOT/out/x86/lib/\"" && make && make install
cd ..; mv nettle-2.7.1 nettle-2.7.1.x86
tar -xf nettle-2.7.1.tar.gz; cd nettle-2.7.1/
./configure --prefix=$ROOT/out/arm --disable-openssl --enable-shared --host=arm-none-linux-gnueabi CFLAGS="-L\"$ROOT/out/arm/lib/\" -mcpu=arm926ej-s -mthumb" && make && make install
cd ..; mv nettle-2.7.1 nettle-2.7.1.arm
#tar -xf gnutls-3.2.2.tar.xz; cd gnutls-3.2.2/
#./configure --prefix=$ROOT/gnutls-out/x86 --enable-threads=posix --with-sysroot=$ROOT/out/x86 && make && make install
#cd ..; mv gnutls-3.2.2 gnutls-3.2.2.x86
#tar -xf gnutls-3.2.2.tar.xz; cd gnutls-3.2.2/
#./configure --prefix=$ROOT/gnutls-out/arm --enable-threads=posix --with-sysroot=$ROOT/out/arm --host=arm-none-linux-gnueabi CFLAGS="-mcpu=arm926ej-s -mthumb" && make && make install
#cd ..; mv gnutls-3.2.2 gnutls-3.2.2.arm
Try below command it will work.Give correct path to your arm built gmp library and include file.
tar -xf nettle-2.7.1.tar.gz; cd nettle-2.7.1/
CFLAGS=-L/$ROOT/out/arm CPPFLAGS=-I/$ROOT/out/arm/include LDFLAGS=-L$ROOT/out/arm/lib
./configure --prefix=$ROOT/out/arm --disable-openssl --enable-shared --host=arm-none-linux-gnueabi
As in your case its trying to finding to link gmp. so LDFLAGS will link your library files.
To know more about how to compile you can try like below command.It shows some light on your configuartion.
./configure --help
here you can see various option for compilation.
Fine tuning of the installation directories:
This gives fine tuning of your package.
System types:
Under this option it will show for which machine or architecture you can build and compile.
Some influential environment variables:
this section gives complete control over your Flags for compiling and building your package
So I thought I would provide you with the script that finally did it for me (it is based on vinay hunachyal'a answer). It builds gnutls with all dependencies (two mandatory ones + zlib) for x86 and ARM (i.MX25).
Mind you, that it does no error checking so it is unsafe to execute out of the box. But it is good for reference purposes.
echo "This file too unflexible / uncaring about return codes to be run confidently. Use it for reference purposes only!"
exit 1;
ROOT=/home/xena/gnutls
mkdir -p $ROOT/out
tar -xf gmp-5.1.2.tar.xz; cd gmp-5.1.2/
./configure --prefix=$ROOT/gmp-out/x86 --enable-cxx && make && make install
cd ..; mv gmp-5.1.2 gmp-5.1.2.x86
tar -xf gmp-5.1.2.tar.xz; cd gmp-5.1.2/
CFLAGS="-mcpu=arm926ej-s -mthumb" ./configure --prefix=$ROOT/gmp-out/arm --host=arm-none-linux-gnueabi && make && make install
cd ..; mv gmp-5.1.2 gmp-5.1.2.arm
cp -R $ROOT/gmp-out/* $ROOT/out
tar -xf zlib-1.2.8.tar.xz; cd zlib-1.2.8/
./configure --prefix=$ROOT/zlib-out/x86 && make && make install
cd ..; mv zlib-1.2.8 zlib-1.2.8.x86
tar -xf zlib-1.2.8.tar.xz; cd zlib-1.2.8/
CC="arm-none-linux-gnueabi-gcc" CFLAGS="-mcpu=arm926ej-s -mthumb" ./configure --prefix=$ROOT/zlib-out/arm && make && make install
cd ..; mv zlib-1.2.8 zlib-1.2.8.arm
cp -R $ROOT/zlib-out/* $ROOT/out
tar -xf nettle-2.7.1.tar.gz; cd nettle-2.7.1/
CFLAGS="-L$ROOT/out/x86 -I$ROOT/out/x86/include" CPPFLAGS=-I$ROOT/out/x86/include LDFLAGS=-L$ROOT/out/x86/lib LD_LIBRARY_PATH="$ROOT/out/x86/lib:$LD_LIBRARY_PATH" ./configure --prefix=$ROOT/nettle-out/x86 --disable-openssl --enable-shared && make && make install
cd ..; mv nettle-2.7.1 nettle-2.7.1.x86
tar -xf nettle-2.7.1.tar.gz; cd nettle-2.7.1/
CFLAGS="-L$ROOT/out/arm -mcpu=arm926ej-s -mthumb" CPPFLAGS=-I$ROOT/out/arm/include LDFLAGS=-L$ROOT/out/arm/lib ./configure --prefix=$ROOT/nettle-out/arm --disable-openssl --enable-shared --host=arm-none-linux-gnueabi && make && make install
cd ..; mv nettle-2.7.1 nettle-2.7.1.arm
cp -R $ROOT/nettle-out/* $ROOT/out
tar -xf gnutls-3.2.2.tar.xz; cd gnutls-3.2.2/
CFLAGS="-L$ROOT/out/x86 -I$ROOT/out/x86/include" NETTLE_CFLAGS="-I$ROOT/out/x86/include/nettle" NETTLE_LIBS="-lnettle" HOGWEED_CFLAGS="-I$ROOT/out/x86/include/nettle" HOGWEED_LIBS="-lhogweed" CPPFLAGS=-I$ROOT/out/x86/include LDFLAGS=-L$ROOT/out/x86/lib LD_LIBRARY_PATH="$ROOT/out/x86/lib:$LD_LIBRARY_PATH" ./configure --with-libz-prefix="$ROOT/out/x86/" --prefix=$ROOT/gnutls-out/x86 --enable-threads=posix --with-sysroot=$ROOT/out/x86 && make
make install # "make" fails because my system lacks makeinfo from texinfo package, but software builds correctly so I just ignore that error
cd ..; mv gnutls-3.2.2 gnutls-3.2.2.x86
tar -xf gnutls-3.2.2.tar.xz; cd gnutls-3.2.2/
CFLAGS="-L$ROOT/out/arm -mcpu=arm926ej-s -mthumb" NETTLE_CFLAGS="-I$ROOT/out/arm/include/nettle" NETTLE_LIBS="-lnettle" HOGWEED_CFLAGS="-I$ROOT/out/arm/include/nettle" HOGWEED_LIBS="-lhogweed" CPPFLAGS=-I$ROOT/out/arm/include LDFLAGS=-L$ROOT/out/arm/lib ./configure --with-libz-prefix="$ROOT/out/arm/" --prefix=$ROOT/gnutls-out/arm --enable-threads=posix --with-sysroot=$ROOT/out/arm --host=arm-none-linux-gnueabi && make
make install # same as above
cd ..; mv gnutls-3.2.2 gnutls-3.2.2.arm
cp -R $ROOT/gnutls-out/* $ROOT/out