0.9.4a has a problem building sometimes with parallel make (ex, "make -j2").
Here's the full build output when it fails:
https://588864.bugs.gentoo.org/attachment.cgi?id=440748
This issue was reported in the Gentoo issue tracker at https://bugs.gentoo.org/show_bug.cgi?id=588864
Thanks!
yes, we have a yet-not-pushed fix for this. Attaching.
That patches was applied in https://sourceforge.net/p/lirc/git/ci/8e0e7b65dea3b9f71e8658f0e417fac6409b4c2c/ which is in 0.9.4a. So it's not the fix for this issue.
indeed, I was too quick. Sorry for that.
Still, I have no clue here. This builds fine using parallel options on at least Fedora (koji and copr), Arch and Debian mentors. One question in the air is if the Gentoo toolchain differs in some respect?
Parallel make is all about one single thing: getting the dependencies right and complete. From the log file I gather that libirrrecord.a needs liblirc.so, but the Makefile does not know of this. A Makefile with that sort of incomplete dependencies may work "sometimes", for example sequencially, or in one environment but not another.
Try to add this dependence. (Sorry, no patch, just "theory".)
From lib/Makefile.am:
So, the dep is seemingly there. This is actually after the fix above, the error message before that fix was exactly Craig's. Mystified. And still ashore...
No, it isn't. (Obviously.) That is a flag that is added to the linker command line, not a dependency. If I understand autotools, correctly, you can try setting
or just add
to the end of lib/Makefile.am.
Well... I wouldn't call it obvious. The question of the deps generated by foo_LIBADD is, well, not that obvious.
Looking in my own lib/Makefile there is (abridged):
Now, what's the interpretation of a dependency on a linker option?
According to [1] using non-standard versions of libtool could cause errors like this. That said, I have no problem incorporating a patch like adding
should it resolve your problem - it certainly doesn't hurt. But I need some feedback here.
[1] http://stackoverflow.com/questions/11802727/libtool-doesnt-provide-library-dependencies-to-link
Since it did not solve the problem, it was, "obviouly", not the solution. That simple.
Bad and useless. Expands to
-llirc
which is (probably?) not a Make target. (liblirc.la is)ld arguments and Make dependencies are really two pair of shoes. I do not know what libtool attempts (someone should check!), but I suspect that there are reasons that ld arguments are not automatically added to the dependencies, like adding system libraries.
Also recall that libtool (and the rest of the autotools) were written in the 90-ties, when "parallel" was something pretty uncommon. Is Gordon still around?
The quoted stackoverflow article is not about Make dependencies.
I need input from Craig to resolve this.
That said, my snippets was from the generated Makefile, not Makefile.am (which is as of master). I have not made any changes since I cannot reproduce the problem.
I'm not sure how to help... I'm no Make or autotools expert. All I know is stated in the Gentoo bug at https://bugs.gentoo.org/show_bug.cgi?id=588864
The question is just IF and of the proposed patches fixes thr problem -a
Craig craigandrews@users.sf.net skrev: (5 augusti 2016 17:02:22 CEST)
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
Related
Tickets:
#210As stated in PM: the question is if any of the proposed pacthes resolves the problem
The following method should ("should") be able to deterministically verify a possible fix:
First compile the whole package. Then delete lib/libirrecord.la and lib/liblirc.la. In directory lib, try to
make libirrecord.la
. This should try to link libirrecord.la and should thus fail. After a successful fix, the command will succeed. (In detail: make now knows, through the dependencies, that it will need to build liblirc.la first, and will do so, before attempting to build libirrecord.la.Things that might go wrong: there may be liblirc.so-s spread around all around your system.
Now, with soem more time, this becomes interesting.
First, we have [19439d] which supposedly should have fixed this.
Second, followiign Bengt's ideas I'm able to reproduce the problem. And indeed, this lib/Makefile.am patch solves the problem:
Now, this looks like a automake (libtool?) bug: automake should add the proper deps for LIBADD, but doesn't. However I'm not sure enough (or too lazy) to report this.
Need input from Craig to confirm that this patch resolves the problem before closing bug.
Related
Commit: [19439d]
Last edit: Alec Leamas 2016-08-08
Ah... finally. This is just a simple error (as always) and automake does what it should. Reading the automake manual for the _DEPENDENCIES variable it turns out that the default alternative uses what's in LIBADD, but removes any linker flags like -lliblirc.. Which is perfectly sane. Proper patch is basically
Verified using Bengt's approach and by reading the manual Fixed in [c2d2f3] and [5e8a14] (master) and [6881bd] (release-0_9_4)
On a sidenote, this is what the comment in [19439d] prescribed. But, still the one-line patch was wrong. Sigh.
Related
Commit: [6881bd]
Commit: [19439d]
Commit: [5e8a14]
Commit: [c2d2f3]
Last edit: Alec Leamas 2016-08-09
I think the fix version of this issue is actually 0.9.4b (or maybe 0.9.4c).