[ruby] thrift gem 이슈 - shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
Ruby 2016. 8. 17. 12:09OS El Capitan(10.11.6)에서 Xcode 7.3.1를 설치한 후, ruby thrift 모듈이 컴파일이 실패했다.
$ sudo gem install thrift
compiling compact_protocol.c
compact_protocol.c:442:41: error: shifting a negative signed value is undefined [-Werror,-Wshift-negative-value]
rb_exc_raise(get_protocol_exception(INT2FIX(-1), rb_str_new2(but)));
....
xcode 설치 디렉토리 정보는 다음과 같다. (뒷 부분에서 바꾼다).
$xcode-select -p
/Applications/Xcode.app/Contents/Developer
https://developer.apple.com/download/more/ 에 접속하고, 로그인 한 후,
Command Line Tools OS X 10.11 for Xcode 7.2 설치 파일을 다운받고 설치한다.
OS X 10.11 for Xcode 7.2의 커맨드 라인의 위치를 변경한다.
$ sudo xcode-select -s /Library/Developer/CommandLineTools/
바뀐 xcode 커맨드 라인을 확인한다.
$ xcode-select -p
/Library/Developer/CommandLineTools
$ gem install thrift 를 실행한다.
더 이상 shifting a negative signed value is undefined [-Werror,-Wshift-negative-value] 에러는 발생하지 않는다.
'Ruby' 카테고리의 다른 글
[ruby] difference, union, intersection (0) | 2016.08.17 |
---|---|
[ruby] 타입(type) 알기 (0) | 2016.08.17 |
[ruby] ruby에서 현재 디렉토리 얻기 (0) | 2016.08.16 |
[ruby] enumeration의 inject (0) | 2016.08.12 |
[ruby] bundle에서 모듈설치시 You have to install development tools first. 에러 해결하기 (0) | 2016.01.13 |