Bug 537363

Summary: Review Request: lv2-c++-tools - Support library for writing LV2 plugins in C++
Product: [Fedora] Fedora Reporter: Orcan Ogetbil <oget.fedora>
Component: Package ReviewAssignee: David Cornette <rpm>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: fedora-package-review, notting, rpm
Target Milestone: ---Flags: rpm: fedora-review+
dennis: fedora-cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: lv2-c++-tools-1.0.3-3.fc12 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-05-24 19:35:15 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---
Bug Depends On:    
Bug Blocks: 567028, 581104    

Description Orcan Ogetbil 2009-11-13 10:18:44 UTC
Spec URL: http://oget.fedorapeople.org/review/lv2-c++-tools.spec
SRPM URL: http://oget.fedorapeople.org/review/lv2-c++-tools-1.0.2-1.fc11.src.rpm
Description: 
This software package contains libraries and programs that should make it
easier to write LV2 plugins in C++.


rpmlint says:
   lv2-c++-tools.src:43: W: configure-without-libdir-spec
This is not the usual GNU configure. Passing libdir to this configure is useless.

Comment 1 Michael Schwendt 2009-12-05 20:20:37 UTC
Things that make you go hmmm...

> sed -i -e '/ldconfig/d' Makefile.template

And later:

> # Add missing symlinks
> ln -sf liblv2-gui.so.0.0.0 %{buildroot}%{_libdir}/liblv2-gui.so.0
> ln -sf liblv2-gui.so.0.0.0 %{buildroot}%{_libdir}/liblv2-gui.so
> ln -sf liblv2-plugin.so.0.0.0 %{buildroot}%{_libdir}/liblv2-plugin.so.0
> ln -sf liblv2-plugin.so.0.0.0 %{buildroot}%{_libdir}/liblv2-plugin.so
> ln -sf libpaq.so.0.0.0 %{buildroot}%{_libdir}/libpaq.so.0

:)

Actually, that's why the Makefile ran "ldconfig -n" in libdir to create the symlinks for the shared libpaq. With ldconfig, it would reduce to

/sbin/ldconfig -n %{buildroot}%{_libdir}
ln -sf liblv2-gui.so.0.0.0 %{buildroot}%{_libdir}/liblv2-gui.so
ln -sf liblv2-plugin.so.0.0.0 %{buildroot}%{_libdir}/liblv2-plugin.so

at the end of %install. The two "ln -s" are left only because those two shared libs are built manually in the spec file.

[...]

Upstream is funny so to say:

http://ll-plugins.nongnu.org/dox/lv2-c++-tools/1.0.2/

| These libraries are only available as static libraries (and most
| of the code is template classes in header files), thus ABI stability
| is not an issue. The API will be stable between major version bumps,
| at which the pkg-config name would change to prevent plugins from
| building against an incompatible version, but if you were to modify
| the build system to create shared libraries and link against those
| you are on your own.

Translates to ''I don't really want this API to be used by any C++ application'' as all library updates will require app rebuilds, and API changes will require additional updates in build frameworks.

Comment 2 Orcan Ogetbil 2009-12-05 21:46:40 UTC
(In reply to comment #1)

Thanks for having a look

> Things that make you go hmmm...
> 
> > sed -i -e '/ldconfig/d' Makefile.template
> 
> And later:
> 
> > # Add missing symlinks
> > ln -sf liblv2-gui.so.0.0.0 %{buildroot}%{_libdir}/liblv2-gui.so.0
> > ln -sf liblv2-gui.so.0.0.0 %{buildroot}%{_libdir}/liblv2-gui.so
> > ln -sf liblv2-plugin.so.0.0.0 %{buildroot}%{_libdir}/liblv2-plugin.so.0
> > ln -sf liblv2-plugin.so.0.0.0 %{buildroot}%{_libdir}/liblv2-plugin.so
> > ln -sf libpaq.so.0.0.0 %{buildroot}%{_libdir}/libpaq.so.0
> 
> :)
> 
> Actually, that's why the Makefile ran "ldconfig -n" in libdir to create the
> symlinks for the shared libpaq. With ldconfig, it would reduce to
> 
> /sbin/ldconfig -n %{buildroot}%{_libdir}
> ln -sf liblv2-gui.so.0.0.0 %{buildroot}%{_libdir}/liblv2-gui.so
> ln -sf liblv2-plugin.so.0.0.0 %{buildroot}%{_libdir}/liblv2-plugin.so
> 
> at the end of %install. The two "ln -s" are left only because those two shared
> libs are built manually in the spec file.
> 
> [...]
> 

