GithubHelp home page GithubHelp logo

Compilation error with qt5 about qtcurve HOT 18 OPEN

qtcurve avatar qtcurve commented on June 2, 2024
Compilation error with qt5

from qtcurve.

Comments (18)

yuyichao avatar yuyichao commented on June 2, 2024

That should be fine.
What's the compile error and are you sure you have QtWidgets private headers installed?

from qtcurve.

nick87720z avatar nick87720z commented on June 2, 2024

There is dir with private headers:
/usr/include/qt5/QtWidgets/5.2.0/QtWidgets/private

Including necessary header.
"" is usually used for headers in source dir. For system dirs or those, added with compiler option -I, should be <>.

i.e.: "" is path relative including file, not in -I and other system dirs

from qtcurve.

yuyichao avatar yuyichao commented on June 2, 2024

So what exactly is the compile error.
I think if the header is not found in current directory, the compiler will search it again in system path.

Quoted from cplusplus.com

The syntax used in the second #include uses quotes, and includes a file. The file is searched for in an
implementation-defined manner, which generally includes the current path. In the case that the file is not found,
the compiler interprets the directive as a header inclusion, just as if the quotes ("") were replaced by
angle-brackets (<>).

from qtcurve.

nick87720z avatar nick87720z commented on June 2, 2024

Hm, tried for self. Error doesn't disappear.

from qtcurve.

yuyichao avatar yuyichao commented on June 2, 2024

You can paste the error output of the compiler, this should help narrowing down the problem.

Also, if you think there is any problem with include path running make VERBOSE=1 should help figuring out what exactly command is used.

If you have changed compile options or have compiled with different Qt5 versions, remove CMakeCache.txt and compile again may help.

from qtcurve.

nick87720z avatar nick87720z commented on June 2, 2024

[ 92%] Building CXX object qt5/style/CMakeFiles/qtcurve-qt5.dir/argbhelper.cpp.o
cd /var/calculate/tmp/portage/x11-themes/qtcurve-9999/work/qtcurve-9999_build/qt5/style && /usr/bin/x86_64-pc-linux-gnu-g++ -DQTC_UTILS_QT5 -DQT_CORE_LIB -DQT_DBUS_LIB -DQT_DISABLE_DEPRECATED_BEFORE=0x050100 -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_PLUGIN -DQT_QML_LIB -DQT_QUICK_LIB -DQT_SVG_LIB -DQT_WIDGETS_LIB -DQT_X11EXTRAS_LIB -D_BSD_SOURCE -Dqtcurve_qt5_EXPORTS -DNDEBUG -O2 -march=native -mtune=native -pipe -msse4 -msse4.1 -msse4.2 -mavx -Wnon-virtual-dtor -Wno-long-long -Wundef -Wcast-align -Wchar-subscripts -Wall -W -Wpointer-arith -Wformat-security -fno-exceptions -DQT_NO_EXCEPTIONS -fno-check-new -fno-common -Woverloaded-virtual -fno-threadsafe-statics -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra '-std=c++0x' -fPIC -I/var/calculate/tmp/portage/x11-themes/qtcurve-9999/work/qtcurve-9999_build -I/var/calculate/tmp/portage/x11-themes/qtcurve-9999/work/qtcurve-9999_build/.cmake_utils_base/cmake_c_macros/include_fix -I/var/calculate/tmp/portage/x11-themes/qtcurve-9999/work/qtcurve-9999/qt5 -I/var/calculate/tmp/portage/x11-themes/qtcurve-9999/work/qtcurve-9999_build/qt5 -I/usr/include/qt5 -I/usr/include/qt5/QtCore -I/usr/lib64/qt5/mkspecs/linux-g++ -I/usr/include/qt5/QtGui -I/usr/include/qt5/QtWidgets -I/usr/include/qt5/QtSvg -I/usr/include/qt5/QtQuick -I/usr/include/qt5/QtQml -I/usr/include/qt5/QtNetwork -I/usr/include/qt5/QtDBus -I/usr/include/qt5/QtX11Extras -I/var/calculate/tmp/portage/x11-themes/qtcurve-9999/work/qtcurve-9999/qt5/style -I/var/calculate/tmp/portage/x11-themes/qtcurve-9999/work/qtcurve-9999_build/qt5/style -D_GNU_SOURCE -pthread -o CMakeFiles/qtcurve-qt5.dir/argbhelper.cpp.o -c /var/calculate/tmp/portage/x11-themes/qtcurve-9999/work/qtcurve-9999/qt5/style/argbhelper.cpp
/var/calculate/tmp/portage/x11-themes/qtcurve-9999/work/qtcurve-9999/qt5/style/argbhelper.cpp:25:31: fatal error: private/qwidget_p.h: No such file or directory

