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. make install error 1ignored
Forum Update on Monday, May 27th 2025

make install error 1ignored

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
4 Posts 2 Posters 393 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.
  • P Offline
    P Offline
    poucz
    wrote on last edited by
    #1

    Hello,
    I have script that compile many QT project (in script I do qmake, make and make install).
    Now I find out, that command <make install> return always 0, even if error occured.

    
    pou@silent-killer:/tmp/autobuild/Core$ make install
    /home/pou/Qt5.10.1/5.10.1/gcc_64/bin/qmake -install qinstall -exe Core /Core
    Error copying Core to /Core: Cannot create /Core for output
    make: [Makefile:5222: install_target] Chyba 3 (ignorováno)
    strip /Core
    strip: '/Core': No such file
    make: [Makefile:5223: install_target] Chyba 1 (ignorováno)
    pou@silent-killer:/tmp/autobuild/Core$ echo $?
    0
    pou@silent-killer:/tmp/autobuild/Core$ 
    
    

    In Make file there is "-" in make install section - I think its meaning - ignore error:

    install_target: first FORCE
            @test -d $(INSTALL_ROOT)/ || mkdir -p $(INSTALL_ROOT)/
            -$(QINSTALL_PROGRAM) $(QMAKE_TARGET) $(INSTALL_ROOT)/$(QMAKE_TARGET)
            -$(STRIP) $(INSTALL_ROOT)/$(QMAKE_TARGET)
    
    uninstall_target: FORCE
            -$(DEL_FILE) $(INSTALL_ROOT)/$(QMAKE_TARGET)
            -$(DEL_DIR) $(INSTALL_ROOT)/ 
    

    So how to change this behavior?
    I need detect "make install" error in my bash script.
    Thank you.

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

      Hi,

      That is rather a bash question. IIRC, you should call set -e as first command of your script to propagate the error.

      See here for a discussion of an alternative.

      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
      • P Offline
        P Offline
        poucz
        wrote on last edited by
        #3

        Hello,
        thank you for your reply.

        so I added "set -e" but behavior is same...
        my code is:

        #!/bin/bash
        set -e
                if ! make install;then
                        echo "Make install return error!"
                fi
        

        And error never appear event if I install to "/" where I have not permission.

        I think it is because "-" at start line in make file:

        it is describe here

        - means ignore the exit status of the command that is executed (normally, a non-zero exit status would stop that part of the build).
        

        So I think - I need to tell qmake to generate Makefile without this behavior (without ignore error).
        When I deleted this "-" manualy in Makefile, error is detected.
        But manually editing Makefile is not what I want.

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

          You can use sed to modify the relevant lines.

          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

          • Login

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