Hello
I am fairly new to QT and Linux and have never yet cross compiled. First my background:
I am using a VirtualBox with Ubuntu 14.04, installed Qt 4.8.6. and the 07.00.00.00 SDK like explained in the SDK Installer Tutorial. Now I started the Hands on with QT Tutorial and everything worked up until step 17. I can create a Makefile using the qmake command, but if I run the make command it says:
[linux-devkit]:~/ti-sdk-am335x-evm-07.00.00.00/example-applications/helloworld> make
arm-linux-gnueabihf-g++ -c -pipe -pipe -pipe -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 --sysroot=/home/xferwebn/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi -march=armv7-a -marm -mthumb-interwork -mfloat-abi=hard -mfpu=neon -mtune=cortex-a8 --sysroot=/home/xferwebn/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi -O2 -O2 -Wall -W -Wall -W -Wall -W -D_REENTRANT -DQT_QWS_CLIENTBLIT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED -I../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/linux-g++ -I. -I/home/xferwebn/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/include/qtopia/QtCore -I/home/xferwebn/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/include/qtopia/QtGui -I/home/xferwebn/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/include/qtopia -I. -o helloworld.o helloworld.cpp
arm-linux-gnueabihf-g++: error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory
make: *** [helloworld.o] Error 127
Can anybody please tell what I am doing wrong? I googled a lot and tried to change the CROSS_COMPILE but it says
[linux-devkit]:~/ti-sdk-am335x-evm-07.00.00.00/example-applications/helloworld> which arm-linux-gnueabihf-gcc
/home/xferwebn/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/arm-linux-gnueabihf-gcc
[linux-devkit]:~/ti-sdk-am335x-evm-07.00.00.00/example-applications/helloworld> CROSS_COMPILE = /home/xferwebn/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/arm-linux-gnueabihf-
CROSS_COMPILE: command not found
Thank you for your help!
P.S.: This is my Makefile
#############################################################################
# Makefile for building: helloworld
# Generated by qmake (2.01a) (Qt 4.8.4) on: Di. Okt 28 08:52:49 2014
# Project: helloworld.pro
# Template: app
# Command: /home/xferwebn/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/qmake -o Makefile helloworld.pro
#############################################################################
####### Compiler, tools and options
CC = $(OE_QMAKE_CC)
CXX = $(OE_QMAKE_CXX)
DEFINES = -DQT_QWS_CLIENTBLIT -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_CORE_LIB -DQT_SHARED
CFLAGS = -pipe -pipe $(OE_QMAKE_CFLAGS) -O2 -Wall -W -Wall -W -D_REENTRANT $(DEFINES)
CXXFLAGS = -pipe -pipe -pipe $(OE_QMAKE_CFLAGS) $(OE_QMAKE_CXXFLAGS) -O2 -O2 -Wall -W -Wall -W -Wall -W -D_REENTRANT $(DEFINES)
INCPATH = -I../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/linux-g++ -I. -I$(OE_QMAKE_INCDIR_QT)/QtCore -I$(OE_QMAKE_INCDIR_QT)/QtGui -I$(OE_QMAKE_INCDIR_QT) -I.
LINK = $(OE_QMAKE_LINK)
LFLAGS = $(OE_QMAKE_LDFLAGS) -Wl,-rpath-link,$(OE_QMAKE_LIBDIR_QT)
LIBS = $(SUBLIBS) -L$(OE_QMAKE_LIBDIR_QT) -lQtGuiE -lEGL -lIMGegl -lsrv_um -lQtNetworkE -lQtCoreE -lpthread
AR = $(OE_QMAKE_AR) cqs
RANLIB =
QMAKE = /home/xferwebn/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/i686-arago-linux/usr/bin/qmake
TAR = tar -cf
COMPRESS = gzip -9f
COPY = cp -f
SED = sed
COPY_FILE = $(COPY)
COPY_DIR = $(COPY) -r
STRIP = $(OE_QMAKE_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
####### Output directory
OBJECTS_DIR = ./
####### Files
SOURCES = helloworld.cpp
OBJECTS = helloworld.o
DIST = ../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/common/unix.conf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/common/linux.conf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/common/gcc-base.conf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/common/gcc-base-unix.conf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/common/g++-unix.conf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/qconfig.pri \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/modules/qt_webkit_version.pri \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/qt_functions.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/qt_config.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/exclusive_builds.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/default_pre.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/release.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/default_post.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/warn_on.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/qt.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/unix/thread.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/moc.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/resources.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/uic.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/yacc.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/lex.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/include_source_dir.prf \
helloworld.pro
QMAKE_TARGET = helloworld
DESTDIR =
TARGET = helloworld
first: all
####### Implicit rules
.SUFFIXES: .o .c .cpp .cc .cxx .C
.cpp.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
.cc.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
.cxx.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
.C.o:
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o "$@" "$<"
.c.o:
$(CC) -c $(CFLAGS) $(INCPATH) -o "$@" "$<"
####### Build rules
all: Makefile $(TARGET)
$(TARGET): $(OBJECTS)
$(LINK) $(LFLAGS) -o $(TARGET) $(OBJECTS) $(OBJCOMP) $(LIBS)
Makefile: helloworld.pro ../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/linux-g++/qmake.conf ../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/common/unix.conf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/common/linux.conf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/common/gcc-base.conf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/common/gcc-base-unix.conf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/common/g++-unix.conf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/qconfig.pri \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/modules/qt_webkit_version.pri \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/qt_functions.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/qt_config.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/exclusive_builds.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/default_pre.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/release.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/default_post.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/warn_on.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/qt.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/unix/thread.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/moc.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/resources.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/uic.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/yacc.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/lex.prf \
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/include_source_dir.prf \
/home/xferwebn/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/lib/libQtGuiE.prl \
/home/xferwebn/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/lib/libQtNetworkE.prl \
/home/xferwebn/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/lib/libQtCoreE.prl
$(QMAKE) -o Makefile helloworld.pro
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/common/unix.conf:
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/common/linux.conf:
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/common/gcc-base.conf:
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/common/gcc-base-unix.conf:
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/common/g++-unix.conf:
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/qconfig.pri:
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/modules/qt_webkit_version.pri:
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/qt_functions.prf:
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/qt_config.prf:
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/exclusive_builds.prf:
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/default_pre.prf:
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/release.prf:
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/default_post.prf:
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/warn_on.prf:
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/qt.prf:
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/unix/thread.prf:
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/moc.prf:
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/resources.prf:
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/uic.prf:
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/yacc.prf:
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/lex.prf:
../../linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/share/qtopia/mkspecs/features/include_source_dir.prf:
/home/xferwebn/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/lib/libQtGuiE.prl:
/home/xferwebn/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/lib/libQtNetworkE.prl:
/home/xferwebn/ti-sdk-am335x-evm-07.00.00.00/linux-devkit/sysroots/cortexa8hf-vfp-neon-3.8-oe-linux-gnueabi/usr/lib/libQtCoreE.prl:
qmake: FORCE
@$(QMAKE) -o Makefile helloworld.pro
dist:
@$(CHK_DIR_EXISTS) .tmp/helloworld1.0.0 || $(MKDIR) .tmp/helloworld1.0.0
$(COPY_FILE) --parents $(SOURCES) $(DIST) .tmp/helloworld1.0.0/ && $(COPY_FILE) --parents helloworld.cpp .tmp/helloworld1.0.0/ && (cd `dirname .tmp/helloworld1.0.0` && $(TAR) helloworld1.0.0.tar helloworld1.0.0 && $(COMPRESS) helloworld1.0.0.tar) && $(MOVE) `dirname .tmp/helloworld1.0.0`/helloworld1.0.0.tar.gz . && $(DEL_FILE) -r .tmp/helloworld1.0.0
clean:compiler_clean
-$(DEL_FILE) $(OBJECTS)
-$(DEL_FILE) *~ core *.core
####### Sub-libraries
distclean: clean
-$(DEL_FILE) $(TARGET)
-$(DEL_FILE) Makefile
check: first
mocclean: compiler_moc_header_clean compiler_moc_source_clean
mocables: compiler_moc_header_make_all compiler_moc_source_make_all
compiler_moc_header_make_all:
compiler_moc_header_clean:
compiler_rcc_make_all:
compiler_rcc_clean:
compiler_image_collection_make_all: qmake_image_collection.cpp
compiler_image_collection_clean:
-$(DEL_FILE) qmake_image_collection.cpp
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:
####### Compile
helloworld.o: helloworld.cpp
$(CXX) -c $(CXXFLAGS) $(INCPATH) -o helloworld.o helloworld.cpp
####### Install
install: FORCE
uninstall: FORCE
FORCE: