Open jfqd opened 14 years ago
Hmmm. We build this gem successfully on amd64 machines all the time. Are you passing any special compile flags?
No, installation was done only by a regular gem install. Maybe it is distribution specific. We are using Nexenta NCP 3.0.1 - an OpenSolaris distro with Ubuntu userland.
Ok, I don't have that distro readily available to test changes. How do you propose we modify the code so it works on all systems?
Think, the best would be to test if libmemcached.a is under "#{HERE}/lib" or under "#{HERE}/lib/amd64" before the copy.
The changes introduced in SHA: aa8fcc2eb40b4360a1a8ce948b97162df644f84f break the build on OS X, as the existence of 'lib/libmemcached.so' is assumed; this file is called libmemcached.dylib on OS X, however. Suggested fix: The extconf.rb srcipt should check whether the .so, .dylib or .dll file exists, copy the appropriate file and raise an exception if no library was found (otherwise, the installation fails during make, not extconf)).
@chrisjwu, is this related to the issue you were seeing?
— Sent from Mailbox for iPad
On Mon, Nov 18, 2013 at 10:11 AM, Benedikt Huber notifications@github.com wrote:
The changes introduced in SHA: aa8fcc2eb40b4360a1a8ce948b97162df644f84f break the build on OS X, as the existence of 'lib/libmemcached.so' is assumed; this file is called libmemcached.dylib on OS X, however.
Suggested fix: The extconf.rb srcipt should check whether the .so, .dylib or .dll file exists, copy the appropriate file and raise an exception if no library was found (otherwise, the installation fails during make, not extconf)).
Reply to this email directly or view it on GitHub: https://github.com/ninjudd/memcache/issues/5#issuecomment-28722729
Ya, that actually fixes the problem, I just changed the two references to libmemcached.so to libmemcached.dylib in the ext/extconf.rb and it builds.
Thanks!
On Nov 19, 2013, at 8:13 PM, Justin Balthrop notifications@github.com wrote:
@chrisjwu, is this related to the issue you were seeing?
— Sent from Mailbox for iPad
On Mon, Nov 18, 2013 at 10:11 AM, Benedikt Huber notifications@github.com wrote:
The changes introduced in SHA: aa8fcc2eb40b4360a1a8ce948b97162df644f84f break the build on OS X, as the existence of 'lib/libmemcached.so' is assumed; this file is called libmemcached.dylib on OS X, however.
Suggested fix: The extconf.rb srcipt should check whether the .so, .dylib or .dll file exists, copy the appropriate file and raise an exception if no library was found (otherwise, the installation fails during make, not extconf)).
Reply to this email directly or view it on GitHub: https://github.com/ninjudd/memcache/issues/5#issuecomment-28722729 — Reply to this email directly or view it on GitHub.
Cool. Do you mind submitting a patch?
On Wed, Nov 20, 2013 at 11:48 AM, chrisjwu notifications@github.com wrote:
Ya, that actually fixes the problem, I just changed the two references to libmemcached.so to libmemcached.dylib in the ext/extconf.rb and it builds. Thanks! On Nov 19, 2013, at 8:13 PM, Justin Balthrop notifications@github.com wrote:
@chrisjwu, is this related to the issue you were seeing?
— Sent from Mailbox for iPad
On Mon, Nov 18, 2013 at 10:11 AM, Benedikt Huber notifications@github.com wrote:
The changes introduced in SHA: aa8fcc2eb40b4360a1a8ce948b97162df644f84f break the build on OS X, as the existence of 'lib/libmemcached.so' is assumed; this file is called libmemcached.dylib on OS X, however.
Suggested fix: The extconf.rb srcipt should check whether the .so, .dylib or .dll file exists, copy the appropriate file and raise an exception if no library was found (otherwise, the installation fails during make, not extconf)).
Reply to this email directly or view it on GitHub: https://github.com/ninjudd/memcache/issues/5#issuecomment-28722729 — Reply to this email directly or view it on GitHub.
Reply to this email directly or view it on GitHub: https://github.com/ninjudd/memcache/issues/5#issuecomment-28923240
I can do that, are you worried about it breaking on other distro's now though?
On Nov 20, 2013, at 12:36 PM, Justin Balthrop notifications@github.com wrote:
Cool. Do you mind submitting a patch?
On Wed, Nov 20, 2013 at 11:48 AM, chrisjwu notifications@github.com wrote:
Ya, that actually fixes the problem, I just changed the two references to libmemcached.so to libmemcached.dylib in the ext/extconf.rb and it builds. Thanks! On Nov 19, 2013, at 8:13 PM, Justin Balthrop notifications@github.com wrote:
@chrisjwu, is this related to the issue you were seeing?
— Sent from Mailbox for iPad
On Mon, Nov 18, 2013 at 10:11 AM, Benedikt Huber notifications@github.com wrote:
The changes introduced in SHA: aa8fcc2eb40b4360a1a8ce948b97162df644f84f break the build on OS X, as the existence of 'lib/libmemcached.so' is assumed; this file is called libmemcached.dylib on OS X, however.
Suggested fix: The extconf.rb srcipt should check whether the .so, .dylib or .dll file exists, copy the appropriate file and raise an exception if no library was found (otherwise, the installation fails during make, not extconf)).
Reply to this email directly or view it on GitHub: https://github.com/ninjudd/memcache/issues/5#issuecomment-28722729 — Reply to this email directly or view it on GitHub.
Reply to this email directly or view it on GitHub: https://github.com/ninjudd/memcache/issues/5#issuecomment-28923240 — Reply to this email directly or view it on GitHub.
The simplest fix is to add another elsif clause that checks whether libmemcached.dylib exists; this way, non OS X platforms are not affected for sure. I'd also suggest to raise an exception if the neither libmemcached.dylib nor libmemcached.so can be found. My fix is for this problem is here: https://github.com/visq/memcache/commit/2b32d0262c10e2b3d79a620f62f89070a329ca22
There is a problem building the native part of the gem on a 64bit machine, because the path of the build library is different ;-)
The code to fix is on line 45 in the extconf.rb file:
The path for the library on 64bit is: "#{HERE}/lib/amd64". So if the amd64 folder is available the copy should incorporate it.