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

Fix universal builds of libgcrypt #18345

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
6 participants

xnyhps commented Mar 8, 2013

https://trac.macports.org/ticket/20866 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.
746009f
Contributor

jacknagel commented Mar 8, 2013

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

Contributor

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: https://gist.github.com/xnyhps/5130255. 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.

Contributor

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.

Contributor

adamv commented May 15, 2013

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

Contributor

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.

Contributor

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.

Owner

MikeMcQuaid commented Jun 12, 2013

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

Contributor

samueljohn commented Jun 12, 2013

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

Contributor

adamv commented Aug 23, 2013

Contributor

adamv commented Oct 1, 2013

MacPorts switched to an alternate fix in: https://trac.macports.org/browser/trunk/dports/devel/libgcrypt/Portfile?rev=91558

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.
34f45f8

@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.
cc9c373

@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.