oops. I guess it's my sloppiness again. I didn't notice the -n flag and I thought it was trying to rebuild the cache which would need root access. I'll remove the unnecessary lines.

> Upstream is funny so to say:
> 
> http://ll-plugins.nongnu.org/dox/lv2-c++-tools/1.0.2/
> 
> | These libraries are only available as static libraries (and most
> | of the code is template classes in header files), thus ABI stability
> | is not an issue. The API will be stable between major version bumps,
> | at which the pkg-config name would change to prevent plugins from
> | building against an incompatible version, but if you were to modify
> | the build system to create shared libraries and link against those
> | you are on your own.
> 
> Translates to ''I don't really want this API to be used by any C++
> application'' as all library updates will require app rebuilds, and API 
> changes will require additional updates in build frameworks.  

I am really not sure what would be the best approach here. I can leave them as static libs but Fedora doesn't really like static libs. Or just make shared libs despite the warning of upstream. For the time being, it is safe to do so since the only software that uses the library is made by the same author.


By the way I noticed that the build hangs in F-12 at
   ar rcs libraries/lv2gui/liblv2-gui.a libraries/lv2gui/lv2gui.o
It doesn't fail but it just stays there forever. When I make the build on F-11, it passes through that line without much delay. I don't know where the problem is. Any opinions?

Comment 3 Michael Schwendt 2009-12-06 00:17:36 UTC
So, it *really* hangs? - I've experienced a long build-time with F12 i686, too, but g++/ccache was still sucking a lot of cpu power and memory on an already busy machine, so I killed the build and restarted it without ccache and with optflags=-g only. That had managed to build something before I returned.

Will need another look it seems.

Comment 4 Orcan Ogetbil 2009-12-09 04:47:01 UTC
Yes, it hangs when -O2 is present. Did they modify the -O2 bundle recently because the same code compiles in F-11? 

I didn't have time to look into this further but I will.

Comment 5 Orcan Ogetbil 2010-01-31 00:31:30 UTC
Spec URL: http://oget.fedorapeople.org/review/lv2-c++-tools.spec
SRPM URL:
http://oget.fedorapeople.org/review/lv2-c++-tools-1.0.3-1.fc11.src.rpm

Updated to 1.0.3. Not much changed softwarewise. I added a patch that fixes bunch of warnings about some boost headers. The patch is sent upstream. I also worked around the compiler bug with the -fno-var-tracking-assignments flag.

As for the static/dynamic library, I asked upstream about this and I am waiting for their response. But I vote for going for dynamic libraries. Not much software depends on this.

Comment 6 Orcan Ogetbil 2010-01-31 00:33:24 UTC
Sorry the SRPM URL should be
http://oget.fedorapeople.org/review/lv2-c++-tools-1.0.3-1.fc12.src.rpm

Comment 7 Orcan Ogetbil 2010-02-20 10:19:54 UTC
Hi, I got a hold of the project developer and he requested me to leave the two libraries static, as otherwise things might break. Here is what he says:

> Well, I don't think I'll ever make the libraries shared by default -
> there are reasons for having them static other than ABI instability. I
> don't think that the gain in file size and maintainability in separating
> such a tiny piece of code (two 2-line functions and one 3-line function
> for liblv2-plugin.a, one 2-line function and one 4-line function for
> liblv2-gui.a) justifies the additional annoyance of having an extra
> runtime dependency for every plugin built using the libraries (more of
> an annoyance for people who build from source than for those who use
> package managers obviously).
>
> Also, when looking at the code I remembered a reason why it's not a good
> idea to build the current code as shared libraries. liblv2-plugin.a
> contains a symbol, LV2::get_lv2_descriptors()::descriptors, which is a
> list of plugin descriptors for all the plugins in that plugin library.
> If liblv2-plugin is shared that symbol would be shared by all plugin
> libraries that a host has loaded, which would cause two problems:
>
> 1) Since all the plugin descriptors would end up in the same list, it
>    would appear to the host as if every plugin library contained every
>    plugin, which could possibly break things and definitely confuse
>    diagnostic tools, and
> 2) the code that accesses that list is not threadsafe, and the LV2
>    spec only guarantees that plugin discovery calls are not
>    executed simultaneously by the host for plugins in the same
>    library, so having a shared list for all libraries could
>    potentially corrupt memory.
>
> liblv2-gui.a has a similar problem.

I removed my hacks and I am building the two libraries static.

