www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.ldc - make install fails on Fedora

reply Russel Winder via digitalmars-d-ldc <digitalmars-d-ldc puremagic.com> writes:
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?

--=20
Russel.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder ekiga.n=
et
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
Apr 25 2016
parent reply Kai Nacke <kai redstar.de> writes:
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
Apr 25 2016
parent reply Russel Winder via digitalmars-d-ldc <digitalmars-d-ldc puremagic.com> writes:
On Debian Sid, the cmake_install.cmake file has a block:

if(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}" STREQUAL "Un=
specified")
=C2=A0=C2=A0list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
=C2=A0=C2=A0=C2=A0"/home/users/russel/Built/etc/bash_completion.d/")
=C2=A0=C2=A0if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
=C2=A0=C2=A0=C2=A0=C2=A0message(WARNING "ABSOLUTE path INSTALL DESTINATION =
: ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
=C2=A0=C2=A0endif()
=C2=A0=C2=A0if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
=C2=A0=C2=A0=C2=A0=C2=A0message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINAT=
ION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
=C2=A0=C2=A0endif()
file(INSTALL DESTINATION "/home/users/russel/Built/etc/bash_completion.d" T=
YPE 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.=C2=A0

=C2=A0
--=20
Russel.
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D
Dr Russel Winder      t: +44 20 7585 2200   voip: sip:russel.winder ekiga.n=
et
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
Apr 26 2016
parent reply FreeSlave <freeslave93 gmail.com> writes:
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.
Apr 26 2016
parent Russel Winder via digitalmars-d-ldc <digitalmars-d-ldc puremagic.com> writes:
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:
=20
 if(NOT CMAKE_INSTALL_COMPONENT OR "${CMAKE_INSTALL_COMPONENT}"=C2=A0
 STREQUAL "Unspecified")
 =C2=A0=C2=A0list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
 =C2=A0=C2=A0=C2=A0"/home/users/russel/Built/etc/bash_completion.d/")
 =C2=A0=C2=A0if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
 =C2=A0=C2=A0=C2=A0=C2=A0message(WARNING "ABSOLUTE path INSTALL DESTINAT=
ION :=C2=A0
 ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
 =C2=A0=C2=A0endif()
 =C2=A0=C2=A0if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
 =C2=A0=C2=A0=C2=A0=C2=A0message(FATAL_ERROR "ABSOLUTE path INSTALL DEST=
INATION=C2=A0
 forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
 =C2=A0=C2=A0endif()
 file(INSTALL DESTINATION=C2=A0
 "/home/users/russel/Built/etc/bash_completion.d" TYPE DIRECTORY=C2=A0
 FILES "/home/Checkouts/Git/LDC/bash_completion.d/")
 endif()
=20
 [...]
=20 Currently Debian uses /usr/share/bash-completion/completions/=C2=A0 too. /usr/share/bash-completion/completions/bash_completion=C2=A0 script automatically includes /etc/bash_completion.d for backward=C2=A0 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. --=20 Russel. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D Dr Russel Winder t: +44 20 7585 2200 voip: sip:russel.winder ekiga.n= et 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
Apr 26 2016