dibyendumajumdar / nanojit

NanoJIT is a small, cross-platform C++ library that emits machine code.
Mozilla Public License 2.0
151 stars 16 forks source link

Compilation of nanojit with avmplus generates errors on arm32 linux #12

Closed al-sabr closed 6 years ago

al-sabr commented 6 years ago

Greetings to all!

I was since the last 2 days trying to compile avmplus which incorporates nanojit. I had to modify the configure.py files and use py-cpuinfo to get detailed infos about the cpu and the features supported by the host cpu.

py-cpuinfo : https://github.com/workhorsy/py-cpuinfo avmplus : https://github.com/adobe/avmplus

This is a fork of avmplus on my github repo : https://github.com/gdeverlant/avmplus

Now these are the information concerning the arm32(armv7l) board I'm using to compile natively: more info here : http://www.hardkernel.com/main/products/prdt_info.php?g_code=G141578608433

* Amlogic ARM® Cortex®-A5(ARMv7) 1.5Ghz quad core CPUs 
* Mali™-450 MP2 GPU (OpenGL ES 2.0/1.1 enabled for Linux and Android)
* 1Gbyte DDR3 SDRAM
* Gigabit Ethernet
* 40pin GPIOs
* eMMC4.5 HS200 Flash Storage slot / UHS-1 SDR50 MicroSD Card slot
* USB 2.0 Host x 4, USB OTG x 1,
* Infrared(IR) Receiver

This is the output I get from py-cpuinfo:

{
    "count": 4,
    "hz_advertised": "1.8240 GHz",
    "bits": 32,
    "brand": "ARMv7 Processor rev 1 (v7l)",
    "cpuinfo_version": [
        3,
        3,
        0
    ],
    "hardware": "ODROIDC",
    "raw_arch_string": "armv7l",
    "hz_actual_raw": [
        1824000000,
        0
    ],
    "flags": [
        "edsp",
        "fastmult",
        "half",
        "neon",
        "swp",
        "thumb",
        "tls",
        "vfp",
        "vfpv3",
        "vfpv4"
    ],
    "hz_actual": "1.8240 GHz",
    "arch": "ARM_7",
    "hz_advertised_raw": [
        1824000000,
        0
    ]
}

I'm running on HypriotOS (Debian Jessie) armhfv7(ARM32) via SSH. I had to remove the GCC error flag in configure.py file https://github.com/gdeverlant/avmplus/blob/arm32/configure.py#L139.

When I tried to compile the the project I got this error at the end with nanojit:

true "Preprocessing nanojit/njconfig"
true "Compiling nanojit/njconfig"
true "Preprocessing nanojit/RegAlloc"
true "Compiling nanojit/RegAlloc"
true "Preprocessing nanojit/NativeARM"
true "Compiling nanojit/NativeARM"
../nanojit/NativeARM.cpp: In member function ‘void nanojit::Assembler::asm_arg_float(nanojit::LIns*, nanojit::ParameterRegisters&)’:
../nanojit/NativeARM.cpp:696:30: error: request for member ‘getLsb’ in ‘avail’, which is of non-class type ‘nanojit::RegisterMask {aka long long unsigned int}’
         Register r = { avail.getLsb() }; // get first available from the proper class; backfills available regs
                              ^
../nanojit/NativeARM.cpp:700:37: error: ‘FpOverlapMask’ was not declared in this scope
         RegisterMask consumedRegs = FpOverlapMask[ REGNUM(r) ];
                                     ^
../build/rules.mk:30: recipe for target 'nanojit/NativeARM.o' failed
make: *** [nanojit/NativeARM.o] Error 1

I have no idea what does it mean can someone help me to overcome this problem?

Latest version of my try at this commit address : https://github.com/gdeverlant/avmplus/commit/182fb74685d7b9b35d8c74cb72ed6bb5b0835fcc

dibyendumajumdar commented 6 years ago

Hi - sorry I am unable to help with avmplus questions. Also my version of NanoJIT is only tested on x64.

al-sabr commented 6 years ago

nanojit is actually a part of avmplus. It is the only part which gives me error. We can maybe collaborate and check what are the possibilities.

dibyendumajumdar commented 6 years ago

Hope you had some luck with this. Unfortunately I don't think I can help as the problem is not something I can test.