Installing pmem

72 views
Skip to first unread message

Amitabha Roy

unread,
Apr 7, 2016, 5:59:17 PM4/7/16
to pmem
Hi

This bit of advice in the Makefile:

# As root, use "make install" to install the library in the usual
# locations (/usr/local/lib, /usr/local/include, and /usr/local/share/man).
# You can provide custom directory prefix for installation using
# DESTDIR variable e.g.: "make install DESTDIR=/opt"
# You can override the prefix within DESTDIR using prefix variable
# e.g.: "make install prefix=/usr"

does not correspond to behavior.

Example:

make install prefix=/usr

Installs in
/usr/lib64 rather than /usr/lib

A suggestion would be clean it up so prefix does exactly what its is supposed to do. Also the presence of both DESTDIR and prefix is confusing to say the least.

A question is how do I install to /usr/lib ?

-Amitabha


Amitabha Roy

unread,
Apr 7, 2016, 6:08:35 PM4/7/16
to pmem
Ok this works... 

make install DESTDIR=/usr/lib/ prefix=..

kindof illustrates my point about the need to change this :D

-A

Lebioda, Pawel

unread,
Apr 8, 2016, 6:30:23 AM4/8/16
to Amitabha Roy, pmem

Hi Roy,

 

We tried to follow the rules from the following GNU ‘standards’:

https://www.gnu.org/prep/standards/html_node/DESTDIR.html

https://www.gnu.org/prep/standards/html_node/Directory-Variables.html

 

So the DESTDIR is a variable prepended to each installed target file, but the prefix is used to construct the default values of several variables like:

libdir, exec_prefix, sysconfdif, datarootdir, mandir etc.

 

The main difference between the DESTDIR and prefix is that the latter determines where the files will go when installing (e.g. from package) and where the associated files should be looked for. But the DESTDIR variable is for installing to some temporary directory which is not where the package itself will be installed.

 

Maybe we would need to update the documentation to make it clear.

 

In case of libraries the libdir is used to provide an install prefix and it is detected automatically in makefiles which location should be used, but you can always overwrite this:

 

$ make install  libdir=/usr/lib

 

But this will install all libraries in /usr/lib but rest of files would be installed in /usr/local

So the complete command would be:

 

$ make install prefix=/usr libdir=/usr/lib

 

And now if you would like to install all files in some other directory you can use the DESTDIR:

 

$ make install prefix=/usr libdir=/usr/lib DESTDIR=~/buildroot

 

Regards

Pawel

--
You received this message because you are subscribed to the Google Groups "pmem" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pmem+uns...@googlegroups.com.
To post to this group, send email to pm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pmem/9126694c-85aa-4f2d-8724-b46dff963177%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. S&#322owackiego 173 | 80-298 Gda&#324sk | S&#261d Rejonowy Gda&#324sk P&#243&#322noc | VII Wydzia&#322 Gospodarczy Krajowego Rejestru S&#261dowego - KRS 101882 | NIP 957-07-52-316 | Kapita&#322 zak&#322adowy 200.000 PLN.

Ta wiadomo&#347&#263 wraz z za&#322&#261cznikami jest przeznaczona dla okre&#347lonego adresata i mo&#380e zawiera&#263 informacje poufne. W razie przypadkowego otrzymania tej wiadomo&#347ci, prosimy o powiadomienie nadawcy oraz trwa&#322e jej usuni&#281cie; jakiekolwiek przegl&#261danie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.

Amitabha Roy

unread,
Apr 8, 2016, 10:56:36 AM4/8/16
to pmem
Thanks, that clears it up. Perhaps those examples should be in the documentation :)

My aim (and others might also have the same issue) was to install into /usr/lib rather than /usr/local/lib so at the minimal an example showing how to install libraries to /usr/lib using the libdir prefix would be super useful in the documentation or the comment section in the makefile.

-Amitabha


On Thursday, April 7, 2016 at 2:59:17 PM UTC-7, Amitabha Roy wrote:
Reply all
Reply to author
Forward
0 new messages