Thread overview
make install fails on Fedora
Apr 25, 2016
Russel Winder
Apr 25, 2016
Kai Nacke
Apr 26, 2016
Russel Winder
Apr 26, 2016
FreeSlave
Apr 26, 2016
Russel Winder
April 25, 2016
make install works fine on Debian Sid but fails on Fedora Rawhide because the generated cmake_install.cmake file has an inappropriate path in. I have no idea why this happens on Fedora, and not Debian. Is anyone else building LDC on Fedora so we could investigate further?

-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder

April 25, 2016
On Monday, 25 April 2016 at 13:39:05 UTC, Russel Winder wrote:
> make install works fine on Debian Sid but fails on Fedora Rawhide because the generated cmake_install.cmake file has an inappropriate path in. I have no idea why this happens on Fedora, and not Debian. Is anyone else building LDC on Fedora so we could investigate further?

Could you post the error message, please? Which path is wrong? Thanks!

Regards,
Kai
April 26, 2016
On Debian Sid, the cmake_install.cmake file has a block:

if(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
  list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
   "/home/users/russel/Built/etc/bash_completion.d/")
  if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
file(INSTALL DESTINATION "/home/users/russel/Built/etc/bash_completion.d" TYPE DIRECTORY FILES "/home/Checkouts/Git/LDC/bash_completion.d/")
endif()

which appears to be fine. However on Fedora the path to the bash completion directory is:

"/usr/share/bash-completion/completions/"

instead of:

"/home/russel/Built/etc/bash_completion.d/"

which is not only wrong, it is also an unreadable and (more importantly) unwriteable directory. Currently on Fedora I manually comment out this block so as to be able to run:

make install

Not a huge problem, but very irritating.

I am guessing there is a problem with file template and/or string interpolation that happens on Fedora but not on Debian.


-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder



April 26, 2016
On Tuesday, 26 April 2016 at 08:16:55 UTC, Russel Winder wrote:
> On Debian Sid, the cmake_install.cmake file has a block:
>
> if(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Unspecified")
>   list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
>    "/home/users/russel/Built/etc/bash_completion.d/")
>   if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
>     message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
>   endif()
>   if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
>     message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
>   endif()
> file(INSTALL DESTINATION "/home/users/russel/Built/etc/bash_completion.d" TYPE DIRECTORY FILES "/home/Checkouts/Git/LDC/bash_completion.d/")
> endif()
>
> [...]

Currently Debian uses /usr/share/bash-completion/completions/ too. /usr/share/bash-completion/completions/bash_completion script automatically includes /etc/bash_completion.d for backward compatibility.

So probably cmake file should be changed.
April 26, 2016
On Tue, 2016-04-26 at 12:14 +0000, FreeSlave via digitalmars-d-ldc wrote:
> On Tuesday, 26 April 2016 at 08:16:55 UTC, Russel Winder wrote:
> > On Debian Sid, the cmake_install.cmake file has a block:
> > 
> > if(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}"
> > STREQUAL "Unspecified")
> >   list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
> >    "/home/users/russel/Built/etc/bash_completion.d/")
> >   if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
> >     message(WARNING "ABSOLUTE path INSTALL DESTINATION :
> > ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
> >   endif()
> >   if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
> >     message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION
> > forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
> >   endif()
> > file(INSTALL DESTINATION
> > "/home/users/russel/Built/etc/bash_completion.d" TYPE DIRECTORY
> > FILES "/home/Checkouts/Git/LDC/bash_completion.d/")
> > endif()
> > 
> > [...]
> 
> Currently Debian uses /usr/share/bash-completion/completions/ too. /usr/share/bash-completion/completions/bash_completion script automatically includes /etc/bash_completion.d for backward compatibility.

True, certainly, but given that CMAKE_INSTALL_PREFIX has been set, and the entire /usr tree in not writeable, having the (working) path as above for Debian is what needs to be the case for Fedora.

> So probably cmake file should be changed.

For Fedora builds yes, but not for Debian builds; the current way things happen on Debian is just fine for me.

-- 
Russel. ============================================================================= Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder@ekiga.net 41 Buckmaster Road    m: +44 7770 465 077   xmpp: russel@winder.org.uk London SW11 1EN, UK   w: www.russel.org.uk  skype: russel_winder