I spend weeks trying to cross compile Qt for my Panda board and no way, I can't pass the ./configure. If someone could give me a help I'll appreciate.
My host system is Ubuntu-13.04 ×86_64bit(running un Virtualbox)
My target system is Pandaboard ES Ubuntu-12.04.
All the steps in host box:
sudo apt-get install arm-linux-gnueabihf
sudo mkdir /opt/qt-485-armhf
cd /usr/src
sudo wget http://download.qt-project.org/official_releases/qt/4.8/4.8.5/qt-everywhere-opensource-src-4.8.5.tar.gz
sudo tar xf qt-everywhere-opensource-src-4.8.5.tar.gz
cd /usr/src/qt-everywhere-opensource-src-4.8.5
sudo cp -r mkspecs/qws/linux-arm-gnueabi-g++ mkspecs/qws/linux-arm-gnueabihf-g++
sudo vim mkspecs/qws/linux-arm-gnueabihf-g++/qmake.conf
-------------------------------
include(../../common/gcc-base-unix.conf)
include(../../common/g++-unix.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-a9 -mfpu=neon -mfloat-abi=hard
QMAKE_CXXFLAGS = -march=armv7-a -mtune=cortex-a9 -mfpu=neon -mfloat-abi=hard
# modifications to g++.conf
QMAKE_CC = arm-linux-gnueabihf-gcc
QMAKE_CXX = arm-linux-gnueabihf-g++
QMAKE_LINK = arm-linux-gnueabihf-g++
QMAKE_LINK_SHLIB = arm-linux-gnueabihf-g++
# 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)
---------------------------------
sudo sed -i -e "/#if/d" -e "/#error/d" -e "/#endif/d" config.tests/unix/libmng/libmng.cpp (This command fixes detection of libmng 2.0.)
export QTDIR=/opt/qt4-485-armhf
And finally:
sudo ./configure -prefix /opt/qt4-485-armhf -sysconfdir /etc/xdg -embedded arm -little-endian -host-big-endian -no-qt3support -nomake examples -nomake demos -opensource -confirm-license -release -openssl-linked -no-phonon -no-phonon-backend -no-nis -platform qws/linux-x86_64-g++ -xplatform qws/linux-arm-gnueabihf-g++ -optimized-qmake
With this result:
Creating qmake. Please wait...
g++ -c -o option.o -pipe -m64 -DQMAKE_OPENSOURCE_EDITION -O2 -g -I. -Igenerators -Igenerators/unix -Igenerators/win32 -Igenerators/mac -Igenerators/symbian -Igenerators/integrity -I/usr/src/qt-everywhere-opensource-src-4.8.5/include -I/usr/src/qt-everywhere-opensource-src-4.8.5/include/QtCore -I/usr/src/qt-everywhere-opensource-src-4.8.5/src/corelib/global -I/usr/src/qt-everywhere-opensource-src-4.8.5/src/corelib/xml -I/usr/src/qt-everywhere-opensource-src-4.8.5/tools/shared -DQT_NO_PCRE -DQT_BUILD_QMAKE -DQT_BOOTSTRAPPED -DQLIBRARYINFO_EPOCROOT -DQT_NO_TEXTCODEC -DQT_NO_UNICODETABLES -DQT_NO_COMPONENT -DQT_NO_STL -DQT_NO_COMPRESS -I/usr/src/qt-everywhere-opensource-src-4.8.5/mkspecs/qws/linux-x86_64-g++ -DHAVE_QCONFIG_CPP -DQT_NO_THREAD -DQT_NO_QOBJECT -DQT_NO_GEOM_VARIANT -DQT_NO_DEPRECATED option.cpp
g++ -o "/usr/src/qt-everywhere-opensource-src-4.8.5/bin/qmake" project.o property.o main.o makefile.o unixmake2.o unixmake.o mingw_make.o option.o winmakefile.o projectgenerator.o meta.o makefiledeps.o metamakefile.o xmloutput.o pbuilder_pbx.o borland_bmake.o msvc_vcproj.o msvc_vcxproj.o msvc_nmake.o msvc_objectmodel.o msbuild_objectmodel.o symmake.o initprojectdeploy_symbian.o symmake_abld.o symmake_sbsv2.o symbiancommon.o registry.o epocroot.o gbuild.o qtextcodec.o qutfcodec.o qstring.o qtextstream.o qiodevice.o qmalloc.o qglobal.o qbytearray.o qbytearraymatcher.o qdatastream.o qbuffer.o qlist.o qfile.o qfilesystementry.o qfilesystemengine_unix.o qfilesystemengine.o qfilesystemiterator_unix.o qfsfileengine_unix.o qfsfileengine.o qfsfileengine_iterator.o qregexp.o qvector.o qbitarray.o qdir.o qdiriterator.o quuid.o qhash.o qfileinfo.o qdatetime.o qstringlist.o qabstractfileengine.o qtemporaryfile.o qmap.o qmetatype.o qsettings.o qsystemerror.o qlibraryinfo.o qvariant.o qvsnprintf.o qlocale.o qlocale_tools.o qlocale_unix.o qlinkedlist.o qnumeric.o qcryptographichash.o qxmlstream.o qxmlutils.o
You have not explicitly asked to use pkg-config and are cross-compiling.
pkg-config will not be used to automatically query cflag/lib parameters for
dependencies
The system floating point format could not be detected.
This may cause data to be generated in a wrong format
Turn on verbose messaging (-v) to see the final report.
OpenSSL support cannot be enabled due to functionality tests!
Turn on verbose messaging (-v) to ./configure to see the final report.
If you believe this message is in error you may use the continue
switch (-continue) to ./configure to continue.
Thanks in advance.
To cross-compile a program on a PC you must have the development files for the same packages installed on the PC as the ARM target. Qt 4.8 depends on OpenSSL, so you must get the correct development files for the ARM release if you wish to compile Qt.
Install a Ubuntu 12.04 PC virtual box. SAME VERSION as the board.
Get the compiler. apt-get install arm-linux-gnueabihf (You knew that).
Get required development packages. apt-get install libssl-dev or apt-get build-dep -aarmhf qt4 (which only works for X11).
Edit your Qt configuration to suit your needs and build it.
The current step you are missing is step 3; but to perform it you need step 1 or some other way to get the OpenSSL development files for Ubuntu 12.04. There is probably some other way to do this using apt.sources. I think the steps above will be easiest for you.
Here is an alternative approach. As you are going to use Qt, you don't necessarily need Ubuntu. Simple rootfs with Qt Embedded could be sufficient.
I'll describe, how you can create rootfs and your application using Buildroot(BR). BR already has a config file for Pandaboard. All you need to is to download BR and execute:
make pandaboard_defconfig
After that you can choose between Qt4 and Qt5 in the menuconfig.
For your application I'd suggest using CMake infrastructure, but it is a matter of taste. This article is about source directory override mechanism in BR.
try to get the version off gcc in your Pandaboard Ubuntu OS and if is the same arm-linux-gnueabihf-gcc version or less like 4.6 hint the config in your qmake.config
#QMAKE_CFLAGS = -march=armv7-a -mtune=cortex-a9 -mfpu=neon -mfloat-abi=hard
#QMAKE_CXXFLAGS = -march=armv7-a -mtune=cortex-a9 -mfpu=neon -mfloat-abi=hard
Related
I downloaded the Minix source code through git:
git clone git://git.minix3.org/minix minixsrc
Then I followed the instructions on Crosscompiling MINIX with build.sh
and ran the command
sh build.sh -mi386 -O ../build tools
Now I have been waiting for about an hour for it to compile and it is continuously showing messages on my terminal like this:
# compile libclangSema/SemaExprMember.lo
c++ -O -O2 -fno-rtti -fno-exceptions -I. -I/home/keeyan/git/minixsrc/tools/llvm-lib/libclangSema/../../llvm/../../external/bsd/llvm/lib/../dist/clang/include -I/home/keeyan/git/minixsrc/tools/llvm-lib/libclangSema/../../llvm/../../external/bsd/llvm/lib/../dist/lld/include -I/home/keeyan/git/minixsrc/tools/llvm-lib/libclangSema/../../llvm/../../external/bsd/llvm/lib/../dist/llvm/include -I/home/keeyan/git/minixsrc/tools/llvm-lib/libclangSema/../../llvm/../../external/bsd/llvm/lib/../dist/mclinker/include -I/home/keeyan/git/minixsrc/tools/llvm-lib/libclangSema/../../llvm/../../external/bsd/llvm/lib/../dist/lldb/include -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -DCLANG_ENABLE_STATIC_ANALYZER -I/home/keeyan/git/minixsrc/../build/tools/llvm-include -I/home/keeyan/git/minixsrc/../build/tools/llvm/config/include -I/home/keeyan/git/minixsrc/../build/tools/llvm/config/tools/clang/include -I/home/keeyan/git/minixsrc/tools/llvm-lib/libclangSema/../../llvm/../../external/bsd/llvm/lib/../config/mclinker -std=c++11 -std=c++11 -c -o SemaExprMember.lo.o /home/keeyan/git/minixsrc/tools/llvm-lib/libclangSema/../../llvm/../../external/bsd/llvm/lib/../dist/clang/lib/Sema/SemaExprMember.cpp
mv SemaExprMember.lo.o SemaExprMember.lo
My question is, how long should this process take? Is something wrong?
System Specs:
OS: Linux Mint 18 64bit
CPU: Intel Core i7-5500U CPU # 2.4GHz x 2
I believe it should take this long to do the job. It took me about 2 hours for the sh build.sh -mi386 -O ../build tools c to finish and it completed successfully and I got the build tools. After that process I ran the sh build.sh -mi386 -O ../build -U distribution command and that also took a number of hours. I ended up with the built distribution of MINIX which is what was expected of the process. It seems after that there is no way to turn this into an ISO though.
I don't know if the build script unsets MAKEFLAGS but you can do:
MAKEFLAGS=-j\ $(nproc) sh build.sh -mi386 -O ../build tools
nproc returns the number of cores in your CPU so it uses all cores and is faster.
I'm trying to compile OpenSCAD on my Mac. When the build script reaches the line qmake qscintilla.pro it spits out the error Project ERROR: Unknown module(s) in QT: gui opengl concurrent widgets printsupport macextras If I run qmake on its own I recieve more errors for missing modules Project ERROR: Unknown module(s) in QT: gui opengl concurrent widgets printsupport macextras I added QT += macextras to my qt.pro file to see if it would stop complaining about macextras, but that didn't work either.
I looked inside qt-everywhere-opensource-src-5.4.1 and I can see qtmacextras but I don't see the other modules mentioned.
Any ideas how I could get these modules for Mac?
I thought that qt was being compiled by the following script
build_qt()
{
version=$1
if [ -d $DEPLOYDIR/lib/QtCore.framework ]; then
echo "qt already installed. not building"
return
fi
echo "Building Qt" $version "..."
cd $BASEDIR/src
rm -rf qt-everywhere-opensource-src-$version
if [ ! -f qt-everywhere-opensource-src-$version.tar.gz ]; then
curl -O -L http://download.qt-project.org/official_releases/qt/4.8/4.8.5/qt-everywhere-opensource-src-4.8.5.tar.gz
fi
tar xzf qt-everywhere-opensource-src-$version.tar.gz
cd qt-everywhere-opensource-src-$version
patch -p0 < $OPENSCADDIR/patches/qt4/patch-src_corelib_global_qglobal.h.diff
patch -p0 < $OPENSCADDIR/patches/qt4/patch-libtiff.diff
patch -p0 < $OPENSCADDIR/patches/qt4/patch-src_plugins_bearer_corewlan_qcorewlanengine.mm.diff
if $USING_CLANG; then
# FIX for clang
sed -i "" -e "s/::TabletProximityRec/TabletProximityRec/g" src/gui/kernel/qt_cocoa_helpers_mac_p.h
PLATFORM="-platform unsupported/macx-clang"
fi
if $OPTION_32BIT; then
QT_32BIT="-arch x86"
fi
case "$OSX_VERSION" in
9)
# libtiff fails in the linker step with Mavericks / XCode 5.0.1
MACOSX_RELEASE_OPTIONS=-no-libtiff
# wlan support bails out with lots of compiler errors, disable it for the build
patch_qt_disable_core_wlan "$version"
;;
*)
MACOSX_RELEASE_OPTIONS=
;;
esac
./configure -prefix $DEPLOYDIR -release $QT_32BIT -arch x86_64 -opensource -confirm-license $PLATFORM -fast -no-qt3support -no-svg -no-phonon -no-audio-backend -no-multimedia -no-javascript-jit -no-script -no-scripttools -no-declarative -no-xmlpatterns -nomake demos -nomake examples -nomake docs -nomake translations -no-webkit $MACOSX_RELEASE_OPTIONS
make -j"$NUMCPU" install
}
It sounds like you're using the macosx-build-dependencies.sh script. If you do, you need to set up your environment first, to search for libraries in the right places:
$ source setenv_mac-qt5.sh
I have ported Qt 4.8.6 to sparc linux.as per my knowledge Sparc and Linux support is not available in qws folder.
I have copied linux-generic-g++ to linux-sparc-g++ and changed qmake.conf as per my toolchain functionality as shown below.
include(../../common/linux.conf)
include(../../common/gcc-base-unix.conf)
include(../../common/g++-unix.conf)
include(../../common/qws.conf)
QMAKE_CFLAGS_RELEASE = -nostdlib -nostartfiles -shared
QMAKE_CXXFLAGS_RELEASE = -nostdlib -nostartfiles -shared
QMAKE_LFLAGS_RELEASE = -nostdlib -nostartfiles -shared
QMAKE_CC = sparc-elf-gcc
QMAKE_CXX = sparc-elf-g++
QMAKE_LINK = sparc-elf-g++
QMAKE_LINK_SHLIB = sparc-elf-g++
QMAKE_AR = sparc-elf-ar cqs
QMAKE_OBJCOPY = sparc-elf-objcopy
QMAKE_STRIP = sparc-elf-strip
load(qt_config)
After this I have configured with below configuration feature
./configure -verbose -opensource -confirm-license -no-qt3support -no-glib -depths 32 -qt-gfx-vnc -no-gfx-qvfb -no-gfx-multiscreen -no-gfx-directfb -debug -shared -embedded sparc -platform qws/linux-x86_64-g++ -xplatform qws/linux-sparc-g++ -host-little-endian -little-endian -no-openssl -no-opengl -no-sql-sqlite -no-xmlpatterns -no-multimedia -no-audio-backend -no-phonon -no-script -no-phonon-backend -no-svg -multimedia -no-webkit -nomake demos -no-separate-debug-info -prefix /usr/local/ -plugindir /usr/local/plugins -importdir /usr/local/imports -translationdir /usr/local/translations -no-rpath
I have successfully crated all shared library and copied into my board /lib/ path
Now my plan is to run analogclock example on board using below command(I don't have display that's what I am using VNC display)
./analogclock -qws -display VNC:0
analogclock[120]: segfault at 8 ip 5019b06c (rpc f000eff0) sp ef82cae8
error 30001 in libQtGui.so.4.8.6[50017000+10cb000] Segmentation fault
I am getting segmentation fault when graphics_system_name.isEmpty(); in src/gui/kernel/qapplication.cpp file is invoked.
After debugging I found that global "QString QApplicationPrivate::graphics_system_name;" object is created successfully with valid address 0x5143a400.
However I could not access any QString member functions such as (graphics_system_name.data(), graphics_system_name.size().....)
If I create local QString class object,it is working fine.if global segmentation fault.
Is there a way to make gnatmake tool recompile the Ada's runtime library ("RTS") with the project I'm building file by file? I want to integrate my custom preprocessor that adds some features to ada source code and then compiles it with gcc. I'm passing --GCC=<preprocessor> flag to the gnatmake utility, it figures out dependencies automatically and runs my preprocessor for all of my source files. However I want custom preprocessing to be done on code in the RTS as well, is there any way to do it?
The -a flag tells gnatmake to recompile any RTS files that need to be recompiled.
After a little experiment here it seems that if you copy system.ads (and maybe gnat.ads, interfac.ads .. yes) from the compiler’s adainclude/ directory to your source tree (I think you’ll need to touch it whenever you update your preprocessor), gnatmake may be able do what you want.
$ cp /opt/gcc-4.9.0/lib/gcc/x86_64-apple-darwin13/4.9.0/adainclude/system.ads .
$ gnatmake -a int
gcc -c int.adb
gcc -gnatpg -c -I./ -I- /opt/gcc-4.9.0/lib/gcc/x86_64-apple-darwin13/4.9.0/adainclude/s-stalib.adb
gcc -gnatpg -c -I./ -I- /opt/gcc-4.9.0/lib/gcc/x86_64-apple-darwin13/4.9.0/adainclude/a-except.adb
gcc -gnatpg -c -I./ -I- /opt/gcc-4.9.0/lib/gcc/x86_64-apple-darwin13/4.9.0/adainclude/s-valint.adb
gcc -gnatpg -c system.ads
...
gcc -gnatpg -c -I./ -I- /opt/gcc-4.9.0/lib/gcc/x86_64-apple-darwin13/4.9.0/adainclude/s-conca4.adb
gnatbind -x int.ali
gnatlink int.ali
and, after I realised I hadn’t used -gnata,
$ touch int.adb
$ gnatmake -a -gnata int
gcc -c -gnata int.adb
gcc -gnatpg -c -I./ -gnata -I- /opt/gcc-4.9.0/lib/gcc/x86_64-apple-darwin13/4.9.0/adainclude/s-assert.adb
gnatbind -x int.ali
gnatlink int.ali
(I do not want to use -f here, because it’ll rebuild everything.)
I have a makefile that I needed to change around, and use it to install the program. I can;t figure out why I am getting this error:
v245-2% make install
install -m 555 audit /export/home/student/scort323/bin
sh: install: not found
*** Error code 1
make: Fatal error: Command failed for target `install'
Below is my code, can somebody please give me some advice. I am not good at makefiles so trying to find this error is hard for me until I get a better understanding:
# Make file for audit
# Location to install binary. Default is /usr/local/bin. You may
# prefer to install it in /usr/bin or /sbin
BINDIR = /export/home/student/scort323/bin
#BINDIR=/usr/bin
#BINDIR=/usr/sbin
# Location to install man page. Default is /usr/local/man. You may
# prefer to install it in /usr/man
MANDIR = /export/home/student/scort323/bin
#MANDIR = /usr/man
# Compiler to use
CC = gcc
# Linker to use
LD = gcc
# Preprocessor options
CPPFLAGS = -DGETOPTLONG
# Compile and link options
# On a.out systems you might want to add -N when linking
# RPM_OPT_FLAGS can be set by rpm tool
# ...For production code
CFLAGS = -Wall -O3 $(RPM_OPT_FLAGS)
LDFLAGS = -s
# ...For debug
#CFLAGS = -Wall -g
#LDFLAGS = -g
audit: audit.o
$(LD) $(LDFLAGS) -o audit audit.o
audit.o: audit.c
$(CC) $(CPPFLAGS) $(CFLAGS) -c audit.c
install: audit
install -m 555 audit $(BINDIR)
#/audit
install -m 444 audit.1 $(MANDIR)
#/man1/audit.1
clean:
$(RM) audit audit.o core *~ results
# check in
ci: clean
-ci -l *
dist: clean
cd .. ; tar --exclude RCS -czvf audit-0.2.tar.gz audit-0.2
There is no problem with the makefile. Check if you have install utility
$~ install --help
If you dont have then you can get it from GNU coreutils. If you have install somewhere then export its path in PATH variable
export PATH=$PATH:/path/to/install-utilit