Problem installing kim-api

47 views
Skip to first unread message

Rob Groner

unread,
Nov 11, 2020, 2:15:48 PM11/11/20
to Spack
On one system we have the install tree set to /opt/aci/sw, with an environment there.  On that system, the install of kim-api would fail.  The reason it failed was that it was trying to install a file in /etc, which of course I didn't have permissions for.  So looking at the error message, it's this:
     1281    -- Installing: /opt/aci/sw/kim-api/2.1.3_gcc-8.3.1-7yp/share/cmake/Modules/FindKIM-API.cmake
     1282    -- Installing: /etc/opt/aci/sw/kim-api/2.1.3_gcc-8.3.1-7yp/bash_completion.d/kim-api-collections-management.bash
  >> 1283    CMake Error at completions/cmake_install.cmake:49 (file):
     1284      file INSTALL cannot copy file
As you can see, it installs fine until it reaches a particular file where /etc is pre-pended to the install tree.  If I complete the kim-api install as root...sure enough, it does install a couple things to /etc/<install tree>/<kim-api install dir>/.

I decided to try installing kim-api locally on my PC, where everything is still the default ( no env)  That install completed successfully.  And there was indeed a directory at <default spack tree><kim-api install dir>/etc/bash_completion.d.

I then changed the install tree location to /opt/spack-test and did the kim-api install again.  This time, it had the same error.

So it appears that if I have a non-default spack install tree value, or possibly it's specific to one in /opt/, then for some reason, it takes the /etc/ part of that bash_completion.d path and puts it in FRONT of the install tree value instead of behind it.  That's a head scratcher for me, but that's the best I can determine.

I can fill out an issue in the tracker if that's warranted, or perhaps I'm just doing something crazy wrong.

Rob

Christoph Junghans

unread,
Nov 11, 2020, 10:10:15 PM11/11/20
to Spack
Rob, see below!

---------- Forwarded message ---------
From: Ryan S. Elliott <rell...@umn.edu>
Date: Wed, Nov 11, 2020 at 20:07
Subject: Re: Fwd: [spack] Problem installing kim-api
To: Christoph Junghans <christoph...@gmail.com>


Hi Christoph,

Thanks for the notification.

This is "correct" as expected behavior defined by cmake:

https://cmake.org/cmake/help/v3.10/module/GNUInstallDirs.html

When CMAKE_INSTALL_PREFIX have a value of "/opt/..." the CMAKE_SYSCONFDIR value
becomes "/etc/opt/..."  As indicated in the camke docs, this behavior is
defined by the FHS.

Let me know if I should follow up in any way...


Ryan

On Wed, 11 Nov 2020, Christoph Junghans wrote:

> FYI
--
Ryan S. Elliott, Ph.D.
Professor & Director of Graduate Studies
Aerospace Engineering and Mechanics, University of Minnesota
(612) 624-2376 (626-1558 fax)
https://z.umn.edu/relliott
download vCard <https://z.umn.edu/relliott_vcf>
OpenPGP Public key <https://z.umn.edu/relliott_asc> (576D4997C4D51D92)
----------
Never any knowledge was delivered in the same order it was invented.

                                                          Sir Francis Bacon
----------
--
Christoph Junghans
Web: http://www.compphys.de

Rob Groner

unread,
Nov 12, 2020, 9:32:40 AM11/12/20
to Spack
Thank you very much for the reply!  I hate it when expected behavior happens to me unexpectedly, but it seemed too specific to have been a random bug.  

Now to spend some time teaching cmake that I'm going to get my way no matter what.  :)

Rob


Christoph Junghans

unread,
Nov 12, 2020, 10:41:07 AM11/12/20
to Rob Groner, Spack
On Thu, Nov 12, 2020 at 7:32 AM Rob Groner <rug...@psu.edu> wrote:
>
> Thank you very much for the reply! I hate it when expected behavior happens to me unexpectedly, but it seemed too specific to have been a random bug.
>
> Now to spend some time teaching cmake that I'm going to get my way no matter what. :)
I think we could explicitly set CMAKE_SYSCONFDIR to /opt/etc in Spack
as part of the cmake buildsystem class.

Christoph
> --
> You received this message because you are subscribed to the Google Groups "Spack" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to spack+un...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/spack/3331d9bc-1543-4970-8abc-7196982be9d1n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages