qtcreator 'type_traits' file not found

Discussions Regarding Software

Moderator: Moderators

User avatar
linuxfluesterer
Old Dear Hen
Posts: 873
Joined: Thu Sep 20, 2012 19:47
Location: Germany

qtcreator 'type_traits' file not found

Post by linuxfluesterer » Sat Mar 10, 2018 21:54

Hallo guys.
I try to learn (a little) qml with qt creator to finally build a plasmoid. So before using qtcreator I found this kde.org website, where was shown the principle structure of a qm program (app):
https://techbase.kde.org/Development/Tu ... ingStarted

I have Plasma 5.12.1 with qt (5.6, I assume, how to check it?).
When I create all the example files and then change into the directory ".../contents/ui" and start the command:

Code: Select all

qmlscene main.qml
then I receive a small app window with "Hello world in Plasma 5".

When I now copy the code of main.qml into the qtcreator window and let it run, then I receive a final error, which is:

Code: Select all

!'type_traits' file not found
#  include <type_traits>
           ^~~~~~~~~~~~~
/usr/include/qt5/QtCore/qglobal.h
and there is no small window with "Hello world in Plasma 5".

This <type_traits> is called by /usr/include/qt5/QtCore/global.h:

Code: Select all

...
#ifdef __cplusplus
#  include <type_traits>
#  include <cstddef>
#  include <utility>
#endif
...
So, my question is, where is this "type_traits" file in Sabayon repo and why can I execute the same qmlcode with qmlscene main.qml] without errors?

Thank you in advance.

-Linuxfluesterer (I love KDE...)
Take away Facebook from me and let there be real people again...

joost
Sagely Hen
Posts: 2715
Joined: Fri Nov 17, 2006 12:11
Location: The Netherlands
Contact:

Re: qtcreator 'type_traits' file not found

Post by joost » Sun Mar 11, 2018 10:50

I think you should make sure you have BOTH sys-devel/base-gcc and sys-devel/gcc installed on your system.
Image
My blog | Twitter | Please support Sabayon: Image

User avatar
linuxfluesterer
Old Dear Hen
Posts: 873
Joined: Thu Sep 20, 2012 19:47
Location: Germany

Re: qtcreator 'type_traits' file not found

Post by linuxfluesterer » Sun Mar 11, 2018 12:15

joost wrote:I think you should make sure you have BOTH sys-devel/base-gcc and sys-devel/gcc installed on your system.
Thank you, Joost. I just installed the missing sys-devel/gcc-6.4.0-r1 package. The other(s) where already installed.
Then I started the qtcreator again, trying to run the simple main.qml with the content:

Code: Select all

import QtQuick 2.0
import org.kde.plasma.components 2.0 as PlasmaComponents

PlasmaComponents.Label {
    text: "Hello world in Plasma 5 ";
}
but instead a proper result, I receive more errors than before:
Image

I have no idea for the (new) errors appearing.

To emphasize: When I simply change into the project directory containingg the simply main.qml and just simply enter:

Code: Select all

qmlscene main.qml
then I do not receive any error. I receive a window and after closing this window, the command line prompt is back.

-Linuxfluesterer (I love KDE...)
Take away Facebook from me and let there be real people again...

User avatar
sabayonino
Sagely Hen
Posts: 3279
Joined: Sun Sep 21, 2008 1:12
Location: Italy
Contact:

Re: qtcreator 'type_traits' file not found

Post by sabayonino » Sun Mar 11, 2018 15:19

a quick check :

Code: Select all

$ sudo find /usr/ -name crti*
Password: 
/usr/lib32/crti.o
/usr/lib64/crti.o
[email protected] ~ $ equo q belongs /usr/lib32/crti.o
╠  @@ Ricerca Appartenenza
╠      @@ Pacchetto: sys-libs/glibc-2.25-r10 branch: 5, [__system__] 
╠          Installato:    versione: 2.25-r10 ~ tag: NoTag ~ revisione: 0
╠          Slot:          2.2
╠          Homepage:      https://www.gnu.org/software/libc/libc.html 
╠          Descrizione:   GNU libc6 (also called glibc2) 
╠                         C library 
╠          Licenza:       BSD HPND ISC LGPL-2.1+ PCRE inner-net rc
╠   Keyword:  /usr/lib32/crti.o
╠   Trovati:  1 voce
[email protected] ~ $ 
[Che Cos'è Il Calcolo Distribuito (BOINC)

BOINC ready ! Sabayon+BOINC = BILD ,my Sabayon spin :cyclops: - Ready to crunch for the Science everywhere :)

