[Gc] compiling gc-7.2alpha2 or a4

Marcos_David.Dione at sophia.inria.fr Marcos_David.Dione at sophia.inria.fr
Tue Dec 8 02:40:50 PST 2009


On Mon, December 7, 2009 8:00 pm, Ivan Maidanski wrote:
> Marcos_David.Dione at sophia.inria.fr wrote:
>>     so my first conclusion is that -DLINUX and -DPLATFORM_ANDROID are
>> not
>> meant to be mixed. I just took this idea from gcconfig.h, around line
>> 1839 where you can read:
>>
>> [...]
>> #   ifdef LINUX
>> [...]
>> #       ifdef __ELF__
>> [...]
>> #            if defined(__GLIBC__) && __GLIBC__ >= 2 \
>>                 || defined(PLATFORM_ANDROID)
>> #                define SEARCH_FOR_DATA_START
>> [...]
>
> This was my idea to add this android-specific code (the code really looks
> the same as in mono).

    can you please point me to the mono code you mention? also, do you
know against which version of the android platform (1.0, 1.5 cupcake,
1.6, 2.0) did they compiled against? I forgot to mention it, but I'm
trying 1.5 cupcake here.

> I don't remember whether I compiled GC for the target (most probably not),
> I has very little experience with compiling C for NDK (and even less
> linking one which I found a bit complicated compared to other embedded
> toolkits). (I also found&reported a missing proto in a clib header but
> this was unrelated to GC.)

    hmm, koushik dutta[1] seems to have exploited mono's ability to
produce java code, because he uses the NDK for the port.

>>     but later around line 1869:
>>
>> [...]
>> #   ifdef PLATFORM_ANDROID
>> #        define SEARCH_FOR_DATA_START
>> #     undef NOSYS
>> #   endif
>> [...]
>
> This absent in the GC CVS (probably, you refer to Mono code, right?)

    I also forgot to mention which version of gc I'm using: it's
gc-7.2alpha4. and no, this is gc's code.

>>     this clearly means that JMP_BUF is not defined.
>
> You could also try to guard that error place with ifndef JMP_BUF if
> [sig]jmp_buf is not refered from another place (but, of course, successful
> compilation doesn't mean it would work).

    I don't think that would work (but I will try), because the code goes:

[...] line 2156
/* Do we need the GC_find_limit machinery to find the end of a  */
/* data segment.                                                */
# if defined(HEURISTIC2) || defined(SEARCH_FOR_DATA_START)
#   define NEED_FIND_LIMIT
# endif
[...] line 2188
# if defined(NEED_FIND_LIMIT) || \
     defined(USE_PROC_FOR_LIBRARIES) && defined(THREADS)
JMP_BUF GC_jmp_buf;

> IMHO, you'd probably try to
> build/run a test without -ldl first (as Hans suggested above).

    you mean, compiling statically?

--
[1] http://github.com/koush/androidmono
-- 
Lic. Marcos Dione
Engineer Expert - Hop Project
http://hop.inria.fr/
INRIA Sophia Antipolis - Méditerranée
Phone: +33 (0)4 92 38 79 67


More information about the Gc mailing list