tech-pkg archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

libtool archives for modules (or plugins) in pkgsrc



Hi all,

In the pkgsrc guide (developper part), we recommend (if possible), using libtool to make shared librairies, mainly with the package containing a home-made makefile not really portable:
https://www.netbsd.org/docs/pkgsrc/fixes.html#fixes.configure

If we follow the indicated rules, we need to use the libtool archive (.la files) for installing.
The kind of libraries (static, shared, etc..) installed depends on the flags used with libtool.
We write in the PLIST file the library libtool archive and pkgsrc manages to install the libraries with the library.la.

That's ok for a library. Now what about modules or plugins built?
I meet a problem either with the documentation which is pretty ambiguous, either the developper expectation.

About the documentation, we have:
4 - When linking shared object (.so) files, i.e. files that are loaded via dlopen(3), NOT shared libraries, use “-module -avoid-version” to prevent them getting version tacked on.
     The PLIST file gets the foo.so entry.
7 -  In your PLIST, include only the .la file (this is a change from previous behaviour).

I know that if I put module.so directly in the PLIST file, I have an error with the file-check saying that module.la is in the DESTDIR but not in PLIST.
If I put module.la then it is ok but I have module.so *and* module.la.
"The PLIST file gets the foo.so entry"  of the rule 4 would not be correct…

Apparently having .la file for a module would be confusing for the developer. I'm extending this point of view to module in the generic sense but apparently for Lua C module that could be the case (see discussion PR pkg/54500)
I don't think there is a simple method to remove the .la files with install mode in libtool, isn't it?
Can pkgsrc avoid to install the la files (notably for the modules or plugins) ?
Except libltdl which uses the .la files what are packages using the libtool archives after install? Is it necessary to install .la files?

Regards,
Clément Bouvier 

 


Home | Main Index | Thread Index | Old Index