Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
existing file invisable to g++
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
mayhew
n00b
n00b


Joined: 25 Feb 2013
Posts: 68

PostPosted: Fri Mar 25, 2016 5:23 pm    Post subject: existing file invisable to g++ Reply with quote

Ive been compiling antimony (https://github.com/mkeeter/antimony) I tried the ebuild on cg but it has blocks that i cant make sence of.

I decided to self compile and after a few CPLUS_INCLUDE_PATH's and CXXFLAGS. im stuck with this failure in g++

Code:
g++ -c -std=c++11 -I/usr/share/qt4/mkspecs/linux-g++ -I../../app -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I../../app/src -I../../lib/fab/inc -I../../lib/graph/inc -I. -I. -I../../app -I. -o serializer.o ../../app/src/graph/node/serializer.cpp
In file included from /usr/include/qt5/QtCore/QJsonObject:1:0,
                 from ../../app/src/graph/node/serializer.h:9,
                 from ../../app/src/graph/node/serializer.cpp:5:
/usr/include/qt5/QtCore/qjsonobject.h:37:31: fatal error: QtCore/qjsonvalue.h: No such file or directory


the problem is qjsonvalue.h exists and i think its where it needs to be
Code:
fen@MayhewMain ~ $ locate QtCore/qjsonvalue.h
/usr/include/qt5/QtCore/qjsonvalue.h


any advice is appriciated.
_________________
:)
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 5724

PostPosted: Fri Mar 25, 2016 6:23 pm    Post subject: Reply with quote

Are you compiling a program that uses Qt4 and Qt5 at the same time? The include flags say one thing but the error points to something very different.
Back to top
View user's profile Send private message
mayhew
n00b
n00b


Joined: 25 Feb 2013
Posts: 68

PostPosted: Fri Mar 25, 2016 6:56 pm    Post subject: Reply with quote

QT 5.4 per the BUILDING.md** and i have qt5 via the fragmented bits and pieces style in gentoo updated to 5.5.1-r1 only ones lower than 5.5 are QT3support and QTtanslations Version 4.8.6-r1 both. the only pieces not emerged are qtbluetooth, qtconcurrent, qtdiag, qthelp, qtpositioning, qtprintsupport, qtquick1(depri.) ,qtsensors, qtserialport, qtwayland, qtwebchannel, qtwebkit, qtwebsockets I dont think they are nessisary but i could be wrong.




** https://github.com/mkeeter/antimony/blob/develop/BUILDING.md
_________________
:)
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Fri Mar 25, 2016 7:57 pm    Post subject: Reply with quote

Add: -I /usr/include/qt5 to CPPFLAGS, after the qt4 stuff, if you're sure you need to be using Qt4 like that.

You really should put the local directories before the system ones, with -I . (which you're repeating for some reason,) first.

(Note that CPPFLAGS apply to CPP, the C PreProcessor. That's where you put your -D, -U, or -I settings.)
Back to top
View user's profile Send private message
mayhew
n00b
n00b


Joined: 25 Feb 2013
Posts: 68

PostPosted: Fri Mar 25, 2016 8:05 pm    Post subject: Reply with quote

i just read the Makefile and it is all linked to qt4. i think my qt version may have been set to qt4 when the make file was generated. i need to set the system to qt5 i think.
_________________
:)
Back to top
View user's profile Send private message
mayhew
n00b
n00b


Joined: 25 Feb 2013
Posts: 68

PostPosted: Fri Mar 25, 2016 8:07 pm    Post subject: Reply with quote

Theres my problem

Code:
 qtchooser -print-env
QT_SELECT="default"
QTTOOLDIR="/usr/lib64/qt4/bin"
QTLIBDIR="/usr/lib64/qt4"

_________________
:)
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Fri Mar 25, 2016 8:13 pm    Post subject: Reply with quote

Ah good. :-)
Back to top
View user's profile Send private message
mayhew
n00b
n00b


Joined: 25 Feb 2013
Posts: 68

PostPosted: Fri Mar 25, 2016 8:20 pm    Post subject: Reply with quote

i think the make file is correct now
it has

QMAKE = /usr/lib/qt5/bin/qmake
as well as "./usr/lib64/qt5 " makefile listings


But the compiling outputs still show qt4
Code:

g++ -c -std=c++11 -I/usr/share/qt4/mkspecs/linux-g++ -I../../app -I/usr/include/qt4/QtCore -I/usr/include/qt4/QtNetwork -I/usr/include/qt4/QtGui -I/usr/include/qt4/QtOpenGL -I/usr/include/qt4 -I../../app/src -I../../lib/fab/inc -I../../lib/graph/inc -I. -I. -I../../app -I. -o serializer.o ../../app/src/graph/node/serializer.cpp


I also found this wiki article but am not sure how to impliment

https://wiki.gentoo.org/wiki/Qt#Compiling_programs_that_use_qmake_and_need_Qt5
_________________
:)
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Fri Mar 25, 2016 8:42 pm    Post subject: Reply with quote

You need to run qtchooser to select Qt5 for your current session.

What does qtchooser --help output? (code tag, please.)

(I've never used it.)
Back to top
View user's profile Send private message
mayhew
n00b
n00b


Joined: 25 Feb 2013
Posts: 68

PostPosted: Fri Mar 25, 2016 9:20 pm    Post subject: Reply with quote

--help
Code:
fen@MayhewMain ~ $ qtchooser --help
Usage:
  qtchooser { -l | -list-versions | -print-env }
  qtchooser -install [-f] [-local] <name> <path-to-qmake>
  qtchooser -run-tool=<tool name> [-qt=<Qt version>] [program arguments]
  <executable name> [-qt=<Qt version>] [program arguments]

Environment variables accepted:
 QTCHOOSER_RUNTOOL  name of the tool to be run (same as the -run-tool argument)
 QT_SELECT          version of Qt to be run (same as the -qt argument)


-l listing and -print-env

Code:
fen@MayhewMain ~ $ qtchooser -l
4
5
default
qt4-x86_64-pc-linux-gnu
qt4
qt5-x86_64-pc-linux-gnu
qt5
fen@MayhewMain ~ $ qtchooser -print-env
QT_SELECT="default"
QTTOOLDIR="/usr/lib64/qt4/bin"
QTLIBDIR="/usr/lib64/qt4"
fen@MayhewMain ~ $


_________________
:)
Back to top
View user's profile Send private message
mayhew
n00b
n00b


Joined: 25 Feb 2013
Posts: 68

PostPosted: Sat Mar 26, 2016 4:54 am    Post subject: Reply with quote

anyone know for sure how to set qt version?
_________________
:)
Back to top
View user's profile Send private message
steveL
Watchman
Watchman


Joined: 13 Sep 2006
Posts: 5153
Location: The Peanut Gallery

PostPosted: Sat Mar 26, 2016 1:23 pm    Post subject: Reply with quote

Blimey, not from that; it looks like qtchooser runs a specific program (like ./configure or make) using the -qt=5 argument.

I'd ask in #gentoo-desktop on IRC: chat.freenode.net or .org if man qtchooser does not help.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum