Opened 17 years ago

Closed 17 years ago

Last modified 15 years ago

#12283 closed defect (fixed)

rpm 4.4.9_2 chokes on sqlite3 dependency

Reported by: jmpp@… Owned by: afb@…
Priority: Normal Milestone:
Component: ports Version: 1.5
Keywords: rpm, sqlite3 Cc: jmpp@…, afb@…, n3npq@…
Port:

Description

Revision 2 of the rpm 4.4.9 port lists the sqlite3 dependency as a library one that can be satisfied by 3rd parties (read, the one supplied by Apple on the base system):

depends_lib             lib:libhistory.5:readline port:gettext \
                        lib:libsqlite3.0:sqlite3

This dependency is satisfied by /usr/lib/libsqlite3.0.dylib. However, the patch-configure patchfile forces the rpm build system to look for the library under MacPorts ${prefix}:

+    WITH_SQLITE3_INCLUDE='-I${prefix}/include'
+    WITH_SQLITE3_LIB='${prefix}/lib/libsqlite3.la'

Which will limit the build to succeed only if the sqlite3 dependency is satisfied by MacPorts. When it's not (that is, when it's satisfied by the Apple supplied library) you get the following error:

/bin/sh ../libtool --tag=CC   --mode=link gcc  -O2 -fPIC -DPIC -D_GNU_SOURCE -D_REENTRANT -Wall -Wpointer-arith -Wstrict-prototypes -Wmissing-prototypes -Wno-char-subscripts -no-undefined -release 4.4 ../rpmio/librpmio.la /opt/local/lib/libpopt.la /opt/local/lib/libsqlite3.la  -L/opt/local/lib -L/opt/local/lib -o librpmdb.la -rpath /opt/local/lib dbconfig.lo fprint.lo hdrNVR.lo header.lo header_internal.lo legacy.lo merge.lo poptDB.lo rpmdb.lo tagname.lo tagtbl.lo db3.lo sqlite.lo ../db3/libdb.la 
libtool: link: cannot find the library `/opt/local/lib/libsqlite3.la' or unhandled argument `/opt/local/lib/libsqlite3.la'
gnumake[3]: *** [librpmdb.la] Error 1
gnumake[2]: *** [all] Error 2
gnumake[1]: *** [all-recursive] Error 1
gnumake: *** [all] Error 2

So I guess the questions we need to ask is: do we force a MacPorts satisfied sqlite3 dependency? This implies determining if we can trust the Apple supplied library and if so, remove the appropriate lines (quoted above) from the patch-confgure patchfile. If not, if we determine we *can't* trust the Apple supplied sqlite3 library, then we need to switch to the port:<port> syntax for that dependency.

For the time being, MacPorts is satisfying the sqlite3 dependency with a library found in /usr/lib/ but the rpm build system is being forced to find it elsewhere, inside ${prefix}. This naturally fails.

-jmpp

Change History (4)

comment:1 Changed 17 years ago by jmpp@…

Cc: eridius@… removed

Removing eridius from the Cc list. Bad, bad Safari Complete! Sorry 'bout that ;-)

-jmpp

comment:2 Changed 17 years ago by afb@…

The main reason the configure is patched like that is that it otherwise mistakenly looks for a file called "-lsqlite" as part of the build process (it obviously expects a .la file to be in the var)

If someone volunteers to patch the old configure/makefiles so that it works then do so a keep the "lib" dependency. Otherwise I think it should be changed to "port" and revisited with RPM 4.5 ?

BTW: this seems related to Bug #12263 ?

comment:3 Changed 17 years ago by afb@…

Resolution: fixed
Status: newclosed

Fixed in revision [29671] by adding port:sqlite3 as a dependency.

Better to keep the dep internal, e.g. Panther doesn't have sqlite3...

comment:4 Changed 15 years ago by (none)

Milestone: Port Bugs

Milestone Port Bugs deleted

Note: See TracTickets for help on using tickets.