Bug 445937 - [FeatureFeature] Add static libs (lib*.a) to -devel
Summary: [FeatureFeature] Add static libs (lib*.a) to -devel
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: opencv
Version: 9
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Rakesh Pandit
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-05-09 23:05 UTC by Daniel Neilson
Modified: 2008-09-09 06:30 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-09-09 06:30:37 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Daniel Neilson 2008-05-09 23:05:44 UTC
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 04:47:43 UTC
(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 04:59:04 UTC
(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 05:02:55 UTC
 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 05:39:00 UTC
(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 04:08:33 UTC
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 06:27:09 UTC
(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 10:56:41 UTC
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 06:30:37 UTC
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.