3

I need to use a package X. X depends on Y so I need the dev package of Y (Y-dev). I also have Y's source. How may I compile Y-dev from Y's source?

If this question is incoherent please point me in the right direction on how to avail a package Y that X depends on.

Specifics:

X is R-2.15.3

Y is readline-6.2

I downloaded readline-6.2 and installed it to $HOME/software. I also set

$C_INCLUDE_PATH=$HOME/software/include:$HOME/software/include/readline

and

$LD_LIBRARY_PATH=$HOME/software/lib:$HOME/software/lib64

I have the following readline files in $LD_LIBRARY_PATH:

/home/paulk/software/lib/libreadline.a
/home/paulk/software/lib/libreadline.old
/home/paulk/software/lib/libreadline.so
/home/paulk/software/lib/libreadline.so.6
/home/paulk/software/lib/libreadline.so.6.2
/home/paulk/software/lib/libreadline.so.6.2.old

When I run ./configure --prefix=$HOME/software for R-2.15.3 I get

configure: error: --with-readline=yes (default) and headers/libs are not available.

My distro is Scientific Linux, which is RPM-based.

5
  • 3
    Any particular reason you're not simply installing readline-dev from the package manager?
    – tripleee
    Jun 30, 2013 at 18:58
  • 1
    What's the distro?
    – slm
    Jul 1, 2013 at 0:15
  • @tripleee: I'm working on a lab cluster and I don't have sysadmin authority. R-2.15.0 is installed but one package I need requires R-2.15.3. Hence the $HOME/software.
    – polarise
    Jul 1, 2013 at 3:32
  • @sim: Scientific Linux 5
    – polarise
    Jul 1, 2013 at 3:35
  • @bahamat: The question and answer you point to do not solve the problem. Thanks, though.
    – polarise
    Jul 1, 2013 at 4:00

1 Answer 1

2

OK. So it appears that I do not need to compile a dev package. To use readline requires that I set CFLAGS and LDFLAGS for the ./configure script as follows

export CFLAGS=-I$HOME/software

export LDFLAGS=-L$HOME/software

Here's my reasoning: you need a dev package when you use a package manager because most of the time you will only need precompiled apps. The dev package is a pre-compilation designed to provide what you would have if you compiled from source.

Therefore, when you have source it is incoherent to try and compile a dev package for two reasons:

  1. You have all the source
  2. You do not need to work with the package manager

I'm sure some pro can fine tune my argument but (hey!) it solved the problem and makes sense.

Thanks.

Not the answer you're looking for? Browse other questions tagged .