Mailing List Archive

Cross-compiling gpg4win: can not find the runtime library libgcc_s_sjlj-1.dll
Cannot cross-compile gpg4win-3.1.12-23-gfa3dff39 on Arch Linux. I have installed all necessary packages, but get:

? ./autogen.sh --build-w32
Using /home/ave/w32root as standard install directory
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
/home/ave/.local/soft/gpg4win/missing: Unknown `--is-lightweight' option
Try `/home/ave/.local/soft/gpg4win/missing --help' for more information
configure: WARNING: 'missing' script is too old or missing
checking for i686-w64-mingw32-strip... i686-w64-mingw32-strip
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether UID '1000' is supported by ustar format... yes
checking whether GID '1000' is supported by ustar format... yes
checking how to create a ustar tar archive... gnutar
checking whether to enable maintainer-specific portions of Makefiles... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... i686-w64-mingw32
checking whether NLS is requested... yes
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for i686-w64-mingw32-gcc... i686-w64-mingw32-gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... yes
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether i686-w64-mingw32-gcc accepts -g... yes
checking for i686-w64-mingw32-gcc option to accept ISO C89... none needed
checking whether i686-w64-mingw32-gcc understands -c and -o together... yes
checking whether make supports the include directive... yes (GNU style)
checking dependency style of i686-w64-mingw32-gcc... gcc3
checking how to run the C preprocessor... i686-w64-mingw32-gcc -E
checking for i686-w64-mingw32-ranlib... i686-w64-mingw32-ranlib
checking for i686-w64-mingw32-ar... i686-w64-mingw32-ar
checking for i686-w64-mingw32-strip... (cached) i686-w64-mingw32-strip
checking for i686-w64-mingw32-dlltool... i686-w64-mingw32-dlltool
checking for make... make
checking for unzip... unzip
checking for tar... tar
checking for mkdir... mkdir
checking for cp... cp
checking for rm... rm
checking for stow... stow
checking for makensis... makensis
checking for zcat... zcat
checking for texi2dvi... texi2dvi
checking for dvipdf... dvipdf
checking for convert... convert
checking for sha1sum... sha1sum
checking for msgfmt... /usr/bin/msgfmt
checking for gitlog-to-changelog... no
checking for gcc... gcc
checking for i686-w64-mingw32-x86_64-w64-mingw32-strip... no
checking for x86_64-w64-mingw32-strip... x86_64-w64-mingw32-strip
configure: WARNING: using cross tools not prefixed with host triplet
configure: Using autodetected 12 make jobs. You can override this by setting GPG4WIN_PARALLEL.
configure: error: can not find the runtime library libgcc_s_sjlj-1.dll in the default locations.
Use the --with-libgcc_s_sjlj-1 option to set the path directly.



Internet says this is a problem with dynamic linking [0]. Any advice?

[0] https://stackoverflow.com/questions/12921911/mingw-libgcc-s-sjlj-1-dll-is-missing

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Re: Cross-compiling gpg4win: can not find the runtime library libgcc_s_sjlj-1.dll [ In reply to ]
Hi,

On Thursday 3 September 2020 14:49:06 CEST Ave Milia via Gnupg-devel wrote:
> configure: error: can not find the runtime library libgcc_s_sjlj-1.dll in the
default locations.
> > Use the --with-libgcc_s_sjlj-1
option to set the path directly.

This file is needed to to be installed by Gpg4win, so when configuring our
package we look for that as a dll binary. To be put into the installer package
so that it is available at runtime.

On debian they come from:
gcc-mingw-w64-i686:
/usr/lib/gcc/i686-w64-mingw32/8.3-posix/libgcc_s_sjlj-1.dll
/usr/lib/gcc/i686-w64-mingw32/8.3-win32/libgcc_s_sjlj-1.dll


For arch linux I do not know where they come from or that you have to pass as
--with-libgcc_s_sjlj-1 configure argument.

There will be two other runtime librarys also:
libgstdc++-6.dll and libwinpthread-1.dll

Regards,
Andre

--
GnuPG.com - a brand of g10 Code, the GnuPG experts.

g10 Code GmbH, Erkrath/Germany, AG Wuppertal HRB14459
GF Werner Koch, USt-Id DE215605608, www.g10code.com.

GnuPG e.V., Rochusstr. 44, D-40479 D?sseldorf. VR 11482 D?sseldorf
Vorstand: W.Koch, B.Reiter, A.Heinecke Mail: board@gnupg.org
Finanzamt D-Altstadt, St-Nr: 103/5923/1779. Tel: +49-211-28010702



