[Users] Building CM on Windows 11 with MSys2 MinGW

Enan Ajmain 3nan.ajmain at gmail.com
Fri Nov 25 06:16:16 CET 2022


On Thu, 24 Nov 2022 21:40:31 -0700
Jonathan Boeing <jonathan at claws-mail.org> wrote:
> That's pretty much what I'd expect when trying to build with Msys or
> WSL.  Cross-compiling is a lot better than it used to be, but you're
> still out in the wild.  If you want it to just work, build from a
> Debian 11 VM in VirtualBox.
>
> See https://github.com/crosstool-ng/crosstool-ng/issues/1328 for
> someone hitting the same GMP build failure with WSL:

Thanks. I found the same GH issues and ended up using these values, and
with these `gmp` built fine.

    $ echo $CC_FOR_BUILD
    /usr/bin/x86_64-linux-gnu-gcc
    $ echo $CPP_FOR_BUILD
    /usr/bin/x86_64-linux-gnu-cpp

> > Update:
> > I tried the same thing in ubuntu vm.it worked fine.

I also shifted to a native Ubuntu-20.04 host (not VM, not WSL), but
unfortunately ran into another problem. I can't provide the full log
because my tmux buffer holds only 5K lines, but I hope the pertinent
parts are there (see below).

The error is related to `pgpcore` not finding the «pthread» library (I
think).


    Making all in pgpcore
    make[8]: Entering directory '/home/enan/projects/claws-mail-win32-4.1.1-1/src/playground/build/claws_mail-4.1.1-build/src/plugins/pgpcore'
      CC       pgpcore_la-autocompletion.lo
      CC       pgpcore_la-passphrase.lo
      CC       pgpcore_la-pgp_utils.lo
      CC       pgpcore_la-pgp_viewer.lo
      CC       pgpcore_la-plugin.lo
      CC       pgpcore_la-prefs_gpg.lo
      CC       pgpcore_la-select-keys.lo
      CC       pgpcore_la-sgpgme.lo
    /bin/bash ../../../libtool --mode=compile --tag=RC x86_64-w64-mingw32-windres -i version.rc -o version.lo
    libtool: compile:  x86_64-w64-mingw32-windres -i version.rc  -o .libs/version.o
    libtool: compile:  x86_64-w64-mingw32-windres -i version.rc -o version.o >/dev/null 2>&1
    ../../../../claws_mail-4.1.1/src/plugins/pgpcore/passphrase.c: In function 'gpgmegtk_passphrase_cb':
    ../../../../claws_mail-4.1.1/src/plugins/pgpcore/passphrase.c:338:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      338 |         WriteFile ((HANDLE)fd, pass, strlen (pass), &nwritten, NULL);
          |                    ^
    ../../../../claws_mail-4.1.1/src/plugins/pgpcore/passphrase.c:339:20: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
      339 |         WriteFile ((HANDLE)fd, "\n", 1, &nwritten, NULL);
          |                    ^
      CCLD     pgpcore.la
    /usr/bin/x86_64-w64-mingw32-ld: .libs/pgpcore_la-pgp_viewer.o: in function `pgpview_show_mime_part':
    /home/enan/projects/claws-mail-win32-4.1.1-1/src/playground/build/claws_mail-4.1.1-build/src/plugins/pgpcore/../../../../claws_mail-4.1.1/src/plugins/pgpcore/pgp_viewer.c:259: undefined reference to `__imp_pthread_create'
    /usr/bin/x86_64-w64-mingw32-ld: /home/enan/projects/claws-mail-win32-4.1.1-1/src/playground/build/claws_mail-4.1.1-build/src/plugins/pgpcore/../../../../claws_mail-4.1.1/src/plugins/pgpcore/pgp_viewer.c:270: undefined reference to `__imp_pthread_join'
    /usr/bin/x86_64-w64-mingw32-ld: .libs/pgpcore_la-sgpgme.o: in function `sgpgme_create_secret_key':
    /home/enan/projects/claws-mail-win32-4.1.1-1/src/playground/build/claws_mail-4.1.1-build/src/plugins/pgpcore/../../../../claws_mail-4.1.1/src/plugins/pgpcore/sgpgme.c:1264: undefined reference to `__imp_pthread_create'
    /usr/bin/x86_64-w64-mingw32-ld: /home/enan/projects/claws-mail-win32-4.1.1-1/src/playground/build/claws_mail-4.1.1-build/src/plugins/pgpcore/../../../../claws_mail-4.1.1/src/plugins/pgpcore/sgpgme.c:1275: undefined reference to `__imp_pthread_join'
    collect2: error: ld returned 1 exit status
    make[8]: *** [Makefile:642: pgpcore.la] Error 1
    make[8]: Leaving directory '/home/enan/projects/claws-mail-win32-4.1.1-1/src/playground/build/claws_mail-4.1.1-build/src/plugins/pgpcore'
    make[7]: *** [Makefile:545: all-recursive] Error 1
    make[7]: Leaving directory '/home/enan/projects/claws-mail-win32-4.1.1-1/src/playground/build/claws_mail-4.1.1-build/src/plugins'
    make[6]: *** [Makefile:1663: all-recursive] Error 1
    make[6]: Leaving directory '/home/enan/projects/claws-mail-win32-4.1.1-1/src/playground/build/claws_mail-4.1.1-build/src'
    make[5]: *** [Makefile:1342: all] Error 2
    make[5]: Leaving directory '/home/enan/projects/claws-mail-win32-4.1.1-1/src/playground/build/claws_mail-4.1.1-build/src'
    make[4]: *** [Makefile:798: all-recursive] Error 1
    make[4]: Leaving directory '/home/enan/projects/claws-mail-win32-4.1.1-1/src/playground/build/claws_mail-4.1.1-build'
    make[3]: *** [Makefile:572: all] Error 2
    make[3]: Leaving directory '/home/enan/projects/claws-mail-win32-4.1.1-1/src/playground/build/claws_mail-4.1.1-build'
    make[2]: *** [claws-mail.mk:282: stamps/stamp-claws_mail-03-make] Error 2
    make[2]: Leaving directory '/home/enan/projects/claws-mail-win32-4.1.1-1/src'
    make[1]: *** [Makefile:685: all-recursive] Error 1
    make[1]: Leaving directory '/home/enan/projects/claws-mail-win32-4.1.1-1'
    make: *** [Makefile:624: all] Error 2

--
Enan
3nan.ajmain at gmail.com
https://git.sr.ht/~enan/
https://www.github.com/3N4N


More information about the Users mailing list