Compilation of libgcrypt 1.7.5 on cygwin 64 bit fails

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Compilation of libgcrypt 1.7.5 on cygwin 64 bit fails

Roger Qiu
Hi Gcrypt devs,

I just tried compiling from source libgcrypt 1.7.5 (and I also tried
earlier versions).

It always comes to this:

```

libtool: link: ranlib .libs/libgcrypt.alibtool: link: rm -fr
.libs/libgcrypt.laxlibtool: link: ( cd ".libs" && rm -f "libgcrypt.la"
&& ln -s "../libgcrypt.la" "libgcrypt.la" )gcc -DHAVE_CONFIG_H -I.
-I..    -I/usr/local/include -g -O2 -Wall -MT mpicalc-mpicalc.o -MD -MP
-MF .deps/mpicalc-mpicalc.Tpo -c -o mpicalc-mpicalc.o `test -f
'mpicalc.c' || echo './'`mpicalc.cmv -f .deps/mpicalc-mpicalc.Tpo
.deps/mpicalc-mpicalc.Po/bin/sh ../libtool  --tag=CC   --mode=link gcc
-I/usr/local/include -g -O2 -Wall   -o mpicalc.exe mpicalc-mpicalc.o
libgcrypt.la  -L/usr/local/lib -lgpg-errorlibtool: link: gcc
-I/usr/local/include -g -O2 -Wall -o .libs/mpicalc.exe
mpicalc-mpicalc.o  ./.libs/libgcrypt.a -L/usr/local/lib
/usr/local/lib/libgpg-error.a -lintl./.libs/libgcrypt.a(rijndael.o): In
function
`do_encrypt':/cygdrive/c/Users/CMCDragonkai/.src/libgcrypt-1.7.5/cipher/rijndael.c:747:(.text+0x9f):
relocation truncated to fit: R_X86_64_32S against
`.rdata'./.libs/libgcrypt.a(rijndael.o): In function
`do_decrypt':/cygdrive/c/Users/CMCDragonkai/.src/libgcrypt-1.7.5/cipher/rijndael.c:1130:(.text+0x110):
relocation truncated to fit: R_X86_64_32S against
`.rdata'./.libs/libgcrypt.a(cast5-amd64.o):/cygdrive/c/Users/CMCDragonkai/.src/libgcrypt-1.7.5/cipher/cast5-amd64.S:201:(.text+0x9):
relocation truncated to fit: R_X86_64_32S against symbol
`_gcry_cast5_s1to4' defined in .rdata section in
./.libs/libgcrypt.a(cast5.o)./.libs/libgcrypt.a(cast5-amd64.o):/cygdrive/c/Users/CMCDragonkai/.src/libgcrypt-1.7.5/cipher/cast5-amd64.S:241:(.text+0x429):
relocation truncated to fit: R_X86_64_32S against symbol
`_gcry_cast5_s1to4' defined in .rdata section in
./.libs/libgcrypt.a(cast5.o)./.libs/libgcrypt.a(cast5-amd64.o):/cygdrive/c/Users/CMCDragonkai/.src/libgcrypt-1.7.5/cipher/cast5-amd64.S:376:(.text+0x844):
relocation truncated to fit: R_X86_64_32S against symbol
`_gcry_cast5_s1to4' defined in .rdata section in
./.libs/libgcrypt.a(cast5.o)./.libs/libgcrypt.a(cast5-amd64.o):/cygdrive/c/Users/CMCDragonkai/.src/libgcrypt-1.7.5/cipher/cast5-amd64.S:404:(.text+0x177c):
relocation truncated to fit: R_X86_64_32S against symbol
`_gcry_cast5_s1to4' defined in .rdata section in
./.libs/libgcrypt.a(cast5.o)collect2: error: ld returned 1 exit
statusmake[2]: *** [Makefile:712: mpicalc.exe] Error 1make[2]: Leaving
directory
'/cygdrive/c/Users/CMCDragonkai/.src/libgcrypt-1.7.5/src'make[1]: ***
[Makefile:477: all-recursive] Error 1make[1]: Leaving directory
'/cygdrive/c/Users/CMCDragonkai/.src/libgcrypt-1.7.5'make: ***
[Makefile:408: all] Error 2

```

Please cc me as I am not subscribed to the mailing list.

All other dependencies of gnupg works on cygwin 64 bit, this is the only
one that fails, and thus prevents building gpg2 on Cygwin 64 bit.

Thanks,

Roger

--
Founder of Matrix AI
https://matrix.ai/
+61420925975


_______________________________________________
Gnupg-users mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-users
Reply | Threaded
Open this post in threaded view
|

Re: Compilation of libgcrypt 1.7.5 on cygwin 64 bit fails

Jussi Kivilinna-2
Hello,

