[Ilugc] static linking of libraries using libtool

  • From: shakthimaan@xxxxxxxxx (Shakthi Kannan)
  • Date: Mon Feb 15 13:07:05 2010

Hi,

--- On Mon, Feb 15, 2010 at 9:06 AM, anantha narasimhan
<anantha.narasimhan@xxxxxxxxx> wrote:
| I am trying to build an rpm for an application. This application needs to
| link with libhtp library.
\--

Include this in the BuildRequires section of the .spec file?

---
| I wanted to link libhtp statically to the application, hence i overrode
| LDFLAGS in the SPEC file to point to the location of libhtp.a.
|
| export LDFLAGS="-L`pwd` ?-lz -ldag ?-O3 -mtune=generic"
\--

Statically linking means, use of the word '-static', wherein the
library is built into the application, not just giving the location of
the library.

As per Fedora packaging recommendations you should always link with
shared libraries and avoid static libraries. Please refer:

  http://fedoraproject.org/wiki/Packaging/Guidelines#Packaging_Static_Libraries

SK

-- 
Shakthi Kannan
http://www.shakthimaan.com

Other related posts: