I am trying to compile Indri 5.9 (downloaded from http://sourceforge.net/projects/lemur/) on Ubuntu 14.04 LTS using VirtualBox, but after "env CPP=/usr/bin/cpp CXX=/usr/bin/g++ ./configure" and when I "make", I got a problem: ator.cpp:216:undefined reference to 'gzopen'. I already installed zlib1g0dev by "sudo apt-get install zlib1g-dev", and according to Compilation problems with ZLIB it seems I have to add "-lz" at the end of "-o". However, this is my Makefile:
-include MakeDefns
INSTALLDIRS = $(bindir) $(includedir) $(pkgincludedir) $(includedir)/lemur $(libdir) $(pkgdatadir) $(pkgdatadir)/doc
.PHONY: all dist clean install $(INSTALLDIRS) site-search
all:
$(MAKE) -C contrib
$(MAKE) -C obj -f ../src/Makefile
ifeq ($(WITH_SWIG), 1)
$(MAKE) -C swig/src
endif
$(MAKE) -C buildindex
$(MAKE) -C runquery
$(MAKE) -C indrid
$(MAKE) -C dumpindex
$(MAKE) -C harvestlinks
$(MAKE) -C pagerank
$(MAKE) -C rmodel
$(MAKE) -C makeprior
$(MAKE) -C site-search
$(MAKE) -C modifyfields
$(MAKE) -C clarity
$(MAKE) -C reformulate
$(INSTALLDIRS):
$(INSTALL_DIR) $#
clean:
$(MAKE) clean -C contrib
$(MAKE) clean -C obj -f ../src/Makefile
ifeq ($(WITH_SWIG), 1)
$(MAKE) clean -C swig/src
endif
$(MAKE) clean -C buildindex
$(MAKE) clean -C runquery
$(MAKE) clean -C indrid
$(MAKE) clean -C dumpindex
$(MAKE) clean -C harvestlinks
$(MAKE) clean -C pagerank
$(MAKE) clean -C rmodel
$(MAKE) clean -C makeprior
$(MAKE) -C site-search clean
$(MAKE) -C modifyfields clean
$(MAKE) -C clarity clean
$(MAKE) -C reformulate clean
rm -f depend/*
distclean: clean
rm -rf autom4te.cache MakeDefns Makefile.app config.log config.status indri.ncb indri.suo
dist: distclean
$(MAKE) stamp -C obj -f ../src/Makefile
cd ..; tar zcvf indri-`date +%Y%m%d-%H%M`.tar.gz indri
install: $(INSTALLDIRS)
rm -f $(libdir)/$(INDRILIB)
$(MAKE) install -C contrib
$(MAKE) install -C obj -f ../src/Makefile
ifeq ($(WITH_SWIG), 1)
$(MAKE) install -C swig/src
endif
$(MAKE) install -C buildindex
$(MAKE) install -C runquery
$(MAKE) install -C indrid
$(MAKE) install -C dumpindex
$(MAKE) install -C harvestlinks
$(MAKE) install -C pagerank
$(MAKE) install -C rmodel
$(MAKE) install -C makeprior
$(MAKE) install -C modifyfields
$(MAKE) install -C clarity
$(MAKE) install -C reformulate
$(MAKE) install -C doc
$(MAKE) -C site-search install
$(INSTALL_DATA) Makefile.app $(pkgdatadir)
test:
And this is MakeDefns:
SHELL = /bin/bash
host_os = linux-gnu
srcdir = .
top_srcdir = .
prefix = /usr/local
exec_prefix = ${prefix}
bindir = ${exec_prefix}/bin
sbindir = ${exec_prefix}/sbin
libexecdir = ${exec_prefix}/libexec
datadir = ${datarootdir}
sysconfdir = ${prefix}/etc
sharedstatedir = ${prefix}/com
localstatedir = ${prefix}/var
libdir = ${exec_prefix}/lib
infodir = ${datarootdir}/info
mandir = ${datarootdir}/man
includedir = ${prefix}/include
datarootdir = ${prefix}/share
oldincludedir = /usr/include
pkgdatadir = $(datadir)/indri
pkglibdir = $(libdir)/indri
pkgincludedir = $(includedir)/indri
top_builddir = .
AR = /usr/bin/ar
CC = gcc
GCC_33 = 0
CXX = /usr/bin/g++
LEX = :
INSTALL = /usr/bin/install -c
INSTALL_DATA = ${INSTALL} -m 644
INSTALL_PROGRAM = ${INSTALL}
INSTALL_DIR = ${INSTALL} -m 755 -d
JAVAC =
JAR =
JAVAINC =
JAVADOC =
JAVAHOME =
NEED_ANTLR = 1
SWIG =
PHP_SHARED = -shared
JAVA_SHARED = -shared
CSHARP_SHARED = -shared
PHP_SO = .so
JAVA_SO = .so
CSHARP_SO = .so
PHPINCLUDE =
MCS=
DEPENDENCIES = lemur xpdf
ifeq ($(NEED_ANTLR), 1)
DEPENDENCIES += antlr
endif
PACKAGE = indri
VERSION = 5.8
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
INDRI_STANDALONE = 1
INDRILIB = lib$(PACKAGE).a
WITH_SWIG = 0
WITH_JAVA = 0
WITH_PHP = 0
WITH_CSHARP = 0
# C++ source files
CPPSRC1 = $(notdir $(wildcard ../src/*.cpp))
CPPSRC2 = $(notdir $(wildcard ../src/*.cc))
CPPSRC3 = $(notdir $(wildcard ../src/*.C))
# C source files
CSRC = $(notdir $(wildcard ../src/*.c))
# flex source files
FSRC = $(notdir $(wildcard ../src/*.l))
# Flex objects
FCPP = $(filter-out $(CPPSRC1), $(FSRC:.l=.cpp))
CPPSRC = $(CPPSRC1) $(CPPSRC3) $(CPPSRC3) $(FCPP)
.SECONDARY: $($(wildcard ../src/*.l).l=.cpp)
# All header files
ALLHEADER = $(wildcard ../include/indri/*.h*)
# Include path
INCPATH = -I../include $(patsubst %, -I../contrib/%/include, $(DEPENDENCIES))
ALLINCPATH = $(INCPATH)
# C++ objects
CPPOBJ = $(CPPSRC:.cpp=.o) $(CPPSRC2:.cc=.o) $(CPPSRC3:.C=.o)
# C objects
COBJ = $(CSRC:.c=.o)
# all objects
OBJ = $(CPPOBJ) $(COBJ)
# application makefiles should set SHARED=
# (see buildindex/Makefile
SHARED = -shared -fPIC
# C compiler and compiling options
# C++ compiler and compiling/linking options
CFLAGS = -DPACKAGE_NAME=\"Indri\" -DPACKAGE_TARNAME=\"indri\" -DPACKAGE_VERSION=\"5.8\" -DPACKAGE_STRING=\"Indri\ 5.8\" -DPACKAGE_BUGREPORT=\"project#lemurproject.org\" -DINDRI_STANDALONE=1 -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -DHAVE_NAMESPACES=/\*\*/ -DISNAN_IN_NAMESPACE_STD=/\*\*/ -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FSEEKO=1 -DHAVE_EXT_ATOMICITY_H=1 -DP_NEEDS_GNU_CXX_NAMESPACE=1 -DHAVE_MKSTEMP=1 -DHAVE_MKSTEMPS=1 -DNDEBUG=1 -g -O3 $(INCPATH) $(SHARED)
CXXFLAGS = -DPACKAGE_NAME=\"Indri\" -DPACKAGE_TARNAME=\"indri\" -DPACKAGE_VERSION=\"5.8\" -DPACKAGE_STRING=\"Indri\ 5.8\" -DPACKAGE_BUGREPORT=\"project#lemurproject.org\" -DINDRI_STANDALONE=1 -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -DHAVE_NAMESPACES=/\*\*/ -DISNAN_IN_NAMESPACE_STD=/\*\*/ -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FSEEKO=1 -DHAVE_EXT_ATOMICITY_H=1 -DP_NEEDS_GNU_CXX_NAMESPACE=1 -DHAVE_MKSTEMP=1 -DHAVE_MKSTEMPS=1 -DNDEBUG=1 -g -O3 $(INCPATH) $(SHARED)
CXXFLAGS_NOOPT = -DPACKAGE_NAME=\"Indri\" -DPACKAGE_TARNAME=\"indri\" -DPACKAGE_VERSION=\"5.8\" -DPACKAGE_STRING=\"Indri\ 5.8\" -DPACKAGE_BUGREPORT=\"project#lemurproject.org\" -DINDRI_STANDALONE=1 -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -DHAVE_NAMESPACES=/\*\*/ -DISNAN_IN_NAMESPACE_STD=/\*\*/ -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FSEEKO=1 -DHAVE_EXT_ATOMICITY_H=1 -DP_NEEDS_GNU_CXX_NAMESPACE=1 -DHAVE_MKSTEMP=1 -DHAVE_MKSTEMPS=1 -DNDEBUG=1 -g $(INCPATH) $(SHARED)
CPPLDFLAGS = -lpthread -lm
ifeq ($(STYLE),release)
CFLAGS = -DPACKAGE_NAME=\"Indri\" -DPACKAGE_TARNAME=\"indri\" -DPACKAGE_VERSION=\"5.8\" -DPACKAGE_STRING=\"Indri\ 5.8\" -DPACKAGE_BUGREPORT=\"project#lemurproject.org\" -DINDRI_STANDALONE=1 -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -DHAVE_NAMESPACES=/\*\*/ -DISNAN_IN_NAMESPACE_STD=/\*\*/ -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FSEEKO=1 -DHAVE_EXT_ATOMICITY_H=1 -DP_NEEDS_GNU_CXX_NAMESPACE=1 -DHAVE_MKSTEMP=1 -DHAVE_MKSTEMPS=1 -DNDEBUG=1 -DNDEBUG -g -O3 $(INCPATH) $(SHARED)
CXXFLAGS = -DPACKAGE_NAME=\"Indri\" -DPACKAGE_TARNAME=\"indri\" -DPACKAGE_VERSION=\"5.8\" -DPACKAGE_STRING=\"Indri\ 5.8\" -DPACKAGE_BUGREPORT=\"project#lemurproject.org\" -DINDRI_STANDALONE=1 -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -DHAVE_NAMESPACES=/\*\*/ -DISNAN_IN_NAMESPACE_STD=/\*\*/ -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FSEEKO=1 -DHAVE_EXT_ATOMICITY_H=1 -DP_NEEDS_GNU_CXX_NAMESPACE=1 -DHAVE_MKSTEMP=1 -DHAVE_MKSTEMPS=1 -DNDEBUG=1 -DNDEBUG -g -O3 $(INCPATH) $(SHARED)
CPPLDFLAGS = -lpthread -lm
endif
ifeq ($(STYLE),profile)
CFLAGS=-g -pg $(INCPATH)
CXXFLAGS=-g -pg $(INCPATH)
endif
# generating C++ with flex
../src/%.cpp: ../src/%.l
$(LEX) -8 -Cf -o$# $<
I am new to Makefile, so could anyone help me on how to add "-lz" to it? Or any other suggestions for compiling Indri 5.9. Thanks a lot!
Related
I am trying to use Qt to make my cpp codes nicer to use. So I exploited the qmake -project to subsequently generate a Makefile. Nevertheless even with the simplest example, when executing the main.o file obtaining by typing make, I am getting bash: ./main.o: cannot execute binary file: Exec format error.
So I looked on the internet, and this problem is often related to architecture incompatibilities. That's why I exploited file main.o and uname -a commands in terminal. To my surprise, they respectively returned:
main.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), not stripped
Linux mario-Inspiron-7577 4.15.0-64-generic #73-Ubuntu SMP Thu Sep 12 13:16:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Which to me doesn't seem to be conflicting. Am I missing out on something huge? What could I do to make it run smoothly?
If it can be of any help as suggested by #NathanOliver, here is my Makefile, generated with qmake:
#############################################################################
# Makefile for building: QTexample
# Generated by qmake (3.1) (Qt 5.9.5)
# Project: QTexample.pro
# Template: app
# Command: /home/mario/anaconda3/bin/qmake -o Makefile QTexample.pro
#############################################################################
MAKEFILE = Makefile
####### Compiler, tools and options
CC = gcc
CXX = g++
DEFINES = -DQT_DEPRECATED_WARNINGS -DQT_NO_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB
CFLAGS = -pipe -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES)
CXXFLAGS = -pipe -O2 -Wall -W -D_REENTRANT -fPIC $(DEFINES)
INCPATH = -I. -I. -I../../anaconda3/include/qt -I../../anaconda3/include/qt/QtWidgets -I../../anaconda3/include/qt/QtGui -I../../anaconda3/include/qt/QtCore -I. -I../../anaconda3/mkspecs/linux-g++
QMAKE = /home/mario/anaconda3/bin/qmake
DEL_FILE = rm -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
COPY = cp -f
COPY_FILE = cp -f
COPY_DIR = cp -f -R
INSTALL_FILE = install -m 644 -p
INSTALL_PROGRAM = install -m 755 -p
INSTALL_DIR = cp -f -R
QINSTALL = /home/mario/anaconda3/bin/qmake -install qinstall
QINSTALL_PROGRAM = /home/mario/anaconda3/bin/qmake -install qinstall -exe
DEL_FILE = rm -f
SYMLINK = ln -f -s
DEL_DIR = rmdir
MOVE = mv -f
TAR = tar -cf
COMPRESS = gzip -9f
DISTNAME = QTexample1.0.0
DISTDIR = /home/mario/Tools/QTexample/.tmp/QTexample1.0.0
LINK = g++
LFLAGS = -Wl,-O1 -Wl,-rpath,/home/mario/anaconda3/lib
LIBS = $(SUBLIBS) -L/home/mario/anaconda3/lib -lQt5Widgets -lQt5Gui -lQt5Core -lGL -lpthread
AR = ar cqs
RANLIB =
SED = sed
STRIP = strip
####### Output directory
OBJECTS_DIR = ./
####### Files
SOURCES = main.cpp
OBJECTS = main.o
DIST = ../../anaconda3/mkspecs/features/spec_pre.prf \
../[...]
QTexample.pro main.cpp
QMAKE_TARGET = QTexample
DESTDIR =
TARGET = QTexample
first: all
####### Build rules
$(TARGET): $(OBJECTS)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
Makefile: QTexample.pro ../../anaconda3/mkspecs/linux-g++/qmake.conf ../../anaconda3/mkspecs/features/spec_pre.prf \[...]
qmake: FORCE
#$(QMAKE) -o Makefile QTexample.pro
qmake_all: FORCE
all: Makefile $(TARGET)
dist: distdir FORCE
(cd `dirname $(DISTDIR)` && $(TAR) $(DISTNAME).tar $(DISTNAME) && $(COMPRESS) $(DISTNAME).tar) && $(MOVE) `dirname $(DISTDIR)`/$(DISTNAME).tar.gz . && $(DEL_FILE) -r $(DISTDIR)
distdir: FORCE
#test -d $(DISTDIR) || mkdir -p $(DISTDIR)
$(COPY_FILE) --parents $(DIST) $(DISTDIR)/
$(COPY_FILE) --parents ../../anaconda3/mkspecs/features/data/dummy.cpp $(DISTDIR)/
$(COPY_FILE) --parents main.cpp $(DISTDIR)/
clean: compiler_clean
-$(DEL_FILE) $(OBJECTS)
-$(DEL_FILE) *~ core *.core
distclean: clean
-$(DEL_FILE) $(TARGET)
-$(DEL_FILE) .qmake.stash
-$(DEL_FILE) Makefile
####### Sub-libraries
mocclean: compiler_moc_header_clean compiler_moc_source_clean
mocables: compiler_moc_header_make_all compiler_moc_source_make_all
check: first
benchmark: first
compiler_rcc_make_all:
compiler_rcc_clean:
compiler_moc_predefs_make_all: moc_predefs.h
compiler_moc_predefs_clean:
-$(DEL_FILE) moc_predefs.h
moc_predefs.h: ../../anaconda3/mkspecs/features/data/dummy.cpp
g++ -pipe -O2 -Wall -W -dM -E -o moc_predefs.h ../../anaconda3/mkspecs/features/data/dummy.cpp
compiler_moc_header_make_all:
compiler_moc_header_clean:
compiler_moc_source_make_all:
compiler_moc_source_clean:
compiler_uic_make_all:
compiler_uic_clean:
compiler_yacc_decl_make_all:
compiler_yacc_decl_clean:
compiler_yacc_impl_make_all:
compiler_yacc_impl_clean:
compiler_lex_make_all:
compiler_lex_clean:
compiler_clean: compiler_moc_predefs_clean
####### Compile
main.o: main.cpp ../../anaconda3/include/qt/QtWidgets/qapplication.h \[...]
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o main.o main.cpp
#####
main: $(OBJS) $(CXX) $(LDFLAGS) -o main $(OBJS) $(LDLIBS)
####### Install
install: FORCE
uninstall: FORCE
FORCE:
I tried to cross-compile the following code:
//test.cpp
#include <QApplication>
#include <QWidget>
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
QWidget window;
window.resize(250, 150);
window.setWindowTitle("Test");
window.show();
return app.exec();
}
following those instructions: Building Qt 5 on Linux, for Windows. I downloaded and built the source, created a Makefile and tried to build my project. after getting lot of undefined reference errors, I changed the includes to
#include "/home/administrator/mxe/usr/i686-w64-mingw32.static/qt5/include/QtWidgets/QApplication"
#include "/home/administrator/mxe/usr/i686-w64-mingw32.static/qt5/include/QtWidgets/QWidget"
and changed some paths in the Makefiles. But I am still getting lots of errors:
make
make -f Makefile.Release
make[1] : on entre dans le répertoire « /home/administrator/louis/buildwin »
/home/administrator/mxe/usr/bin/i686-w64-mingw32.static-g++ -c -pipe -fno-keep-inline-dllexport -O2 -std=gnu++11 -frtti -Wall -Wextra -fexceptions -mthreads -DUNICODE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN -I. -I. -I../../mxe/usr/i686-w64-mingw32.static/qt5/include -I../../mxe/usr/i686-w64-mingw32.static/qt5/include/QtGui -I../../mxe/usr/i686-w64-mingw32.static/qt5/include/QtCore -Irelease -I../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/win32-g++ -o release/test.o test.cpp
/home/administrator/mxe/usr/bin/i686-w64-mingw32.static-g++ -Wl,-s -Wl,-subsystem,windows -mthreads -o release/buildwin.exe release/test.o release/buildwin_plugin_import.o -lglu32 -lmingw32 -L/home/administrator/mxe/usr/i686-w64-mingw32.static/qt5/lib /home/administrator/mxe/usr/i686-w64-mingw32.static/qt5/lib/libqtmain.a -L/home/administrator/mxe/usr/i686-w64-mingw32.static/lib -L/home/administrator/mxe/usr/i686-w64-mingw32.static/lib -L/home/administrator/mxe/usr/i686-w64-mingw32.static/qt5/plugins/platforms /home/administrator/mxe/usr/i686-w64-mingw32.static/qt5/plugins/platforms/libqwindows.a -lwinspool /home/administrator/mxe/usr/i686-w64-mingw32.static/qt5/lib/libQt5PlatformSupport.a /home/administrator/mxe/usr/i686-w64-mingw32.static/qt5/lib/libQt5DBus.a -ldbus-1 -liphlpapi -ldbghelp -lnetapi32 -L/home/administrator/mxe/usr/i686-w64-mingw32.static/qt5/plugins/imageformats /home/administrator/mxe/usr/i686-w64-mingw32.static/qt5/plugins/imageformats/libqico.a /home/administrator/mxe/usr/i686-w64-mingw32.static/qt5/lib/libQt5Gui.a -lcomdlg32 -loleaut32 -limm32 -lopengl32 -ljpeg -lharfbuzz -lcairo -lgobject-2.0 -lfontconfig -lusp10 -lmsimg32 -lgdi32 -lpixman-1 -lffi -lexpat -lfreetype -lbz2 -lharfbuzz_too -lglib-2.0 -lwinmm -lshlwapi -lpcre -lintl -liconv -lpng16 /home/administrator/mxe/usr/i686-w64-mingw32.static/qt5/lib/libQt5Core.a -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -lmpr -lz -lpcre16
release/test.o:test.cpp:(.text+0x52): undefined reference to `QApplication::QApplication(int&, char**, int)'
release/test.o:test.cpp:(.text+0x73): undefined reference to `QWidget::QWidget(QWidget*, QFlags<Qt::WindowType>)'
release/test.o:test.cpp:(.text+0x99): undefined reference to `QWidget::resize(QSize const&)'
release/test.o:test.cpp:(.text+0xc8): undefined reference to `QWidget::setWindowTitle(QString const&)'
release/test.o:test.cpp:(.text+0xee): undefined reference to `QWidget::show()'
release/test.o:test.cpp:(.text+0xf3): undefined reference to `QApplication::exec()'
release/test.o:test.cpp:(.text+0xfe): undefined reference to `QWidget::~QWidget()'
release/test.o:test.cpp:(.text+0x106): undefined reference to `QApplication::~QApplication()'
release/test.o:test.cpp:(.text+0x177): undefined reference to `QWidget::~QWidget()'
release/test.o:test.cpp:(.text+0x17f): undefined reference to `QApplication::~QApplication()'
collect2: error: ld returned 1 exit status
Makefile.Release:62 : la recette pour la cible « release/buildwin.exe » a échouée
make[1]: *** [release/buildwin.exe] Erreur 1
make[1] : on quitte le répertoire « /home/administrator/louis/buildwin »
Makefile:34 : la recette pour la cible « release » a échouée
make: *** [release] Erreur 2
Those are the Makefiles. I only modified a few paths
in Makefile:
# Makefile for building: buildwin
# Generated by qmake (3.0) (Qt 5.7.1)
# Project: buildwin.pro
# Template: app
# Command: /home/administrator/mxe/usr/bin/i686-w64-mingw32.static-qmake-qt5 -o Makefile buildwin.pro
MAKEFILE = Makefile
first: release
install: release-install
uninstall: release-uninstall
QMAKE = /home/administrator/mxe/usr/bin/i686-w64-mingw32.static-qmake-qt5
DEL_FILE = rm -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
COPY = cp -f
COPY_FILE = cp -f
COPY_DIR = cp -f -R
INSTALL_FILE = install -m 644 -p
INSTALL_PROGRAM = install -m 755 -p
INSTALL_DIR = cp -f -R
DEL_FILE = rm -f
SYMLINK = ln -f -s
DEL_DIR = rmdir
MOVE = mv -f
SUBTARGETS = \
release \
debug
release: FORCE
$(MAKE) -f $(MAKEFILE).Release
release-make_first: FORCE
$(MAKE) -f $(MAKEFILE).Release
release-all: FORCE
$(MAKE) -f $(MAKEFILE).Release all
release-clean: FORCE
$(MAKE) -f $(MAKEFILE).Release clean
release-distclean: FORCE
$(MAKE) -f $(MAKEFILE).Release distclean
release-install: FORCE
$(MAKE) -f $(MAKEFILE).Release install
release-uninstall: FORCE
$(MAKE) -f $(MAKEFILE).Release uninstall
debug: FORCE
$(MAKE) -f $(MAKEFILE).Debug
debug-make_first: FORCE
$(MAKE) -f $(MAKEFILE).Debug
debug-all: FORCE
$(MAKE) -f $(MAKEFILE).Debug all
debug-clean: FORCE
$(MAKE) -f $(MAKEFILE).Debug clean
debug-distclean: FORCE
$(MAKE) -f $(MAKEFILE).Debug distclean
debug-install: FORCE
$(MAKE) -f $(MAKEFILE).Debug install
debug-uninstall: FORCE
$(MAKE) -f $(MAKEFILE).Debug uninstall
Makefile: buildwin.pro ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/win32-g++/qmake.conf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/spec_pre.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/qdevice.pri \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/device_config.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/common/angle.conf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/qconfig.pri \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_concurrent.pri \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_concurrent_private.pri \
###I shortened here to fit the 30k limit...
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_qwindows.pri \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_windowsprintersupport.pri \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/qt_functions.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/qt_config.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/win32/qt_config.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/win32-g++/qmake.conf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/spec_post.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/exclusive_builds.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/toolchain.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/default_pre.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/win32/default_pre.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/resolve_config.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/exclusive_builds_post.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/default_post.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/win32/rtti.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/precompile_header.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/warn_on.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/qt.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/resources.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/moc.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/win32/opengl.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/file_copies.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/win32/windows.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/testcase_targets.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/exceptions.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/yacc.prf \
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/lex.prf \
buildwin.pro \
../../mxe/usr/i686-w64-mingw32.static/qt5/lib/qtmain.prl \
../../mxe/usr/i686-w64-mingw32.static/qt5/lib/Qt5Gui.prl \
../../mxe/usr/i686-w64-mingw32.static/qt5/lib/Qt5Core.prl \
../../mxe/usr/i686-w64-mingw32.static/qt5/plugins/platforms/qwindows.prl \
../../mxe/usr/i686-w64-mingw32.static/qt5/plugins/imageformats/qico.prl
$(QMAKE) -o Makefile buildwin.pro
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/spec_pre.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/qdevice.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/device_config.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/common/angle.conf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/qconfig.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_concurrent.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_concurrent_private.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_core.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_core_private.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_dbus.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_dbus_private.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_gui.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_gui_private.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_network.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_network_private.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_opengl.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_opengl_private.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_openglextensions.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_platformsupport_private.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_printsupport.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_printsupport_private.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_sql.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_sql_private.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_testlib.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_testlib_private.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_widgets.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_widgets_private.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_xml.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_xml_private.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_zlib_private.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_qgenericbearer.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_qico.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_qminimal.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_qnativewifibearer.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_qsqlite.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_qsqlmysql.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_qsqlodbc.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_qsqlpsql.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_qsqltds.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_qtuiotouchplugin.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_qwindows.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_windowsprintersupport.pri:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/qt_functions.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/qt_config.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/win32/qt_config.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/win32-g++/qmake.conf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/spec_post.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/exclusive_builds.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/toolchain.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/default_pre.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/win32/default_pre.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/resolve_config.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/exclusive_builds_post.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/default_post.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/win32/rtti.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/precompile_header.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/warn_on.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/qt.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/resources.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/moc.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/win32/opengl.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/file_copies.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/win32/windows.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/testcase_targets.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/exceptions.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/yacc.prf:
../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/lex.prf:
buildwin.pro:
../../mxe/usr/i686-w64-mingw32.static/qt5/lib/qtmain.prl:
../../mxe/usr/i686-w64-mingw32.static/qt5/lib/Qt5Gui.prl:
../../mxe/usr/i686-w64-mingw32.static/qt5/lib/Qt5Core.prl:
../../mxe/usr/i686-w64-mingw32.static/qt5/plugins/platforms/qwindows.prl:
../../mxe/usr/i686-w64-mingw32.static/qt5/plugins/imageformats/qico.prl:
qmake: FORCE
#$(QMAKE) -o Makefile buildwin.pro
qmake_all: FORCE
make_first: release-make_first debug-make_first FORCE
all: release-all debug-all FORCE
clean: release-clean debug-clean FORCE
distclean: release-distclean debug-distclean FORCE
-$(DEL_FILE) Makefile
-$(DEL_FILE) /home/administrator/louis/buildwin/buildwin_plugin_import.cpp
release-mocclean:
$(MAKE) -f $(MAKEFILE).Release mocclean
debug-mocclean:
$(MAKE) -f $(MAKEFILE).Debug mocclean
mocclean: release-mocclean debug-mocclean
release-mocables:
$(MAKE) -f $(MAKEFILE).Release mocables
debug-mocables:
$(MAKE) -f $(MAKEFILE).Debug mocables
mocables: release-mocables debug-mocables
check: first
benchmark: first
FORCE:
$(MAKEFILE).Release: Makefile
$(MAKEFILE).Debug: Makefile
in Makefile.Release:
# Makefile for building: buildwin
# Generated by qmake (3.0) (Qt 5.7.1)
# Project: buildwin.pro
# Template: app
MAKEFILE = Makefile.Release
## Compiler, tools and options
CC = /home/administrator/mxe/usr/bin/i686-w64-mingw32.static-gcc
CXX = /home/administrator/mxe/usr/bin/i686-w64-mingw32.static-g++
DEFINES = -DUNICODE -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_NEEDS_QMAIN
CFLAGS = -pipe -fno-keep-inline-dllexport -O2 -Wall -Wextra $(DEFINES)
CXXFLAGS = -pipe -fno-keep-inline-dllexport -O2 -std=gnu++11 -frtti -Wall -Wextra -fexceptions -mthreads $(DEFINES)
INCPATH = -I. -I. -I../../mxe/usr/i686-w64-mingw32.static/qt5/include -I../../mxe/usr/i686-w64-mingw32.static/qt5/include/QtGui -I../../mxe/usr/i686-w64-mingw32.static/qt5/include/QtCore -Irelease -I../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/win32-g++
LINKER = /home/administrator/mxe/usr/bin/i686-w64-mingw32.static-g++
LFLAGS = -Wl,-s -Wl,-subsystem,windows -mthreads
LIBS = -lglu32 -lmingw32 -L/home/administrator/mxe/usr/i686-w64-mingw32.static/qt5/lib /home/administrator/mxe/usr/i686-w64-mingw32.static/qt5/lib/libqtmain.a -L/home/administrator/mxe/usr/i686-w64-mingw32.static/lib -L/home/administrator/mxe/usr/i686-w64-mingw32.static/lib -L/home/administrator/mxe/usr/i686-w64-mingw32.static/qt5/plugins/platforms /home/administrator/mxe/usr/i686-w64-mingw32.static/qt5/plugins/platforms/libqwindows.a -lwinspool /home/administrator/mxe/usr/i686-w64-mingw32.static/qt5/lib/libQt5PlatformSupport.a /home/administrator/mxe/usr/i686-w64-mingw32.static/qt5/lib/libQt5DBus.a -ldbus-1 -liphlpapi -ldbghelp -lnetapi32 -L/home/administrator/mxe/usr/i686-w64-mingw32.static/qt5/plugins/imageformats /home/administrator/mxe/usr/i686-w64-mingw32.static/qt5/plugins/imageformats/libqico.a /home/administrator/mxe/usr/i686-w64-mingw32.static/qt5/lib/libQt5Gui.a -lcomdlg32 -loleaut32 -limm32 -lopengl32 -ljpeg -lharfbuzz -lcairo -lgobject-2.0 -lfontconfig -lusp10 -lmsimg32 -lgdi32 -lpixman-1 -lffi -lexpat -lfreetype -lbz2 -lharfbuzz_too -lglib-2.0 -lwinmm -lshlwapi -lpcre -lintl -liconv -lpng16 /home/administrator/mxe/usr/i686-w64-mingw32.static/qt5/lib/libQt5Core.a -lole32 -luuid -lws2_32 -ladvapi32 -lshell32 -luser32 -lkernel32 -lmpr -lz -lpcre16
QMAKE = /home/administrator/mxe/usr/bin/i686-w64-mingw32.static-qmake-qt5
IDC = idc
IDL = midl
ZIP =
DEF_FILE =
RES_FILE =
COPY = cp -f
SED = sed
COPY_FILE = cp -f
COPY_DIR = cp -f -R
DEL_FILE = rm -f
DEL_DIR = rmdir
MOVE = mv -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
INSTALL_FILE = install -m 644 -p
INSTALL_PROGRAM = install -m 755 -p
INSTALL_DIR = cp -f -R
### Output directory
OBJECTS_DIR = release/
### Files
SOURCES = test.cpp /home/administrator/louis/buildwin/buildwin_plugin_import.cpp
OBJECTS = release/test.o \
release/buildwin_plugin_import.o
DIST = test.cpp
QMAKE_TARGET = buildwin
DESTDIR = release/ #avoid trailing-slash linebreak
TARGET = buildwin.exe
DESTDIR_TARGET = release/buildwin.exe
## Build rules
first: all
all: Makefile.Release $(DESTDIR_TARGET)
$(DESTDIR_TARGET): /home/administrator/mxe/usr/i686-w64-mingw32.static/qt5/lib/libQt5Gui.a /home/administrator/mxe/usr/i686-w64-mingw32.static/qt5/lib/libQt5Core.a $(OBJECTS)
$(LINKER) $(LFLAGS) -o $(DESTDIR_TARGET) $(OBJECTS) $(LIBS)
qmake: FORCE
#$(QMAKE) -o Makefile.Release buildwin.pro
qmake_all: FORCE
dist:
$(ZIP) buildwin.zip $(SOURCES) $(DIST) buildwin.pro ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/spec_pre.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/qdevice.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/device_config.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/common/angle.conf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/qconfig.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_bootstrap_private.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_concurrent.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_concurrent_private.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_core.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_core_private.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_dbus.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_dbus_private.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_gui.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_gui_private.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_network.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_network_private.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_opengl.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_opengl_private.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_openglextensions.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_openglextensions_private.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_platformsupport_private.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_printsupport.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_printsupport_private.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_sql.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_sql_private.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_testlib.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_testlib_private.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_widgets.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_widgets_private.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_xml.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_xml_private.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_lib_zlib_private.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_qgenericbearer.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_qico.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_qminimal.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_qnativewifibearer.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_qsqlite.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_qsqlmysql.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_qsqlodbc.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_qsqlpsql.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_qsqltds.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_qtuiotouchplugin.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_qwindows.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/modules/qt_plugin_windowsprintersupport.pri ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/qt_functions.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/qt_config.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/win32/qt_config.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/win32-g++/qmake.conf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/spec_post.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/exclusive_builds.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/toolchain.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/default_pre.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/win32/default_pre.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/resolve_config.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/exclusive_builds_post.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/default_post.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/build_pass.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/win32/rtti.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/precompile_header.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/warn_on.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/qt.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/resources.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/moc.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/win32/opengl.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/file_copies.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/win32/windows.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/testcase_targets.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/exceptions.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/yacc.prf ../../mxe/usr/i686-w64-mingw32.static/qt5/mkspecs/features/lex.prf buildwin.pro ../../mxe/usr/i686-w64-mingw32.static/qt5/lib/qtmain.prl ../../mxe/usr/i686-w64-mingw32.static/qt5/lib/Qt5Gui.prl ../../mxe/usr/i686-w64-mingw32.static/qt5/lib/Qt5Core.prl ../../mxe/usr/i686-w64-mingw32.static/qt5/plugins/platforms/qwindows.prl ../../mxe/usr/i686-w64-mingw32.static/qt5/plugins/imageformats/qico.prl NO_PCH_SOURCES RESOURCES HEADERS SOURCES OBJECTIVE_SOURCES YACCSOURCES YACCSOURCES LEXSOURCES
clean: compiler_clean
-$(DEL_FILE) release/test.o release/buildwin_plugin_import.o
distclean: clean
-$(DEL_FILE) /home/administrator/louis/buildwin/buildwin_plugin_import.cpp
-$(DEL_FILE) $(DESTDIR_TARGET)
-$(DEL_FILE) Makefile.Release
mocclean: compiler_moc_header_clean compiler_moc_source_clean
mocables: compiler_moc_header_make_all compiler_moc_source_make_all
check: first
benchmark: first
compiler_no_pch_compiler_make_all:
compiler_no_pch_compiler_clean:
compiler_rcc_make_all:
compiler_rcc_clean:
compiler_moc_header_make_all:
compiler_moc_header_clean:
compiler_moc_source_make_all:
compiler_moc_source_clean:
compiler_yacc_decl_make_all:
compiler_yacc_decl_clean:
compiler_yacc_impl_make_all:
compiler_yacc_impl_clean:
compiler_lex_make_all:
compiler_lex_clean:
compiler_clean:
####### Compile
release/test.o: test.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/test.o test.cpp
release/buildwin_plugin_import.o: /home/administrator/louis/buildwin/buildwin_plugin_import.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o release/buildwin_plugin_import.o /home/administrator/louis/buildwin/buildwin_plugin_import.cpp
####### Install
install: FORCE
uninstall: FORCE
FORCE:
Probably it is just a simple include mistake, or a wrong line in the makefiles
Thanks in advance for help
I am trying to install xgboost on Mac. I followed the instructions on github, but when I run make -j4 I get an error:
c++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -DDISABLE_OPENMP -o xgboost build/cli_main.o build/learner.o build/logging.o build/c_api/c_api.o build/c_api/c_api_error.o build/common/common.o build/data/data.o build/data/simple_csr_source.o build/data/simple_dmatrix.o build/data/sparse_page_dmatrix.o build/data/sparse_page_raw_format.o build/data/sparse_page_source.o build/data/sparse_page_writer.o build/gbm/gblinear.o build/gbm/gbm.o build/gbm/gbtree.o build/metric/elementwise_metric.o build/metric/metric.o build/metric/multiclass_metric.o build/metric/rank_metric.o build/objective/multiclass_obj.o build/objective/objective.o build/objective/rank_obj.o build/objective/regression_obj.o build/tree/tree_model.o build/tree/tree_updater.o build/tree/updater_colmaker.o build/tree/updater_histmaker.o build/tree/updater_prune.o build/tree/updater_refresh.o build/tree/updater_skmaker.o build/tree/updater_sync.o dmlc-core/libdmlc.a rabit/lib/librabit_empty.a -pthread -lm
ar crv lib/libxgboost.a
c++ -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude -Idmlc-core/include -Irabit/include -fPIC -DDISABLE_OPENMP -shared -o lib/libxgboost.so build/learner.o build/logging.o build/c_api/c_api.o build/c_api/c_api_error.o build/common/common.o build/data/data.o build/data/simple_csr_source.o build/data/simple_dmatrix.o build/data/sparse_page_dmatrix.o build/data/sparse_page_raw_format.o build/data/sparse_page_source.o build/data/sparse_page_writer.o build/gbm/gblinear.o build/gbm/gbm.o build/gbm/gbtree.o build/metric/elementwise_metric.o build/metric/metric.o build/metric/multiclass_metric.o build/metric/rank_metric.o build/objective/multiclass_obj.o build/objective/objective.o build/objective/rank_obj.o build/objective/regression_obj.o build/tree/tree_model.o build/tree/tree_updater.o build/tree/updater_colmaker.o build/tree/updater_histmaker.o build/tree/updater_prune.o build/tree/updater_refresh.o build/tree/updater_skmaker.o build/tree/updater_sync.o dmlc-core/libdmlc.a rabit/lib/librabit_empty.a -pthread -lm
ar: no archive members specified
usage: ar -d [-TLsv] archive file ...
ar -m [-TLsv] archive file ...
ar -m [-abiTLsv] position archive file ...
ar -p [-TLsv] archive [file ...]
ar -q [-cTLsv] archive file ...
ar -r [-cuTLsv] archive file ...
ar -r [-abciuTLsv] position archive file ...
ar -t [-TLsv] archive [file ...]
ar -x [-ouTLsv] archive [file ...]
make: *** [lib/libxgboost.a] Error 1
make: *** Waiting for unfinished jobs....
clang: warning: argument unused during compilation: '-pthread'
clang: warning: argument unused during compilation: '-pthread'
If I run just make (without -j4) I get:
$ make
ar crv lib/libxgboost.a
ar: no archive members specified
usage: ar -d [-TLsv] archive file ...
ar -m [-TLsv] archive file ...
ar -m [-abiTLsv] position archive file ...
ar -p [-TLsv] archive [file ...]
ar -q [-cTLsv] archive file ...
ar -r [-cuTLsv] archive file ...
ar -r [-abciuTLsv] position archive file ...
ar -t [-TLsv] archive [file ...]
ar -x [-ouTLsv] archive [file ...]
make: *** [lib/libxgboost.a] Error 1
Any idea what is causing this and how I can fix it?
Although I might be wrong I think is because archive utility ar on mac is too old (from 2005):
$ man ar
AR(1) BSD General Commands Manual AR(1)
NAME
ar -- create and maintain library archives
SYNOPSIS
...
...
Darwin July 27, 2005 Darwin
Any ideas how to update ar to the newest version on OS X?
Here is the makefile for your reference:
ifndef config
ifneq ("$(wildcard ./config.mk)","")
config = config.mk
else
config = make/config.mk
endif
endif
ifndef DMLC_CORE
DMLC_CORE = dmlc-core
endif
ifndef RABIT
RABIT = rabit
endif
ROOTDIR = $(CURDIR)
ifeq ($(OS), Windows_NT)
UNAME="Windows"
else
UNAME=$(shell uname)
endif
include $(config)
ifeq ($(USE_OPENMP), 0)
export NO_OPENMP = 1
endif
include $(DMLC_CORE)/make/dmlc.mk
# include the plugins
include $(XGB_PLUGINS)
# use customized config file
ifndef CC
export CC = $(if $(shell which gcc-5),gcc-5,gcc)
endif
ifndef CXX
export CXX = $(if $(shell which g++-5),g++-5,g++)
endif
export LDFLAGS= -pthread -lm $(ADD_LDFLAGS) $(DMLC_LDFLAGS) $(PLUGIN_LDFLAGS)
export CFLAGS= -std=c++0x -Wall -O3 -msse2 -Wno-unknown-pragmas -funroll-loops -Iinclude $(ADD_CFLAGS) $(PLUGIN_CFLAGS)
CFLAGS += -I$(DMLC_CORE)/include -I$(RABIT)/include
#java include path
export JAVAINCFLAGS = -I${JAVA_HOME}/include -I./java
ifndef LINT_LANG
LINT_LANG= "all"
endif
ifneq ($(UNAME), Windows)
CFLAGS += -fPIC
XGBOOST_DYLIB = lib/libxgboost.so
else
XGBOOST_DYLIB = lib/libxgboost.dll
endif
ifeq ($(UNAME), Linux)
LDFLAGS += -lrt
JAVAINCFLAGS += -I${JAVA_HOME}/include/linux
endif
ifeq ($(UNAME), Darwin)
JAVAINCFLAGS += -I${JAVA_HOME}/include/darwin
endif
ifeq ($(USE_OPENMP), 1)
CFLAGS += -fopenmp
else
CFLAGS += -DDISABLE_OPENMP
endif
# specify tensor path
.PHONY: clean all lint clean_all doxygen rcpplint pypack Rpack Rbuild Rcheck java
all: lib/libxgboost.a $(XGBOOST_DYLIB) xgboost
$(DMLC_CORE)/libdmlc.a: $(wildcard $(DMLC_CORE)/src/*.cc $(DMLC_CORE)/src/*/*.cc)
+ cd $(DMLC_CORE); make libdmlc.a config=$(ROOTDIR)/$(config); cd $(ROOTDIR)
$(RABIT)/lib/$(LIB_RABIT): $(wildcard $(RABIT)/src/*.cc)
+ cd $(RABIT); make lib/$(LIB_RABIT); cd $(ROOTDIR)
jvm: jvm-packages/lib/libxgboost4j.so
SRC = $(wildcard src/*.cc src/*/*.cc)
ALL_OBJ = $(patsubst src/%.cc, build/%.o, $(SRC)) $(PLUGIN_OBJS)
AMALGA_OBJ = amalgamation/xgboost-all0.o
LIB_DEP = $(DMLC_CORE)/libdmlc.a $(RABIT)/lib/$(LIB_RABIT)
ALL_DEP = $(filter-out build/cli_main.o, $(ALL_OBJ)) $(LIB_DEP)
CLI_OBJ = build/cli_main.o
build/%.o: src/%.cc
#mkdir -p $(#D)
$(CXX) $(CFLAGS) -MM -MT build/$*.o $< >build/$*.d
$(CXX) -c $(CFLAGS) -c $< -o $#
build_plugin/%.o: plugin/%.cc
#mkdir -p $(#D)
$(CXX) $(CFLAGS) -MM -MT build_plugin/$*.o $< >build_plugin/$*.d
$(CXX) -c $(CFLAGS) -c $< -o $#
# The should be equivalent to $(ALL_OBJ) except for build/cli_main.o
amalgamation/xgboost-all0.o: amalgamation/xgboost-all0.cc
$(CXX) -c $(CFLAGS) -c $< -o $#
# Equivalent to lib/libxgboost_all.so
lib/libxgboost_all.so: $(AMALGA_OBJ) $(LIB_DEP)
#mkdir -p $(#D)
$(CXX) $(CFLAGS) -shared -o $# $(filter %.o %.a, $^) $(LDFLAGS)
lib/libxgboost.a: $(ALL_DEP)
#mkdir -p $(#D)
ar crv $# $(filter %.o, $?)
lib/libxgboost.dll lib/libxgboost.so: $(ALL_DEP)
#mkdir -p $(#D)
$(CXX) $(CFLAGS) -shared -o $# $(filter %.o %a, $^) $(LDFLAGS)
jvm-packages/lib/libxgboost4j.so: jvm-packages/xgboost4j/src/native/xgboost4j.cpp $(ALL_DEP)
#mkdir -p $(#D)
$(CXX) $(CFLAGS) $(JAVAINCFLAGS) -shared -o $# $(filter %.cpp %.o %.a, $^) $(LDFLAGS)
xgboost: $(CLI_OBJ) $(ALL_DEP)
$(CXX) $(CFLAGS) -o $# $(filter %.o %.a, $^) $(LDFLAGS)
rcpplint:
python2 dmlc-core/scripts/lint.py xgboost ${LINT_LANG} R-package/src
lint: rcpplint
python2 dmlc-core/scripts/lint.py xgboost ${LINT_LANG} include src plugin
clean:
$(RM) -rf build build_plugin lib bin *~ */*~ */*/*~ */*/*/*~ */*.o */*/*.o */*/*/*.o xgboost
clean_all: clean
cd $(DMLC_CORE); make clean; cd $(ROODIR)
cd $(RABIT); make clean; cd $(ROODIR)
doxygen:
doxygen doc/Doxyfile
# create standalone python tar file.
pypack: ${XGBOOST_DYLIB}
pypack: ${XGBOOST_DYLIB}
cp ${XGBOOST_DYLIB} python-package/xgboost
cd python-package; tar cf xgboost.tar xgboost; cd ..
# Script to make a clean installable R package.
Rpack:
make clean_all
rm -rf xgboost xgboost*.tar.gz
cp -r R-package xgboost
rm -rf xgboost/src/*.o xgboost/src/*.so xgboost/src/*.dll
rm -rf xgboost/src/*/*.o
rm -rf xgboost/demo/*.model xgboost/demo/*.buffer xgboost/demo/*.txt
rm -rf xgboost/demo/runall.R
cp -r src xgboost/src/src
cp -r include xgboost/src/include
cp -r amalgamation xgboost/src/amalgamation
mkdir -p xgboost/src/rabit
cp -r rabit/include xgboost/src/rabit/include
cp -r rabit/src xgboost/src/rabit/src
rm -rf xgboost/src/rabit/src/*.o
mkdir -p xgboost/src/dmlc-core
cp -r dmlc-core/include xgboost/src/dmlc-core/include
cp -r dmlc-core/src xgboost/src/dmlc-core/src
cp ./LICENSE xgboost
cat R-package/src/Makevars|sed '2s/.*/PKGROOT=./' | sed '3s/.*/ENABLE_STD_THREAD=0/' > xgboost/src/Makevars
cp xgboost/src/Makevars xgboost/src/Makevars.win
Rbuild:
make Rpack
R CMD build --no-build-vignettes xgboost
rm -rf xgboost
Rcheck:
make Rbuild
R CMD check xgboost*.tar.gz
-include build/*.d
-include build/*/*.d
-include build_plugin/*/*.d
Thanks a lot.
brew install clang-omp
export CC=clang-omp
export CXX=clang-omp++
cd python-package
sudo python setup.py install
pip install xgboost
i successfully installed it on my linux machine, there is nothing wrong with the make file, my ar version is 2.24, so you got it right, your binutils is very old, to update it go to https://www.gnu.org/software/binutils/ download the 2.24 version.
extract and change the directory:
./configure
make
sudo make install
What I have done so far is create two makefiles: a project makefile and a package makefile.The project makefile was,however, created using qmake. When I compile the package, I get an x86-64 binary which means the makefile is not cross compiling. How can I fix this?
Here's a the part where I believe the source of the problem:
CC = gcc
CXX = g++
DEFINES = -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_SHARED
CFLAGS = -m64 -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
CXXFLAGS = -m64 -pipe -O2 -Wall -W -D_REENTRANT $(DEFINES)
INCPATH = -I/usr/share/qt4/mkspecs/linux-g++-64 -I. -I/usr/include/qt4/QtCore -I/usr/include/qt4 -I.
LINK = g++
LFLAGS = -m64 -Wl,-O1
LIBS = $(SUBLIBS) -L/usr/lib/x86_64-linux-gnu -lcrypto -lssl -lQtCore -lpthread
AR = ar cqs
RANLIB =
QMAKE = /usr/lib/x86_64-linux-gnu/qt4/bin/qmake
TAR = tar -cf
COMPRESS = gzip -9f
COPY = cp -f
SED = sed
COPY_FILE = $(COPY)
COPY_DIR = $(COPY) -r
STRIP = strip
INSTALL_FILE = install -m 644 -p
INSTALL_DIR = $(COPY_DIR)
INSTALL_PROGRAM = install -m 755 -p
DEL_FILE = rm -f
SYMLINK = ln -f -s
DEL_DIR = rmdir
MOVE = mv -f
CHK_DIR_EXISTS= test -d
MKDIR = mkdir -p
I changed the first line "CC = gcc" to "CC ?=gcc" but it didn't fix the problem.
In my app.cpp file I have the following line: #include "indri/Repository.hpp"
However when I run make (makefile below): I get the following error:
indri/Repository.hpp:22:32: error: indri/Parameters.hpp: No such file or directory
The reason is that the Repository.hpp includes other hpp in the same folder but it uses "indri/*.hpp" instead of just "*.hpp".
What am I missing ?
thanks
## your application name here
APP=myapp
SRC=$(APP).cpp
## extra object files for your app here
OBJ=
prefix = /usr/local
exec_prefix = ${prefix}
libdir = ${exec_prefix}/lib
includedir = ${prefix}/include
INCPATH=-I$(includedir)
LIBPATH=-L$(libdir)
CXXFLAGS=-DPACKAGE_NAME=\"Indri\" -DPACKAGE_TARNAME=\"indri\" -DPACKAGE_VERSION=\"5.0\" -DPACKAGE_STRING=\"Indri\ 5.0\" -DPACKAGE_BUGREPORT=\"project#lemurproject.org\" -DYYTEXT_POINTER=1 -DINDRI_STANDALONE=1 -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -DHAVE_LIBZ=1 -DHAVE_NAMESPACES= -DISNAN_IN_NAMESPACE_STD= -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FSEEKO=1 -DHAVE_EXT_ATOMICITY_H=1 -DP_NEEDS_GNU_CXX_NAMESPACE=1 -DHAVE_MKSTEMP=1 -DHAVE_MKSTEMPS=1 -DNDEBUG=1 -g -O3 $(INCPATH)
CPPLDFLAGS = -lindri -lz -lpthread -lm
all:
$(CXX) $(CXXFLAGS) $(SRC) -o $(APP) $(OBJ) $(LIBPATH) $(CPPLDFLAGS)
clean:
rm -f $(APP)
Did you forget to add the current directory?
## your application name here
APP=myapp
SRC=$(APP).cpp
## extra object files for your app here
OBJ=
prefix = /usr/local
exec_prefix = ${prefix}
libdir = ${exec_prefix}/lib
includedir = ${prefix}/include
INCPATH=-I$(includedir) -I. # can you spot the difference?
LIBPATH=-L$(libdir)
CXXFLAGS=-DPACKAGE_NAME=\"Indri\" -DPACKAGE_TARNAME=\"indri\" -DPACKAGE_VERSION=\"5.0\" -DPACKAGE_STRING=\"Indri\ 5.0\" -DPACKAGE_BUGREPORT=\"project#lemurproject.org\" -DYYTEXT_POINTER=1 -DINDRI_STANDALONE=1 -DHAVE_LIBM=1 -DHAVE_LIBPTHREAD=1 -DHAVE_LIBZ=1 -DHAVE_NAMESPACES= -DISNAN_IN_NAMESPACE_STD= -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_FSEEKO=1 -DHAVE_EXT_ATOMICITY_H=1 -DP_NEEDS_GNU_CXX_NAMESPACE=1 -DHAVE_MKSTEMP=1 -DHAVE_MKSTEMPS=1 -DNDEBUG=1 -g -O3 $(INCPATH)
CPPLDFLAGS = -lindri -lz -lpthread -lm
all:
$(CXX) $(CXXFLAGS) $(SRC) -o $(APP) $(OBJ) $(LIBPATH) $(CPPLDFLAGS)
clean:
rm -f $(APP)