On 11.05.2017 12:26, Roger Qiu wrote:

> Hi Gcrypt devs,
>
> I just tried compiling from source libgcrypt 1.7.5 (and I also tried earlier versions).
>
> It always comes to this:
>
> ```
>
> libtool: link: ranlib .libs/libgcrypt.alibtool: link: rm -fr .libs/libgcrypt.laxlibtool: link: ( cd ".libs" && rm -f "libgcrypt.la" && ln -s "../libgcrypt.la" "libgcrypt.la" )gcc -DHAVE_CONFIG_H -I. -I..    -I/usr/local/include -g -O2 -Wall -MT mpicalc-mpicalc.o -MD -MP -MF .deps/mpicalc-mpicalc.Tpo -c -o mpicalc-mpicalc.o `test -f 'mpicalc.c' || echo './'`mpicalc.cmv -f .deps/mpicalc-mpicalc.Tpo .deps/mpicalc-mpicalc.Po/bin/sh ../libtool  --tag=CC   --mode=link gcc -I/usr/local/include -g -O2 -Wall   -o mpicalc.exe mpicalc-mpicalc.o libgcrypt.la  -L/usr/local/lib -lgpg-errorlibtool: link: gcc -I/usr/local/include -g -O2 -Wall -o .libs/mpicalc.exe mpicalc-mpicalc.o  ./.libs/libgcrypt.a -L/usr/local/lib /usr/local/lib/libgpg-error.a -lintl./.libs/libgcrypt.a(rijndael.o): In function `do_encrypt':/cygdrive/c/Users/CMCDragonkai/.src/libgcrypt-1.7.5/cipher/rijndael.c:747:(.text+0x9f): relocation truncated to fit: R_X86_64_32S against `.rdata'./.libs/libgcrypt.a(rijndael.o): In
> function `do_decrypt':/cygdrive/c/Users/CMCDragonkai/.src/libgcrypt-1.7.5/cipher/rijndael.c:1130:(.text+0x110): relocation truncated to fit: R_X86_64_32S against `.rdata'./.libs/libgcrypt.a(cast5-amd64.o):/cygdrive/c/Users/CMCDragonkai/.src/libgcrypt-1.7.5/cipher/cast5-amd64.S:201:(.text+0x9): relocation truncated to fit: R_X86_64_32S against symbol `_gcry_cast5_s1to4' defined in .rdata section in ./.libs/libgcrypt.a(cast5.o)./.libs/libgcrypt.a(cast5-amd64.o):/cygdrive/c/Users/CMCDragonkai/.src/libgcrypt-1.7.5/cipher/cast5-amd64.S:241:(.text+0x429): relocation truncated to fit: R_X86_64_32S against symbol `_gcry_cast5_s1to4' defined in .rdata section in ./.libs/libgcrypt.a(cast5.o)./.libs/libgcrypt.a(cast5-amd64.o):/cygdrive/c/Users/CMCDragonkai/.src/libgcrypt-1.7.5/cipher/cast5-amd64.S:376:(.text+0x844): relocation truncated to fit: R_X86_64_32S against symbol `_gcry_cast5_s1to4' defined in .rdata section in
> ./.libs/libgcrypt.a(cast5.o)./.libs/libgcrypt.a(cast5-amd64.o):/cygdrive/c/Users/CMCDragonkai/.src/libgcrypt-1.7.5/cipher/cast5-amd64.S:404:(.text+0x177c): relocation truncated to fit: R_X86_64_32S against symbol `_gcry_cast5_s1to4' defined in .rdata section in ./.libs/libgcrypt.a(cast5.o)collect2: error: ld returned 1 exit statusmake[2]: *** [Makefile:712: mpicalc.exe] Error 1make[2]: Leaving directory '/cygdrive/c/Users/CMCDragonkai/.src/libgcrypt-1.7.5/src'make[1]: *** [Makefile:477: all-recursive] Error 1make[1]: Leaving directory '/cygdrive/c/Users/CMCDragonkai/.src/libgcrypt-1.7.5'make: *** [Makefile:408: all] Error 2
>
> ```
>
> Please cc me as I am not subscribed to the mailing list.
>
> All other dependencies of gnupg works on cygwin 64 bit, this is the only one that fails, and thus prevents building gpg2 on Cygwin 64 bit.
Does attached patch solve the problem? Patch is made on top of libgcrypt development branch, but I think it should apply to 1.7.5 too.

-Jussi


_______________________________________________
Gnupg-users mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-users

