LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-12-2008, 04:56 PM   #1
Ryzol
Member
 
Registered: Jun 2007
Distribution: Ubuntu, Slackware
Posts: 50

Rep: Reputation: 15
general compiling help/tips


I have basically two questions:
1.For distros like slackware that lack dependency resolution is there a program that will tell me if I have a certain lib installed? Basically is there a version of which that works for libraries?

2. What do all those cryptic compile time error messages mean?

Any other general compiling tips/common issues would be much appreciated.
 
Old 04-12-2008, 07:10 PM   #2
anupamsr
Member
 
Registered: Sep 2004
Location: India
Distribution: Kubuntu, Archlinux, Suse, Gentoo, Mandrake
Posts: 371

Rep: Reputation: 30
one command: ldd <executable file name>

It will tell you what libraries are missing. Most of the time you can guess the library name, other times you can Google it

For example:
Code:
$ ldd nedit                                                      2:08
    linux-gate.so.1 =>  (0xffffe000)
    libXm.so.4 => /usr/lib/libXm.so.4 (0xb7cc5000)
    libXt.so.6 => /usr/lib/libXt.so.6 (0xb7c75000)
    libX11.so.6 => /usr/lib/libX11.so.6 (0xb7b58000)
    libm.so.6 => /lib/libm.so.6 (0xb7b32000)
    libc.so.6 => /lib/libc.so.6 (0xb7a04000)
    libXmu.so.6 => /usr/lib/libXmu.so.6 (0xb79ed000)
    libXext.so.6 => /usr/lib/libXext.so.6 (0xb79de000)
    libXp.so.6 => /usr/lib/libXp.so.6 (0xb79d5000)
    libXft.so.2 => /usr/lib/libXft.so.2 (0xb79c2000)
    libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0xb7953000)
    libz.so.1 => /lib/libz.so.1 (0xb7940000)
    libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0xb7914000)
    libexpat.so.1 => /usr/lib/libexpat.so.1 (0xb78f3000)
    libXrender.so.1 => /usr/lib/libXrender.so.1 (0xb78ea000)
    libpthread.so.0 => /lib/libpthread.so.0 (0xb78d2000)
    libXau.so.6 => /usr/lib/libXau.so.6 (0xb78ce000)
    libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb78c8000)
    libSM.so.6 => /usr/lib/libSM.so.6 (0xb78bd000)
    libICE.so.6 => /usr/lib/libICE.so.6 (0xb78a4000)
    libdl.so.2 => /lib/libdl.so.2 (0xb78a0000)
    /lib/ld-linux.so.2 (0xb7f2f000)
$
So, you can see that I have expat, pXau, fontconfig, Xrender, freetype, etc... all installed. But I don't know what is libz. So I do a Google search: http://www.google.com/search?q=libz - and get to know that it is zlib.

Last edited by anupamsr; 04-12-2008 at 07:11 PM.
 
Old 04-12-2008, 07:19 PM   #3
XavierP
Moderator
 
Registered: Nov 2002
Location: Kent, England
Distribution: Debian Testing
Posts: 19,192
Blog Entries: 4

Rep: Reputation: 475Reputation: 475Reputation: 475Reputation: 475Reputation: 475
As for the compile errors, normally the last few lines will tell you the problem - whether it's that it's missing a dependency or something else. I would say that your best bet is to post up the last 10 lines here on LQ and we can help you decipher them. It does get easier, honest
 
Old 04-12-2008, 07:22 PM   #4
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
Quote:
Originally Posted by Ryzol View Post
1.For distros like slackware that lack dependency resolution is there a program that will tell me if I have a certain lib installed? Basically is there a version of which that works for libraries?
locate, find, and ls all work for libraries.

Quote:
Originally Posted by Ryzol View Post
2. What do all those cryptic compile time error messages mean?
Which ones? All is pretty all encompassing and vague. But if you have something in particular, post the last 10-20 lines of the failed build.

Last edited by weibullguy; 04-12-2008 at 07:23 PM.
 
Old 04-12-2008, 09:46 PM   #5
Ryzol
Member
 
Registered: Jun 2007
Distribution: Ubuntu, Slackware
Posts: 50

Original Poster
Rep: Reputation: 15
Could someone explain what the output of ldd means? The man page is lacking. I'm guessing it means libname.version => path (location in memory). So I ran ldd on /bin/ls got some output. Then did slocate on a library it listed, linux-gate.so.1 to be exact and it did not find anything. What gives? I have a working ls, how do I not have all the libraries it needs?

With respect to compile to messages, I don't have any currently but I probably will have some soon. I just remember when I first tried to compile a program I got a very cryptic message and was wondering if there's a site or something that lists/explains gcc compile time error messages.
 
Old 04-13-2008, 03:34 AM   #6
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
You don't even need to run ldd, if you try to run the program in question, it'll output what you're missing if it can't find it. Usually during the compile process the configure script will tell you before hand most of the libraries you need to compile a program. As for error messages, post them on here and we'll help you out. They are often cryptic, but they always mean something.
 
Old 04-13-2008, 02:37 PM   #7
Ryzol
Member
 
Registered: Jun 2007
Distribution: Ubuntu, Slackware
Posts: 50

Original Poster
Rep: Reputation: 15
So I was following slackwarebasics about compiling the kernel. Anyways quick question, I did cd to path of kernel source. Then did make menuconfig and selected what I thought was appropriate. When I was done with that I chose save this configuration and named it "firstkernel.config". I then did make. Did make use this new configuration or the default one? If it didn't how do I tell it which configuration to use?
 
  


Reply



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
General Installation Tips der_11 Slackware - Installation 3 06-03-2007 02:24 PM
General tips for detecting chipset on Linux box? brycen Linux - Hardware 3 09-29-2006 03:32 PM
Tips on compiling a kernel. dr_zayus69 Linux - General 4 06-01-2005 07:47 PM
General Tips.. how I love them BrutualTarget Linux - Newbie 3 07-11-2003 01:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:31 AM.

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