LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-29-2008, 05:15 PM   #1
rheng
LQ Newbie
 
Registered: Jul 2008
Posts: 8

Rep: Reputation: 0
compile question


How can I specify the path where I want to put a particular library?

For example: I would like to put a library in /usr/lib/ during an install.

Thanks.
 
Old 07-29-2008, 05:18 PM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
Your Subject indicates this is a compile question, but your question seems to be asking how to *install* a file.

Are you simply asking how to install a file?
 
Old 07-29-2008, 05:22 PM   #3
rheng
LQ Newbie
 
Registered: Jul 2008
Posts: 8

Original Poster
Rep: Reputation: 0
Yes, sorry. I thought made is was during the compile time where I set up the path for it to install. I see the library, but how could I get it to install at a particular path.
 
Old 07-29-2008, 05:31 PM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
man install
 
Old 07-29-2008, 06:24 PM   #5
jomen
Senior Member
 
Registered: May 2004
Location: Leipzig/Germany
Distribution: Arch
Posts: 1,687

Rep: Reputation: 54
If you are compiling - see the output of "configure --help" - it will tell you the default locations and also the available switches (like: --prefix=/usr --libdir=/usr/lib ... )
"make install" will then install the files to the locations you specified - or use the default

If you want different locations - run "configure" with the switches adapted to your wishes - so the software will be built to install to those you want.

There is also the file /etc/ld.so.conf - where you can give the path to a library (if you copied it to a directory not in that path)
This file is in many distributions not to be edited itself - it rather is generated from files in some other place. In Gentoo for example the files taken into account to generate /etc/ld.so.conf are in /etc/env.d/...

HTH
 
Old 08-01-2008, 01:54 PM   #6
rheng
LQ Newbie
 
Registered: Jul 2008
Posts: 8

Original Poster
Rep: Reputation: 0
This is what i want to do:

After building my application and installing it, I try to run an application and get the following error:

/usr/lib/libstdc++.so.6: version `CXXABI_1.3.1' not found (required by ./replicationd)

I check /usr/lib/ and I noticed that libstdc++.so.6 is pointing to an older compiler

libstdc++.so.6.0.3.

( Background info on the compiler )
The kernel is being compiled on gcc-3.4.5 while the application is being compiled on gcc-4.0.3.

So it looks like it will put the 3.4.5 path before the 4.0.3.

On the build server, I checked /usr/lib, this is what I see. I notice that libstdc++.so.6 is pointing to libstdc++.so.6.0.3 and libstdc++.so.6.0.7 is pointing to /usr/local/gcc-403/lib/libstdc++.so.6.0.7.

[rheng@panther2 lib]$ ls -al libstdc++*
lrwxrwxrwx 1 root root 18 Jul 29 15:31 libstdc++.so.6 -> libstdc++.so.6.0.3*
-rwxr-xr-x 1 root root 789K Dec 31 2005 libstdc++.so.6.0.3*
lrwxrwxrwx 1 root root 41 Oct 17 2006 libstdc++.so.6.0.7 -> /usr/local/gcc-403/lib/libstdc++.so.6.0.7*

I tried to manually link libstdc++.so.6 to libstdc++.so.6.0.7 in the build server, compiled it and then install the package, but still no change.

How can I get libstdc++.so.6 to link to libstdc++.so.6.0.7? Right now I have to manually copy over libstdc++.so.6.0.7 and then manually link it to libstdc++.so.6 in /usr/lib.

I tried running "configure" but get the following:

[]$ configure --help
-bash: configure: command not found
[]$ ./configure
-bash: ./configure: No such file or directory
[]$


And I'm not sure about ld.so.conf and what I need to modify.
 
Old 08-01-2008, 02:12 PM   #7
kevkim55
Member
 
Registered: Dec 2005
Location: Edmonton
Distribution: BLFS, Gentoo
Posts: 353

Rep: Reputation: 32
What application are you trying to install ?
 
Old 08-01-2008, 02:17 PM   #8
rheng
LQ Newbie
 
Registered: Jul 2008
Posts: 8

Original Poster
Rep: Reputation: 0
a backup application. why does that matter?
 
Old 08-01-2008, 02:32 PM   #9
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
It is very difficult for people to help when you feel the need to withhold information. It further annoys and alienates helpers when you challenge their questions.
 
Old 08-01-2008, 02:55 PM   #10
rheng
LQ Newbie
 
Registered: Jul 2008
Posts: 8

Original Poster
Rep: Reputation: 0
very true. I apologize.
 
Old 08-01-2008, 03:20 PM   #11
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 63
It matters which program you are trying to install because there is no one way to configure, build and install a package. There are lots of build systems out there, and it depends what the developers who wrote the program decided to use.


Common build systems include, but are not limited to:
  • a list of instructions to manually compile, link and then install
  • hand-made makefiles
  • automake/autoconf generated makefiles (very common)
  • cmake generated makefiles (not so common, but a nice build system)
  • scons projects

This list is nearly endless, these are just of a few of the options. This doesn't even start to go into project written in perl or python which have their own build systems.

Basically, the answer is "it depends on the thing you are trying to build/install", so if you don't want to say what it is, we will find it very difficult to help you.

Having said all that, do you even need to build it? Can you not find a pre-built package in your distribution's repositories?
 
  


Reply


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Compile Question. pete1234 Linux - Laptop and Netbook 6 05-19-2005 10:51 AM
Compile question LazySlacker Slackware 3 07-05-2004 05:01 AM
compile question jpostma Linux - General 1 06-19-2004 09:54 AM
Compile Question steveh350 Slackware 3 08-17-2003 04:14 AM
compile question chens_83 Linux - General 7 02-24-2002 07:53 PM


All times are GMT -5. The time now is 02:12 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration