New Ticket     Tickets     Wiki     Browse Source     Timeline     Roadmap     Ticket Reports     Search

Ticket #20866 (closed defect: fixed)

Opened 7 years ago

Last modified 7 years ago

libgcrypt universal install is subtly broken

Reported by: wiml@… Owned by: sfiera@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: gnutls universal Cc: jmr@…
Port: libgcrypt


Building an i386+x86_64 version of libgcrypt seems to result in a broken libgcrypt. My guess is that either BYTES_PER_MPI_LIMB or SIZEOF_UNSIGNED_LONG is being defined inconsistently between configure and compile.

The result I noticed is that when gnutls is linked against this libgcrypt it fails miserably in 'make check'. The simplest test case is probably gnutls' "mpi" test, which fails because gcry_mpi_scan is broken:

|<9>| MPI: length: 60

You'll notice that the random number isn't very random. Further investigation shows that mpi_read_from_buffer() (an internal libgcrypt function) is being passed a valid random buffer, but is returning an mpi with every other 32 bits omitted, as you see.

Libgcrypt does some screwy stuff in its headers, things like #defining SIZEOF_UNSIGNED_LONG to a constant instead of simply using sizeof(unsigned long), so I guess it's not surprising it doesn't cross-compile properly.

Change History

comment:1 Changed 7 years ago by macsforever2000@…

  • Keywords libgcrypt removed
  • Owner changed from macports-tickets@… to sfiera@…
  • Version 1.8.0 deleted

comment:2 Changed 7 years ago by jmr@…

  • Cc jmr@… added

Does r56608 fix this?

comment:3 Changed 7 years ago by jmr@…

  • Status changed from new to closed
  • Resolution set to fixed

Assuming it's ok now...

Note: See TracTickets for help on using tickets.