[Vm-dev] Building StackVM on ARM linux meego-hartmann

Igor Stasenko siguctua at gmail.com
Wed Oct 3 23:51:26 UTC 2012


On 3 October 2012 21:15, Denis Kudriashov <dionisiydk at gmail.com> wrote:
>
> 2012/10/3 Igor Stasenko <siguctua at gmail.com>
>>
>>
>> On 3 October 2012 20:31, Denis Kudriashov <dionisiydk at gmail.com> wrote:
>> >
>> > Ok, I just remove keys from makefilelist. And now I have error no high res clock defined:
>> >
>> > sqLong
>> > ioHighResClock(void)
>> > {
>> >   /* return the value of the high performance counter */
>> >   sqLong value = 0;
>> > #if defined(__GNUC__) && ( defined(i386) || defined(__i386) || defined(__i386__)  \
>> >             || defined(i486) || defined(__i486) || defined (__i486__) \
>> >             || defined(intel) || defined(x86) || defined(i86pc) )
>> >     __asm__ __volatile__ ("rdtsc" : "=A"(value));
>> > #else
>> > # error "no high res clock defined"
>> > #endif
>> >   return value;
>> > }
>> >
>> > I try to just return value here;
>> >
>> bad idea..
>>
>> seems like you get to the place where you need to make your hands
>> dirty implementing some stuff :)
>>
>> But i think this was done before for ARM.
>>
>> I think, Dimitry can help you there, since he were adopted Stack VM
>> for ARM  before:
>>
>> https://gitorious.org/~golubovsky/cogvm/dmg-blessed
>
>
> I will look at it. But now my linking process broken.
> I have too many undefines during linking C executable StackVM which finished with error:
>
>
> 85%] Built target SurfacePlugin
> Linking C executable /cogVM/blessed/results/StackVM
> CMakeFiles/StackVM.dir/cogVM/blessed/src/vm/gcc3x-interp.c.o: In function `markAndTraceInterpreterOops':
> gcc3x-interp.c:(.text+0x6130): undefined reference to `sqLowLevelMFence'
> CMakeFiles/StackVM.dir/cogVM/blessed/src/vm/gcc3x-interp.c.o: In function `primitiveLongRunningPrimitiveSemaphore':
> gcc3x-interp.c:(.text+0x6868): undefined reference to `sqLowLevelMFence'
> CMakeFiles/StackVM.dir/cogVM/blessed/src/vm/gcc3x-interp.c.o: In function `forceInterruptCheck':
> gcc3x-interp.c:(.text+0x68c4): undefined reference to `sqLowLevelMFence'
> CMakeFiles/StackVM.dir/cogVM/blessed/src/vm/gcc3x-interp.c.o: In function `L0mapInterpreterOops':
> gcc3x-interp.c:(.text+0x9a0c): undefined reference to `sqLowLevelMFence'
> gcc3x-interp.c:(.text+0x9a68): undefined reference to `sqLowLevelMFence'
> CMakeFiles/StackVM.dir/cogVM/blessed/src/vm/gcc3x-interp.c.o: In function `interpreterAllocationReserveBytes':
> gcc3x-interp.c:(.text+0xac44): undefined reference to `pow'
> CMakeFiles/StackVM.dir/cogVM/blessed/src/vm/gcc3x-interp.c.o: In function `forceInterruptCheckFromHeartbeat':
> gcc3x-interp.c:(.text+0x10bec): undefined reference to `sqLowLevelMFence'
> CMakeFiles/StackVM.dir/cogVM/blessed/src/vm/gcc3x-interp.c.o: In function `L25assertClassOfiscompactClassIndex':
> gcc3x-interp.c:(.text+0x129e4): undefined reference to `exp'
> CMakeFiles/StackVM.dir/cogVM/blessed/src/vm/gcc3x-interp.c.o: In function `L5
> ...

sqLowLevelMFence() is low-level assembler function used in various atomic
operations.
It is not defined for ARM architecture. Can't help with it.. i know
little about ARM.
But as i told you, Dimitry already dealt with these problems when making VM work
on android platform you should just look and adopt his code.
Search mailing list , you can find pointers.

Btw, iPhone VM also runs on ARM, so the solution which Esteban/John
Macintosh found, should be similar.
I cannot say any more details, because i simply don't know.

> dct.c:(.text+0x2d54): undefined reference to `cos'
> dct.c:(.text+0x2d60): undefined reference to `sin'
> dct.c:(.text+0x2ef8): undefined reference to `sincos'
> collect2: perform ld complete with code 1
> make[2]: *** [/cogVM/blessed/results/StackVM] Ошибка 1
> make[1]: *** [CMakeFiles/StackVM.dir/all] Ошибка 2
> make: *** [all] Ошибка 2
>
no libm on ARM?

-lm


>
> What can be reason? Are undefined's just warnings?
>
> Mariano write about:
>>
>> Then, I have a problem at linking time, “/usr/bin/ld: cannot find -lGL”, which
>
>
> But I dont see any "cannot find -lGL”.
> What this error actualy means?
>

means that you need to find a code which uses that and remove it :)


P.S. and welcome to beautiful world of C :)


-- 
Best regards,
Igor Stasenko.


More information about the Vm-dev mailing list