User avatar
linuxfluesterer
Old Dear Hen
Posts: 873
Joined: Thu Sep 20, 2012 19:47
Location: Germany

Re: qtcreator 'type_traits' file not found

Post by linuxfluesterer » Sun Mar 11, 2018 16:38

Thank you again.
I already have installed glibc-2.25-r10 package.
Anyway, when I start to run and build, I receive another error result:

Image

I haven't found much about "lgcc" or "-lgcc" in Google. Could be a missing lib of Android? But why? I just have chosen 'local of type 'Desktop' pc' as my device.
And the locate or find commands don't find anything with lgcc on my system.

-Linuxfluesterer (I love KDE...)
Take away Facebook from me and let there be real people again...

Stupot
Sagely Hen
Posts: 1680
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: qtcreator 'type_traits' file not found

Post by Stupot » Mon Mar 12, 2018 16:58


User avatar
linuxfluesterer
Old Dear Hen
Posts: 873
Joined: Thu Sep 20, 2012 19:47
Location: Germany

Re: qtcreator 'type_traits' file not found

Post by linuxfluesterer » Mon Mar 12, 2018 23:18

Thank you. I'm honest, I found something of Ubuntu to solve this problem before, so, I searched for:

Code: Select all

gcc-4.4-multilib
The main point I have with solutions for Ubuntu topics,is, the packages for Ubuntu I often cannot find in Sabayon repo, e.g. gcc-4.4-multilib.
Either the packages don't exist in Sabayon repo or they have another name. I would really like to know, which sub packages (programs, libs and so on) I can find in Sabayon and in which package.
And: btw, is there a simple way to install all components for qtcreator and a complete qt mainline in Sabayon?

-Linuxfluesterer (I love KDE...)
Take away Facebook from me and let there be real people again...

User avatar
sabayonino
Sagely Hen
Posts: 3279
Joined: Sun Sep 21, 2008 1:12
Location: Italy
Contact:

Re: qtcreator 'type_traits' file not found

Post by sabayonino » Tue Mar 13, 2018 0:18

All packages are build with multilibs support.
/usr/lib64 and /usr/lib32

so no need of "multi-lib" suffix .


GCC Useflags

Code: Select all

USE flag:         -altivec -awt -cilk -debug -doc 
╠                            -fixed-point -gcj -jit -libssp 
╠                            -mpx -pgo -regression-test -vanilla 
╠                            abi_x86_64 amd64 big-endian cxx 
╠                            elibc_glibc fortran go graphite 
╠                            hardened kernel_linux multilib 
╠                            nls nptl objc objc++ objc-gc openmp 
╠                            pch pie sanitize ssp userland_GNU 
╠                            vtv 
[Che Cos'è Il Calcolo Distribuito (BOINC)

BOINC ready ! Sabayon+BOINC = BILD ,my Sabayon spin :cyclops: - Ready to crunch for the Science everywhere :)

User avatar
linuxfluesterer
Old Dear Hen
Posts: 873
Joined: Thu Sep 20, 2012 19:47
Location: Germany

Re: qtcreator 'type_traits' file not found

Post by linuxfluesterer » Tue Mar 13, 2018 20:00

sabayonino wrote:All packages are build with multilibs support.
/usr/lib64 and /usr/lib32

so no need of "multi-lib" suffix .
Thank you, Sabayonino. But finally, the multilib did not solve my problem...
I fear, when solved one error message, then the next one appears. And this for such a very, very little qml source.

-Linuxfluesterer (I love KDE...)
Take away Facebook from me and let there be real people again...

Stupot
Sagely Hen
Posts: 1680
Joined: Wed Feb 14, 2007 3:44
Location: St. Louis, MO, USA

Re: qtcreator 'type_traits' file not found

Post by Stupot » Thu Mar 15, 2018 3:37

The more I've dug, the more it looks like something might be up with the way it's compiled.
https://bugreports.qt.io/browse/QTCREATORBUG-19260

That's the bug I'm stuck on when I try to create a new project in qt-creator.

Post Reply