_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Re: Cross-compiling gpg4win: can not find the runtime library libgcc_s_sjlj-1.dll [ In reply to ]
> Hi,
>
> On Thursday 3 September 2020 14:49:06 CEST Ave Milia via Gnupg-devel wrote:
>
> > configure: error: can not find the runtime library libgcc_s_sjlj-1.dll in the
>
> default locations.
>
> > > Use the --with-libgcc_s_sjlj-1
> >
>
> option to set the path directly.
>
> This file is needed to to be installed by Gpg4win, so when configuring our
> package we look for that as a dll binary. To be put into the installer package
> so that it is available at runtime.
>
> On debian they come from:
> gcc-mingw-w64-i686:
> /usr/lib/gcc/i686-w64-mingw32/8.3-posix/libgcc_s_sjlj-1.dll
> /usr/lib/gcc/i686-w64-mingw32/8.3-win32/libgcc_s_sjlj-1.dll
>
> For arch linux I do not know where they come from or that you have to pass as
> --with-libgcc_s_sjlj-1 configure argument.

Thanks for the response.
This is what I have:

? sudo pacman -S mingw-w64-toolchain mingw-w64 --needed
warning: mingw-w64-binutils-2.35-1 is up to date -- skipping
warning: mingw-w64-crt-7.0.0-1 is up to date -- skipping
warning: mingw-w64-gcc-10.2.0-1 is up to date -- skipping
warning: mingw-w64-headers-7.0.0-1 is up to date -- skipping
warning: mingw-w64-winpthreads-7.0.0-1 is up to date -- skipping
warning: mingw-w64-binutils-2.35-1 is up to date -- skipping
warning: mingw-w64-crt-7.0.0-1 is up to date -- skipping
warning: mingw-w64-gcc-10.2.0-1 is up to date -- skipping
warning: mingw-w64-headers-7.0.0-1 is up to date -- skipping
warning: mingw-w64-winpthreads-7.0.0-1 is up to date -- skipping
there is nothing to do

? pacman -Ql mingw-w64-gcc | grep gcc_s
mingw-w64-gcc /usr/i686-w64-mingw32/bin/libgcc_s_dw2-1.dll
mingw-w64-gcc /usr/i686-w64-mingw32/lib/libgcc_s.a
mingw-w64-gcc /usr/x86_64-w64-mingw32/bin/libgcc_s_seh-1.dll
mingw-w64-gcc /usr/x86_64-w64-mingw32/lib/libgcc_s.a

? pacman -Qi mingw-w64-gcc | grep -i version
Version : 10.2.0-1

Perhaps something changed between gcc 8 and gcc 10? Or it's in a different form (sjlj is part of e.g. dw2)? I just don't see any reason why part of a bundle (if sjlj is really a standard part of the bundle) wouldn't be installed.

There are no additional potential packages to install, even in AUR:
? yay -Ss mingw-w64 | grep -i gcc
An efficient Gthread implementation for GCC (mingw-w64)
aur/mingw-w64-gcc-base 10.1.0-1 (+18 0.89)
Cross GCC for the MinGW-w64 cross-compiler (bootstrap)
community/mingw-w64-gcc 10.2.0-1 (143.3 MiB 884.7 MiB) [mingw-w64-toolchain mingw-w64] (Installed)
Cross GCC for the MinGW-w64 cross-compiler

mingw-w64-gcc-base is "compile-it-yourself" version of mingw-w64-gcc in repos, I believe.

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Re: Cross-compiling gpg4win: can not find the runtime library libgcc_s_sjlj-1.dll [ In reply to ]
Hello,

Ave Milia via Gnupg-devel wrote:
> Perhaps something changed between gcc 8 and gcc 10? Or it's in a
> different form (sjlj is part of e.g. dw2)?

I have a look at:
https://aur.archlinux.org/cgit/aur.git/commit/PKGBUILD?h=mingw-w64-gcc-base

It has this change:
==========================
- --enable-lto --disable-dw2-exceptions \
+ --enable-lto \
--disable-nls --enable-version-specific-runtime-libs \
- --disable-multilib --enable-checking=release
+ --disable-multilib --enable-checking=release \
+ --disable-sjlj-exceptions --with-dwarf2
==========================

IIUC, I think --disable-sjlj-exceptions matters.
--

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Re: Cross-compiling gpg4win: can not find the runtime library libgcc_s_sjlj-1.dll [ In reply to ]
On Thursday, September 17, 2020 11:57 AM, Niibe Yutaka <gniibe@fsij.org> wrote:
>
> IIUC, I think --disable-sjlj-exceptions matters.
>

Good catch, thanks! It didn't come to me to look at the sources [0]. Consider resolved.

[0]: <https://github.com/archlinux/svntogit-community/blob/194a8cb32cb0db2a3bff265ae69a6658a4067428/trunk/PKGBUILD#L49>

_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel