Search Members Help

» Welcome Guest
[ Log In :: Register ]

Mini-ITX Boards Sale, Fanless BareBones Mini-ITX, Bootable 1G DSL USBs, 533MHz Fanless PC <-- SALE $200 each!
Get The Official Damn Small Linux Book. DSL Market , Great VPS hosting provided by Tektonic
Pages: (6) </ 1 [2] 3 4 5 6 >/

[ Track this topic :: Email this topic :: Print this topic ]

reply to topic new topic new poll
Topic: More questions regarding compiling extensions, Yeah baby, you want it< Next Oldest | Next Newest >
b1ackmai1er Offline





Group: Members
Posts: 115
Joined: June 2005
Posted: Sep. 08 2007,16:27 QUOTE

Ok, so I have compiled my library so that it is now in /opt/gnuplot/lib/....

I gather I don't need the *.a files or the includes for a .tar.gz, just the libgd.so's

Now going to recopile gnuplot to see if can make it find the libraries.

Ok gnuplot now recognizes where the libraries are during the compile process but when I run gnuplot it can't find them.

Any feedback welcome

cheers phil
Back to top
Profile PM 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Sep. 08 2007,18:03 QUOTE

That's exactly the issue I was talking about. I'm sure there's a way to build the program to find the libs automatically at runtime, but I don't know how t do it. When I compile apps that need extra libs I just hope the program compiles that way, and if not i write a wrapper:
Code Sample
#!/bin/bash
export LD_LIBRARY_PATH="/opt/gnuplot/lib:$LD_LIBRARY_PATH"
exec /opt/gnuplot/bin/gnuplot

And then run the wrapper instead of directly running gnuplot


--------------
http://www.tldp.org/LDP/intro-linux/html/index.html
Back to top
Profile PM WEB 
b1ackmai1er Offline





Group: Members
Posts: 115
Joined: June 2005
Posted: Sep. 08 2007,18:33 QUOTE

Cool, thanks mikshaw, I will try that!

Yes! It works.

Ok, so now to use a wrapper I will have to move from a .tar.gz to a .UCI or .UNC?

Thanks heaps. Once again I can goto bed

Cheers Phil
Back to top
Profile PM 
b1ackmai1er Offline





Group: Members
Posts: 115
Joined: June 2005
Posted: Sep. 09 2007,03:52 QUOTE

OK, I am awake again.

Still working through this issue.

Here are snippets of code from the 'make' output, with and without the library option.

More info: extraction from the make output with the --with-gd

g++  -g -O2  -L/opt/gnuplot/lib -o gnuplot  alloc.o axis.o breaders.o
bitmap.o color.o command.o contour.o datafile.o dynarray.o eval.o
fit.o gadgets.o getcolor.o graph3d.o graphics.o help.o hidden3d.o
history.o internal.o interpol.o matrix.o misc.o mouse.o parse.o plot.o
plot2d.o plot3d.o pm3d.o readline.o save.o scanner.o set.o show.o
specfun.o standard.o stdfn.o tables.o term.o time.o unset.o util.o
util3d.o variable.o version.o   -lreadline  -lncurses  -lz -lgd  -
ljpeg -lfreetype -lpng   -lm

extraction from the make output without the --with-gd

g++  -g -O2   -o gnuplot  alloc.o axis.o breaders.o bitmap.o color.o
command.o contour.o datafile.o dynarray.o eval.o fit.o gadgets.o
getcolor.o graph3d.o graphics.o help.o hidden3d.o history.o internal.o
interpol.o matrix.o misc.o mouse.o parse.o plot.o plot2d.o plot3d.o
pm3d.o readline.o save.o scanner.o set.o show.o specfun.o standard.o
stdfn.o tables.o term.o time.o unset.o util.o util3d.o variable.o
version.o   -lreadline  -lncurses  -lz   -lm

I was wondering if maybe the library command was not correct, maybe it should be


g++  -g -O2  LDFLAGS=-L/opt/gnuplot/lib -o gnuplot  alloc.o axis.o
breaders.o ect..

rather than g++  -g -O2  -L/opt/gnuplot/lib -o gnuplot  alloc.o axis.o
breaders.o etc..

Thanks Phil
Back to top
Profile PM 
b1ackmai1er Offline





Group: Members
Posts: 115
Joined: June 2005
Posted: Sep. 09 2007,06:01 QUOTE

Nah, the LDFLAGS=-/L etc isn't right from what I can see in reference material on the web.

However, I did find that if I copy the files to the /opt/gnuplot directory, the program finds them when run from /opt/gnuplot/bin. Very strange.

Maybe I need to do something different when I compile the libraries?

I don't know ???

regards Phil
Back to top
Profile PM 
28 replies since Sep. 07 2007,16:00 < Next Oldest | Next Newest >

[ Track this topic :: Email this topic :: Print this topic ]

Pages: (6) </ 1 [2] 3 4 5 6 >/
reply to topic new topic new poll
Quick Reply: More questions regarding compiling extensions

Do you wish to enable your signature for this post?
Do you wish to enable emoticons for this post?
Track this topic
View All Emoticons
View iB Code