This repository has been archived by the owner. It is now read-only.

Fix universal builds of libgcrypt #18345

wants to merge 1 commit into


None yet
6 participants

xnyhps commented Mar 8, 2013 also applies to homebrew. ./configure always sets SIZEOF_UNSIGNED_LONG to 8, while it should be 8 on x86_64 and 4 on i386. This leads to hangs and crashes when trying to use libgcrypt on 32-bit Macs.

@xnyhps xnyhps Fix universal builds of libgcrypt.
SIZEOF_UNSIGNED_LONG was incorrectly set to 8 on i386, use a patch from
macports to make it depend on arch.

jacknagel commented Mar 8, 2013

That ticket is 4 years old. Has this been reported upstream?


jacknagel commented Mar 8, 2013

As far as I can tell, macports doesn't even apply that ed script anymore...

xnyhps commented Mar 10, 2013

Afaict, MacPorts' build process (currently?) runs the configure step into two separate directories, once for i386 and once for x86_64. That would make the patch unnecessary for them.

I have a test case I was using which I've copied here: Without the ed patch to the generated config.h, the second invocation of test hangs forever.

I wasn't able to find a real bugtracker for libgcrypt, only a mailing list where my search turned up nothing.


jacknagel commented Mar 10, 2013

Our usual response is "please report this upstream". We're happy to carry patches so long as upstream is aware of the issue and hopefully weighing a fix. Otherwise we end up like MacPorts, carrying the same patches for years and years.


adamv commented May 15, 2013

Can we get a test that demonstrates the breakage and that the fix fixes it?


garthk commented Jun 12, 2013

Jack, I'm concerned that leaving "please report this upstream" to the users in all cases will leave you with a different but equally toxic problem: an ever-increasing number of broken packages.


jacknagel commented Jun 12, 2013

We consider it reasonable to have bugs reported upstream before applying patches for them. It's worked out pretty well so far.


MikeMcQuaid commented Jun 12, 2013

Unfortunately if we were to report all bugs upstream ourselves we'd never get time to work on Homebrew.


samueljohn commented Jun 12, 2013

Most upstream devs are aware of the weight homebrew has now and are willing to fix quickly.


adamv commented Aug 23, 2013


adamv commented Oct 1, 2013

MacPorts switched to an alternate fix in:

It now fills in the proper ${os.arch}-apple-darwin${os.major} instead of editing the .h file after the fact.

@jacknagel jacknagel closed this in 6ee2f27 Nov 12, 2013

@yriveiro yriveiro added a commit to yriveiro/homebrew that referenced this pull request Nov 26, 2013

@jacknagel @yriveiro jacknagel + yriveiro libgcrypt: fix universal builds
Closes #18345.

@ehershey ehershey added a commit to ehershey/homebrew that referenced this pull request Apr 4, 2014

@jacknagel @ehershey jacknagel + ehershey libgcrypt: fix universal builds
Closes #18345.

@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.