Patches to enable cocotron build with llvm/clang and libobjc2/libBlocksRuntime under linux.

94 views
Skip to first unread message

cja...@gmail.com

unread,
Jul 28, 2015, 7:18:01 AM7/28/15
to Cocotron Developers
Hi, here contains some patches to build cocotron under linux with llvm/clang and libobjc2/libBlocksRuntime.

https://github.com/cjacker/cocotron-linux

It's not tested with the libobjc runtime shipped by gcc, I already dropped it many years ago.

1, install llvm/clang, libobjc2 and libBlocksRuntime.

llvm/clang : http://www.llvm.org
libBlocksRuntime : https://github.com/mheily/blocks-runtime/releases/download/v0.4.1/libblocksruntime-0.4.1.tar.gz
libobjc2 : https://github.com/gnustep/libobjc2/archive/v1.8.tar.gz

2, get cocotron codes:
git clone https://github.com/cjwl/cocotron.git

3,apply all pacthes with "-p1"

4, build
"cd makefiles;make"
For users, run "make install", it will:

install libFoundation.so to /usr/lib
install headers to /usr/include/cocotron
install plist resources to /usr/share/cocotron
install pkgconfig file to /usr/lib/pkgconfig

For Packagers, run "make install DESTDIR=<your root>".

Christopher Lloyd

unread,
Jul 28, 2015, 9:50:19 PM7/28/15
to Cocotron Developers, cja...@gmail.com, cja...@gmail.com
Hi, thanks, I'll take a look at it.

The patches are fine, but if you want to participate in ongoing dev, creating a fork and doing pull requests and/or just maintaining a fork would be more optimal. 

I am curious about the revert of autorelease pool and exception behavior, these are needed forward for ARC support. I guess libobjc2 doesn't have equivalents? Maybe we need a companion objc runtime for it. This piece of the patch can't go in as-is, it'll have to be reworked. If you do it great, if not I'll put it on my plate.

Thanks again!
Chris

cja...@gmail.com

unread,
Jul 29, 2015, 12:41:39 AM7/29/15
to Cocotron Developers, cjwl...@gmail.com
Last time I build cocotron is 20140703 hg. I noticed recent git master(20150727) have a complete private objc runtime implementation and seems a lot of functions had been moved to the private objc runtime.

The gnustep libobjc2-1.8 have arc/exception support, but can not match API needed by cocotron. so I temporarily backport some codes from 20140703 hg and make it compiled.

I also tried to compile the private objc runtime shipped by cocotron and un-define GNU_RUNTIME_3 macro, built but segfault when running.(x86_64/linux)


Later, I will tried to:
1, use libobjc2 API instead of backporting some functions.
OR.
2, make private objc runtime work.


在 2015年7月29日星期三 UTC上午1:50:19,Christopher Lloyd写道:
Reply all
Reply to author
Forward
0 new messages