Error compiling Qt embedded pandaboard: [.moc/release-shared-emb-arm/moc_qabstractanimation.cpp] Error 1

1.4k views Asked by At

I'm trying to compile Qt embedded for pandaboard (OMAP4, 4430). I installed this cross-compiler for armv7:

sudo apt-get install g++-4.6-arm-linux-gnueabihf

I downloaded last qt-embedded source and uncopressed them in the folder:

/opt/qt-everywhere-opensource-src-4.6.4

I copied configuration files:

cp -r mkspecs/qws/linux-arm-gnueabi-g++ mkspecs/qws/linux-arm-gnueabihf-g++

and I modified mkspecs/qws/linux-arm-gnueabihf-g++/qmake.conf as below:

include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)

#Compiler Flags to take advantage of the ARM architecture
#N.B.:I also tried to uncomment the two following instructions with no success   
QMAKE_CFLAGS = -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp
QMAKE_CXXFLAGS = -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp

# modifications to g++.conf
QMAKE_CC                = arm-linux-gnueabihf-gcc-4.6
QMAKE_CXX               = arm-linux-gnueabihf-g++-4.6
QMAKE_LINK              = arm-linux-gnueabihf-g++-4.6
QMAKE_LINK_SHLIB        = arm-linux-gnueabihf-g++-4.6

# modifications to linux.conf
QMAKE_AR                = arm-linux-gnueabihf-ar cqs
QMAKE_OBJCOPY           = arm-linux-gnueabihf-objcopy
QMAKE_STRIP             = arm-linux-gnueabihf-strip

load(qt_config)

I runned the configuration:

./configure -embedded arm -little-endian -no-qt3support -nomake examples -nomake demos -opensource -confirm-license -xplatform qws/linux-arm-gnueabihf-g++

But of course, compilation with make command fails:

make[1]: Entering directory `/opt/qt-everywhere-opensource-src-4.6.4/src/corelib'
/opt/qt-everywhere-opensource-src-4.6.4/bin/moc -DQT_SHARED -DQT_BUILD_CORE_LIB -DQT_NO_USING_NAMESPACE -DQT_NO_CAST_TO_ASCII -DQT_ASCII_CAST_WARNINGS -DQT_MOC_COMPAT -DHB_EXPORT=Q_CORE_EXPORT -DQT_NO_DEBUG -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I../../mkspecs/qws/linux-arm-gnueabihf-g++ -I. -I../../include -I../../include/QtCore -I.rcc/release-shared-emb-arm -Iglobal -I../3rdparty/zlib -I../3rdparty/harfbuzz/src -I../3rdparty/md5 -I../3rdparty/md4 -I.moc/release-shared-emb-arm animation/qabstractanimation.h -o .moc/release-shared-emb-arm/moc_qabstractanimation.cpp
moc: Cannot create .moc/release-shared-emb-arm/moc_qabstractanimation.cpp
make[1]: *** [.moc/release-shared-emb-arm/moc_qabstractanimation.cpp] Error 1
make[1]: Leaving directory `/opt/qt-everywhere-opensource-src-4.6.4/src/corelib'
make: *** [sub-corelib-make_default-ordered] Error 2

What's wrong?

2

There are 2 answers

1
aldo85ita On

Sorry, I found the answer and I've fogotten to post it. The issue is related to a not correct moc installation. I've alredy all "root" privilegies.Thanks everybody you for your supports

1
nvd On

Do it as "root". Seems like you do not have the privileges for file creation.