Unix/Linux Go Back    


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

Make install in custom path

UNIX for Dummies Questions & Answers


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 03-16-2013
anil510 anil510 is offline
Registered User
 
Join Date: Mar 2012
Last Activity: 16 March 2015, 2:50 AM EDT
Posts: 100
Thanks: 47
Thanked 2 Times in 2 Posts
Make install in custom path

I would like to install a binary from source on a custom path, say /usr/local/myapps. There is no --prefix option in ./configure How can I "make install" at custom path. I tried this.

Code:
No --prefix

root@server [/usr/src/libvpx-v1.1.0]# ./configure --help | grep prefix
root@server [/usr/src/libvpx-v1.1.0]#



Code:
Make install

root@server [/usr/src/libvpx-v1.1.0]# make install INSTALL_PATH=/usr/local/myapps
    [INSTALL] /usr/local/lib/libvpx.a
    [INSTALL] /usr/local/lib/libvpx.so.1.1.0
    [LN]      /usr/local/lib/libvpx.so
    [INSTALL] /usr/local/lib/pkgconfig/vpx.pc
    [INSTALL] /usr/local/bin/vpxdec
    [INSTALL] /usr/local/bin/vpxenc
    [INSTALL] /usr/local/bin/vp8_scalable_patterns
make[1]: Nothing to be done for `install'.

Sponsored Links
    #2  
Old Unix and Linux 03-16-2013
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
 
Join Date: May 2005
Last Activity: 30 July 2015, 2:54 PM EDT
Location: In the leftmost byte of /dev/kmem
Posts: 4,625
Thanks: 56
Thanked 1,004 Times in 783 Posts
Quote:
Originally Posted by anil510 View Post
How can I "make install" at custom path.
Obviously your make-file has no provisions for doing this. You will have to change (extend) it to do so. "make install" calls the command "make" which in turn uses its default rule file, "./Makefile". Have a look into this file and change the rules/actions under the target "install" according to your needs.

I hope this helps.

bakunin
The Following User Says Thank You to bakunin For This Useful Post:
anil510 (03-17-2013)
Sponsored Links
    #3  
Old Unix and Linux 03-17-2013
anil510 anil510 is offline
Registered User
 
Join Date: Mar 2012
Last Activity: 16 March 2015, 2:50 AM EDT
Posts: 100
Thanks: 47
Thanked 2 Times in 2 Posts
Thank you Bakunin.

I have doubt in the flags I set while I compile. For Eg. I compiled an extra library required for ffmpeg (libdc1394) at /usr/local/myapps/lib/libdc1394.so. I then set these ENV variables and compile ffmpeg using the below option.


Code:
LIBS=-L/usr/local/myapps/lib/
export LIBS

PKG_CONFIG_PATH=/usr/local/myapps/lib/pkgconfig/
export PKG_CONFIG_PATH

LDFLAGS=-L/usr/local/myapps/lib/
export LDFLAGS

CPPFLAGS=-I/usr/local/myapps/include/
export CPPFLAGS

PATH=/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin::/root/bin:/usr/local/myapps/bin
export PATH

FFmpeg compilation.

Code:
./configure  --enable-libdc1394
make
make install

Contents of /usr/local/myapps/lib/pkgconfig/libdc1394-2.pc

Code:
# cat /usr/local/myapps/lib/pkgconfig/libdc1394-2.pc
prefix=/usr/local/myapps
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: libdc1394
Description: 1394-based DC Control Library
Version: 2.1.3
Libs: -L${libdir} -ldc1394
Cflags: -I${includedir}

Ffmpeg binary compiled fine. But when I checked "/usr/local/myapps/bin/ffmpeg -v" with strace, I could find, it not taking the /usr/local/myapps/lib/libdc1394.so. It takes "/usr/lib/libdc1394.so.22". Please see the corresponding line in strace output.


Code:
open("/usr/lib/libdc1394.so.22", O_RDONLY) = 3

I need the /usr/local/myapps/lib/libdc1394.so.22 being used during ffpmeg install. There is NO option like "--enable-libdc1394=/path/to/libdc1394"
    #4  
Old Unix and Linux 03-21-2013
bakunin bakunin is offline Forum Staff  
Bughunter Extraordinaire
 
Join Date: May 2005
Last Activity: 30 July 2015, 2:54 PM EDT
Location: In the leftmost byte of /dev/kmem
Posts: 4,625
Thanks: 56
Thanked 1,004 Times in 783 Posts
It might help to set the library path to the directory where your library resides. Set the environment variables "LIBPATH" and/or "LD_LIBRARY_PATH" accordingly (they work like the PATH variable, paths, separated by ":") and try again.

I hope this helps.

bakunin
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
how to install custom .bat files in perl hansini Windows & DOS: Issues & Discussions 1 08-31-2012 01:00 PM
zlib.h in custom path anilcliff Shell Programming and Scripting 7 07-05-2011 01:10 PM
Custom directory path variable Chronomaly Shell Programming and Scripting 10 10-08-2010 12:06 PM
Gani Network Driver Won't Install - make: Fatal error: Don't know how to make targ... Bradj47 Solaris 1 08-17-2009 12:46 AM
AIX custom package install query jobbyjoseph AIX 9 07-29-2009 08:23 AM



All times are GMT -4. The time now is 04:15 AM.