-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ask libtool to stop hiding some errors #13086
Conversation
lib/libzpool/Makefile.am
Outdated
@@ -239,3 +242,4 @@ vdev_raidz_math_powerpc_altivec.l$(OBJEXT): CFLAGS += -maltivec | |||
endif | |||
|
|||
include $(top_srcdir)/config/CppCheck.am | |||
AM_CFLAGS += -no-suppress |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stupid question maybe but is this really supposed to be here twice? (I'm fully prepared for Autohell Weirdness™ to mean Yes, but)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Absolutely not, I just echoed it into the end of every file and then moved it up to somewhere reasonable, but I had already put it in this file because it was where I hit the problem initially, so I presumably just didn't go edit it at all.
35bd9a9
to
bdab247
Compare
I hit exactly the same problem, Debian testing. What you propose here, @rincebrain, is very fragile. I don't see better solutions though. |
I'd prefer a better solution, but everything else I tried did not do the right thing. :/ |
lib/libzpool/Makefile.am
Outdated
@@ -27,6 +27,9 @@ AM_CFLAGS += $(ZLIB_CFLAGS) | |||
|
|||
AM_CFLAGS += -DLIB_ZPOOL_BUILD | |||
|
|||
# libtool flag |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest adding a comment that this is not really meant for a compiler but libtool
and it circumvents autotools deficiencies. It is a gigantic hack but still better than people wasting time on troubleshooting failed compilations.
Should we report this to Mr. Stallman?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure.
I suspect Mr. Stallman would respond with rude words for daring to not use the GPL on something.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just wrote following to bug-automake@gnu.org
Dear automake developers!
A standard libtool
invocation line generated by automake looks like:
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
$(AM_CFLAGS) $(CFLAGS)
Sometimes files compiled using the method above make the compiler emit errors. Those errors are suppressed by default which makes troubleshooting impossible. libtool
has a command line option, -no-suppress
which can be used to make the compiler verbose. Unfortunately, there is no way to inject that option since libtool
demands that it comes after --mode=compile
. AM_LIBTOOLFLAGS
nor LIBTOOLFLAGS
cannot be used for that purpose since "it is too early", according to libtool
's command line parser. It is somewhat possible to use AM_CFLAGS
for that purpose but then it breaks modes other than --mode=compile
.
Is there any way to make libtool more verbose?
Thanks in advance!
Software used:
autoconf (GNU Autoconf) 2.71
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv3+/Autoconf: GNU GPL version 3 or later
<https://gnu.org/licenses/gpl.html>, <https://gnu.org/licenses/exceptions.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by David J. MacKenzie and Akim Demaille.
automake (GNU automake) 1.16.5
Copyright (C) 2021 Free Software Foundation, Inc.
License GPLv2+: GNU GPL version 2 or later <https://gnu.org/licenses/gpl-2.0.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Tom Tromey <[tromey@redhat.com](mailto:tromey@redhat.com)>
and Alexandre Duret-Lutz <[adl@gnu.org](mailto:adl@gnu.org)>.
bdab247
to
dca349b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I hope this workaround won't bite us back hard.
I reported this issue to automake developers https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54020 Let's hope for their quick and accurate response.
EDIT01
Looks like the bug was confirmed: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54020#8
EDIT02
Solution proposal is there: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54020#11
Now we are looking for a hero to implement it: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54020#14
Looks like we're all better off merging @rincebrain hack in right away.
dca349b
to
0ce1ed7
Compare
I got hit by this like two days ago, so I highly agree with your EDIT02 (to merge this and possibly revert it after an autohell hero fixes some perl), but edits don't actually generate notifications. This will, though. |
Good point! |
I feel like "this is a terrible hack, but we're better off merging it for now" might be the subtitle of too many of my PRs... |
Are we absolutely sure this isn't a side effect of setting I'd really prefer that we not have to make this hack, I'm concerned it might cause us future problems. |
With dec1eef ~1:
(And yes, I ran |
Bummer. In that case, let's go ahead and make the change but simply reference the upstream autoconf issue to keep the Makefile's tidy. # See https://debbugs.gnu.org/cgi/bugreport.cgi?bug=54020
AM_CFLAGS += -no-suppress |
For openzfs#13083, curiously, it did not print the actual error, just that the compile failed with "Error 1". In theory, this flag should cause it to report errors twice sometimes. In practice, I'm pretty okay with reporting some twice if it avoids reporting some never. Signed-off-by: Rich Ercolani <rincebrain@gmail.com>
There you go. If you need a rebase, let me know, but I don't think there's any conflicts... |
For openzfs#13083, curiously, it did not print the actual error, just that the compile failed with "Error 1". In theory, this flag should cause it to report errors twice sometimes. In practice, I'm pretty okay with reporting some twice if it avoids reporting some never. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13086
For openzfs#13083, curiously, it did not print the actual error, just that the compile failed with "Error 1". In theory, this flag should cause it to report errors twice sometimes. In practice, I'm pretty okay with reporting some twice if it avoids reporting some never. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13086
For openzfs#13083, curiously, it did not print the actual error, just that the compile failed with "Error 1". In theory, this flag should cause it to report errors twice sometimes. In practice, I'm pretty okay with reporting some twice if it avoids reporting some never. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13086
For openzfs#13083, curiously, it did not print the actual error, just that the compile failed with "Error 1". In theory, this flag should cause it to report errors twice sometimes. In practice, I'm pretty okay with reporting some twice if it avoids reporting some never. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13086
For openzfs#13083, curiously, it did not print the actual error, just that the compile failed with "Error 1". In theory, this flag should cause it to report errors twice sometimes. In practice, I'm pretty okay with reporting some twice if it avoids reporting some never. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13086
For openzfs#13083, curiously, it did not print the actual error, just that the compile failed with "Error 1". In theory, this flag should cause it to report errors twice sometimes. In practice, I'm pretty okay with reporting some twice if it avoids reporting some never. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13086
For openzfs#13083, curiously, it did not print the actual error, just that the compile failed with "Error 1". In theory, this flag should cause it to report errors twice sometimes. In practice, I'm pretty okay with reporting some twice if it avoids reporting some never. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13086
For openzfs#13083, curiously, it did not print the actual error, just that the compile failed with "Error 1". In theory, this flag should cause it to report errors twice sometimes. In practice, I'm pretty okay with reporting some twice if it avoids reporting some never. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13086
For openzfs#13083, curiously, it did not print the actual error, just that the compile failed with "Error 1". In theory, this flag should cause it to report errors twice sometimes. In practice, I'm pretty okay with reporting some twice if it avoids reporting some never. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13086
For openzfs#13083, curiously, it did not print the actual error, just that the compile failed with "Error 1". In theory, this flag should cause it to report errors twice sometimes. In practice, I'm pretty okay with reporting some twice if it avoids reporting some never. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13086
For openzfs#13083, curiously, it did not print the actual error, just that the compile failed with "Error 1". In theory, this flag should cause it to report errors twice sometimes. In practice, I'm pretty okay with reporting some twice if it avoids reporting some never. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13086
For openzfs#13083, curiously, it did not print the actual error, just that the compile failed with "Error 1". In theory, this flag should cause it to report errors twice sometimes. In practice, I'm pretty okay with reporting some twice if it avoids reporting some never. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13086
For openzfs#13083, curiously, it did not print the actual error, just that the compile failed with "Error 1". In theory, this flag should cause it to report errors twice sometimes. In practice, I'm pretty okay with reporting some twice if it avoids reporting some never. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13086
For openzfs#13083, curiously, it did not print the actual error, just that the compile failed with "Error 1". In theory, this flag should cause it to report errors twice sometimes. In practice, I'm pretty okay with reporting some twice if it avoids reporting some never. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13086
For openzfs#13083, curiously, it did not print the actual error, just that the compile failed with "Error 1". In theory, this flag should cause it to report errors twice sometimes. In practice, I'm pretty okay with reporting some twice if it avoids reporting some never. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13086
For openzfs#13083, curiously, it did not print the actual error, just that the compile failed with "Error 1". In theory, this flag should cause it to report errors twice sometimes. In practice, I'm pretty okay with reporting some twice if it avoids reporting some never. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13086
For openzfs#13083, curiously, it did not print the actual error, just that the compile failed with "Error 1". In theory, this flag should cause it to report errors twice sometimes. In practice, I'm pretty okay with reporting some twice if it avoids reporting some never. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13086
For openzfs#13083, curiously, it did not print the actual error, just that the compile failed with "Error 1". In theory, this flag should cause it to report errors twice sometimes. In practice, I'm pretty okay with reporting some twice if it avoids reporting some never. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13086
For openzfs#13083, curiously, it did not print the actual error, just that the compile failed with "Error 1". In theory, this flag should cause it to report errors twice sometimes. In practice, I'm pretty okay with reporting some twice if it avoids reporting some never. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13086
For openzfs#13083, curiously, it did not print the actual error, just that the compile failed with "Error 1". In theory, this flag should cause it to report errors twice sometimes. In practice, I'm pretty okay with reporting some twice if it avoids reporting some never. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13086
For openzfs#13083, curiously, it did not print the actual error, just that the compile failed with "Error 1". In theory, this flag should cause it to report errors twice sometimes. In practice, I'm pretty okay with reporting some twice if it avoids reporting some never. Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Reviewed-by: Damian Szuberski <szuberskidamian@gmail.com> Signed-off-by: Rich Ercolani <rincebrain@gmail.com> Closes openzfs#13086
Motivation and Context
Curiously, for #13083, it did not print the actual error encountered for me, on Fedora 35 or Debian 11, it just printed something like this, even with V=1 (though V=1 prints the full command it ran):
as opposed to:
After a bit of staring into the abyss, I found it was libtool eating the error output.
In theory, this flag should make it sometimes kick out errors twice. In practice, I'm okay with getting some twice if it means getting some more than 0 times.
(If someone has a better way to accomplish this, I'm all ears, but from reading the "libtool" script, this seems to be the only flag that influences the behavior...)
Description
Shoves -no-suppress into AM_CPPFLAGS for lib/ - AM_LIBTOOLFLAGS puts it too early in the invocation, LTCFLAGS did not do what I might have hoped, and AM_CPPFLAGS globally breaks all of our cmd/ compiles.
How Has This Been Tested?
Well, it correctly bombs printing that error now, and if you fix the error, it successfully built for me.
Types of changes
Checklist:
Signed-off-by
.