Bug 195742

Summary: Static lib not in sqlite-devel rpm
Product: [Fedora] Fedora Reporter: Joe Smith <jes>
Component: sqlite3Assignee: Paul Nasrat <nobody+pnasrat>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: medium    
Version: 5CC: bcotton
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-07-08 20:55:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joe Smith 2006-06-16 23:10:36 UTC
Description of problem:
The sqlite-devel package should include the libsqlite.a static library, however
there is an error which prevents the file from being included in the rpm.
This breaks the building of other components that need to link against the
static library.

Version-Release number of selected component (if applicable):
3.3.3-1.2

How reproducible:
Always

Steps to Reproduce:

# Check a fresh download (looking for libsqlite3.a):
$ wget ftp:...Fedora/RPMS/sqlite-devel-3.3.3-1.2.i386.rpm
$ $ rpm -qlp sqlite-devel-3.3.3-1.2.i386.rpm | grep lib
/usr/lib/libsqlite3.so
/usr/lib/pkgconfig/sqlite3.pc

# Check a freshly built (looking for libsqlite3.a):
$ rpm -i ../SRPMS/sqlite-3.3.3-1.2.src.rpm
$ rpmbuild -ba sqlite.spec
$ rpm -qlp ../RPMS/i386/sqlite-devel-3.3.3-1.2.i386.rpm | grep lib
/usr/lib/libsqlite3.so
/usr/lib/pkgconfig/sqlite3.pc
  
Actual results:
No libsqlite3.a installed with sqlite-devel-3.3.3-1.2.i386.rpm
No libsqlite3.a included in sqlite-devel-3.3.3-1.2.i386.rpm

Expected results:
libsqlite3.a should be included in -devel rpm and installed in /usr/lib

Additional info:
The static lib is built and the -devel rpm builds without error, but the static
lib is not included in the rpm. I tried adding this line to the spec:

 %files devel
 %defattr(-, root, root)
 %doc doc/
 %{_includedir}/*.h
 %{_libdir}/*.so
+%{_libdir}/*.a
 %{_libdir}/pkgconfig/*.pc

Which caused the rpm build to fail:
...
RPM build errors:
    File not found by glob: /var/tmp/sqlite-root/usr/lib/*.a

I'm afraid I don't have the brain cells to analyze the build and figure out
exactly why the lib isn't packaged; hopefully it will be obvious to someone.

As a workaround, I simply copied the libsqlite3.a file from the BUILD tree to
/usr/local/lib and it works fine from there.

Comment 1 Paul Nasrat 2006-06-26 18:00:18 UTC
We deliberately don't ship static libraries see in the spec:

rm -f $RPM_BUILD_ROOT/%{_libdir}/*.{la,a}

see:

http://fedoraproject.org/wiki/Packaging/Guidelines#head-2302ec1e1f44202c9cc4bcce24cb711266557ad7

Specifically what other Core/Extras components require to build against sqlite
statically?

Comment 2 Joe Smith 2006-06-26 18:35:15 UTC
> Specifically what other Core/Extras components require to build 
> against sqlite statically?

I needed it to build the unstable branch of Audacity.

http://audacity.sourceforge.net/community/developers#cvs

I have no idea why it links against the static lib (possibly to simplify
building under Windows?), and it seems that sqlite is only required to build an
intermediate testing tool, not for Audacity itself. The comments I found on the
Audacity mailing list, rather than tracking down the source of the build
failure, simply disabled the component that depended on the tool. I wanted to
"fix" the problem.

But I can understand the policy (sorry I didn't think to check that) and it
seems like the right thing is to fix it on the project end, rather than
requiring the .a.

I will pass this along to the Audacity devs, anticipating that this issue will
be closed.

Comment 3 Paul Nasrat 2006-06-26 18:47:56 UTC
OK - if it helps you can rebuild tomorrows rawhide sqlite src.rpm with --with
static to enable including of the static library which will help if you need an
interim measure.

I'm going to close it for now, please feel free to add additional comments as
need be.

Comment 4 Erwan Velu 2018-04-03 22:19:11 UTC
Why not ? :p

I tried to build locally a gis (http://www.giis.co.in/download.html) to perform some data recovery on a broken host. I only miss sqlite3-static :(