taf2 / curb

Ruby bindings for libcurl
Other
1.29k stars 227 forks source link

Do not build on OS X Snow Leopard #12

Closed erikdahlstrand closed 14 years ago

erikdahlstrand commented 14 years ago
$ sudo gem install curb
Building native extensions.  This could take a while...
ERROR: Error installing curb:
ERROR: Failed to build gem native extension.
make
gcc -I. -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin10.0 -I. -DRUBY_EXTCONF_H=\"curb_config.h\"  -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE   -fno-common -arch i386 -arch x86_64 -g -Os -pipe -fno-common -DENABLE_DTRACE  -fno-common  -pipe -fno-common  -I/opt/local/include -Wall  -c curb.c
In file included from /opt/local/include/curl/curl.h:36,
                 from curb.h:12,
                 from curb.c:8:
/opt/local/include/curl/curlrules.h:144: error: size of array ‘__curl_rule_01__’ is negative
/opt/local/include/curl/curlrules.h:154: error: size of array ‘__curl_rule_02__’ is negative
lipo: can't open input file: /var/tmp//ccgPJWIG.out (No such file or directory)
make: *** [curb.o] Error 1

This works:

$ sudo env ARCHFLAGS="-arch x86_64" gem install curb
Building native extensions.  This could take a while...
Successfully installed curb-0.5.4.0
taf2 commented 14 years ago

This is an issue with your installed version of libcurl and ruby not having the same arch. Check to make sure you have installed the 86_64 version of libcurl especially if you're using mac ports... see the FAQ.