New libraries shouldn't be added to "std" by default and webview should be removed from it
|Reported by:||ojwb||Owned by:||VZ|
Here's the background to this issue:
In the latest upload of the debian packages of wxwidgets3.0, we enabled wxWebView. Because this pulls in a lot of extra dependencies (webkit, etc) we package this as separate binary packages, so only those wanting to use them need to install them. There are actually 3 packages: libwxgtk-webview3.0-0 (for the runtime library), libwxgtk-webview3.0-dev (for building apps using it), and libwxgtk-webview3.0-dbg (detached debug symbols).
Unfortunately, this change has caused many of the packages with build-dependencies on libwxgtk3.0-dev to fail to build from source (FTBFS) - the problem is that wx-config --libs without any libraries listed, or with std in the list of libraries, now includes the wx webview library in the list to link with, and that causes the link to fail unless libwxgtk-webview3.0-dev is also installed.
We don't want to merge libwxgtk-webview3.0-dev into libwxgtk3.0-dev, as libwxgtk-webview3.0-dev has to depend on libwxgtk-webview3.0-0 to work, which would require installing its large dependency stack to build any wx-using application.
It seems to me that webview shouldn't have been added to the list that "std" can expand to - even if you only consider builds from source, unless you use -Wl,--as-needed linking against the "std" libraries will result in your application being linked to all the libraries that expands to, which will increase the time it takes to load.
For similar reasons, I think it's better to encourage app authors to actually list the libraries their app needs when running wx-config --libs, so I would suggest that (contrary to the advice currently in docs/tech/tn0016.txt) new libraries should not be added to the std list. Perhaps in some cases it makes sense, but I'd suggest inclusion should be considered in each case.
I'd also suggest that the inclusion of webview in "std" be reconsidered for 3.0.1. I realise this is possibly controversial as it would mean an incompatible change for applications which link against webview and assume it's in the "std" list. But "webview" is new in wx3, so I doubt there are many users yet (the only one I know of so far is "boinc", and I've looked at a lot of wx-using apps as part of trying to eliminate wx 2.8 from Debian). Updating an app's build system to use wx-config --libs std,webview would work whether or not std included webview.
The alternative is that any binary package distro which enables webview will have to patch wx-config such that it expands "std" based on what wx development packages are installed. It seems that such a context-sensitive expansion of "std" is liable to surprise people (which is likely to mean that as upstream you'll end up fielding questions about it), and means what libraries get linked will behave differently depending on whether or not the wx webview development package is installed or not.
I've marked this for milestone 3.0.1 for now, since if webview is to be removed from std, that really needs to get done before more people start to use it.
I'm happy to provide patches for configure.in and/or docs/tech/tn0016.txt as appropriate - I've not done so yet, as what patches are needed depends on what of the above (if anything) you agree should be done.
Change History (5)
comment:2 Changed 6 months ago by vadz
- Cc steve.lamerton@… added
- Milestone changed from 3.0.1 to 3.1.0
- Status changed from new to confirmed
- Summary changed from New libraries shouldn't be added to "std" by default to New libraries shouldn't be added to "std" by default and webview should be removed from it