Menu

Build Fails during configuration

Help
will kranz
2015-02-18
2015-02-24
  • will kranz

    will kranz - 2015-02-18

    Possibly it is just that I have never used CMake, but I find the instructions as I read them don't work. I download and expand the tar ball. I create a build directory. The instructions appear to imply I stay in this directory to issue the first CMake command which contains -D style defines. If I do there is an immediate error that the directory does not contain a CMakeLists.txt file. This file does exist in the parent directory so I tried to copy it to the new build directory and start again. It gets to line 95 in the CMakeLists.txt and has an error because required sub-diretories 'po' and 'doc-translations' do not exist. They do exist in parent directory so I conclude I should do the configuration in this parent directory as extracted from tarball. I delete what was created in build directory and try again from parent. It goes further, up to line 232 in CMakelists where it has a problem with custom target smbk4k-1.1.81/po/bg/profiles which it thinks exists already, but my file browser does not show as existing. Any suggestions about what I am doing wrong?? Thanks in advance, saw no one else has this problem so it must be me or my Slackwark 14.1 linux distro.

     
    • Alexander Reinholdt

      Please follow the steps below to configure, compile and install Smb4K:

      1. Extract the downloaded version of Smb4K (replace a.b.c with the correct version number):
      $ tar xvfJ smb4k-a.b.c.xz
      
      1. Change into the just created directory:
      $ cd smb4k-a.b.c
      
      1. Create a build directory and change into it:
      $ mkdir build
      $ cd build
      
      1. Execute the following command (mind the two dots at the end of the command):
      $ cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=`kde4-config --prefix` ..
      
      1. Run make:
      $ make
      
      1. Install Smb4K:
      $ checkinstall
      

      For further information, please see our wiki.

      If installation should still not work, please drop a note.

      Best regards
      Alexander

       

      Related

      Wiki: CompilationAndInstallation

  • will kranz

    will kranz - 2015-02-20

    Thanks for the attempt to help, its possible I left out the '..' when I did my first attempt from the build directory last time. I deleted everything and downloaded your latest version 1.1.90, did as you suggested above.
    I get the same error as before listed below while running cmake version 2.8.12 on a slackware linux 14.1 distribution with their 3.10.17-smp kernel.

    These are the last few lines of output to the screen while cmake is running. Oddly the error is reported 3 times, I only include the last of the 3. The log files don't seem to show anything of interest but I could send or post them if they might be of interest:
    "
    CMake Error at /usr/share/apps/cmake/modules/FindGettext.cmake:232 (ADD_CUSTOM_TARGET):
    add_custom_target cannot create target "pofiles" because another target
    with the same name already exists. The existing target is a custom target
    created in source directory "/usr/src/smb4k-1.1.90/po/bg". See
    documentation for policy CMP0002 for more details.
    Call Stack (most recent call first):
    po/zh_TW/CMakeLists.txt:2 (GETTEXT_PROCESS_PO_FILES)

    -- Configuring incomplete, errors occurred!
    See also "/usr/src/smb4k-1.1.90/build/CMakeFiles/CMakeOutput.log".
    See also "/usr/src/smb4k-1.1.90/build/CMakeFiles/CMakeError.log".
    "
    I tried it on two different machines both with the same slackware distribution installed with the same results. Not surprising, but some verification its repeatable. Any other suggestions?

     
  • FranzMari

    FranzMari - 2015-02-23

    Hi,
    I'm trying to build smb4k for Chakra Linux, but I get the same error as Will.
    Here's the full output: https://paste.kde.org/pammdqumm

     
  • Alexander Reinholdt

    Thank you for reporting this issue. I found the cause of it: It comes from the new minimum required CMake version (2.8). The fix is to edit the top level CMakeLists.txt file and either change the line

    cmake_minimum_required( VERSION 2.8 FATAL_ERROR )
    

    to

    cmake_minimum_required( VERSION 2.6 FATAL_ERROR )
    

    or to add the following somewhere in the file

    if ( EXISTS po )
      set_property(GLOBAL PROPERTY ALLOW_DUPLICATE_CUSTOM_TARGETS ON)
    endif( EXISTS po )
    

    Sorry for the inconvenience. I will reupload version 1.2.0 with this fix as soon as possible.

     

Log in to post a comment.