Menu

#247 'make install' does not install files

Mercurial tip
closed
nobody
None
5
2018-07-18
2017-12-05
David Runge
No

I'm trying hard to package 3.0.3 for Arch Linux atm, but 'make install' does not install files to where you select it with configure, e.g.:

./configure --prefix=/usr
make
make install

does not install to /usr/bin/ but to /usr/local/bin (or rather tries to and then fails).
Even if I set all other configure flags for the directories, all of it is not applied!

This is quite frustrating to use and especially to package...
I can't be expected to pick up every single file and put it in the file system myself, am I?

Seems this is connected to:
https://sourceforge.net/p/sv1/bugs/234/
and
https://sourceforge.net/p/sv1/bugs/238/

Please fix the build system!

Discussion

  • Chris Cannam

    Chris Cannam - 2017-12-05

    This and the other two should be fixed in the current hg default branch - but my working hours have been mostly allocated to server/devops tasks for the past couple of months and haven't yet had an opportunity to do the cross-platform test/build/package process necessary for a 3.0.4 build with these fixes in, or to isolate any Linux-build-only fixes for a platform-specific point release.

    (comment edited to soften it a bit - it's not that I've had no time, just not the proper space to get back to grips with an SV release)

     

    Last edit: Chris Cannam 2017-12-05
  • David Runge

    David Runge - 2017-12-05

    Okay, I'll fix it by script in the meantime.
    If I move the files sv works otherwise!

     
  • Chris Cannam

    Chris Cannam - 2018-07-17

    Please try this again with v3.1.

     
  • David Runge

    David Runge - 2018-07-17

    Well, nothing has changed. The install target does nothing. Neither with nor without DESTDIR set. I still have to install everything by hand.

     
  • Chris Cannam

    Chris Cannam - 2018-07-17

    Oh, that is disappointing - I thought this was confirmed fixed, in the duplicate issue #234.

    I just tested it myself with the release tarball and it worked here. I used qmake -r, make, sudo make install and the last few commands run were

    make[1]: Entering directory '/tmp/sonic-visualiser-3.1'
    /usr/bin/qmake -install qinstall -exe /tmp/sonic-visualiser-3.1/checker/vamp-plugin-load-checker /usr/local/bin/vamp-plugin-load-checker
    strip /usr/local/bin/vamp-plugin-load-checker
    /usr/bin/qmake -install qinstall -exe /tmp/sonic-visualiser-3.1/piper-vamp-simple-server /usr/local/bin/piper-vamp-simple-server
    strip /usr/local/bin/piper-vamp-simple-server
    /usr/bin/qmake -install qinstall -exe /tmp/sonic-visualiser-3.1/sonic-visualiser /usr/local/bin/sonic-visualiser
    strip /usr/local/bin/sonic-visualiser
    make[1]: Leaving directory '/tmp/sonic-visualiser-3.1'
    

    leaving the following in /usr/local/bin

    -rwxr-xr-x 1 root   root       14200 Jul 17 21:11 vamp-plugin-load-checker
    -rwxr-xr-x 1 root   root      432088 Jul 17 21:11 piper-vamp-simple-server
    -rwxr-xr-x 1 root   root     7547024 Jul 17 21:11 sonic-visualiser
    

    How does the make install process end, when you run it? What does Makefile.sv have in it, in the end section after the ### Install comment header?

     
  • Chris Cannam

    Chris Cannam - 2018-07-17

    I realise that wasn't a very good example because I forgot to change the install prefix, which is part of the substance of this report. However, I just tried it again with an arbitrary install prefix supplied to ./configure --prefix= (using a new directory created for the purpose) and it still worked fine, installing to the supplied target, so I'm still puzzled!

     

    Last edit: Chris Cannam 2018-07-17
  • David Runge

    David Runge - 2018-07-18

    I followed INSTALL.txt and used ./configure --prefix=/usr && make && make install DESTDIR="${pkgdir}/" (in a nutshell, $pkgdir is where the package contents are supposed to be installed to).
    However build runs fine, but this is the install target then:

    ( test -e Makefile.base || /bin/qmake-qt5 -o Makefile.base /build/sonic-visualiser/src/sonic-visualiser-3.1/base.pro ) && make -f Makefile.base install                                                                                                                                                                                                                                        
    make[1]: Entering directory '/build/sonic-visualiser/src/sonic-visualiser-3.1'                                                                                                                                                                                                                                                                                                                 
    make[1]: Nothing to be done for 'install'.                                                                                                                                                                                                                                                                                                                                                     
    make[1]: Leaving directory '/build/sonic-visualiser/src/sonic-visualiser-3.1'                                                                                                                                                                                                                                                                                                                 
    ( test -e Makefile.test-svcore-base || /bin/qmake-qt5 -o Makefile.test-svcore-base /build/sonic-visualiser/src/sonic-visualiser-3.1/test-svcore-base.pro ) && make -f Makefile.test-svcore-base install                                                                                                                                                                                        
    make[1]: Entering directory '/build/sonic-visualiser/src/sonic-visualiser-3.1'                                                                                                                                                                                                                                                                                                                 
    make[1]: Nothing to be done for 'install'.                                                                                                                                                                                                                                                                                                                                                     
    make[1]: Leaving directory '/build/sonic-visualiser/src/sonic-visualiser-3.1'                                                                                                                                                                                                                                                                                                                  
    ( test -e Makefile.test-svcore-system || /bin/qmake-qt5 -o Makefile.test-svcore-system /build/sonic-visualiser/src/sonic-visualiser-3.1/test-svcore-system.pro ) && make -f Makefile.test-svcore-system install                                                                                                                                                                                
    make[1]: Entering directory '/build/sonic-visualiser/src/sonic-visualiser-3.1'                                                                                                                                                                                                                                                                                                                
    make[1]: Nothing to be done for 'install'.                                                                                                                                                                                                                                                                                                                                                     
    make[1]: Leaving directory '/build/sonic-visualiser/src/sonic-visualiser-3.1'                                                                                                                                                                                                                                                                                                                  
    ( test -e Makefile.test-svcore-data-fileio || /bin/qmake-qt5 -o Makefile.test-svcore-data-fileio /build/sonic-visualiser/src/sonic-visualiser-3.1/test-svcore-data-fileio.pro ) && make -f Makefile.test-svcore-data-fileio install                                                                                                                                                            
    make[1]: Entering directory '/build/sonic-visualiser/src/sonic-visualiser-3.1'                                                                                                                                                                                                                                                                                                                
    make[1]: Nothing to be done for 'install'.                                                                                                                                                                                                                                                                                                                                                     
    make[1]: Leaving directory '/build/sonic-visualiser/src/sonic-visualiser-3.1'                                                                                                                                                                                                                                                                                                                  
    ( test -e Makefile.test-svcore-data-model || /bin/qmake-qt5 -o Makefile.test-svcore-data-model /build/sonic-visualiser/src/sonic-visualiser-3.1/test-svcore-data-model.pro ) && make -f Makefile.test-svcore-data-model install                                                                                                                                                                
    make[1]: Entering directory '/build/sonic-visualiser/src/sonic-visualiser-3.1'                                                                                                                                                                                                                                                                                                                 
    make[1]: Nothing to be done for 'install'.                                                                                                                                                                                                                                                                                                                                                     
    make[1]: Leaving directory '/build/sonic-visualiser/src/sonic-visualiser-3.1'                                                                                                                                                                                                                                                                                                                 
    cd checker/ && ( test -e Makefile || /bin/qmake-qt5 -o Makefile /build/sonic-visualiser/src/sonic-visualiser-3.1/checker/checker.pro ) && make -f Makefile install                                                                                                                                                                                                                             
    make[1]: Entering directory '/build/sonic-visualiser/src/sonic-visualiser-3.1/checker'                                                                                                                                                                                                                                                                                                         
    ( test -e Makefile.checker-lib || /bin/qmake-qt5 -o Makefile.checker-lib /build/sonic-visualiser/src/sonic-visualiser-3.1/checker/checker-lib.pro ) && make -f Makefile.checker-lib install                                                                                                                                                                                                    
    make[2]: Entering directory '/build/sonic-visualiser/src/sonic-visualiser-3.1/checker'                                                                                                                                                                                                                                                                                                        
    make[2]: Nothing to be done for 'install'.                                                                                                                                                                                                                                                                                                                                                     
    make[2]: Leaving directory '/build/sonic-visualiser/src/sonic-visualiser-3.1/checker'                                                                                                                                                                                                                                                                                                          
    ( test -e Makefile.checker-client || /bin/qmake-qt5 -o Makefile.checker-client /build/sonic-visualiser/src/sonic-visualiser-3.1/checker/checker-client.pro ) && make -f Makefile.checker-client install                                                                                                                                                                                        
    make[2]: Entering directory '/build/sonic-visualiser/src/sonic-visualiser-3.1/checker'                                                                                                                                                                                                                                                                                                         
    make[2]: Nothing to be done for 'install'.                                                                                                                                                                                                                                                                                                                                                     
    make[2]: Leaving directory '/build/sonic-visualiser/src/sonic-visualiser-3.1/checker'                                                                                                                                                                                                                                                                                                         
    ( test -e Makefile.helper || /bin/qmake-qt5 -o Makefile.helper /build/sonic-visualiser/src/sonic-visualiser-3.1/checker/helper.pro ) && make -f Makefile.helper install                                                                                                                                                                                                                        
    make[2]: Entering directory '/build/sonic-visualiser/src/sonic-visualiser-3.1/checker'                                                                                                                                                                                                                                                                                                         
    make[2]: Nothing to be done for 'install'.                                                                                                                                                                                                                                                                                                                                                     
    make[2]: Leaving directory '/build/sonic-visualiser/src/sonic-visualiser-3.1/checker'                                                                                                                                                                                                                                                                                                         
    make[1]: Leaving directory '/build/sonic-visualiser/src/sonic-visualiser-3.1/checker'                                                                                                                                                                                                                                                                                                          
    ( test -e Makefile.server || /bin/qmake-qt5 -o Makefile.server /build/sonic-visualiser/src/sonic-visualiser-3.1/server.pro ) && make -f Makefile.server install                                                                                                                                                                                                                                
    make[1]: Entering directory '/build/sonic-visualiser/src/sonic-visualiser-3.1'                                                                                                                                                                                                                                                                                                                 
    make[1]: Nothing to be done for 'install'.                                                                                                                                                                                                                                                                                                                                                    
    make[1]: Leaving directory '/build/sonic-visualiser/src/sonic-visualiser-3.1'                                                                                                                                                                                                                                                                                                                  
    ( test -e Makefile.convert || /bin/qmake-qt5 -o Makefile.convert /build/sonic-visualiser/src/sonic-visualiser-3.1/convert.pro ) && make -f Makefile.convert install                                                                                                                                                                                                                            
    make[1]: Entering directory '/build/sonic-visualiser/src/sonic-visualiser-3.1'                                                                                                                                                                                                                                                                                                                 
    make[1]: Nothing to be done for 'install'.                                                                                                                                                                                                                                                                                                                                                     
    make[1]: Leaving directory '/build/sonic-visualiser/src/sonic-visualiser-3.1'                                                                                                                                                                                                                                                                                                                  
    ( test -e Makefile.sv || /bin/qmake-qt5 -o Makefile.sv /build/sonic-visualiser/src/sonic-visualiser-3.1/sv.pro ) && make -f Makefile.sv install                                                                                                                                                                                                                                                
    make[1]: Entering directory '/build/sonic-visualiser/src/sonic-visualiser-3.1'                                                                                                                                                                                                                                                                                                                 
    /bin/qmake-qt5 -install qinstall /build/sonic-visualiser/src/sonic-visualiser-3.1/checker/vamp-plugin-load-checker /usr/bin/vamp-plugin-load-checker
    Error copying /build/sonic-visualiser/src/sonic-visualiser-3.1/checker/vamp-plugin-load-checker to /usr/bin/vamp-plugin-load-checker: Cannot create /usr/bin/vamp-plugin-load-checker for output
    make[1]: [Makefile.sv:5116: install_sv_bins] Error 3 (ignored)               
    /bin/qmake-qt5 -install qinstall /build/sonic-visualiser/src/sonic-visualiser-3.1/piper-vamp-simple-server /usr/bin/piper-vamp-simple-server
    Error copying /build/sonic-visualiser/src/sonic-visualiser-3.1/piper-vamp-simple-server to /usr/bin/piper-vamp-simple-server: Cannot create /usr/bin/piper-vamp-simple-server for output
    make[1]: [Makefile.sv:5117: install_sv_bins] Error 3 (ignored)                                                                                         
    /bin/qmake-qt5 -install qinstall -exe /build/sonic-visualiser/src/sonic-visualiser-3.1/sonic-visualiser /usr/bin/sonic-visualiser
    Error copying /build/sonic-visualiser/src/sonic-visualiser-3.1/sonic-visualiser to /usr/bin/sonic-visualiser: Cannot create /usr/bin/sonic-visualiser for output
    make[1]: [Makefile.sv:5118: install_sv_bins] Error 3 (ignored)               
    

    I guess this means DESTDIR is still ignored, as the target is trying to install to my root file system!

    qmake for some reason doesn't work for me ./configure --prefix=/usr && qmake{-qt5 {-makefile,-r}} && make install just stops:

    checking for gcc... gcc                                                                                                                                                                        
    checking whether the C compiler works... yes                                                                                                                                                   
    checking for C compiler default output file name... a.out                                                                                                                                      
    checking for suffix of executables...                                                                                                                                                          
    checking whether we are cross compiling... no                                                                                                                                                  
    checking for suffix of object files... o                                                                                                                                                       
    checking whether we are using the GNU C compiler... yes                                                                                                                                        
    checking whether gcc accepts -g... yes                                                                                                                                                         
    checking for gcc option to accept ISO C89... none needed                                                                                                                                       
    checking for g++... g++                                                                                                                                                                        
    checking whether we are using the GNU C++ compiler... yes                                                                                                                                      
    checking whether g++ accepts -g... yes                                                                                                                                                         
    checking for a BSD-compatible install... /usr/bin/install -c                                                                                                                                   
    checking for a thread-safe mkdir -p... /usr/bin/mkdir -p                                                                                                                                       
    checking whether g++ supports C++11 features by default... yes                                                                                                                                 
    checking how to run the C++ preprocessor... g++ -E                                                                                                                                             
    checking for grep that handles long lines and -e... /usr/bin/grep                                                                                                                              
    checking for egrep... /usr/bin/grep -E                                                                                                                                                         
    checking for ANSI C header files... yes                                                                                                                                                        
    checking for pkg-config... /usr/bin/pkg-config                                                                                                                                                 
    checking pkg-config is at least version 0.9.0... yes                                                                                                                                           
    checking for qmake-qt5... /bin/qmake-qt5                                                                                                                                                       
    configure: The CXXFLAGS environment variable is set to "-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt".                                                             
    configure: Overriding default compiler flags with the above user setting.                                                                                                                      
    checking for sys/types.h... yes                                                                                                                                                                
    checking for sys/stat.h... yes                                                                                                                                                                 
    checking for stdlib.h... yes                                                                                                                                                                   
    checking for string.h... yes                                                                                                                                                                   
    checking for memory.h... yes                                                                                                                                                                   
    checking for strings.h... yes                                                                                                                                                                  
    checking for inttypes.h... yes                                                                                                                                                                 
    checking for stdint.h... yes                                                                                                                                                                   
    checking for unistd.h... yes                                                                                                                                                                   
    checking for bz2... no                                                                                                                                                                         
    configure: Failed to find required module bz2 using pkg-config, trying again by old-fashioned means                                                                                            
    checking bzlib.h usability... yes                                                                                                                                                              
    checking bzlib.h presence... yes                                                                                                                                                               
    checking for bzlib.h... yes                                                                                                                                                                    
    checking for BZ2_bzReadOpen in -lbz2... yes                                                                                                                                                    
    checking for fftw3 >= 3.0.0... yes                                                                                                                                                             
    checking for fftw3f >= 3.0.0... yes                                                                                                                                                            
    checking for sndfile >= 1.0.16... yes                                                                                                                                                          
    checking for samplerate >= 0.1.2... yes                                                                                                                                                        
    checking for rubberband... yes                                                                                                                                                                 
    checking for sord-0 >= 0.5... yes                                                                                                                                                              
    checking for serd-0 >= 0.5... yes                                                                                                                                                              
    checking for capnp >= 0.6... yes                                                                                                                                                               
    checking for liblo... yes                                                                                                                                                                      
    checking for portaudio-2.0 >= 19... yes                                                                                                                                       
    checking for jack >= 0.100... yes                                                                                                                                                              
    checking for libpulse >= 0.9... yes                                                                                                                                                            
    checking for lrdf >= 0.2... yes                                                                                                                                                                                                                                                                                                                                                               
    checking for oggz >= 1.0.0... yes                                                                  
    checking for fishsound >= 1.0.0... yes
    checking for mad >= 0.15.0... yes
    checking for id3tag >= 0.15.0... yes
    checking for x11 >= 1.0.0... yes
    configure: creating ./config.status
    config.status: creating config.pri
    configure: No Repoint executable found: assuming external libraries are already here
    Info: creating stash file /build/sonic-visualiser/src/sonic-visualiser-3.1/.qmake.stash
    Reading /build/sonic-visualiser/src/sonic-visualiser-3.1/base.pro
    Reading /build/sonic-visualiser/src/sonic-visualiser-3.1/test-svcore-base.pro
    Reading /build/sonic-visualiser/src/sonic-visualiser-3.1/test-svcore-system.pro
    Reading /build/sonic-visualiser/src/sonic-visualiser-3.1/test-svcore-data-fileio.pro
    Reading /build/sonic-visualiser/src/sonic-visualiser-3.1/test-svcore-data-model.pro
    Reading /build/sonic-visualiser/src/sonic-visualiser-3.1/checker/checker.pro
     Reading /build/sonic-visualiser/src/sonic-visualiser-3.1/checker/checker-lib.pro
     Reading /build/sonic-visualiser/src/sonic-visualiser-3.1/checker/checker-client.pro
     Reading /build/sonic-visualiser/src/sonic-visualiser-3.1/checker/helper.pro
    Reading /build/sonic-visualiser/src/sonic-visualiser-3.1/server.pro
    Reading /build/sonic-visualiser/src/sonic-visualiser-3.1/convert.pro
    Reading /build/sonic-visualiser/src/sonic-visualiser-3.1/sv.pro
    Empty filename passed to function
    Empty filename passed to function
    Empty filename passed to function
    Empty filename passed to function
    Empty filename passed to function
    Empty filename passed to function
    Empty filename passed to function
    configure:
    
    Configuration complete.
    Please check the above messages for any warnings that you
    might care about, and then run "make".
    
    The file config.pri contains the configuration settings for
    qmake.  If you want to adjust these by hand, edit config.pri
    and run "/bin/qmake-qt5 -r" again to regenerate the Makefile.
    
    Usage: qmake-qt5 [mode] [options] [files]
    
    QMake has two modes, one mode for generating project files based on
    some heuristics, and the other for generating makefiles. Normally you
    shouldn't need to specify a mode, as makefile generation is the default
    mode for qmake, but you may use this to test qmake on an existing project
    
    Mode:
      -project       Put qmake into project file generation mode
                     In this mode qmake interprets files as files to
                     be built,
                     defaults to *; *; *; *.ts; *.xlf; *.qrc
                     Note: The created .pro file probably will
                     need to be edited. For example add the QT variable to
                     specify what modules are required.
      -makefile      Put qmake into makefile generation mode (default)
                     In this mode qmake interprets files as project files to
                     be processed, if skipped qmake will try to find a project
                     file in your current working directory
    
    Warnings Options:
      -Wnone         Turn off all warnings; specific ones may be re-enabled by
                     later -W options
      -Wall          Turn on all warnings
      -Wparser       Turn on parser warnings
      -Wlogic        Turn on logic warnings (on by default)
      -Wdeprecated   Turn on deprecation warnings (on by default)
    
    Options:
    
       * You can place any variable assignment in options and it will be *
       * processed as if it was in [files]. These assignments will be    *
       * processed before [files] by default.                            *
      -o file        Write output to file
      -d             Increase debug level
      -t templ       Overrides TEMPLATE as templ
      -tp prefix     Overrides TEMPLATE so that prefix is prefixed into the value
      -help          This help
      -v             Version information
      -early         All subsequent variable assignments will be
                     parsed right before default_pre.prf
      -before        All subsequent variable assignments will be
                     parsed right before [files] (the default)
      -after         All subsequent variable assignments will be
                     parsed after [files]
      -late          All subsequent variable assignments will be
                     parsed right after default_post.prf
      -norecursive   Don't do a recursive search
      -recursive     Do a recursive search
      -set <prop> <value> Set persistent property
      -unset <prop>  Unset persistent property
      -query <prop>  Query persistent property. Show all if <prop> is empty.
      -qtconf file   Use file instead of looking for qt.conf
      -cache file    Use file as cache           [makefile mode only]
      -spec spec     Use spec as QMAKESPEC       [makefile mode only]
      -nocache       Don't use a cache file      [makefile mode only]
      -nodepend      Don't generate dependencies [makefile mode only]
      -nomoc         Don't generate moc targets  [makefile mode only]
      -nopwd         Don't look for files in pwd [project mode only]
    

    So I don't even get to make install here.

     

    Related

    Files: files

  • Chris Cannam

    Chris Cannam - 2018-07-18

    OK, thanks.

    So in the first case you ran configure with a certain prefix, then make and make install, and the files were installed to the prefix that you had provided to configure. (Or they would have been installed there, if you had had permission.)

    That means the bug as described looks to be fixed, since the initial report was that make install ignored the prefix supplied to configure.

    The reason the second example fails to build is that qmake tries to guess the project file name based on the current directory name - so if you are running from a directory called sonic-visualiser-3.1 but the project file is sonic-visualiser.pro, then you need to provide that filename explicitly as an argument to qmake. Sorry I didn't mention that in my brief summary earlier.

    We seem to have the same situation both here and in the related #234. In both cases, a bug report was opened about the install process, I (eventually!) fixed the bug as reported, and then there turned out to be an issue with DESTDIR as well. Unfortunately neither report mentioned DESTDIR until after I had addressed the initial bug, and so I had never made any attempt to fix anything related to it.

    I suggest (as I did in #234) that we need a separate issue to track DESTDIR usage, with an example of what behaviour is expected.

     

    Last edit: Chris Cannam 2018-07-18
  • David Runge

    David Runge - 2018-07-18

    Well, yes and no. The title of this bug report still applies.
    However, I have opened the more specific #254 for tracking work on implementing DESTDIR.

     
  • Chris Cannam

    Chris Cannam - 2018-07-18
    • status: open --> closed
     
  • Chris Cannam

    Chris Cannam - 2018-07-18

    OK, thanks. Since the problem as initially described is solved, there is a new issue for the remaining problem, and this entry is now rather long, I'm closing this one.

     

Log in to post a comment.

MongoDB Logo MongoDB