LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices

Reply
 
Search this Thread
Old 05-21-2007, 10:00 AM   #1
geom06005
LQ Newbie
 
Registered: Jan 2007
Distribution: slackware 10.2
Posts: 8

Rep: Reputation: 0
Problem with confiqure static library (slackware 10.2)


Dear list

I run slackware 10.2
I would like to install a static library grib_api
I followed the steps in the manual:

Download grib_api from here.

Unpack distribution:
> gunzip grib_api-1.0.0.tar.gz
> tar xf grib_api-1.0.0.tar

Create the directory where to install grib_api say grib_api_dir
> mkdir grib_api_dir

Run the configure in the grib_api-1.0.0
> cd grib_api-1.0.0
> ./configure --prefix=grib_api_dir
When i run the configure it gives me an error saying:

configure: error: expected an absolute directory name for --prefix: grib_api_dir

Does anyone know why it gives me this kind of error?
 
Old 05-21-2007, 10:08 AM   #2
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
The --prefix option is used to direct the source to it's installation path, so ./configure --prefix=/opt/geoff will install everything to /opt/geoff/{bin,lib,libexec,etc} when you run `make install`.

So what you want to do is:

Code:
tar xf grib_api-1.0.0.tar.gz
mkdir grib_build
cd grib_build
../grib_api-1.0.0/configure
This builds the source outside of the source directory! Adjust the paths as necessary =)

- Piete.
 
Old 05-21-2007, 11:18 AM   #3
geom06005
LQ Newbie
 
Registered: Jan 2007
Distribution: slackware 10.2
Posts: 8

Original Poster
Rep: Reputation: 0
problem with make command

Dear Piete


First of all thanks for your quick response.

I used the code you send me to confiqure it works fine but when i am using the make command it sends me many errors some of them are:


In file included from /root/Desktop/grib_api-1.0.0/tools/grib_tools.c:13:
/root/Desktop/grib_api-1.0.0/tools/grib_tools.h:1:31: grib_api_internal.h: No such file or directory
In file included from /root/Desktop/grib_api-1.0.0/tools/grib_tools.c:13:
/root/Desktop/grib_api-1.0.0/tools/grib_tools.h:56: error: syntax error before "grib_values"
 
Old 05-21-2007, 06:38 PM   #4
piete
Member
 
Registered: Apr 2005
Location: Havant, Hampshire, UK
Distribution: Slamd64, Slackware, PS2Linux
Posts: 465

Rep: Reputation: 44
2 questions:

1. do you mean static (.a), as opposed to dynamic (.so) ?
2. does this library need to be built outside of the source tree?

For 2. i took the liberty of looking myself, and it does not.

The complete steps are (as listed in the README):

Code:
tar xf grib_api-1.0.0.tar.gz
cd grib_api-1.0.0
./configure --prefix=/usr
make
make install
Search LQ / Google for "how to uninstall from source", "checkinstall", "slackbuild" and/or "src2pkg" if you are concerned about removing once installed or you intend to deploy over more than one machine by building a package.

- Piete.
 
  


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
LINUX - linking archive (static library) with shared (dynamic) library gurkama Programming 5 03-04-2007 11:11 PM
static qt library in debian dun_noe Debian 2 05-23-2005 02:42 AM
Static IP problem with ndiswrapper + Slackware 10 Reekkor Linux - Wireless Networking 5 01-26-2005 03:58 AM
howto compile bin with my library using all-static and shared linked standart library stpg Programming 4 06-29-2004 04:20 AM
How to use own static library? chuanyung Programming 4 03-10-2004 07:54 PM


All times are GMT -5. The time now is 06:29 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration