Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. QT5 build: CC: No such file or directory

QT5 build: CC: No such file or directory

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
69 Posts 4 Posters 18.9k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Michele31415
    wrote on last edited by Michele31415
    #11

    I'm just following the recipe here: https://wiki.qt.io/Building_Qt_5_from_Git

    $ mkdir qt5-build
    $ cd qt5-build
    $ ..\\qt5\configure -developer-build -opensource -nomake examples -nomake tests
    

    In any event distclean did not work for me.

    /opt/qt5/qtbase $ gmake distclean
    gmake: *** No rule to make target 'distclean'.  Stop.
    /opt/qt5/qtbase $
    

    Update: Oh dear - I just noticed I somehow ended up in qtbase rather than qt5-build. Why don't I just start over.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #12

      Well, since you are getting started, it's not a bad idea to just build qtbase. You can then build the rest later on.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        Michele31415
        wrote on last edited by
        #13

        I just started over from scratch. This time it almost finished:

        ..Done.
        Info: creating stash file /opt/qt5/qt5-build/.qmake.stash
        Info: creating super cache file /opt/qt5/qt5-build/.qmake.super
        
        Running configuration tests...
        Checking for gold linker... yes
        Checking for valid makespec... 
        ERROR: Cannot compile a minimal program. The toolchain or QMakeSpec is broken.
        
        Check config.log for details.
        
        /opt/qt5/qt5-build $ cat config.log
        executing config test use_gold_linker
        + cd /opt/qt5/qt5-build/qtbase/config.tests && /usr/gcc/10/bin/g++ -fuse-ld=gold -o conftest-out conftest.cpp
        test config.qtbase.tests.use_gold_linker succeeded
        executing config test verifyspec
        + cd /opt/qt5/qt5-build/qtbase/config.tests/common/verifyspec && /opt/qt5/qt5-build/qtbase/bin/qmake -qtconf /opt/qt5/qt5-build/qtbase/bin/qt.conf "CONFIG -= qt debug_and_release app_bundle lib_bundle" "CONFIG += shared use_gold_linker console" /opt/qt5/qtbase/config.tests/common/verifyspec
        + cd /opt/qt5/qt5-build/qtbase/config.tests/common/verifyspec && MAKEFLAGS= /opt/csw/bin/gmake
        > /usr/gcc/10/bin/g++ -c -O2  -I/opt/qt5/qtbase/config.tests/common/verifyspec -I. -I/usr/sfw/include -I/opt/qt5/qtbase/mkspecs/solaris-cc -o verifyspec.o /opt/qt5/qtbase/config.tests/common/verifyspec/verifyspec.cpp
        > CC  -o verifyspec verifyspec.o   -L/usr/sfw/lib 
        > gmake: CC: No such file or directory
        > gmake: *** [Makefile:64: verifyspec] Error 127
        /opt/qt5/qt5-build $
        

        So it looks like we're back to this "no CC" business. I thought I had fixed that with the following change to qtbase/mkspecs/mkspec.conf:

        #QMAKE_CXX               = CC
        QMAKE_CXX               = /usr/gcc/10/bin/g++
        

        Technically this was more of an end-run than a fix. I still don't know where CC is being set. So there must be another instance somewhere I can't find.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #14

          Silly question but did you check your environment variables ?

          Note that you seem to set only QMAKE_CXX, did you also set the other one ?

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0
          • M Offline
            M Offline
            Michele31415
            wrote on last edited by Michele31415
            #15

            Yes, I also said this in qtbase/mkspecs/mkspec.conf

            #QMAKE_COMPILER          = sun_cc
            QMAKE_COMPILER          = gcc
            

            Env vars are:

            /opt/qt5/qt5-build $ echo $CC
            /usr/gcc/10/bin/gcc
            /opt/qt5/qt5-build $ echo $CXX
            /usr/gcc/10/bin/g++
            /opt/qt5/qt5-build $ which gcc
            /usr/gcc/10/bin/gcc
            /opt/qt5/qt5-build $ gcc --version
            gcc (GCC) 10.2.0
            Copyright (C) 2020 Free Software Foundation, Inc.
            This is free software; see the source for copying conditions.  There is NO
            warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
            
            /opt/qt5/qt5-build $ g++ --version
            g++ (GCC) 10.2.0
            Copyright (C) 2020 Free Software Foundation, Inc.
            This is free software; see the source for copying conditions.  There is NO
            warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
            
            /opt/qt5/qt5-build $ which gcc
            

            Do I need anything else there?

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #16

              What about the QMAKE_CC variable ?

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • M Offline
                M Offline
                Michele31415
                wrote on last edited by
                #17

                That's set too:

                # QMAKE_COMPILER          = sun_cc
                QMAKE_COMPILER          = gcc
                
                QMAKE_CC                = gcc
                
                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #18

                  I just realized, did you try to specific the platform in your configure options ?

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    Michele31415
                    wrote on last edited by
                    #19

                    Uh, I guess not. What file would that be?

                    1 Reply Last reply
                    0
                    • SGaistS Offline
                      SGaistS Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on last edited by SGaist
                      #20

                      Based on the mkspecs available, I would try the solaris-g++ or solaris-g++-64.

                      Interested in AI ? www.idiap.ch
                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                      1 Reply Last reply
                      0
                      • M Offline
                        M Offline
                        Michele31415
                        wrote on last edited by Michele31415
                        #21

                        DING!! Give that man a ceegar! Thank you so much.

                        ...(bunch of stuff) ...
                        Qt WebEngine:
                          Proprietary Codecs ..................... no
                          Spellchecker ........................... yes
                          ALSA ................................... no
                          PulseAudio ............................. no
                        
                        Note: No wayland-egl support detected. Cross-toolkit compatibility disabled.
                        
                        
                        
                        **Qt is now configured for building.** Just run 'gmake'.
                        Once everything is built, you must run 'gmake install'.
                        Qt will be installed into
                        
                        Prior to reconfiguration, make sure you remove any leftovers from
                        the previous build.
                        /opt/qt5/qt5-build $ 
                        

                        For the record, this is the command that worked:

                        /opt/qt5/qt5-build $ ../configure -developer-build -opensource -nomake examples -nomake tests -platform solaris-g++
                        

                        I'm so happy I'm just going to let it go for now and wait til tomorrow to try the gmake :-)

                        I am wondering about that "remove any leftovers" comment. Is that anything in particular?

                        1 Reply Last reply
                        0
                        • M Offline
                          M Offline
                          Michele31415
                          wrote on last edited by
                          #22

                          Well gmake ran for a long time but finally gave up. This is the tail of the tale:

                          ../../../../include/QtGui/../../../../qtbase/src/gui/painting/qtransform.h:57:20: note: ‘class QTransform’ declared here
                             57 | class Q_GUI_EXPORT QTransform
                                |                    ^~~~~~~~~~
                          ../../../../include/QtGui/../../../../qtbase/src/gui/painting/qtransform.h: In copy constructor ‘QTransform::QTransform(const QTransform&)’:
                          ../../../../include/QtGui/../../../../qtbase/src/gui/painting/qtransform.h:88:46: warning: ‘void* std::memcpy(void*, const void*, std::size_t)’ writing to an object of type ‘class QTransform’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead []8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wclass-memaccess-Wclass-memaccess]8;;]
                             88 |     { memcpy(this, &other, sizeof(QTransform)); }
                                |                                              ^
                          ../../../../include/QtGui/../../../../qtbase/src/gui/painting/qtransform.h:57:20: note: ‘class QTransform’ declared here
                             57 | class Q_GUI_EXPORT QTransform
                                |                    ^~~~~~~~~~
                          In file included from /opt/qt5/qtbase/src/plugins/platforms/vnc/qvnc_p.h:43,
                                           from /opt/qt5/qtbase/src/plugins/platforms/vnc/main.cpp:42:
                          /opt/qt5/qtbase/src/plugins/platforms/vnc/qvncscreen.h: At global scope:
                          /opt/qt5/qtbase/src/plugins/platforms/vnc/qvncscreen.h:76:22: error: expected ‘;’ at end of member declaration
                             76 |     bool swapBytes() const
                                |                      ^~~~~
                                |                           ;
                          gmake[5]: *** [Makefile:1665: .obj/main.o] Error 1
                          gmake[5]: Leaving directory '/opt/qt5/qt5-build/qtbase/src/plugins/platforms/vnc'
                          gmake[4]: *** [Makefile:121: sub-vnc-make_first] Error 2
                          gmake[4]: Leaving directory '/opt/qt5/qt5-build/qtbase/src/plugins/platforms'
                          gmake[3]: *** [Makefile:100: sub-platforms-make_first] Error 2
                          gmake[3]: Leaving directory '/opt/qt5/qt5-build/qtbase/src/plugins'
                          gmake[2]: *** [Makefile:695: sub-plugins-make_first] Error 2
                          gmake[2]: Leaving directory '/opt/qt5/qt5-build/qtbase/src'
                          gmake[1]: *** [Makefile:47: sub-src-make_first] Error 2
                          gmake[1]: Leaving directory '/opt/qt5/qt5-build/qtbase'
                          gmake: *** [Makefile:89: module-qtbase-make_first] Error 2
                          /opt/qt5/qt5-build $
                          
                          1 Reply Last reply
                          0
                          • M Offline
                            M Offline
                            Michele31415
                            wrote on last edited by
                            #23

                            So I gave qvncscreen.h the semicolon it was missing:

                            #if Q_BYTE_ORDER == Q_BIG_ENDIAN
                                bool swapBytes() const ;
                            #endif
                            

                            and tried again. Now we get:

                            g++ -c -g -Wall -W -D_REENTRANT -fPIC -DQT_NO_EXCEPTIONS -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -DQT_PLUGIN -DQT_GUI_LIB -DQT_DBUS_LIB -DQT_CORE_LIB -I/opt/qt5/qtbase/src/plugins/platforminputcontexts/ibus -I. -I../../../../include/QtGui/5.8.0 -I../../../../include/QtGui/5.8.0/QtGui -I../../../../include -I../../../../include/QtGui -I../../../../include/QtDBus -I../../../../include/QtCore/5.8.0 -I../../../../include/QtCore/5.8.0/QtCore -I../../../../include/QtCore -I.moc -I/opt/csw/include -I/usr/openwin/include -I/usr/sfw/include -I/opt/qt5/qtbase/mkspecs/solaris-g++ -o .obj/qibusproxy.o /opt/qt5/qtbase/src/plugins/platforminputcontexts/ibus/qibusproxy.cpp
                            /opt/qt5/qtbase/src/plugins/platforms/vnc/qvncclient.cpp: In member function ‘void QVncClient::convertPixels(char*, const char*, int) const’:
                            /opt/qt5/qtbase/src/plugins/platforms/vnc/qvncclient.cpp:145:17: error: ‘swapBytes’ was not declared in this scope; did you mean ‘m_swapBytes’?
                              145 |             if (swapBytes)
                                  |                 ^~~~~~~~~
                                  |                 m_swapBytes
                            
                            1 Reply Last reply
                            0
                            • SGaistS Offline
                              SGaistS Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on last edited by
                              #24

                              Just add the missing ; and go on with your build.

                              I don't know why it's not there both the dev and latest 5.15 branch have it.

                              Interested in AI ? www.idiap.ch
                              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                              M 1 Reply Last reply
                              0
                              • SGaistS SGaist

                                Just add the missing ; and go on with your build.

                                I don't know why it's not there both the dev and latest 5.15 branch have it.

                                M Offline
                                M Offline
                                Michele31415
                                wrote on last edited by
                                #25

                                @SGaist OK, I changed swapBytes to m_swapBytes (which is how it appears everywhere else) and that went away. Now:

                                88 |     { memcpy(this, &other, sizeof(QTransform)); }
                                    |                                              ^
                                ../../../../include/QtGui/../../../../qtbase/src/gui/painting/qtransform.h:57:20: note: ‘class QTransform’ declared here
                                 57 | class Q_GUI_EXPORT QTransform
                                    |                    ^~~~~~~~~~
                                /opt/qt5/qtbase/src/plugins/platforms/vnc/qvncclient.cpp: In member function ‘void QVncClient::setPixelFormat()’:
                                /opt/qt5/qtbase/src/plugins/platforms/vnc/qvncclient.cpp:487:23: error: ‘qvnc_screen’ was not declared in this scope
                                487 |         m_swapBytes = qvnc_screen->swapBytes();
                                    |                       ^~~~~~~~~~~
                                /opt/qt5/qtbase/src/plugins/platforms/vnc/qvncclient.cpp: In member function ‘bool QVncClient::pixelConversionNeeded() const’:
                                /opt/qt5/qtbase/src/plugins/platforms/vnc/qvncclient.cpp:642:9: error: ‘qvnc_screen’ was not declared in this scope
                                642 |     if (qvnc_screen->swapBytes())
                                    |         ^~~~~~~~~~~
                                /opt/qt5/qtbase/src/plugins/platforms/vnc/qvncscreen.cpp: At global scope:
                                /opt/qt5/qtbase/src/plugins/platforms/vnc/qvncscreen.cpp:175:6: error: ‘QVNCScreen’ has not been declared
                                175 | bool QVNCScreen::swapBytes() const
                                    |      ^~~~~~~~~~
                                /opt/qt5/qtbase/src/plugins/platforms/vnc/qvncscreen.cpp:175:30: error: non-member function ‘bool swapBytes()’ cannot have cv-qualifier
                                175 | bool QVNCScreen::swapBytes() const
                                    |                              ^~~~~
                                /opt/qt5/qtbase/src/plugins/platforms/vnc/qvncscreen.cpp: In function ‘bool swapBytes()’:
                                /opt/qt5/qtbase/src/plugins/platforms/vnc/qvncscreen.cpp:177:9: error: ‘depth’ was not declared in this scope
                                177 |     if (depth() != 16)
                                    |         ^~~~~
                                /opt/qt5/qtbase/src/plugins/platforms/vnc/qvncscreen.cpp:180:9: error: ‘screen’ was not declared in this scope; did you mean ‘qGreen’?
                                180 |     if (screen())
                                    |         ^~~~~~
                                    |         qGreen
                                /opt/qt5/qtbase/src/plugins/platforms/vnc/qvncscreen.cpp:182:12: error: ‘frameBufferLittleEndian’ was not declared in this scope
                                182 |     return frameBufferLittleEndian();
                                    |            ^~~~~~~~~~~~~~~~~~~~~~~
                                gmake[5]: *** [Makefile:2889: .obj/qvncclient.o] Error 1
                                gmake[5]: *** Waiting for unfinished jobs....
                                
                                1 Reply Last reply
                                0
                                • SGaistS Offline
                                  SGaistS Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on last edited by
                                  #26

                                  Which version of Qt are you building ?

                                  I would have rather added the missing parenthesis in this case.

                                  Interested in AI ? www.idiap.ch
                                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                  M 1 Reply Last reply
                                  0
                                  • SGaistS SGaist

                                    Which version of Qt are you building ?

                                    I would have rather added the missing parenthesis in this case.

                                    M Offline
                                    M Offline
                                    Michele31415
                                    wrote on last edited by Michele31415
                                    #27

                                    @SGaist I'm building what

                                    git clone https://code.qt.io/qt/qt5.git
                                    

                                    gave me two days ago. Where does it tell you what version you have? Which missing parentheses?
                                    Should this line in qvncscreen.cpp

                                    bool QVNCScreen::swapBytes() const
                                    

                                    perhaps be

                                    bool QVncScreen::swapBytes() const
                                    

                                    because further up I see

                                    QVncScreen::~QVncScreen()
                                    {
                                        if (clientCursor)
                                            delete clientCursor;
                                    }
                                    
                                    1 Reply Last reply
                                    0
                                    • SGaistS Offline
                                      SGaistS Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on last edited by
                                      #28

                                      Ok, so you are in fact building the dev branch which is Qt 6. So is that what you want ?

                                      I am currently wondering whether you have something that changed these files. Looking at the sources, I do not see these errors in the vnc plugin.

                                      Interested in AI ? www.idiap.ch
                                      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                      M 1 Reply Last reply
                                      1
                                      • SGaistS SGaist

                                        Ok, so you are in fact building the dev branch which is Qt 6. So is that what you want ?

                                        I am currently wondering whether you have something that changed these files. Looking at the sources, I do not see these errors in the vnc plugin.

                                        M Offline
                                        M Offline
                                        Michele31415
                                        wrote on last edited by
                                        #29

                                        @SGaist Um, I'm building QT6?? How could that be? My build directory is called:
                                        /opt/qt5/qt5-build $
                                        I'm following directions from https://wiki.qt.io/Building_Qt_5_from_Git Now I'm confused.

                                        1 Reply Last reply
                                        0
                                        • SGaistS Offline
                                          SGaistS Offline
                                          SGaist
                                          Lifetime Qt Champion
                                          wrote on last edited by
                                          #30

                                          As I wrote before, the default branch that is checked out when cloning from git is the dev branch and that one is for Qt 6.

                                          You have to explicitly check out the 5.15 branch if you want to build Qt 5.

                                          The repository naming is currently in discussion.

                                          Interested in AI ? www.idiap.ch
                                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                                          M 1 Reply Last reply
                                          1

                                          • Login

                                          • Login or register to search.
                                          • First post
                                            Last post
                                          0
                                          • Categories
                                          • Recent
                                          • Tags
                                          • Popular
                                          • Users
                                          • Groups
                                          • Search
                                          • Get Qt Extensions
                                          • Unsolved