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. 07 2007,16:00 QUOTE

Hello again,

I want to include some library files in an extension.

What directory should I compile these for?

By default they compile to /usr/local/lib and /usr/local/include.

Will my application find these automatically?

Would I be better of making these libraries seperate extensions? (There are four- freetype, jpeg, zlib, libpng)

Thanks Phil
Back to top
Profile PM 
lucky13 Offline





Group: Members
Posts: 1478
Joined: Feb. 2007
Posted: Sep. 07 2007,16:27 QUOTE

What kind (dsl/unc, tar.gz/uci) of extension? If dsl/unc, you should compile with a suitable prefix for such an extension -- /usr. The default compile path /usr/local should be used for things exclusive to a local host; that's why binary distributions like Debian and RedHat install to /usr.

Edit (oops): The other two kinds of extensions should be self-contained, so whatever libs you add will need to go into the same /opt/extname prefix when you compile.

As for the libs you listed, aren't they already in DSL?
http://damnsmalllinux.org/packages.html
(remember to keep it damn small and don't duplicate what's already in it)


--------------
"It felt kind of like having a pitbull terrier on my rear end."
-- meo (copyright(c)2008, all rights reserved)
Back to top
Profile PM WEB 
mikshaw Offline





Group: Members
Posts: 4856
Joined: July 2004
Posted: Sep. 07 2007,22:40 QUOTE

For uci/tar.gz:

I've noticed that some applications, depending on how they are compiled, will automatically find their needed libraries if those libraries are 1) pointed to by CFLAGS/CPPFLAGS and LDFLAGS when the application is compiled, and 2) those variables point to directories included with the application.

Some applications don't deal with this, though.  I really couldn't say why some do and some don't...I just see it work sometimes.

When compiling lighttpd into /opt/lighttpd after installing pcre to the same directory, and setting LDFLAGS=-L/opt/lighttpd/lib, PATH=$PATH:/opt/lighttpd/bin and CFLAGS=-I/opt/lighttpd/include, the app will automatically find pcre at runtime. Otherwise it would require LD_LIBRARY_PATH=/opt/lighttpd/lib before running the program if pcre is enabled.

Other applications seem to require the LD_LIBRARY_PATH to include the directory of the library at runtime regardless of whether or not it was specified when the app was built.  I assume this is due to the way the Makefile was created.


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





Group: Members
Posts: 2163
Joined: Feb. 2007
Posted: Sep. 08 2007,11:37 QUOTE

With a more permanent system, such as a debian-type or maybe frugal, you could add a new general library directory into /etc/ld.so.conf and all apps would find all libs in there automatically, but you must of course run "sudo ldconfig" after installing a library..

For example, I have qt in /opt/qt and have a line "/opt/qt/lib" in my ld.so.conf. No trouble compiling/running qt apps.


--------------
There's no such thing as life. Those mean little jocks invented it ;)
-
Windows is not a virus. A virus does something!
Back to top
Profile PM 
b1ackmai1er Offline





Group: Members
Posts: 115
Joined: June 2005
Posted: Sep. 08 2007,15:51 QUOTE

Thanks guys for your help.

@lucky13: You are right, they look like they are built in. That makes my life alot simpler!

@mikshaw: I sort of understand what you mean but will have to work through it. My experience compiling at the moment is ./configure make make install!

The application I am working on (gnuplot) is compiled and running as a .tar.gz extension.

For simplicities sake, as a newbie, it seems that the simplest was to acheive what I want is to compile my library LibGD to /opt/gnuplot/lib and then recompile gnuplot telling it where the library is and rebuild my .tar.gz extension.

How does that sound?


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