As of 2016-02-26, there will be no more posts for this blog. s/blog/pba/
Showing posts with label installation. Show all posts

Note

This is a note currently nothing about about the programming, but the use of C project.

1   $HOME/.local installation with Autotools

Normally, project with GNU Autotools, you can build and install to specified location, for example

% ./configure --prefix=$HOME/.local
% make
% make install

Which installs the files to $HOME/.local other than commonly default /usr/local. On most distributions, you shouldnt have issues with /usr/local installation, not just the executables, but also the libraries, pkg-config, linking, they all should be configured system-wide.

However, its not the case for user home installation, you will need to take some steps to ensure things can be found.

1.1   pkg-config

export LD_LIBRARY_PATH=$HOME/.local/lib
export PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig:/usr/lib64/pkgconfig

LD_LIBRARY_PATH makes sure any shared libraries are linked during the compilation can be found when you execute the program.

PKG_CONFIG_PATH isnt for additional paths, so you still need to provide the system pkg-config locations.

1.2   configure

When startup, continues sources prefix/share/config.site, if found, prefix is either default or one you specify with --prefix. In my case, it is $HOME/.local/share/config.site and I have the following content:

CPPFLAGS=-I$HOME/.local/include
LDFLAGS=-L$HOME/.local/lib

They will make sure the header files can be found and linker knows there the shared libraries are stored.

I cant read Perl and have barely any knowledge of Perl, but its part of my system and sometimes I want to try out some Perl projects, but the dependencies always a mess for me because I dont know how to cleanly remove the installed depending modules after the tryout.

This note was created primarily for how I could uninstall modules. This is not a note for coding, nor the Perl core itself. There might be mistakes in this note.