Opened 11 years ago

Closed 11 years ago

#41697 closed defect (fixed)

rpm: libtool: link: cannot find the library `/opt/local/lib/libpopt.la'

Reported by: ryandesign (Ryan Carsten Schmidt) Owned by: n3npq@…
Priority: Normal Milestone:
Component: ports Version: 2.2.1
Keywords: mavericks Cc: afb@…, eric.bryant@…, cooljeanius (Eric Gallager), minmay, phung.gary@…, apapia@…, mat.boniface@…, viktor@…
Port: rpm

Description

rpm fails to build on Mavericks, saying:

libtool: link: cannot find the library `/opt/local/lib/libpopt.la' or unhandled argument `/opt/local/lib/libpopt.la'

On Mavericks by default MacPorts deletes .la files because they are thought not to be generally useful and cause some problems, but apparently rpm's build system specifically looks for libpopt's (nonexistent) .la file. Perhaps the rpm build system can be patched to not do that. It's also conceivable that this is a bug in popt somehow but I didn't find any occurrences of ".la" in the files the popt port installs.

Attachments (1)

main.log.bz2 (38.9 KB) - added by ryandesign (Ryan Carsten Schmidt) 11 years ago.

Download all attachments as: .zip

Change History (18)

Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Attachment: main.log.bz2 added

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

It's definitely the rpm port's fault, specifically the file patch-configure which has these sections:

@@ -27309,8 +27309,8 @@
 if test $ac_cv_lib_popt_poptGetContext = yes; then
 
       WITH_POPT_SUBDIR=
-      WITH_POPT_INCLUDE=
-      WITH_POPT_LIB="-lpopt"
+      WITH_POPT_INCLUDE='-I${prefix}/include'
+      WITH_POPT_LIB='${prefix}/lib/libpopt.la'
 
 fi
 
@@ -27545,8 +27545,8 @@
 _ACEOF
 
     WITH_SQLITE3_SUBDIR=
-    WITH_SQLITE3_INCLUDE=
-    WITH_SQLITE3_LIB="-lsqlite"
+    WITH_SQLITE3_INCLUDE='-I${prefix}/include'
+    WITH_SQLITE3_LIB='${prefix}/lib/libsqlite3.la'
     DBLIBSRCS="$DBLIBSRCS sqlite.c"
 
 fi

These were added in r26411 to "fix the linking issues with popt/sqlite3" but I'm not sure what that means now. I would say the WITH_POPT_LIB/WITH_SQLITE3_LIB lines were better before the patch and should be changed back. I have not yet tested if this fixes the problem.

comment:2 Changed 11 years ago by eric.bryant@…

Cc: eric.bryant@… added

Cc Me!

comment:3 Changed 11 years ago by cooljeanius (Eric Gallager)

Cc: egall@… added

Cc Me!

comment:4 Changed 11 years ago by cooljeanius (Eric Gallager)

Couldn't we just use destroot.delete_la_files no in the meantime?

comment:5 Changed 11 years ago by larryv (Lawrence Velázquez)

Cc: mvillalobos@… added

Has duplicate #41742.

comment:6 in reply to:  4 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Replying to egall@…:

Couldn't we just use destroot.delete_la_files no in the meantime?

But that would have to be done in the popt port, which would then have to be rebuilt. I'd rather fix the actual bug, which is in the rpm port.

comment:7 Changed 11 years ago by phung.gary@…

Cc: phung.gary@… added

Cc Me!

comment:8 Changed 11 years ago by apapia@…

Cc: apapia@… added

Cc Me!

comment:9 Changed 11 years ago by mat.boniface@…

Cc: mat.boniface@… added

Cc Me!

comment:10 Changed 11 years ago by viktor@…

Cc: viktor@… added

Cc Me!

comment:11 Changed 11 years ago by viktor@…

Are there any work arounds to get rpm installed?

comment:12 in reply to:  11 Changed 11 years ago by apapia@…

Replying to viktor@…:

Are there any work arounds to get rpm installed?

I was able to install it with brew: brew install rpm

comment:13 in reply to:  11 ; Changed 11 years ago by mat.boniface@…

Replying to viktor@…:

Are there any work arounds to get rpm installed?

I've successfully installed rpm 5.1

sudo port install rpm51

comment:14 Changed 11 years ago by afb@…

The build doesn't work, now that MacPorts is deleting the libtool files at random.
The patch was added to avoid the build error when trying using an external library:

No rule to make target `-lpopt'

Probably also breaks static linking of anything trying to use librpm, but that's minor...
(since you need to include libiconv and libintl, in order to link against libpopt, that is)

comment:15 in reply to:  13 Changed 11 years ago by viktor@…

Replying to mat.boniface@…:

Replying to viktor@…:

Are there any work arounds to get rpm installed?

I've successfully installed rpm 5.1

sudo port install rpm51

Thank you !!! It indeed works

comment:16 Changed 11 years ago by afb@…

Port rpm51 (and rpm50) are replaced by rpm52, in case you didn't notice...

RPM 5.2 is obsolete, but upgrading requires someone to care (see #38456)

comment:17 Changed 11 years ago by afb@…

Resolution: fixed
Status: newclosed

Fixed, r115687.

Note: See TracTickets for help on using tickets.