SPEC: http://oget.fedorapeople.org/review/lv2-c++-tools.spec
SRPM: http://oget.fedorapeople.org/review/lv2-c++-tools-1.0.3-2.fc12.src.rpm

Some notes:
- I removed the -fno-var-tracking-assignments hack too. gcc seems fixed now. It takes a little while to compile still. But it doesn't hang.
- There are two static (liblv2-gui.a, liblv2-plugin.a) and one shared (libpag.so) library. I didn't make a static subpackage since the contents of the .a files are not the same as the content of the .so file. Is this okay? What is your opinion?

Comment 8 Michael Schwendt 2010-02-21 19:50:24 UTC
Okay, static by design then (both libs make use of C "static" storage).

You would still need to follow the guidelines and create a virtual -static package:

  http://fedoraproject.org/wiki/Packaging:Guidelines#Packaging_Static_Libraries_2

| If (and only if) a package has shared libraries which require
| static libraries to be functional, the static libraries can be
| included in the *-devel subpackage. The devel subpackage must
| have a virtual Provide for the *-static package, and packages
| dependent on it must BuildRequire the *-static package.

Comment 9 Orcan Ogetbil 2010-02-21 21:22:11 UTC
okay, I updated the package, and added a virtual provides.

SPEC: http://oget.fedorapeople.org/review/lv2-c++-tools.spec
SRPM: http://oget.fedorapeople.org/review/lv2-c++-tools-1.0.3-3.fc12.src.rpm

Comment 10 Orcan Ogetbil 2010-04-11 00:31:45 UTC
Michael, is this package under your review? We have two other packages waiting for this package. One of them is David Cornette's EQ10Q package. He needs to be sponsored, but in order to do that we need to get this package in. (No obligations, I am just asking.)

Comment 11 David Cornette 2010-04-30 22:09:20 UTC
I'll review this one.

Comment 12 David Cornette 2010-05-13 05:33:44 UTC
Looks pretty good.  Ideally there would be man pages for lv2peg and lv2soname.  Just yesterday, someone announced an intent to package this for Debian (see http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=581419 ) so when that is done you can grab them from there.  In the meantime, you can send an email to upstream asking them for the man pages.

That is not a blocker, so this package is
APPROVED

Comment 13 Orcan Ogetbil 2010-05-13 09:31:23 UTC
Sure. I just sent an email upstream. Thanks for the review.

New Package CVS Request
=======================
Package Name: lv2-c++-tools
Short Description: Support library for writing LV2 plugins in C++
Owners: oget
Branches: F-11 F-12 F-13
InitialCC:

Comment 14 Dennis Gilmore 2010-05-13 22:30:54 UTC
CVS Done

Comment 15 Fedora Update System 2010-05-14 01:23:11 UTC
lv2-c++-tools-1.0.3-3.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/lv2-c++-tools-1.0.3-3.fc11

Comment 16 Fedora Update System 2010-05-14 01:23:13 UTC
lv2-c++-tools-1.0.3-3.fc13 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/lv2-c++-tools-1.0.3-3.fc13

Comment 17 Fedora Update System 2010-05-14 01:24:18 UTC
lv2-c++-tools-1.0.3-3.fc12 has been submitted as an update for Fedora 12.
http://admin.fedoraproject.org/updates/lv2-c++-tools-1.0.3-3.fc12

Comment 18 Fedora Update System 2010-05-15 20:40:50 UTC
lv2-c++-tools-1.0.3-3.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update lv2-c++-tools'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/lv2-c++-tools-1.0.3-3.fc11

Comment 19 Fedora Update System 2010-05-15 20:42:33 UTC
lv2-c++-tools-1.0.3-3.fc13 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update lv2-c++-tools'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/lv2-c++-tools-1.0.3-3.fc13

Comment 20 Fedora Update System 2010-05-15 20:43:43 UTC
lv2-c++-tools-1.0.3-3.fc12 has been pushed to the Fedora 12 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update lv2-c++-tools'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/lv2-c++-tools-1.0.3-3.fc12

Comment 21 Fedora Update System 2010-05-24 19:35:08 UTC
lv2-c++-tools-1.0.3-3.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 22 Fedora Update System 2010-05-24 19:36:32 UTC
lv2-c++-tools-1.0.3-3.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 23 Fedora Update System 2010-05-24 19:37:42 UTC
lv2-c++-tools-1.0.3-3.fc12 has been pushed to the Fedora 12 stable repository.  If problems still persist, please make note of it in this bug report.