8000 autotools not building DLL using msys2 and mingw64 on windows 10 · Issue #220 · kkos/oniguruma · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
This repository was archived by the owner on Apr 24, 2025. It is now read-only.
This repository was archived by the owner on Apr 24, 2025. It is now read-only.
autotools not building DLL using msys2 and mingw64 on windows 10 #220
Closed
@jonforums

Description

@jonforums

With the current configure.ac and src/Makefile.am, libtool fails to build libonig-5.dll when using a plain vanilla msys2 + mingw64 toolchain on windows 10 x64.

To build a usable oniguruma, I need to use sed , autoreconf -fi, make src dll, strip the libtool created dll, and finally copy the libonig.def file to the install bin/ dir as in my build helper https://github.com/jonforums/buildlets/blob/master/build_oniguruma.ps1#L45-L72

The problem is that the libonig_la_LDFLAGS does not include -no-undefined when the --build triplet (os portion) contains mingw*.

PCRE2 solves this problem with the following autotools config:

### file: Makefile.am
if WITH_PCRE2_8
libpcre2_8_la_LDFLAGS = $(EXTRA_LIBPCRE2_8_LDFLAGS)
endif # WITH_PCRE2_8

---

### file: configure.ac
# Platform specific issues
NO_UNDEFINED=
EXPORT_ALL_SYMBOLS=
case $host_os in
  cygwin* | mingw* )
    if test X"$enable_shared" = Xyes; then
      NO_UNDEFINED="-no-undefined"
      EXPORT_ALL_SYMBOLS="-Wl,--export-all-symbols"
    fi
    ;;
esac
...
EXTRA_LIBPCRE2_8_LDFLAGS="$EXTRA_LIBPCRE2_8_LDFLAGS \
  $NO_UNDEFINED -version-info libpcre2_8_version"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0