[patch #9999] Fix --preserve-dup-deps flag not to strip some duplicates

2024-04-21 Thread Julien ÉLIE
Follow-up Comment #1, patch # (group libtool):

FWIW, the patch was locally applied to INN in 2020, and there hasn't been any
build problem since then.  Building INN with libtool otherwise failed with
unresolved circular dependencies, even with the use of *--preserve-dup-deps*.

https://github.com/InterNetNews/inn/commit/e715e957fe7db5acc9ec1beaa9abb2ba120c287b#diff-6858ef1035c11e53d6a00ef454d86e2eab93aae2fc7f83f201069946e916c643


I believe it would be useful to fix it upstream too.  There even was a comment
in _ltmain.sh_ noting that the current code is broken and should be fixed,
along with the fix in a commented line:


# FIXME: Pedantically, this is the right thing to do, so
#that some nasty dependency loop isn't accidentally
#broken:
#new_libs="$deplib $new_libs"


The patch basically uses the right expected logic for *--preserve-dup-deps*.


___

Reply to this item at:

  

___
Message posté via Savannah
https://savannah.gnu.org/




Re: [PATCH] Fix Wstrict-prototypes warnings

2024-04-21 Thread Peter Kokot
On Tue, 16 Apr 2024 at 19:56, Ileana Dumitrescu
 wrote:
>
> Thank you for the patch. Diagnosing the test errors is not so easy
> without more information. Could you tell me which tests failed for you,
> and which ones you fixed with the addition of this patch? Also, which
> libtool and compiler version you are using?

Consider creating a minimalistic configure.ac:

AC_PREREQ([2.71])
AC_INIT([ExampleProject], [1.0.0])
AC_PROG_CC
AC_MSG_NOTICE([Configuring Libtool])
LT_INIT
AC_OUTPUT

Then run "autoreconf -i" to create a configure script.

And then "./configure CFLAGS=-Werror=strict-prototypes"

In the config.log file there will be error similar to this:
conftest.c:10:5: error: function declaration isn't a prototype
[-Werror=strict-prototypes]
10 | int main(){nm_test_var='a';nm_test_func();return(0);}
| ^~~~
cc1: some warnings being treated as errors

Some errors are related to Autoconf, which has fixed most of these in
2.72 already. And this patch (hopefully) fixes most if not all those
related to Libtool.

Libtool version: 2.4.7
Compiler: GCC 13.2

Issue is that some compilers might enable strict-prototypes by default
in future versions.

-- 
Peter Kokot