How to disable C++11 in qmake? - qt

Project file:
CONFIG -= qt
QMAKE_CXXFLAGS += -std=c++98
QMAKE_CXXFLAGS -= -std=c++11
QMAKE_CXXFLAGS -= -std=gnu++11
CONFIG -= c++11
Result:
g++ -c -pipe -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-but-set-variable -Wno-reorder -Wno-missing-field-initializers -std=c++98 -DDEBUG -g -std=gnu++11 -Wall -W -fPIC -DQT_QML_DEBUG -I../../qqq -I. -I../src/jsoncpp -I../lib -I../../../../Qt/5.9.1/gcc_64/mkspecs/linux-g++ -o ../build/debug/obj/TaskManager.o ../src/TaskManager.cpp
g++ -c -pipe -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno-unused-but-set-variable -Wno-reorder -Wno-missing-field-initializers -std=c++98 -DDEBUG -g -std=gnu++11 -Wall -W -fPIC -DQT_QML_DEBUG -I../../qqq -I. -I../src/jsoncpp -I../lib -I../../../../Qt/5.9.1/gcc_64/mkspecs/linux-g++ -o ../build/debug/obj/Utils.o ../src/Utils.cpp
As you see option -std=gnu++11 still exist (no any reactoion to "QMAKE_CXXFLAGS -="/"CONFIG -=").
Qt:
Qt Creator 4.3.1
Based on Qt 5.9.1 (GCC 5.3.1 20160406 (Red Hat 5.3.1-6), 64 bit)
Built on Jun 29 2017 04:10:39
Thank you a lot.
P.S. I have compatibility troubles with gnu++11 (c++ with gcc extenstions) on clean system
./qqq: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `CXXABI_1.3.8' not found (required by ./qqq)
./qqq: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ./qqq)
./qqq: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.21' not found
and want to use c++11 (c++ without gcc extenstions) instead gnu++11 without any extenstions but I cannot to disable it :-(

Related

Brew clang++ issue with cmath in OSX Catalina

Having a recurring issue with cmath upon compiling the source R package in OSX 10.15, as follows;
In file included from /usr/local/opt/llvm/bin/../include/c++/v1/complex:245:
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:313:9: error: no member named 'signbit' in the global namespace
using ::signbit;
~~^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:314:9: error: no member named 'fpclassify' in the global namespace
using ::fpclassify;
~~^
/usr/local/opt/llvm/bin/../include/c++/v1/cmath:315:9: error: no member named 'isfinite' in the global namespace; did you mean 'finite'?
using ::isfinite;
~~^
/usr/local/include/math.h:749:12: note: 'finite' declared here
extern int finite(double)
Installation output from R shows clang++ with following arguments;
clang++ -fopenmp -std=gnu++11 -I"/usr/local/Cellar/r/3.6.2/lib/R/include" -DNDEBUG -I"/Volumes/Documents/Library/R/3.x/library/BH/include" -I"/Volumes/Documents/Library/R/3.x/library/Rcpp/include" -I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include -fPIC -g -O3 -Wall -pipe -Wno-nonnull -pedantic -std=c++11 -mtune=native -c AlphaProcedure.cpp -o AlphaProcedure.o
I've read several similar posting having the similar issues but none of workaround has worked on my system so far. I'd really appreciate any input on this.
My system:
sw_vers
ProductName: Mac OS X
ProductVersion: 10.15.2
BuildVersion: 19C57
xcodebuild -version
Xcode 11.3
Build version 11C29
clang -v
clang version 9.0.0 (tags/RELEASE_900/final)
Target: x86_64-apple-darwin19.2.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin
gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/local/Cellar/gcc/9.2.0_3/libexec/gcc/x86_64-apple-darwin19/9.2.0/lto-wrapper
Target: x86_64-apple-darwin19
Configured with: ../configure --build=x86_64-apple-darwin19 --prefix=/usr/local/Cellar/gcc/9.2.0_3 --libdir=/usr/local/Cellar/gcc/9.2.0_3/lib/gcc/9 --disable-nls --enable-checking=release --enable-languages=c,c++,objc,obj-c++,fortran --program-suffix=-9 --with-gmp=/usr/local/opt/gmp --with-mpfr=/usr/local/opt/mpfr --with-mpc=/usr/local/opt/libmpc --with-isl=/usr/local/opt/isl --with-system-zlib --with-pkgversion='Homebrew GCC 9.2.0_3' --with-bugurl=https://github.com/Homebrew/homebrew-core/issues --disable-multilib --with-native-system-header-dir=/usr/include --with-sysroot=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk
Thread model: posix
gcc version 9.2.0 (Homebrew GCC 9.2.0_3)
C complier flags in zshrc
CPATH=/usr/local/include
CPPFLAGS=-I/usr/local/opt/gettext/include -I/usr/local/opt/llvm/include
SDKROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX10.15.sdk
LDFLAGS=-L/usr/local/opt/llvm/lib -Wl,-rpath,/usr/local/opt/llvm/lib
Makevars (for R)
LLVM_LOC = /usr/local/opt/llvm
CC=clang -fopenmp
CXX=clang++ -foropenmp
CXX11=clang++ -fopenmp
CFLAGS = -g -O3 -Wall -pipe -pedantic -Wno-nonnull -std=gnu99 -mtune=native -pipe
CXXFLAGS = -g -O3 -Wall -pipe -Wno-nonnull -pedantic -std=c++11 -mtune=native
CXX11FLAGS = -g -O3 -Wall -pipe -Wno-nonnull -pedantic -std=c++11 -mtune=native
LDFLAGS=-L/usr/local/opt/gettext/lib -L$(LLVM_LOC)/lib -Wl,-rpath,$(LLVM_LOC)/lib
CPPFLAGS=-I/usr/local/opt/gettext/include -I$(LLVM_LOC)/include
I took the nuclear option (clean install Catalina) and used llvm provided by Apple with Brew installation of some required apps. All of this fixed the issue. One minor fix is in Makevars with CPPFLAGS=-I/usr/local/opt/gettext/include -I$(LLVM_LOC)/include -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include

OpenMP support in R and RcppArmadillo

I struggle to enable OpenMP support for R in Ubuntu 16.04. When installing RcppArmadillo, OpenMP is 'found', but I get the following message when installing packages (e.g. 'forecast') that depend on RcppArmadillo:
g++ -I/usr/share/R/include -DNDEBUG -I"/usr/local/lib/R/site-
library/Rcpp/include" -I"/usr/local/lib/R/site-
library/RcppArmadillo/include" -fpic -g -O2 -fstack-protector-strong -
Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c
calcBATS.cpp -o calcBATS.o
In file included from /usr/local/lib/R/site-
library/RcppArmadillo/include/armadillo:53:0,
from /usr/local/lib/R/site-
library/RcppArmadillo/include/RcppArmadilloForward.h:46,
from /usr/local/lib/R/site-library/RcppArmadillo/include/RcppArmadillo.h:31,
from calcBATS.h:36,
from calcBATS.cpp:1:
/usr/local/lib/R/site-
library/RcppArmadillo/include/armadillo_bits/compiler_setup.hpp:474:96:
note: #pragma message: WARNING: use of OpenMP disabled; this compiler
doesn't support OpenMP 3.0+
#pragma message ("WARNING: use of OpenMP disabled; this compiler doesn't
support OpenMP 3.0+")
My ~/.R/Makevars are the following:
VER=-5.4
CC=ccache gcc-$(VER)
CXX=ccache g++-$(VER)
FC=ccache gfortran
F77=ccache gfortran
CXX11 =ccache g++-$(VER)
CXX14=ccache g++-$(VER)
CXX_STD = CXX11
CFLAGS= -O3 -Wall -pipe -pedantic -std=gnu11 -fopenmp
FCFLAGS=-O3 -Wall -pipe -pedantic -std=gnu11 -fopenmp
CXXFLAGS = -O3 -Wall -pipe -pedantic -std=gnu11 -fopenmp
CXX11FLAGS = -O3 -Wall -pipe -pedantic -std=gnu11 -fopenmp
CXX14FLAGS = -O3 -Wall -pipe -pedantic -std=gnu14 -fopenmp
PKG_CFLAGS= -O3 -Wall -pipe -pedantic -std=gnu99 -fopenmp
PKG_CXXFLAGS= -fopenmp
PKG_LIBS = -fopenmp -lgomp
CFLAGS= -O3 -Wall -pipe -pedantic -std=gnu99 -fopenmp
FCFLAGS=-O3 -g0 -Wall -pipe -fopenmp
I have played around with these settings, but nothing seems to help. Any wise thoughts would be appreciated. Many thanks.
Update:
I think some packages are using openMP now (e.g. xgboost). However, I still get the error message with some packages (e.g. Amelia):
* installing *source* package ‘Amelia’ ...
** package ‘Amelia’ successfully unpacked and MD5 sums checked
** libs
g++ -I/usr/share/R/include -DNDEBUG -I"/usr/local/lib/R/site-
library/Rcpp/include" -I"/usr/local/lib/R/site-
library/RcppArmadillo/include" -fpic -g -O2 -fstack-protector-strong -
Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -g -c
em.cpp -o em.o
In file included from /usr/local/lib/R/site-
library/RcppArmadillo/include/armadillo:53:0,
from /usr/local/lib/R/site-
library/RcppArmadillo/include/RcppArmadilloForward.h:46,
from /usr/local/lib/R/site-
library/RcppArmadillo/include/RcppArmadillo.h:31,
from em.h:3,
from em.cpp:2:
/usr/local/lib/R/site-
library/RcppArmadillo/include/armadillo_bits/compiler_setup.hpp:474:96:
note: #pragma message: WARNING: use of OpenMP disabled; this compiler
doesn't support OpenMP 3.0+
#pragma message ("WARNING: use of OpenMP disabled; this compiler doesn't
support OpenMP 3.0+")
^
g++ -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-z,relro -o
Amelia.so em.o -llapack -lblas -lgfortran -lm -lquadmath -L/usr/lib/R/lib -
lR
installing to /usr/local/lib/R/site-library/Amelia/libs
I can see that Amelia does not finish with '-fopenmp' unlike xgboost, but I don't know what else to add to my ~/.R/Makevars. Installation of xgboost ends in the following (note the -fopenmp):
g++ -std=gnu++11 -shared -L/usr/lib/R/lib -Wl,-Bsymbolic-functions -Wl,-
z,relro -o xgboost.so ./xgboost_R.o ./xgboost_custom.o ./xgboost_assert.o
./amalgamation/xgboost-all0.o ./amalgamation/dmlc-minimum0.o
./rabit/src/engine_empty.o ./rabit/src/c_api.o -fopenmp -L/usr/lib/R/lib -lR
installing to /usr/local/lib/R/site-library/xgboost/libs
The comment by #hejseb is correct. (Rcpp)Armadillo now wants to use OpenMP when it can---on new enough compilers.
But client packages need to turn this on, meaning they have to change their file src/Makevars from having just
PKG_LIBS = $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
to
PKG_CXXFLAGS = $(SHLIB_OPENMP_CXXFLAGS)
PKG_LIBS = $(SHLIB_OPENMP_CFLAGS) $(LAPACK_LIBS) $(BLAS_LIBS) $(FLIBS)
to enable OpenMP in the client package on both compilation and linking.
And e.g. the forecast package does not yet do that.
You can also set "global" #define in your ~/.R/Makevars to skip OpenMP if you find this too noisy. But you'd leave some performance on the table, which is not a good default. Which is why (Rcpp)Armadillo makes the noisy comment.
Edit: There is one minor nuisance in that you need to set the flags for every C++ dialect so make sure you set CFLAGS, CXXFLAGS, CXX11FLAGS and CXX14FLAGS. You should see the -fopenmp on the command-line when R CMD INSTALL ... does its work.

How to build QT Project from terminal MacOS X

For example, lets take a default QT widget application that we get. So instead of using QT Creator if we want to build using the terminal then what is the way to do that?
Basically we want to produce the build for the project which actually also contains the dmg file.
Compile output when done using QT Creator shown is below when no change is done :
14:37:04: Running steps for project QTDefaultProj...
14:37:04: Configuration unchanged, skipping qmake step.
14:37:04: Starting: "/usr/bin/make"
make: Nothing to be done for `first'.
14:37:05: The process "/usr/bin/make" exited normally.
14:37:05: Elapsed time: 00:00.
Compile Output after changing the directory :
15:31:50: Running steps for project QTDefaultProj...
15:31:50: Starting: "/Users/arqam/Desktop/ImageToCartoon/QT/5.10.0/clang_64/bin/qmake" /Users/arqam/Desktop/Junk/QTDefaultProj/QTDefaultProj.pro -spec macx-clang CONFIG+=debug CONFIG+=x86_64 CONFIG+=qml_debug
Info: creating stash file /Users/arqam/Desktop/Junk/build-QTDefaultProj-Desktop_Qt_5_10_0_clang_64bit-Debug-2/.qmake.stash
15:31:50: The process "/Users/arqam/Desktop/ImageToCartoon/QT/5.10.0/clang_64/bin/qmake" exited normally.
15:31:50: Starting: "/usr/bin/make" qmake_all
make: Nothing to be done for `qmake_all'.
15:31:51: The process "/usr/bin/make" exited normally.
15:31:51: Starting: "/usr/bin/make"
/Users/arqam/Desktop/ImageToCartoon/QT/5.10.0/clang_64/bin/uic ../QTDefaultProj/mainwindow.ui -o ui_mainwindow.h
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -g -std=gnu++11 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.10 -Wall -W -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../QTDefaultProj -I. -I../../ImageToCartoon/QT/5.10.0/clang_64/lib/QtWidgets.framework/Headers -I../../ImageToCartoon/QT/5.10.0/clang_64/lib/QtGui.framework/Headers -I../../ImageToCartoon/QT/5.10.0/clang_64/lib/QtCore.framework/Headers -I. -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/AGL.framework/Headers -I. -I../../ImageToCartoon/QT/5.10.0/clang_64/mkspecs/macx-clang -F/Users/arqam/Desktop/ImageToCartoon/QT/5.10.0/clang_64/lib -o main.o ../QTDefaultProj/main.cpp
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -g -std=gnu++11 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.10 -Wall -W -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../QTDefaultProj -I. -I../../ImageToCartoon/QT/5.10.0/clang_64/lib/QtWidgets.framework/Headers -I../../ImageToCartoon/QT/5.10.0/clang_64/lib/QtGui.framework/Headers -I../../ImageToCartoon/QT/5.10.0/clang_64/lib/QtCore.framework/Headers -I. -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/AGL.framework/Headers -I. -I../../ImageToCartoon/QT/5.10.0/clang_64/mkspecs/macx-clang -F/Users/arqam/Desktop/ImageToCartoon/QT/5.10.0/clang_64/lib -o mainwindow.o ../QTDefaultProj/mainwindow.cpp
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -pipe -stdlib=libc++ -g -std=gnu++11 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.10 -Wall -W -dM -E -o moc_predefs.h ../../ImageToCartoon/QT/5.10.0/clang_64/mkspecs/features/data/dummy.cpp
/Users/arqam/Desktop/ImageToCartoon/QT/5.10.0/clang_64/bin/moc -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB --include ./moc_predefs.h -I/Users/arqam/Desktop/ImageToCartoon/QT/5.10.0/clang_64/mkspecs/macx-clang -I/Users/arqam/Desktop/Junk/QTDefaultProj -I/Users/arqam/Desktop/ImageToCartoon/QT/5.10.0/clang_64/lib/QtWidgets.framework/Headers -I/Users/arqam/Desktop/ImageToCartoon/QT/5.10.0/clang_64/lib/QtGui.framework/Headers -I/Users/arqam/Desktop/ImageToCartoon/QT/5.10.0/clang_64/lib/QtCore.framework/Headers -I. -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/8.1.0/include -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/usr/include -F/Users/arqam/Desktop/ImageToCartoon/QT/5.10.0/clang_64/lib ../QTDefaultProj/mainwindow.h -o moc_mainwindow.cpp
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -c -pipe -stdlib=libc++ -g -std=gnu++11 -arch x86_64 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.10 -Wall -W -fPIC -DQT_DEPRECATED_WARNINGS -DQT_QML_DEBUG -DQT_WIDGETS_LIB -DQT_GUI_LIB -DQT_CORE_LIB -I../QTDefaultProj -I. -I../../ImageToCartoon/QT/5.10.0/clang_64/lib/QtWidgets.framework/Headers -I../../ImageToCartoon/QT/5.10.0/clang_64/lib/QtGui.framework/Headers -I../../ImageToCartoon/QT/5.10.0/clang_64/lib/QtCore.framework/Headers -I. -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/OpenGL.framework/Headers -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk/System/Library/Frameworks/AGL.framework/Headers -I. -I../../ImageToCartoon/QT/5.10.0/clang_64/mkspecs/macx-clang -F/Users/arqam/Desktop/ImageToCartoon/QT/5.10.0/clang_64/lib -o moc_mainwindow.o moc_mainwindow.cpp
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -stdlib=libc++ -headerpad_max_install_names -arch x86_64 -Wl,-syslibroot,/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -mmacosx-version-min=10.10 -Wl,-rpath,#executable_path/Frameworks -Wl,-rpath,/Users/arqam/Desktop/ImageToCartoon/QT/5.10.0/clang_64/lib -o QTDefaultProj.app/Contents/MacOS/QTDefaultProj main.o mainwindow.o moc_mainwindow.o -F/Users/arqam/Desktop/ImageToCartoon/QT/5.10.0/clang_64/lib -framework QtWidgets -framework QtGui -framework QtCore -framework DiskArbitration -framework IOKit -framework OpenGL -framework AGL
15:31:55: The process "/usr/bin/make" exited normally.
15:31:55: Elapsed time: 00:05.
With help from m7913d I am finally able to build the QT project from terminal without using QT Creator.
So steps are :
Create an empty folder name it as build-debug for example.
Inside your build-debug folder run the following command :
pathToQTDirectory/QT/5.10.0/clang_64/bin/qmake pathToQTProjectFolder/MyProject/
/usr/bin/make qmake_all
/usr/bin/make
If the above doesn't work then try seeing in the QT Creator compiler output the steps involved when you specify a new directory as the build directory.

Installation of rgdal fails in Gentoo with inverser.c include directive

I am trying to install rgdal (a dependency of gstat) in R on a Calculate Linux (effectively a generic Gentoo) clean installation. I have sci-libs/gdal installed. Here are the last few lines of output:
x86_64-pc-linux-gnu-g++ -I/usr/lib64/R/include -DNDEBUG -I/usr/include/gdal -I"/home/wjc721/R/x86_64-pc-linux-gnu-library/3.2/sp/include" -fpic -O2 -march=x86-64 -pipe -c OGR_write.cpp -o OGR_write.o
x86_64-pc-linux-gnu-g++ -I/usr/lib64/R/include -DNDEBUG -I/usr/include/gdal -I"/home/wjc721/R/x86_64-pc-linux-gnu-library/3.2/sp/include" -fpic -O2 -march=x86-64 -pipe -c gdal-bindings.cpp -o gdal-bindings.o
x86_64-pc-linux-gnu-gcc -std=gnu99 -I/usr/lib64/R/include -DNDEBUG -I/usr/include/gdal -I"/home/wjc721/R/x86_64-pc-linux-gnu-library/3.2/sp/include" -fpic -O2 -march=x86-64 -pipe -c init.c -o init.o
x86_64-pc-linux-gnu-gcc -std=gnu99 -I/usr/lib64/R/include -DNDEBUG -I/usr/include/gdal -I"/home/wjc721/R/x86_64-pc-linux-gnu-library/3.2/sp/include" -fpic -O2 -march=x86-64 -pipe -c inverser.c -o inverser.o
inverser.c:3:22: fatal error: projects.h: No such file or directory
#include <projects.h>
^
compilation terminated.
Existing answers on Stackoverflow are for Linux distributions other than Gentoo. They suggest installation of packages (in Debian) such as libgdal1h, libgdal1-dev, libproj-dev and gdal-bin, none of which exist in Gentoo.
Any help would be very much appreciated! It was working fine on the previous version of Calculate :(
Thanks,
Bill
Edit: I upgraded R from v3.2.2 to 3.3.2 and gdal from 2.0.2-r3 to 2.0.3. This did not help, the error is the same.
I encountered the same problem. Upgrading to proj-4.9.2 did the trick.

Configure Qt library 4.8.1 error when I cross compile

I’m compiling the Qt with phonon and phonon-backend for my embedded board.
I type:
./configure -embedded arm -xplatform qws/linux-arm-g++ -qt-mouse-tslib -L/home/user/ev-sdk/rootfs/arm-a8-fs/usr/lib -L/home/user/Desktop/qt-everywhere-opensource-src-4.8.1/lib -I/home/user/ev-sdk/rootfs/arm-a8-fs/usr/include -I/home/user/ev-sdk/rootfs/arm-a8-fs/usr/include/freetype2/freetype/config -prefix /opt/qt_eng -little-endian -no-gif -no-libtiff -no-libmng -no-openssl -no-opengl -no-mmx -no-3dnow -no-sse -no-sse2 -no-largefile -no-sm -svg -v -no-feature-cursor -fast -opensource -release -no-multimedia -no-cups -no-nis -no-exceptions -nomake examples -nomake demos -no-sql-sqlite -no-g++-exceptions -phonon -phonon-backend -DQT_NO_QWS_CURSOR -DQT_THREAD_SUPPORT
with qmake.conf in /home/user/Desktop/qt-everywhere-opensource-src-4.8.1/mkspecs/qws/linux-arm-g++:
#
# qmake configuration for building with arm-linux-g++ #
include(../../common/gcc-base.conf)
include(../../common/gcc-base-unix.conf)
include(../../common/g++.conf)
include(../../common/linux.conf)
include(../../common/qws.conf)
QMAKE_CFLAGS_RELEASE = -O3 -march=armv7-a -mtune=cortex-a8
-mfpu=neon -mfloat-abi=softfp
DEFINES +=
# modifications to g++.conf
QMAKE_CC = sb2 -t imx53 gcc
QMAKE_CXX = sb2 -t imx53 g++
QMAKE_LINK = sb2 -t imx53 g++
QMAKE_LINK_SHLIB = sb2 -t imx53 g++
# modifications to linux.conf
QMAKE_AR = sb2 -t imx53 ar cqs
QMAKE_OBJCOPY = sb2 -t imx53 objcopy
QMAKE_STRIP = sb2 -t imx53 strip
load(qt_config)
If I remove -phonon -phonon-backend from option the compilation is successful.
If I put -phonon -phonon-backend
I have this error:
.
.
.
D-Bus auto-detection... ()
Project WARNING: Your mkspec is including 'common/g++.conf', but the mkspecs have been refactored
To fix this include 'common/gcc-base-.conf and 'common/g++-.conf' instead
sb2 -t imx53 g++ -c -pipe -pipe -pipe -pipe -pipe -pipe -O2 -O2 -O2 -O2 -O2 -O2 -Wall -W -Wall -W -Wall -W -Wall -W -Wall -W -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/home/user/ev-sdk/rootfs/arm-a8-fs/usr/include -I/home/user/ev-sdk/rootfs/arm-a8-fs/usr/include/freetype2/freetype/config -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -o dbus.o dbus.cpp
dbus.cpp:43:23: error: dbus/dbus.h: No such file or directory
dbus.cpp:46:2: error: #error Needs at least dbus version 1
dbus.cpp: In function 'int main(int, char**)':
dbus.cpp:51: error: 'dbus_shutdown' was not declared in this scope
make: *** [dbus.o] Error 1
D-Bus disabled.
Glib auto-detection... ()
Project WARNING: Your mkspec is including 'common/g++.conf', but the mkspecs have been refactored
To fix this include 'common/gcc-base-.conf and 'common/g++-.conf' instead
sb2 -t imx53 g++ -c -pipe -pipe -pipe -pipe -pipe -pipe -O2 -O2 -O2 -O2 -O2 -O2 -Wall -W -Wall -W -Wall -W -Wall -W -Wall -W -Wall -W -I../../../mkspecs/qws/linux-arm-g++ -I. -I/home/user/ev-sdk/rootfs/arm-a8-fs/usr/include -I/home/user/ev-sdk/rootfs/arm-a8-fs/usr/include/freetype2/freetype/config -I/usr/lib/glib-2.0/include -I/usr/include/glib-2.0 -o glib.o glib.cpp
glib.cpp: In function 'int main(int, char**)':
glib.cpp:55: warning: 'pollfd' is used uninitialized in this function
sb2 -t imx53 g++ -Wl,-O1 -o glib glib.o -L/home/user/ev-sdk/rootfs/arm-a8-fs/usr/lib -L/home/user/Desktop/qt-everywhere-opensource-src-4.8.1/lib
*glib.o: In function `main':
glib.cpp:(.text+0x10): undefined reference to `g_thread_init'
glib.cpp:(.text+0x14): undefined reference to `g_main_context_default'
glib.cpp:(.text+0x20): undefined reference to `g_source_new'
glib.cpp:(.text+0x28): undefined reference to `g_source_add_poll'
glib.cpp:(.text+0x38): undefined reference to `g_threads_got_initialized'
collect2: ld returned 1 exit status
make: *** [glib] Error 1*
Glib disabled.
Phonon 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.
I lost the last two days to understand why giving error.
Could someone help me?
Debian/linux can use:
$ sudo apt-get install libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev
The command can be run before run ./configure
QMAKE_LIBDIR += -L$${ROOTFS_DIR}/usr/lib
QMAKE_CFLAGS += -I$${ROOTFS_DIR}/usr/include/glib-2.0
QMAKE_CFLAGS += -I$${ROOTFS_DIR}/usr/lib/glib-2.0/include
QMAKE_LIBS += -lgthread-2.0 -lglib-2.0 -v

Resources