[gmx-users] build nuance in gmx5 (avoiding "file INSTALL cannot find gmx")
Szilárd Páll
pall.szilard at gmail.com
Thu May 21 21:34:21 CEST 2015
Chris,
On Thu, May 21, 2015 at 5:50 PM, Christopher Neale
<chris.neale at alum.utoronto.ca> wrote:
> Dear Szilárd:
>
> I report it only because it is allowed in gmx4 builds (or at least it works, I am not sure whether or not is it "allowed").
By "now allowed" I meant that things will likely break if you do that
(@others: please confirm if I remember correctly this is indeed prone
to break with CMake).
Additionally, I spoke up because this is also a bad practice. The
build and installation directory trees serve different purposes and
have different, but potentially overlapping structure. Hence, you can
easily end up with a disastrous mess if e.g. the install process
modifies or deletes a file that the build tree generated.
> I move the source because I often have many modified source trees that I rename to keep things straight.
You could still do that if e.g. you structure things like this:
GROMACS-5.0.5
/source
/build
/install
> The quick and dirty method that you cite presumes that one has root access, which is very unlikely on the places that most simulations are run.
>
> The http://www.gromacs.org/Documentation/Installation_Instructions_5.0#typical-gromacs-installation section below that does have a note about "-DCMAKE_INSTALL_PREFIX=xxx to install GROMACS to a non-standard location (default /usr/local/gromacs)" but that gives no suggestions on how to use it and based on my experience I presume that "-DCMAKE_INSTALL_PREFIX=$(pwd)" would give a similar error if applied to the "quick and dirty" method.
Exactly, -DCMAKE_INSTALL_PREFIX is all you need to add to the
configure line to avoid needing root access. Perhaps we should add
that to the quick and dirty steps.
Not sure why does it make things easier to put the installation in the
same place where you configured - which is supposed to be just a
staging area, nothing more. However, we should probably note this
issue in the install guide.
> My intention is not to try to get gromacs to change the build procedure. Just to report something that worked once that no longer works and to include a snippit from the relevant error message so that it is searchable.
Sure, documenting issue it is always beneficial for the gmx community,
so thanks for the note!
Cheers,
--
Szilárd
> Thank you,
> Chris.
>
> ________________________________________
> From: gromacs.org_gmx-users-bounces at maillist.sys.kth.se <gromacs.org_gmx-users-bounces at maillist.sys.kth.se> on behalf of Szilárd Páll <pall.szilard at gmail.com>
> Sent: 21 May 2015 11:24
> To: Discussion list for GROMACS users
> Cc: gromacs.org_gmx-users at maillist.sys.kth.se
> Subject: Re: [gmx-users] build nuance in gmx5 (avoiding "file INSTALL cannot find gmx")
>
> You can't install into the build tree, AFAIK that's not allowed!
> Install into a clean target directory instead.
>
> Also, you "mkdir source; mv * source" step is just weird. Why move the
> source around? Instead you can simply create a build directory - this
> can even be in the source tree just as the uiqck and dirty install
> steps suggest:
> http://www.gromacs.org/Documentation/Installation_Instructions_5.0#quick-and-dirty-installation
>
> --
> Szilárd
>
>
> On Thu, May 21, 2015 at 5:11 PM, Christopher Neale
> <chris.neale at alum.utoronto.ca> wrote:
>> Dear Users:
>>
>> This is just a note about compiling gromacs 5 so that the solution can be found by others if they need it.
>>
>> I used to compile gromacs like this:
>>
>> download and unpack tarball
>> cd gromacs-5.0.5
>> mkdir source
>> mv * source
>> mkdir exec
>> cd exec
>> ** run my build script from here, using CMAKE_INSTALL_PREFIX=$(pwd)
>>
>> However, that no longer works. What happens is that "make" creates ./bin/gmx and then "make install" removes ./bin/gmx and then complains that it does not exist:
>>
>> CMake Error at src/programs/cmake_install.cmake:42 (file):
>> file INSTALL cannot find
>> "/project2/p/pomes/cneale/GPC/exe/intel/gromacs-5.0.5/exec/bin/gmx".
>> Call Stack (most recent call first):
>> src/cmake_install.cmake:40 (include)
>> cmake_install.cmake:48 (include)
>>
>> My solution was to build in a separate directory from either the source or the executable:
>> download and unpack tarball
>> cd gromacs-5.0.5
>> mkdir source
>> mv * source
>> mkdir exec build
>> cd build
>> ** run my build script from here, using CMAKE_INSTALL_PREFIX=$(pwd)/../exec
>>
>> Perhaps this is standard practice. Anyway, my original procedure works for gmx4.6.7 but not gmx5.0.5 so I thought I would report it.
>>
>> Note that this is separate from the issue that some have reported where a CMAKE_INSTALL_PREFIX using $(pwd) did not install but using the explicit path worked (I tested the explicit paths and got the same error that I report above).
>>
>> Chris.
>>
>>
>> --
>> Gromacs Users mailing list
>>
>> * Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!
>>
>> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>>
>> * For (un)subscribe requests visit
>> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a mail to gmx-users-request at gromacs.org.
> --
> Gromacs Users mailing list
>
> * Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a mail to gmx-users-request at gromacs.org.
> --
> Gromacs Users mailing list
>
> * Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-Users_List before posting!
>
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-users or send a mail to gmx-users-request at gromacs.org.
More information about the gromacs.org_gmx-users
mailing list