Am looking for confirmation of what should be working and what build flags to use to make this work.
On a Debian-based Linux system, Ubuntu 64-bit 12.04 or 12.10, using trunk from libobjc2, for Objective-C code to use Clang's -fobjc-arc that also wants to link with the libdispatch library,
what is the recommended set of flags for building libdispatch and for building the code itself?
What I've tried so far hasn't worked but rather than clutter this first post with all my attempts and the compiler error and later the execution
failure, I thought it worth checking that I am starting with the proper base. I have found nothing online about using libdispatch with automatic reference counting on Linux. Both are
such powerful tools I was surprised not to find this all spelled out already so I wonder if it just works for others or if no one else has tried.
For the build of libdispatch, I followed this recipe:
cd libdispatch-src
sh autogen.sh
./configure CFLAGS="-I/usr/include/kqueue" LDFLAGS="-lkqueue -lpthread_workqueue -pthread -lm"
make
sudo -E make install
sudo ldconfig
And to build the Objective-C source with GNUstep's libobjc2 runtime library, I used these flags.
clang testfile.m `gnustep-config --objc-flags` `gnustep-config --objc-libs` -fobjc-runtime=gnustep-1.7 -fblocks -lobjc -ldispatch -lgnustep-base
If noone has any suggestion for a different build approach, I will attach the compile error I ran into and then the runtime error that is left to figure out.
Thank you,
-Frank