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.

tripleee
  • 7,699
polarise
  • 1,051

1 Answers1

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.

polarise
  • 1,051