Apps :: More questions regarding compiling extensions



BTW, whats the difference between EPREFIX and PREFIX?

cheers Phil

Arrggghh, I think I have this figure out

When I compile my libraries I have to tell them where the library is.

i.e ./configure --prefix=/opt/gnuplot --libdir=/opt/gnuplot

Suddenly, my program works.

When I run LDD -v gnuplot to confirm the library path it displays:

libgd.so.2 => /opt/gnuplot/lib/libgd.so.2 (0x4008b000)

so it seems to be resolved.

However just looking in /usr/lib I found libgd.so.1 so maybe the library was there all along and I didn't need to compile it.

Arrrggghhh.

regards Phil

Quote
BTW, whats the difference between EPREFIX and PREFIX?

This is so you can put the executable files in one place (eg /opt/app/bin) and other files in another place (eg /etc/app) - the readme, install or "./configure --help" will give a better explanation.

Quote
i.e ./configure --prefix=/opt/gnuplot --libdir=/opt/gnuplot

It might be better to use --prefix=/opt/gnuplot-1.2 or similar to avoid a clash when you submit an updated extension  :)

Thanks for the explanation.

It seems I still have not resolved this. It seems it worked because I had previously set the environement variable for the path.

Back to the drawing board.

I've held back from posting because I'm not sure I understand what you're doing. The part where it appears you're redundantly adding --libdir to an identical --prefix makes me wonder if you understand what you're trying to do, too.

With the --prefix, you're already telling it to put its bin and lib and share and so on directories in /opt/gnuplot (so its lib will already be /opt/gnuplot/lib unless you tell it otherwise). If you're using those options for gnuplot that's telling it where to place its OWN libs if it has any, not your system libs (it should link to them automatically or you can force linking to them -- but you *won't* use --libdir to link to things already in the system). There's no need to duplicate what's in the system; you can link them with either --include-lib=path or --with-lib=path (read the documentation including ./configure --help) if they're not properly linked in your Makefile. If you're using those options for a non-system lib, just use the normal prefix without a --libdir (because it's going to put the lib in $prefix/lib).

I looked at gnuplot's faq yesterday and it says it's a standard ./configure; make; make install and I didn't see any quirky lib requirements listed. Paste in the line(s) you're using when you run configure for whichever libs (?) and gnuplot.

Next Page...
original here.