Ubuntu, Emacs 24.4 compile


1) 의존성 패키지 설치
$ sudo apt-get build-dep emacs24

2) emacs 24.4 설치

2-1) 압축을 풀고

2-2)
$ ./configure —prefix=/usr
$ make
$ sudo make install

– 끝 –

Resolved, TextMate 2, ‘gem_original_require’ : no such file to load — json (LoadError)


아래 내용은 참고 사항입니다.


[62/293] Generate ‘/Users/x/build/Te...extMate/about/Contributions.html’…
FAILED: bin/gen_html > /Users/x/build/TextMate/Applications/TextMate/about/Contributions.html~ -h Applications/TextMate/templates/header.html -f Applications/TextMate/templates/footer.html Applications/TextMate/about/Contributions.md Applications/TextMate/references.md && mv /Users/x/build/TextMate/Applications/TextMate/about/Contributions.html~ /Users/x/build/TextMate/Applications/TextMate/about/Contributions.html
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': no such file to load -- json (LoadError)
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from ./bin/gen_credits.rb:18
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require'
from /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/rubygems/custom_require.rb:31:in `require'
from (erb):11
from bin/gen_html:104
from bin/gen_html:104:in `open'
from bin/gen_html:104
[62/293] Copy ‘"Frameworks/OakTextVi...esources/Bookmark Hover Add.pdf"’…
ninja: build stopped: subcommand failed.

저는 MacPorts 를 사용하기 때문에 ruby에 필요한 것들을 port로 설치하고
Ruby.framework의 ruby 실행 파일을 port 의 ruby 후 위 에러가 해결되었습니다.


xcave@x% cd /System/Library/Frameworks/Ruby.framework/Versions/Current/usr/bin
xcave@x% ls -al
total 64
drwxr-xr-x 10 root wheel 340 11 16 06:09 ./
drwxr-xr-x 5 root wheel 170 9 7 22:44 ../
lrwxr-xr-x 1 root wheel 18 11 16 06:08 erb@ -> /opt/local/bin/erb
lrwxr-xr-x 1 root wheel 18 11 16 06:08 gem@ -> /opt/local/bin/gem
lrwxr-xr-x 1 root wheel 18 11 16 06:08 irb@ -> /opt/local/bin/irb
lrwxr-xr-x 1 root wheel 19 11 16 06:08 rake@ -> /opt/local/bin/rake
lrwxr-xr-x 1 root wheel 19 11 16 06:08 rdoc@ -> /opt/local/bin/rdoc
lrwxr-xr-x 1 root wheel 17 11 16 06:08 ri@ -> /opt/local/bin/ri
lrwxr-xr-x 1 root wheel 19 11 16 06:09 ruby@ -> /opt/local/bin/ruby
lrwxr-xr-x 1 root wheel 21 11 16 06:09 testrb@ -> /opt/local/bin/testrb

iPhone SDK 3.0, may not respond to ‘-className’


iPhone SDK 3.0 에서 className 메소드를 왜 없앴는지 모르겠다.
Device vs. Simulator 블로그에서 메소드를 추가 하는 방법을 소개하고 있다.
난 className 메소드를 많이 사용하지 않으므로 부분 처리를 했다.

기존 코드 :

if ([[aSession className] isEqualToString:@”TTSession”])

수정 안 #1 :

if ([[NSString stringWithUTF8String:(const char *)class_getName(aSession)] isEqualToString:@”TTSession”])

수정 안 #2 :

if ([NSStringFromClass([aSession class]) isEqualToString:@”TTSession”])

– 끝 –

“void value not ignored as it ought to be.” – gcc said –


GTEST(Google test framwork)의 ASSERT_* 을 사용하다
“void value not ignored as it ought to be.” 에러를 만났다.

보니 함수의 리턴값이 void 가 아닌곳에서 void 리턴값을 갖는 것을 사용하면 에러가 나는것 같다.

예를들어,
int test()
{
ASSERT_TRUE( true);
}
이렇게 하면 컴파일에서 에러가 발생한다.

http://code.google.com/p/googletest/wiki/GoogleTestFAQ#My_compiler_complains_”void_value_not_ignored_as_it_ought_t

Q : My compiler complains “void value not ignored as it ought to be.” What does this mean? 

A : You’re probably using an ASSERT_*() in a function that doesn’t return void. ASSERT_*() can only be used in void functions.

ASSERT_TRUE() 를 EXPECT_TRUE() 로 바꾸니 에러가 나지 않았다.

ASSERT_*와 EXPECT_* 와 차이점 – 간단히 조건이 틀리면 함수를 종료하냐 계속하냐의 차이다.

Remember, when they fail, ASSERT_* yields a fatal failure and returns from the current function, while EXPECT_* yields a nonfatal failure, allowing the function to continue running. In either case, an assertion failure means its containing test fails.