[Users] Build of Win32 Installer fails on gmp-6.2.1
Jonathan Boeing
jonathan at claws-mail.org
Sun Jul 3 19:33:36 UTC 2022
On Sun, 3 Jul 2022 15:35:54 +0100
Wishful Thinking via Users <users at lists.claws-mail.org> wrote:
> On Sat, 2 Jul 2022 10:49:28 -0700.
> Jonathan Boeing <jonathan at claws-mail.org> wrote:
>
> > On Sat, 2 Jul 2022 15:35:29 +0100
> > Rosemary Lockie via Users <users at lists.claws-mail.org> wrote:
> >
> > > Hello,
> > >
> > > Maybe a query for Jonathan?
> > >
> > > I am trying to rebuild v3.19 of the Win32 Installer Windows
> > > Subsystem for Linux v.2, and Debian (Bullseye) and have
> > > discovered MAKE fails when trying to build gmp-6.2.1.
> > >
> > > My first build on WLS v1 was successful, so I assume the issue
> > > relates to WSL v2.
> > >
> > > The error reported is:
> > >
> > > [snip]
> > > checking for build system executable sufix... configure: error:
> > > Cannot determine executable suffix
> > > [snip]
> > >
> > > The received wisdom online is that it does relate to WSL2 [qv
> > > https://gmplib.org/list-archives/gmp-bugs/2020-January/004714.html
> > > ]
> > >
> > > and can be fixed by setting environment variables CC and
> > > CC_FOR_BUILD explicitly, eg:
> > >
> > > export CC=x86_64-w64-mingw32-gcc
> > > export CC_FOR_BUILD=x86_64-linux-gnu-gcc
> > >
> > > I tried that, before running autogen.sh, but the build still
> > > fails, and it occurred to me that perhaps those values are not
> > > correct for a Claws Build?
> >
> > The package-specific build arguments are in src/Makefile.am. To set
> > CC and CC_FOR_BUILD explicitly for gmp's configure, change
> > cm_pkg_gmp_configure from:
> >
> > cm_pkg_gmp_configure = \
> > --disable-static \
> > --enable-shared \
> > --disable-cxx
> >
> > to:
> >
> > cm_pkg_gmp_configure = \
> > --disable-static \
> > --enable-shared \
> > --disable-cxx \
> > CC=$(CC) \
> > CC_FOR_BUILD=$(CC)
>
> Jonathan,
>
> Thank you. It's really helpful for me to learn more about where to
> tweak things. :)
>
> I made the necessary modifications to ~/src/Makefile.am, and judging
> from gmp's config.log the values do appear to have been transmitted
> to the build AOK.
>
> But (after running build-aux/pkg.sh, and autogen.sh) MAKE still
> reports the same issue.
>
> Should CC and CC_FOR_BUILD have identical values? They are different
> in the example given in the gmplib list:
>
> https://gmplib.org/list-archives/gmp-bugs/2020-January/004714.html
>
> CC_FOR_BUILD is set to x86_64-linux-gnu-gcc though that might be
> because of other reasons?
Ah, it looks like CC_FOR_BUILD should be set to your native compiler,
not the cross compiler:
http://www.gnu.org/software/autoconf-archive/ax_prog_cc_for_build.html
You can try changing the cm_pkg_gmp_configure line to
CC_FOR_BUILD=$(BUILD_CC). If that doesn't work, try setting it to
'gcc' or your triplet-prefixed native system compiler.
Regards,
Jonathan
More information about the Users
mailing list