LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


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

Rep: Reputation: 68
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?

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

Rep: Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297Reputation: 1297
Hello,

You can find out what options/parameters you can give to a configure script by typing:
Code:
./configure --help
or
Code:
./configure -h
Then look if there is an option like:
Code:
--with-perl=
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,

Eric
 
Old 01-13-2010, 05:11 PM   #3
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
'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 )
http://en.wikipedia.org/wiki/Chroot

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
GooseYArd
Member
 
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.
  


Reply

Tags
configuration, perl



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

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:00 PM.

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