Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined symbol: pthread_key_create #9

Closed
trak3r opened this issue Oct 24, 2011 · 2 comments
Closed

undefined symbol: pthread_key_create #9

trak3r opened this issue Oct 24, 2011 · 2 comments

Comments

@trak3r
Copy link

trak3r commented Oct 24, 2011

zookeeper-0.4.4/lib/zookeeper_c.so: undefined symbol: pthread_key_create

working fine on OSX but throwing this error on CentOS.

will post more info as i dig through it.

@trak3r
Copy link
Author

trak3r commented Oct 24, 2011

this looks to have cleared it up for this one case:

$ git diff vendor/gems/zookeeper-0.4.4/
diff --git a/vendor/gems/zookeeper-0.4.4/ext/extconf.rb b/vendor/gems/zookeeper-0.4.4/ext/extconf.rb
index db4226e..62957dd 100644
--- a/vendor/gems/zookeeper-0.4.4/ext/extconf.rb
+++ b/vendor/gems/zookeeper-0.4.4/ext/extconf.rb
@@ -20,8 +20,8 @@ end

$includes = " -I#{HERE}/include"
$libraries = " -L#{HERE}/lib -L#{RbConfig::CONFIG['libdir']}"
-$CFLAGS = "#{$includes} #{$libraries} #{$CFLAGS}"
-$LDFLAGS = "#{$libraries} #{$LDFLAGS}"
+$CFLAGS = "-pthread #{$includes} #{$libraries} #{$CFLAGS}"
+$LDFLAGS = "-lpthread #{$libraries} #{$LDFLAGS}"
$LIBPATH = ["#{HERE}/lib"]
$DEFLIBPATH = []

@slyphon
Copy link
Contributor

slyphon commented Oct 28, 2011

I'll have a look at this, thanks for the bug report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants