Bug 445937 - [FeatureFeature] Add static libs (lib*.a) to -devel
[FeatureFeature] Add static libs (lib*.a) to -devel
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: opencv (Show other bugs)
9
All Linux
low Severity low
: ---
: ---
Assigned To: Rakesh Pandit
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-05-09 19:05 EDT by Daniel Neilson
Modified: 2008-09-09 02:30 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-09 02:30:37 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Daniel Neilson 2008-05-09 19:05:44 EDT
Description of problem:
 The -devel package does not contain the static link libraries for opencv.

Version-Release number of selected component (if applicable):
 opencv-devel-1.0.0-3

 I would like to suggest that either the static link libs (lib*.a) for opencv be
added to opencv-devel or, alternatively, that another package
(opencv-devel-static) be added that contains the static link libs.

 There are many times where not having the static link libs available is
problematic. One that I recently came across is an instance of needing to run a
program on a machine that has only an old version of the gcc compiler available,
and the program won't compile as a result.

 As an implementation note, when using the static link libs for opencv the -l
options returned by 'pkg-config --libs opencv' have to be reversed; otherwise,
you get all sorts of function-not-found errors from ld. That is, the order has
to be "-lml -lcvaux -lhighgui -lcv -lcxcore." This will require editing the
opencv.pc file included in the -devel package.
Comment 1 Ralf Corsepius 2008-05-10 00:47:43 EDT
(In reply to comment #0)

>  I would like to suggest that either the static link libs (lib*.a) for opencv
I an not going to do this, because doing so is not helpful to fedora and is
misleading users, which is the reason for Fedora having agreed upon not to ship
static libs.

>  There are many times where not having the static link libs available is
> problematic. One that I recently came across is an instance of needing to run a
> program on a machine that has only an old version of the gcc compiler
> available, and the program won't compile as a result.
Well, what you are doing is trying to use package from one distribution (Fedora)
on a incompatible distribution, probably without having them packaged up
properly. If you were doing so, you would not be seeing the issues you are
reporting.

>  As an implementation note, when using the static link libs for opencv the -l
> options returned by 'pkg-config --libs opencv' have to be reversed; otherwise,
> you get all sorts of function-not-found errors from ld. That is, the order has
> to be "-lml -lcvaux -lhighgui -lcv -lcxcore." This will require editing the
> opencv.pc file included in the -devel package.
Hmm, this needs to be investigated. I'll look into this.

Comment 2 Daniel Neilson 2008-05-10 00:59:04 EDT
(In reply to comment #1)
> (In reply to comment #0)
> 
> >  I would like to suggest that either the static link libs (lib*.a) for opencv
> I an not going to do this, because doing so is not helpful to fedora and is
> misleading users, which is the reason for Fedora having agreed upon not to ship
> static libs.

 Not even as a separate -devel-static package? That's most unfortunate.

> >  There are many times where not having the static link libs available is
> > problematic. One that I recently came across is an instance of needing to run a
> > program on a machine that has only an old version of the gcc compiler
> > available, and the program won't compile as a result.
> Well, what you are doing is trying to use package from one distribution (Fedora)
> on a incompatible distribution, probably without having them packaged up
> properly. If you were doing so, you would not be seeing the issues you are
> reporting.

 Actually, I'm running self-developed code (written using gcc v4.0+) on a
supercomputer that only has gcc v3.x available; said code doesn't compile with
said version of gcc, so the only option is to build a statically-linked version
of the program locally, copy it over, and run that.

 Not every developed code-base will have the option of doing the standard untar,
./configure, make routine due to such problems with compiler incompatibilities.
In these cases, having the ability to build a statically linked version of the
program is pretty neccessary.


Comment 3 Daniel Neilson 2008-05-10 01:02:55 EDT
 As an addendum, there is precedence for a -static version of a package
containing the static link libs within Fedora. "yum list | grep static" yields
46, or so, such packages.

 I was wrong on the naming, though. They aren't called -devel-static, they're
just being called -static.
Comment 4 Ralf Corsepius 2008-05-10 01:39:00 EDT
(In reply to comment #3)
> ..  just being called -static.
I know, I am a member of the FPC and wrote the corresponding section of the FPG ;)
Comment 5 Ralf Corsepius 2008-05-11 00:08:33 EDT
Analysing the deps reveals this:
# libhighgui.so: libcxcore.so.1 libcv.so.1
# libcvaux.so: libcxcore.so.1 libcv.so.1
# libml.so: libcxcore.so.1
# libcv.so: libcxcore.so.1
# libcxcore.so:

Could you try changing "Libs:" in opencv.pc into
Libs: -L${libdir} -lhighgui -lcvaux -lcv -lml -lcxcore
and check if it's works for you?
Comment 6 Daniel Neilson 2008-05-11 02:27:09 EDT
(In reply to comment #5)
> Analysing the deps reveals this:
> # libhighgui.so: libcxcore.so.1 libcv.so.1
> # libcvaux.so: libcxcore.so.1 libcv.so.1
> # libml.so: libcxcore.so.1
> # libcv.so: libcxcore.so.1
> # libcxcore.so:
> 
> Could you try changing "Libs:" in opencv.pc into
> Libs: -L${libdir} -lhighgui -lcvaux -lcv -lml -lcxcore
> and check if it's works for you?
> 

 That order works for compiling with and without the "-static" flag.
Comment 7 Bug Zapper 2008-05-14 06:56:41 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 8 Rakesh Pandit 2008-09-09 02:30:37 EDT
I have cross checked and even Ralf has informed me that the .pc issue is fixed.

Moreover, fedora does not ship static libs.

Thanks

Note You need to log in before you can comment on or make changes to this bug.