01-fix-building-on-64-bit-cygwin.patch (2K) Download Attachment
signature.asc (685 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Compilation of libgcrypt 1.7.5 on cygwin 64 bit fails

Roger Qiu

Just tried it, and it successfully allows compilation of libgcrypt.

Now just tried building gpg2.

But it now gives this error:

```

Making all in g10
make[2]: Entering directory '/cygdrive/c/Users/CMCDragonkai/.src/gnupg-2.1.20/g10'
gcc  -I/usr/local/include -I/usr/local/include -I/usr/local/include -Wall -Wno-pointer-sign -Wpointer-arith  -g -O2   -o gpg.exe gpg.o keyedit.o server.o build-packet.o compress.o  free-packet.o getkey.o keydb.o keyring.o seskey.o kbnode.o mainproc.o armor.o mdfilter.o textfilter.o progress.o misc.o rmd160.o openfile.o keyid.o parse-packet.o cpr.o plaintext.o sig-check.o keylist.o pkglue.o ecdh.o pkclist.o skclist.o pubkey-enc.o passphrase.o decrypt.o decrypt-data.o cipher.o encrypt.o sign.o verify.o revoke.o dearmor.o import.o export.o migrate.o delkey.o keygen.o helptext.o keyserver.o call-dirmngr.o photoid.o call-agent.o trust.o trustdb.o tdbdump.o tdbio.o tofu.o gpgsql.o sqrtu32.o card-util.o exec.o ../kbx/libkeybox.a ../common/libcommon.a ../common/libgpgrl.a -lz -lintl   -lsqlite3 -L/usr/local/lib -lgcrypt -lgpg-error -lreadline -L/usr/local/lib -lassuan -lgpg-error -L/usr/local/lib -lgpg-error -liconv
/usr/local/lib/libgpg-error.a(libgpg_error_la-strsource.o): In function `_gpg_strsource':
/cygdrive/c/Users/CMCDragonkai/.src/libgpg-error-1.27/src/strsource.c:36: undefined reference to `libintl_dgettext'
/cygdrive/c/Users/CMCDragonkai/.src/libgpg-error-1.27/src/strsource.c:36:(.text+0x40): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `libintl_dgettext'
/usr/local/lib/libgpg-error.a(libgpg_error_la-strerror.o): In function `_gpg_strerror_r':
/cygdrive/c/Users/CMCDragonkai/.src/libgpg-error-1.27/src/strerror.c:161: undefined reference to `libintl_dgettext'
/cygdrive/c/Users/CMCDragonkai/.src/libgpg-error-1.27/src/strerror.c:161:(.text+0x3f8): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `libintl_dgettext'
/usr/local/lib/libgpg-error.a(libgpg_error_la-strerror.o): In function `_gpg_strerror':
/cygdrive/c/Users/CMCDragonkai/.src/libgpg-error-1.27/src/strerror.c:50: undefined reference to `libintl_dgettext'
/cygdrive/c/Users/CMCDragonkai/.src/libgpg-error-1.27/src/strerror.c:50:(.text+0x129): relocation truncated to fit: R_X86_64_PC32 against undefined symbol `libintl_dgettext'
collect2: error: ld returned 1 exit status
make[2]: *** [Makefile:770: gpg.exe] Error 1
make[2]: Leaving directory '/cygdrive/c/Users/CMCDragonkai/.src/gnupg-2.1.20/g10'
make[1]: *** [Makefile:580: all-recursive] Error 1
make[1]: Leaving directory '/cygdrive/c/Users/CMCDragonkai/.src/gnupg-2.1.20'
make: *** [Makefile:499: all] Error 2

```

Perhaps Cygwin's libintl is too old?

This is the current version of libintl libraries in Cygwin:

  • gettext-devel-0.19.8.1-1 - gettext-devel: GNU Internationalization development utilities (installed binaries and support files)
  • gettext-devel-0.19.8.1-2 - gettext-devel: GNU Internationalization development utilities (installed binaries and support files)
  • libintl-devel-0.19.8.1-1 - libintl-devel: GNU Internationalization runtime library (installed binaries and support files)
  • libintl-devel-0.19.8.1-2 - libintl-devel: GNU Internationalization runtime library (installed binaries and support files)
  • libintl8-0.19.8.1-1 - libintl8: GNU Internationalization runtime library (installed binaries and support files)
  • libintl8-0.19.8.1-2 - libintl8: GNU Internationalization runtime library (installed binaries and support files)

Thanks,

Roger

On 14/05/2017 1:47 AM, Jussi Kivilinna wrote:
Hello,

On 11.05.2017 12:26, Roger Qiu wrote:
Hi Gcrypt devs,

I just tried compiling from source libgcrypt 1.7.5 (and I also tried earlier versions).

It always comes to this:

```

libtool: link: ranlib .libs/libgcrypt.alibtool: link: rm -fr .libs/libgcrypt.laxlibtool: link: ( cd ".libs" && rm -f "libgcrypt.la" && ln -s "../libgcrypt.la" "libgcrypt.la" )gcc -DHAVE_CONFIG_H -I. -I..    -I/usr/local/include -g -O2 -Wall -MT mpicalc-mpicalc.o -MD -MP -MF .deps/mpicalc-mpicalc.Tpo -c -o mpicalc-mpicalc.o `test -f 'mpicalc.c' || echo './'`mpicalc.cmv -f .deps/mpicalc-mpicalc.Tpo .deps/mpicalc-mpicalc.Po/bin/sh ../libtool  --tag=CC   --mode=link gcc -I/usr/local/include -g -O2 -Wall   -o mpicalc.exe mpicalc-mpicalc.o libgcrypt.la  -L/usr/local/lib -lgpg-errorlibtool: link: gcc -I/usr/local/include -g -O2 -Wall -o .libs/mpicalc.exe mpicalc-mpicalc.o  ./.libs/libgcrypt.a -L/usr/local/lib /usr/local/lib/libgpg-error.a -lintl./.libs/libgcrypt.a(rijndael.o): In function `do_encrypt':/cygdrive/c/Users/CMCDragonkai/.src/libgcrypt-1.7.5/cipher/rijndael.c:747:(.text+0x9f): relocation truncated to fit: R_X86_64_32S against `.rdata'./.libs/libgcrypt.a(rijndael.o): In
function `do_decrypt':/cygdrive/c/Users/CMCDragonkai/.src/libgcrypt-1.7.5/cipher/rijndael.c:1130:(.text+0x110): relocation truncated to fit: R_X86_64_32S against `.rdata'./.libs/libgcrypt.a(cast5-amd64.o):/cygdrive/c/Users/CMCDragonkai/.src/libgcrypt-1.7.5/cipher/cast5-amd64.S:201:(.text+0x9): relocation truncated to fit: R_X86_64_32S against symbol `_gcry_cast5_s1to4' defined in .rdata section in ./.libs/libgcrypt.a(cast5.o)./.libs/libgcrypt.a(cast5-amd64.o):/cygdrive/c/Users/CMCDragonkai/.src/libgcrypt-1.7.5/cipher/cast5-amd64.S:241:(.text+0x429): relocation truncated to fit: R_X86_64_32S against symbol `_gcry_cast5_s1to4' defined in .rdata section in ./.libs/libgcrypt.a(cast5.o)./.libs/libgcrypt.a(cast5-amd64.o):/cygdrive/c/Users/CMCDragonkai/.src/libgcrypt-1.7.5/cipher/cast5-amd64.S:376:(.text+0x844): relocation truncated to fit: R_X86_64_32S against symbol `_gcry_cast5_s1to4' defined in .rdata section in
./.libs/libgcrypt.a(cast5.o)./.libs/libgcrypt.a(cast5-amd64.o):/cygdrive/c/Users/CMCDragonkai/.src/libgcrypt-1.7.5/cipher/cast5-amd64.S:404:(.text+0x177c): relocation truncated to fit: R_X86_64_32S against symbol `_gcry_cast5_s1to4' defined in .rdata section in ./.libs/libgcrypt.a(cast5.o)collect2: error: ld returned 1 exit statusmake[2]: *** [Makefile:712: mpicalc.exe] Error 1make[2]: Leaving directory '/cygdrive/c/Users/CMCDragonkai/.src/libgcrypt-1.7.5/src'make[1]: *** [Makefile:477: all-recursive] Error 1make[1]: Leaving directory '/cygdrive/c/Users/CMCDragonkai/.src/libgcrypt-1.7.5'make: *** [Makefile:408: all] Error 2

```

Please cc me as I am not subscribed to the mailing list.

All other dependencies of gnupg works on cygwin 64 bit, this is the only one that fails, and thus prevents building gpg2 on Cygwin 64 bit.
Does attached patch solve the problem? Patch is made on top of libgcrypt development branch, but I think it should apply to 1.7.5 too.

-Jussi


-- 
Founder of Matrix AI
https://matrix.ai/
+61420925975

_______________________________________________
Gnupg-users mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-users
Reply | Threaded
Open this post in threaded view
|

Re: Compilation of libgcrypt 1.7.5 on cygwin 64 bit fails

Werner Koch
In reply to this post by Roger Qiu
On Thu, 11 May 2017 11:26, [hidden email] said:

> All other dependencies of gnupg works on cygwin 64 bit, this is the
> only one that fails, and thus prevents building gpg2 on Cygwin 64 bit.

You will not be able to build a working GnUPG for 64 bit Windows - if
that is what Cygwin 64 bit is about.  The reason for this is that we
coerce a HANDLE (64 bit) into an int (32 bit on 64 bit Windows) at
several places.


Salam-Shalom,

   Werner

--
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

_______________________________________________
Gnupg-users mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-users

attachment0 (233 bytes) Download Attachment