Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 01-10-2010, 01:45 AM   #1
Bodhi Developer
Registered: Jan 2009
Location: Bloomington, IL
Distribution: Bodhi
Posts: 329

Rep: Reputation: 43
Using a non-standard library path when compiling software

I was wondering if there is an argument I can pass to the configuration file to have it use a library from a non-standard path to compile with - for example I would like it to use my perl located in /scratchbox/users/jeff91/usr/bin/perl instead of the standard /usr/bin/perl

Can I do this somehow?

Old 01-10-2010, 01:55 AM   #2
LQ Guru
Registered: May 2009
Location: Gibraltar, Gibraltar
Distribution: Fedora 20 with Awesome WM
Posts: 6,805
Blog Entries: 1

Rep: Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295Reputation: 1295

You can find out what options/parameters you can give to a configure script by typing:
./configure --help
./configure -h
Then look if there is an option like:
If the option is not available then you could always create a link to your perl in the directory where your configure script is looking for it.

Kind regards,

Old 01-13-2010, 05:11 PM   #3
LQ 5k Club
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2017 CentOS6.9 CentOS7.4 + 50+ other Linux OS, for test only.
Posts: 17,049

Rep: Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459Reputation: 3459
'perl' is searching libraries, modules using info
from the binary 'perl' e.g. /usr/bin/perl .

The best setup is of course a chroot environment
( with all your "arm" files )

But a workaround may work : a temporary rename
of /usr/bin/perl to e.g. /usr/bin/perl-5

With only the binary "arm perl" around,
no disturbing "i386" files should then
be picked up.
Old 01-13-2010, 05:17 PM   #4
Registered: Jul 2009
Location: Reston, VA
Distribution: Slackware, Ubuntu, RHEL
Posts: 183

Rep: Reputation: 46
the easiest way is to just modify the environment slightly before you run configure:

PATH=/scratchbox/users/jeff91/usr/bin/perl:$PATH ./configure --blah

If, as you asked, you wanted to link a library from an unusual path, you can say:

CFLAGS="-I/path/to/your/headers" LDFLAGS="-L/path/to/your/lib" ./configure --blah

an autoconf-generated configure script pays attention to those and several other env variables.
1 members found this post helpful.


configuration, perl

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
how to include the path of exe in the ld library path? malli42108 Linux - Networking 10 09-17-2009 09:21 AM
Path Problems with compiling software and Slackbuilt packages GushpinBob Slackware 3 03-11-2008 07:20 PM
How to specify a library path when compiling? moo-cow Linux - Software 5 11-10-2007 09:10 PM
Sockets and standard I/O library failure_to Programming 0 05-22-2004 11:55 AM
C++ standard library. Thetargos Programming 8 10-09-2003 03:01 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:05 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration