WrapEarnPass created an issue (geany/geany-plugins#1593)
Running a cross compile via autogen.
```
_DEST=/home/build/geany-windows
_SYSROOT=/usr/windows/ucrt64
_SRC=/home/build/Projects/geany/geany-plugins
export CFLAGS='-v -std=c99 -mcrtdll=ucrtbase -march=x86-64-v2 -mtune=generic
-mwindows -mwin32 -fwritable-relocated-rdata -mpe-aligned-commons'
export CXXFLAGS='-v -std=c++17 -mcrtdll=ucrtbase -march=x86-64-v2
-mtune=generic -mwindows -mwin32 -fwritable-relocated-rdata
-mpe-aligned-commons -Wp-D_FORTIFY_SOURCE=2 -fstack-protector-strong
-Wl,-static-lssp'
export LDFLAGS='-static-libgcc'
export lt_cv_deplibs_check_method="pass_all"
export PKG_CONFIG="/usr/bin/pkg-config --define-prefix --env-only"
export
PKG_CONFIG_PATH="${_DEST}/lib/pkgconfig:${_SYSROOT}/lib/pkgconfig:${_SYSROOT}/share/pkgconfig"
export ARCH="x86_64"
export MINGW_ARCH="mingw32ucrt"
export HOST="x86_64-w64-mingw32ucrt"
export WINEPREFIX="$HOME/.wine/win64"
export SYSROOT=${_SYSROOT}
cd ${_SRC}
./autogen.sh --build x86_64-pc-linux-gnu --host x86_64-w64-mingw32ucrt
--prefix=${_DEST} --with-geany-libdir=${_DEST}
```
geanypg uses an autogen helper in gpgme.m4. This autogen helper ignores the
build config.
```checking for GPGME - version >= 0.4.2... yes
configure: WARNING:
***
*** The config script "/usr/bin/gpgrt-config --libdir=/usr/lib gpgme" was
*** built for x86_64-w64-mingw32 and thus may not match the
*** used host x86_64-w64-mingw32ucrt.
*** You may want to use the configure option --with-gpgme-prefix
*** to specify a matching config script or use $SYSROOT.
***
```
It runs gpgrt-config out of /usr/bin, which it really shouldn't. That is the
wrong libdir, and the response ignores pkg-config setup.
```
/usr/bin/gpgrt-config --libdir=/usr/lib gpgme --libs --cflags --static
-I/ucrt64/include -L/ucrt64/lib -lgpgme -lgpg-error -lintl -liconv -lassuan
-lws2_32
```
pkg-config supports this library correctly.
```
$PKG_CONFIG --static --libs gpgme
-L/usr/windows/ucrt64/lib -lgpgme -L/usr/windows/ucrt64/lib -lgpg-error
-lws2_32 -lintl -liconv -lassuan -lws2_32 -L/usr/windows/ucrt64/lib -lgpg-error
-lws2_32 -lintl -liconv
```
Suggest removal of the gpgme.m4 helper, and reconfigure geanypg.m4 to a gpgme
dependency.
```
AC_DEFUN([GP_CHECK_GEANYPG],
[
GP_ARG_DISABLE([geanypg], [auto])
GP_CHECK_UTILSLIB([geanypg])
GP_CHECK_PLUGIN_DEPS([geanypg], [GeanyPG],
[gpgme >= 1.23])
# necessary for gpgme
AC_SYS_LARGEFILE
GP_COMMIT_PLUGIN_STATUS([GeanyPG])
AC_CONFIG_FILES([
geanypg/Makefile
geanypg/src/Makefile
])
])
```
--
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany-plugins/issues/1593
You are receiving this because you are subscribed to this thread.
Message ID: <geany/geany-plugins/issues/[email protected]>