bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Do not decorate symbols as dllexport on Cygwin


From: Corinna Vinschen
Subject: Re: [PATCH] Do not decorate symbols as dllexport on Cygwin
Date: Tue, 7 Feb 2023 16:22:25 +0100

Hi Reuben,

On Feb  7 14:22, Corinna Vinschen wrote:
> On Feb  6 20:50, Reuben Thomas wrote:
> > On Mon, 6 Feb 2023 at 20:38, Bruno Haible <bruno@clisp.org> wrote:
> > 
> > >   1. 'recode' is updated to a current gnulib and publish a corresponding
> > >      tarball. (Hi Reuben :) )
> > >
> > 
> > I've updated gnulib in recode git; I'd be grateful if I could have a report
> > that it's doing what's needed here before I make a release, if possible!
> > 
> > Git at: https://github.com/rrthomas/recode.git
> 
> Working on it, but this may take a while.  Stay tuned, please.

The new recode gnulib build works as desired, thank you.

However, I'm trying to build recode from the Cygwin-specific build
script, and running it with default settings I get an error before
recode even got built:

    help2man: can't get `--help' info from ./recode.exe
    Try `--no-discard-stderr' if option outputs to stderr
    WARNING: '/usr/bin/help2man' is missing on your system.
             [...]

So even with help2man installed, it doesn't work because recode.exe
didn't get build yet.

The Cygwin build system prefers parallel make.  And that's the problem.
I think commit dcdd5d26c0c2 is wrong:

    -recode.1: main.c $(top_srcdir)/configure.ac recode$(EXEEXT)
    +recode.1: main.c $(top_srcdir)/configure.ac

This means that recode.1 doesn't depend on the built binary anymore even
though it *needs* said binary to create the man page from it.  This
breaks dependency tracking in make and so make happily runs the
recode.1: rule before recode has been built, just depending on the
existence of main.c and configure.ac.

For cross-checking I tried a Linux build with `make -j8' and help2man
gets called before recode even got built as well.

So the above change breaks parallel make.

Not sure how to fix this correctly, but I have another patch, which
would be nice to have:

In Cygwin projects using libtool, we always have to add -no-undefined
iLDFLAGS.  This is some old safe-guard in libtool to remind developers
that when creating Windows DLLs, all external symbols must be resolved.

Fortunately, libtool allows this flags also on other platforms which
don't require its usage.

Patch is attached.  It would be nice if that's ok for inclusion.


Thanks,
Corinna

Attachment: 0001-src-Makefile.am-librecode_la_LDFLAGS-add-no-undefine.patch
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]