from qtcurve.

nick87720z avatar nick87720z commented on June 2, 2024

Ha, already found. It includes /usr/include/qt5/QtWidgets, but there are more two dirs to dive to :) (5.2.0/QtWidgets).

from qtcurve.

yuyichao avatar yuyichao commented on June 2, 2024

It should be taken care of by this. You should first try removing CMakeCache.txt and if it doesn't work, print that cmake variable with message("${Qt5Widgets_PRIVATE_INCLUDE_DIRS}") and see if it has the right directories in it.

from qtcurve.

nick87720z avatar nick87720z commented on June 2, 2024

It is empty. I guessed misprinting, since most other DIR variables are ending with "_DIR", not "_DIRS", but without S at the end result is same.

I found such variable mentioned only in one place in web: http://qt-project.org/forums/viewthread/23190

from qtcurve.

nick87720z avatar nick87720z commented on June 2, 2024

Tried manually clone and build only with qt5. Same. The only way, i found for self is to set this variable in pointed CMakeList.txt, filling with two path, where second is for QtCore ptivate include dir. Did not install yet.

Using qt 5.2.0
I guess, this variable is deprecated, but could be got using other known, not private paths.

Hm, found mentioned in Qt5WidgetsConfig.cmake.

from qtcurve.

nick87720z avatar nick87720z commented on June 2, 2024

I looked better to cmake output, trying to configure only with qt5 and only with qt4.
In both cases it says in begining: found Qt-Version 4.8.5 (using /usr/bin/qmake) after lines about Q_WS_*.
But for qt4 it prints it again after "xcb; x11-xcb" check.

All options are -DENABLE_QT5=yes -DENABLE_QT4=no -DENABLE_GTK2=no -DQTC_QT4_ENABLE_KDE=no, where only one of first two is enabled. Others are autodetected.

from qtcurve.

nick87720z avatar nick87720z commented on June 2, 2024

https://bugs.archlinux.org/task/36988
still unsure

from qtcurve.

yuyichao avatar yuyichao commented on June 2, 2024

.... None of them are related.....
The first Qt4 check is for figuring out KDE prefix.
And the bug report is just invalid (it just says you should use this variable.)

from qtcurve.

yuyichao avatar yuyichao commented on June 2, 2024

I'm using Qt5.2.0rc1 (haven't updated yet because of network problems) and it compiles fine. I also checked the cmake module of 5.2.0 and rc1 and they looks the same.

from qtcurve.

yuyichao avatar yuyichao commented on June 2, 2024

I'm still not sure what's the problem and I need to leave now.
If you would like to debug this yourself, the only thing I can suggest is to trace the cmake module of Qt5Widgets and print this variable at different places to see if it is properly set.

from qtcurve.

nick87720z avatar nick87720z commented on June 2, 2024

Looks like not qtcurve bug. In foreach block, finding each package and doing some inits, *_INCLUDE_DIRS are filled, but *_PRIVATE_INCLUDE_DIRS are empty.

from qtcurve.

ff2000 avatar ff2000 commented on June 2, 2024

Same issue here, I am also a Gentoo user. Probably Gentoo is doing something wrong with its Qt5 install.
Qt4 installs its private headers under (e.g.) /usr/include/qt4/QtCore/private. Qt5 puts them into /usr/include/qt5/QtCore/5.2.0/QtCore/private. This looks really suspicious - as if it did not get the proper install directory right...

from qtcurve.

ff2000 avatar ff2000 commented on June 2, 2024

I think it is intended that those paths look like this.
/usr/lib64/qt5/mkspecs/modules/qt_lib_core_private.pri etc.
seem to manage it that way.

I also reported this issue in the gentoo bug tracker:
https://bugs.gentoo.org/show_bug.cgi?id=499882

from qtcurve.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.