Including wrong Qt version headers - qt

I am trying to install QT Creator from source on Centos 6. I have installed (what I think are) the Qt5 libraries onto my system using yum. When I check which rpm's are installed I see
[qt-creator-2.8.1-src]# rpm -qa | grep qt
qt5-qtbase-x11-5.1.1-3.el6.x86_64
qt-4.6.2-26.el6_4.x86_64
qt-sqlite-4.6.2-26.el6_4.x86_64
qt-x11-4.6.2-26.el6_4.x86_64
qt5-qtbase-5.1.1-3.el6.x86_64
ibus-qt-1.3.0-2.el6.x86_64
qt3-3.3.8b-30.el6.x86_64
qt5-qtbase-devel-5.1.1-3.el6.x86_64
qt-devel-4.6.2-26.el6_4.x86_64
qt3-devel-3.3.8b-30.el6.x86_64
So qt5 seems to be installed, but so is qt4 and qt3 (perhaps required by some other apps, but this is a pretty plain system). So now I've downloaded the QT Creator source, and am trying to compile. I gave the full path the qt5 qmake (/usr/lib64/qt5/bin/qmake qtcreator.pro) and that worked. But now when I issue the command make I see:
[qt-creator-2.8.1-src]# make
cd src/ && ( test -e Makefile || /usr/lib64/qt5/bin/qmake /usr/src/qtcreator/qt-creator-2.8.1-src/src/src.pro -o Makefile ) && make -f Makefile
make[1]: Entering directory `/usr/src/qtcreator/qt-creator-2.8.1-src/src'
cd libs && make -f Makefile
make[2]: Entering directory `/usr/src/qtcreator/qt-creator-2.8.1-src/src/libs'
cd aggregation && make -f Makefile
make[3]: Entering directory `/usr/src/qtcreator/qt-creator-2.8.1-src/src/libs/aggregation'
g++ -c -pipe -Wall -W -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m64 -mtune=generic -fno-strict-aliasing -fPIC -DAGGREGATION_LIBRARY -DQT_NO_DEBUG -DQT_SHARED -DQT_TABLET_SUPPORT -DQT_THREAD_SUPPORT -I/usr/lib64/qt-3.3/mkspecs/default -I. -I/src -I\ -I/usr/lib64/qt-3.3/include -o aggregate.o aggregate.cpp
In file included from aggregate.h:33,
from aggregate.cpp:30:
aggregation_global.h:33:21: error: qglobal.h: No such file or directory
In file included from aggregate.cpp:30:
aggregate.h:35:19: error: QObject: No such file or directory
aggregate.h:36:17: error: QList: No such file or directory
aggregate.h:37:17: error: QHash: No such file or directory
aggregate.h:38:26: error: QReadWriteLock: No such file or directory
aggregate.h:39:23: error: QReadLocker: No such file or directory
aggregate.cpp:32:24: error: QWriteLocker: No such file or directory
aggregate.cpp:33:18: error: QDebug: No such file or directory
In file included from aggregate.cpp:30:
aggregate.h:43: error: expected initializer before ‘:’ token
aggregate.cpp:277: error: expected ‘}’ at end of input
make[3]: *** [aggregate.o] Error 1
make[3]: Leaving directory `/usr/src/qtcreator/qt-creator-2.8.1-src/src/libs/aggregation'
make[2]: *** [sub-aggregation] Error 2
make[2]: Leaving directory `/usr/src/qtcreator/qt-creator-2.8.1-src/src/libs'
make[1]: *** [sub-libs] Error 2
make[1]: Leaving directory `/usr/src/qtcreator/qt-creator-2.8.1-src/src'
make: *** [sub-src-make_first-ordered] Error 2
so it looks like make is including the qt 3.3 headers I/usr/lib64/qt-3.3/mkspecs/default). How do I tell make or qmake to use the Qt5 headers/libraries?
I remove the qt3-devel package as suggested below, and now my error changes to:
cd src/ && ( test -e Makefile || /opt/Qt/5.1.1/gcc_64/bin/qmake /usr/src/qtcreator/qt-creator-2.8.1-src/src/src.pro -o Makefile ) && make -f Makefile
make[1]: Entering directory `/usr/src/qtcreator/qt-creator-2.8.1-src/src'
make[1]: *** No rule to make target `/usr/lib64/qt-3.3/mkspecs/default/qmake.conf', needed by `Makefile'. Stop.
make[1]: Leaving directory `/usr/src/qtcreator/qt-creator-2.8.1-src/src'
make: *** [sub-src-make_first-ordered] Error 2
as you can see make is still referencing the qt3 stuff.

The solution for those encountering the same:
Remove qt3-devel
Install qt5-* (otherwise the make process will complain about missing items). You can probably be more selective but after 10 time install individual packages based on make complains, I just put them all in.
run qmake giving the full path to the qt5 version of qmake
run 'qmake -r' not 'qmake qtcreator.pro'

Related

No rule to make target all.R, needed by compiler.rdb R 3.4.1 from source, Scientific Linux

I am trying to build R from source on Scientific Linux release 6.9 (Carbon), Linux version 2.6.32-696.3.2.el6.x86_64 (Red Hat 4.4.7-18).
I load the needed modules and run:
./configure --prefix $install_dir --with-blas --with-lapack --enable-R-shlib 2>&1 | tee config-R-$version.log
The "configure" command seems to run ok:
R is now configured for x86_64-pc-linux-gnu
Source directory: .
Installation directory: /fastdata/mbp15ja/R-3.4.1
C compiler: gcc -I/usr/local/packages6/compilers/gcc/5.4.0/include
Fortran 77 compiler: gfortran -g -O2
Default C++ compiler: g++ -g -O2
C++98 compiler: g++ -g -O2
C++11 compiler: g++ -std=gnu++11 -g -O2
C++14 compiler: g++ -std=gnu++14 -g -O2
C++17 compiler:
Fortran 90/95 compiler: gfortran -g -O2
Obj-C compiler:
Interfaces supported: X11, tcltk
External libraries: readline, curl
Additional capabilities: PNG, JPEG, NLS, cairo
Options enabled: shared R library, shared BLAS, R profiling
Capabilities skipped: TIFF, ICU
Options not enabled: memory profiling
Recommended packages: yes
I encountered an error running "make -n" with the libtre library not generating libtre.a:
rm -rf libnmath.a
ar -cr libnmath.a mlutils.o d1mach.o i1mach.o fmax2.o fmin2.o fprec.o fround.o ftrunc.o sign.o fsign.o imax2.o imin2.o chebyshev.o log1p.o expm1.o lgammacor.o gammalims.o stirlerr.o bd0.o gamma.o lgamma.o gamma_cody.o beta.o lbeta.o polygamma.o cospi.o bessel_i.o bessel_j.o bessel_k.o bessel_y.o choose.o snorm.o sexp.o dgamma.o pgamma.o qgamma.o rgamma.o dbeta.o pbeta.o qbeta.o rbeta.o dunif.o punif.o qunif.o runif.o dnorm.o pnorm.o qnorm.o rnorm.o dlnorm.o plnorm.o qlnorm.o rlnorm.o df.o pf.o qf.o rf.o dnf.o dt.o pt.o qt.o rt.o dnt.o dchisq.o pchisq.o qchisq.o rchisq.o rnchisq.o dbinom.o pbinom.o qbinom.o rbinom.o rmultinom.o dcauchy.o pcauchy.o qcauchy.o rcauchy.o dexp.o pexp.o qexp.o rexp.o dgeom.o pgeom.o qgeom.o rgeom.o dhyper.o phyper.o qhyper.o rhyper.o dnbinom.o pnbinom.o qnbinom.o rnbinom.o dpois.o ppois.o qpois.o rpois.o dweibull.o pweibull.o qweibull.o rweibull.o dlogis.o plogis.o qlogis.o rlogis.o dnchisq.o pnchisq.o qnchisq.o dnbeta.o pnbeta.o qnbeta.o pnf.o pnt.o qnf.o qnt.o ptukey.o qtukey.o toms708.o wilcox.o signrank.o
ranlib libnmath.a
make[4]: Leaving directory `/data/mbp15ja/R-3.4.1/R-3.4.1/src/nmath'
make[3]: *** No rule to make target `../extra/tre/libtre.a', needed by `libR.so'. Stop.
make[3]: Leaving directory `/data/mbp15ja/R-3.4.1/R-3.4.1/src/main'
make[2]: *** [R] Error 2
make[2]: Leaving directory `/data/mbp15ja/R-3.4.1/R-3.4.1/src/main'
make[1]: *** [R] Error 1
make[1]: Leaving directory `/data/mbp15ja/R-3.4.1/R-3.4.1/src'
make: *** [R] Error 1
I read in here https://www-01.ibm.com/support/docview.wss?uid=swg1IV36656 that the library isn't supposed to make libtre.a and that they assume the file they are looking for is libtre.so
I therefore built the libtre and linked libtre.so from the library to src/extra/tre/libtre.a and now the make
"make -n" now fails with:
if test -f ./NAMESPACE; then \
/usr/bin/install -c -m 644 ./NAMESPACE ../../../library/compiler; \
fi
rm -f ../../../library/compiler/Meta/nsInfo.rds
if test -f DESCRIPTION; then \
if test "" != ""; then \
echo "tools:::.install_package_description('.', '../../../library/compiler', '')" | \
R_DEFAULT_PACKAGES=NULL R_ENABLE_JIT=0 ../../../bin/R --vanilla --slave > /dev/null ; \
else \
echo "tools:::.install_package_description('.', '../../../library/compiler')" | \
R_DEFAULT_PACKAGES=NULL R_ENABLE_JIT=0 ../../../bin/R --vanilla --slave > /dev/null ; \
fi; \
fi
make[4]: Leaving directory `/data/mbp15ja/R-3.4.1/R-3.4.1/src/library/compiler'
make mklazycomp
make[4]: Entering directory `/data/mbp15ja/R-3.4.1/R-3.4.1/src/library/compiler'
make[4]: *** No rule to make target `all.R', needed by `../../../library/compiler/R/compiler.rdb'. Stop.
make[4]: Leaving directory `/data/mbp15ja/R-3.4.1/R-3.4.1/src/library/compiler'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/data/mbp15ja/R-3.4.1/R-3.4.1/src/library/compiler'
make[2]: *** [R] Error 1
make[2]: Leaving directory `/data/mbp15ja/R-3.4.1/R-3.4.1/src/library'
make[1]: *** [R] Error 1
make[1]: Leaving directory `/data/mbp15ja/R-3.4.1/R-3.4.1/src'
make: *** [R] Error 1
I haven't seen anything regarding all.R and ../../../library/compiler/R/compiler.rdb
Thanks in advance!

/usr/local/lib: file not recognized: Is a directory

When installing justniffer on CentOS 6.5,
./configure
works fine, but make gives the following error:
libtool: link: g++ -g -O2 -o justniffer justniffer-main.o justniffer-formatter.o justniffer-utilities.o justniffer-regex.o justniffer-prog_read_file.o /usr/local/lib -L/root/justniffer/lib/libnids-1.21_patched/src -lnids2 -lpcap -L/usr/local/lib -lboost_regex-mt -lboost_program_options -lpython2.6
/usr/local/lib: file not recognized: Is a directory
collect2: ld returned 1 exit status
make[1]: *** [justniffer] Error 1
make[1]: Leaving directory `/root/justniffer/src'
make: *** [all-recursive] Error 1
What's the solution for this?
use./configure LIBS="-I /usr/local/include -L/usr/local/lib" ,then make,it's work!
Having not compile program for so long time, made the same silly mistake:
Like CFLAGS, LIBS, GTK_LIBS etc should be flags e.g. -Lpath, not bare paths. What I used to do is relocate all DIRs to CFLAGS=/I/L Another way to
Spaces should be quoted or escaped like LIBS="-L'c/program files/gtk+/lib'"
LIBS="-Lc/program\ files/gtk+/lib"
vi Makefile and src/Makefile
LIBS = -pthread -lm -lz -ldl -lutil
make & make install
Success!

