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 13.6k Views
  • 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 21 Jan 2021, 17:48 last edited by
    #1

    While building qt5 in Solaris 11.4 SPARC, I get:

    root@hemlock:/opt/qt5/qtbase# ../configure -developer-build -opensource -nomake examples -nomake test
    + cd qtbase
    + /opt/qt5/qtbase/configure -top-level -developer-build -opensource -nomake examples -nomake test
    Preparing build tree...
    <srcbase> = /opt/qt5/qtbase 
    <bldbase> = /opt/qt5/qtbase/qtbase 
    <outbase> = /opt/qt5/qtbase/qtbase 
    Creating qmake...
    gmake: CC: No such file or directory
    gmake: *** [Makefile:246: main.o] Error 127
    .root@hemlock:/opt/qt5/qtbase#echo $cc
    /usr/bin/gcc
    root@hemlock:/opt/qt5/qtbase# echo $CC
    /usr/bin/gcc
    root@hemlock:/opt/qt5/qtbase#
    

    What am I doing wrong?

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 21 Jan 2021, 17:56 last edited by
      #2

      Hi,

      Looks like you have no compiler installed.

      Unrelated note: do not work as root especially when building/installing libraries. You might nuke your system if something goes wrong.

      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
      2
      • M Offline
        M Offline
        Michele31415
        wrote on 21 Jan 2021, 19:16 last edited by
        #3

        Point taken, but I do have a working compiler:

        /opt/qt5 $ cd qtbase
        /opt/qt5/qtbase $ which gcc         
        /usr/bin/gcc
        /opt/qt5/qtbase $ 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/qtbase $ gcc ~/helloworld.c
        /opt/qt5/qtbase $ ~/a.out
        Hello, World!/opt/qt5/qtbase $
        
        1 Reply Last reply
        0
        • M Offline
          M Offline
          Michele31415
          wrote on 21 Jan 2021, 20:07 last edited by Michele31415
          #4

          The problem seems to be in this part of qtbase/configure (lines 814-817):

          bash -c 'set -o pipefail
                          cd "$0/qmake"; "$1" | while read line; do
                              builtin echo -n .
                          done' "$outpath" "$MAKE" || exit 2
          

          $1 has no value. Why, I do not know.

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SGaist
            Lifetime Qt Champion
            wrote on 21 Jan 2021, 21:12 last edited by
            #5

            Did you try to specify the Solaris mkspec ?

            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 22 Jan 2021, 01:14 last edited by
              #6

              Ah ha! I set QMAKE_CC and QMAKE_CXX in qtbase/mkspecs/solaris-cc/qmake.conf and that got me going again. Configure went much further this time but now it's stopped with this:

              /opt/qt5/qtbase/src/corelib/global/qrandom.cpp: In function ‘void fallback_fill(quint32*, qsizetype)’:
              /opt/qt5/qtbase/src/corelib/global/qrandom.cpp:297:18: error: ‘getauxval’ was not declared in this scope
                297 |     ulong base = getauxval(AT_BASE);
              

              Apparently getauxval is some linux thing. There's a discussion around this here: http://lists.opencsw.org/pipermail/users/2019-January/010420.html so unless anyone has a better suggestion, I'll pursue that.

              1 Reply Last reply
              0
              • M Offline
                M Offline
                Michele31415
                wrote on 22 Jan 2021, 16:46 last edited by
                #7

                I decided the simplest thing was to just remove getauxval since it seemed to be optional anyway. Now we've made more progress. configure is almost finished but ends like this:
                ...........

                (long list of files redacted)
                ...Done.
                Info: creating super cache file /opt/qt5/qtbase/.qmake.super
                Info: creating cache file /opt/qt5/qtbase/.qmake.cache
                ERROR: Invalid value 'test' supplied to command line option 'nomake'.
                /opt/qt5/qtbase $
                
                1 Reply Last reply
                0
                • S Offline
                  S Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on 22 Jan 2021, 18:36 last edited by
                  #8

                  Isn't it "-nomake tests" ?

                  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 22 Jan 2021, 22:06 last edited by
                    #9

                    Good catch - I missed the last character when I copied the command out of the instructions. But now I'm getting the "You cannot make a shadow build from a source tree containing a previous build.
                    Cannot proceed." message.
                    Is my only option to delete the entire qt5 directory and start over? I'm not seeing a "confclean" option.

                    1 Reply Last reply
                    0
                    • S Offline
                      S Offline
                      SGaist
                      Lifetime Qt Champion
                      wrote on 22 Jan 2021, 22:11 last edited by
                      #10

                      I'd go with make distclean but I am not sure, I haven't done any in tree build since over a decade. Always out of source, it allows you to keep your sources clean and start from scratch more easily.

                      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 23 Jan 2021, 01:11 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
                        • S Offline
                          S Offline
                          SGaist
                          Lifetime Qt Champion
                          wrote on 23 Jan 2021, 15:36 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 23 Jan 2021, 17:00 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
                            • S Offline
                              S Offline
                              SGaist
                              Lifetime Qt Champion
                              wrote on 23 Jan 2021, 21:43 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 23 Jan 2021, 22:00 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
                                • S Offline
                                  S Offline
                                  SGaist
                                  Lifetime Qt Champion
                                  wrote on 24 Jan 2021, 07:50 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 24 Jan 2021, 19:43 last edited by
                                    #17

                                    That's set too:

                                    # QMAKE_COMPILER          = sun_cc
                                    QMAKE_COMPILER          = gcc
                                    
                                    QMAKE_CC                = gcc
                                    
                                    1 Reply Last reply
                                    0
                                    • S Offline
                                      S Offline
                                      SGaist
                                      Lifetime Qt Champion
                                      wrote on 24 Jan 2021, 19:51 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 24 Jan 2021, 19:59 last edited by
                                        #19

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

                                        1 Reply Last reply
                                        0
                                        • S Offline
                                          S Offline
                                          SGaist
                                          Lifetime Qt Champion
                                          wrote on 24 Jan 2021, 20:52 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

                                          6/69

                                          22 Jan 2021, 01:14

                                          63 unread
                                          • Login

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