Closed GoogleCodeExporter closed 9 years ago
I am not a C programmer, but here is a temporary fix I came up with to compile
Redis
on Mac OS X 10.5 (PPC). I am not saying this is the best way to patch this
problem, but
it will do for now.
Original comment by jcout...@gmail.com
on 8 Dec 2009 at 11:16
Attachments:
I was also experiencing this problem when trying to install Redis 1.2.1 from
MacPorts on a PowerMac G5
running Mac OS X 10.5.8. Thankfully a solution (involving a one-line change to
redis.c) exists:
http://trac.macports.org/ticket/20295#comment:9
Original comment by arto.ben...@gmail.com
on 5 Feb 2010 at 3:19
the fix from arto.bendiken seems to work for me, mac mini, PowerPC G4, Mac OS X
10.5 (Leopard)
Original comment by nunog...@gmail.com
on 13 Mar 2010 at 9:12
The underlying problem is that redis.c is mucking around with the thread
context and CPU registers, which of course is CPU-specific. Here is the fix
for redis-2.0.0-rc4:
1. edit redis.c
2. go to line 10838.
3. Change the "#else" to "#elsif defined (__i386__)"
4. Below line 10839 add the following:
#else
return (void*) uc->uc_mcontext->__ss.__srr0;
The final version should look like this:
#if defined(_STRUCT_X86_THREAD_STATE64) && !defined(__i386__)
return (void*) uc->uc_mcontext->__ss.__rip;
#elif defined (__i386__)
return (void*) uc->uc_mcontext->__ss.__eip;
#else
return (void*) uc->uc_mcontext->__ss.__srr0;
#endif
You should now be able to compile with the following command:
CFLAGS='-mmacosx-version-min=10.5 -arch i386 -arch x86_64 -arch ppc -sysroot=/Developer/SDKs/MacOSX10.5.sdk' make
Original comment by paho...@gmail.com
on 2 Aug 2010 at 3:14
Attaching a diff based on comment 4.
Original comment by joshua.r...@gmail.com
on 12 Nov 2010 at 5:00
Attachments:
I've successfully compiled with this patch and
make OBJARCH="-arch ppc" ARCH="-arch ppc"
Original comment by ktoka...@smartlabs.tv
on 31 Aug 2011 at 8:55
Thanks for the patch, finally applied.
Original comment by anti...@gmail.com
on 20 Sep 2011 at 9:00
Original issue reported on code.google.com by
jcout...@gmail.com
on 5 Dec 2009 at 8:59