WKHTMLTOPDF with Patched QT Ubuntu 14.04 Errors during compiling

I am trying to compile the wkhtmltopdf with patched qt using these instructions and when i get to the make && make install it gives me an error has anyone else done this on Ubuntu 14.04? I can't figure out what to do from here.
these are the instructions i am following i know they are not for 14.04 but i hoped they would have worked https://gist.github.com/Zauberfisch/8773593
This is the error i get:
cd src/lib/ && make -f Makefile make[1]: Entering directory /temp/wkhtmltopdf/src/lib' rm -f libwkhtmltox.so.0.12.1 libwkhtmltox.so libwkhtmltox.so.0 libwkhtmltox.so.0.12 g++ -Wl,-O1 -Wl,-rpath,/temp/wkqt/lib -shared -Wl,-soname,libwkhtmltox.so.0 -o libwkhtmltox.so.0.12.1 ../../build/loadsettings.o ../../build/multipageloader.o ../../build/tempfile.o ../../build/converter.o ../../build/websettings.o ../../build/reflect.o ../../build/utilities.o ../../build/pdfsettings.o ../../build/pdfconverter.o ../../build/outline.o ../../build/tocstylesheet.o ../../build/imagesettings.o ../../build/imageconverter.o ../../build/pdf_c_bindings.o ../../build/image_c_bindings.o ../../build/moc_multipageloader_p.o ../../build/moc_converter_p.o ../../build/moc_pdfconverter_p.o ../../build/moc_imageconverter_p.o ../../build/moc_pdf_c_bindings_p.o ../../build/moc_image_c_bindings_p.o ../../build/moc_converter.o ../../build/moc_multipageloader.o ../../build/moc_utilities.o ../../build/moc_pdfconverter.o ../../build/moc_imageconverter.o ../../build/qrc_wkhtmltopdf.o -L/temp/wkqt/lib -lQtWebKit -lQtSvg -L/temp/wkqt/lib -L/usr/X11R6/lib -lQtXmlPatterns -lQtGui -lQtNetwork -lQtCore -lpthread /usr/bin/ld: ../../build/qrc_wkhtmltopdf.o: relocation R_X86_64_32 against.rodata' can not be used when making a shared object; recompile with -fPIC ../../build/qrc_wkhtmltopdf.o: error adding symbols: Bad value collect2: error: ld returned 1 exit status make[1]: * [../../bin/libwkhtmltox.so.0.12.1] Error 1 make[1]: Leaving directory `/temp/wkhtmltopdf/src/lib' make: * [sub-src-lib-make_default-ordered] Error 2
I downloaded a binary from their site that already had the QT build and that fixed the issue for me. Thanks!

Cygwin 'make' command

I'm trying to compile a library using a Unix shell. I'm running Cygwin on Windows. The install instructions for the library state:
cd' to the directory containing the package's source code and type
./configure' to configure the package for your system. If you're
using csh' on an old version of System V, you might need to type
sh ./configure' instead to prevent csh' from trying to execute
configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
Type `make' to compile the package.
<... MORE INSTRUCTIONS FOLLOW ...>
So, I've placed the folder containing the library source into my Cygwin directory, cd'ed to the folder, and run ./configure. This all appears to work fine, but the 'make' command produces the following output:
$ make
make all-recursive
make[1]: Entering directory `/liblo-0.26'
Making all in src
make[2]: Entering directory `/liblo-0.26/src'
Making all in .
make[3]: Entering directory `/liblo-0.26/src'
/bin/bash ../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I.. -
Wall -I.. -g -O2 -MT liblo_la-address.lo -MD -MP -MF .deps/liblo_la-address.Tpo
-c -o liblo_la-address.lo `test -f 'address.c' || echo './'`address.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I.. -Wall -I.. -g -O2 -MT liblo_la-a
ddress.lo -MD -MP -MF .deps/liblo_la-address.Tpo -c address.c -DDLL_EXPORT -DPI
C -o .libs/liblo_la-address.o
In file included from lo_types_internal.h:33,
from address.c:37:
../lo/lo_osc_types.h:32:20: stdint.h: No such file or directory
In file included from address.c:37:
lo_types_internal.h:89: field `addr' has incomplete type
lo_types_internal.h:98: confused by earlier errors, bailing out
make[3]: *** [liblo_la-address.lo] Error 1
make[3]: Leaving directory `/liblo-0.26/src'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/liblo-0.26/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/liblo-0.26'
make: *** [all] Error 2
What am I doing wrong? Happy to provide more info - but I'm new to Unix shell (as you can probably tell...)
The error is that the header file stdint.h is not found.
stdint.h is a new header, standardized in C99 (The version published in 1999 of the C standard.) It could be that your UNIX does not have it. But cygwin should be recent and have it.
Does your cygwin installation have the C library header files installed?

XCode 4 Unimotion

I use Xcode 4, and I currently dont have any iDevice right now to be able to test accelerometer in my application, so I googled for a while and find util named "unimotion". read me file for Unimotion says: "A Makefile is included so all you have to do is cd to the 'unimotion' directory and type 'make'." So I tried, but terminal give me a message
ls: /Developer/SDKs: No such file or directory cc -Wall -Os -g
-isysroot /Developer/SDKs/ -arch i386 -arch ppc -fconstant-cfstrings -c -o unimotion.o unimotion.c clang: warning: not using the clang compiler for the 'powerpc' architecture unimotion.c:72:10: fatal
error: 'IOKit/IOKitLib.h' file not found
include IOKit/IOKitLib.h>
1 error generated. make[1]: * [unimotion.o] Error 1 make: * [sub-unimotion] Error 2
again and again.
So, what am I doing wrong?
Thanks.
Rewrite all occurrences of /Developer/SDKs/ in the 3 Makefiles (calibrate/Makefile, motion/Makefile and unimotion/Makefile) with
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/
that should help you. If you're using Xcode 4, you'll probably get further error also
llvm-gcc-4.2: error trying to exec '/usr/bin/../llvm-gcc-4.2/bin/powerpc-apple-darwin11-llvm-gcc-4.2': execvp: No such file or directory
as the -arch ppc is not supported there anymore. Just delete every single occurrence of -arch ppc in Makefiles, and it will work.

Resources