libgcrypt 1.6.0 incorrectly determines CPU on PowerPC Mac
Closed, ResolvedPublic

Description

On PowerPC Darwin, libgcrypt incorrectly determines the CPU type and the build
fails when trying to compile an x86 module.

This problem stems from config.links, and seems to have been introduced between
1.5.3 and 1.6.0.

In 1.5 config.links was only governing the MPI ASM to use. PowerPC Darwin and
certain versions of x86 OpenBSD were both unsupported, so they were grouped
together like so:

case "${host}" in

    powerpc-apple-darwin*          | \
    i[34567]86*-*-openbsd[12]*     | \
    i[34567]86*-*-openbsd3.[0123]*)
       echo '/* No working assembler modules available */' >>./mpi/asm-syntax.h
       path=""
       ;;

In 1.6, CPU type detection was added to config.links. In what looks like an
oversight the grouping wasn't redone, and "x86" was set as the CPU architecture
for this group, presumably due to the OpenBSD entries:

case "${host}" in

    powerpc-apple-darwin*          | \
    i[34567]86*-*-openbsd[12]*     | \
    i[34567]86*-*-openbsd3.[0123]*)
       echo '/* No working assembler modules available */' >>./mpi/asm-syntax.h
       path=""
       mpi_cpu_arch="x86"
       ;;

As a result, it tries to build an x86 module and fails. Build logs are provided
in the linked issue at the Tigerbrew package manager, where this was first
reported. This has been tested and confirmed on Mac OS X 10.4 and 10.5 PowerPC.

A proposed patch for this is attached, which separates powerpc-apple-darwin*
into its own case. This patch has been tested on Mac OS X 10.4 PowerPC and
allows the build to succeed.

Details

Related Objects

Misty set External Link to https://github.com/mistydemeo/tigerbrew/issues/171.Feb 8 2014, 11:39 PM
Misty set Version to 1.6.0.
Misty added projects: libgcrypt, Bug Report.
Misty added a subscriber: Misty.
Misty changed Version from 1.6.0 to 1.6.1.Mar 18 2014, 6:38 PM

Issue also occurs in 1.6.1.

werner added a subscriber: werner.

Thanks for that good description. Fixes pushed to master and 1.6. I can't test
it, though.

werner closed this task as Resolved.Dec 19 2014, 8:49 AM
werner claimed this task.
werner removed a project: Testing.

Released with 1.6.2. on August 21.