Opened 9 years ago

Closed 9 years ago

#50169 closed defect (fixed)

MoarVM to nqp does not build | 32-bit problem? | Snow Leopard 10.6.8

Reported by: drennanelawar (Daniel Drennan ElAwar) Owned by: coke (Will Coleda)
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: mojca (Mojca Miklavec), larryv (Lawrence Velázquez), raimue (Rainer Müller)
Port: MoarVM

Description

I'm ecstatic to see rakudo here. A looooong time ago I managed to get it to compile on my Snow Leopard 10.6.8 Hackintosh. I recall this involved explicitly stating "darwin" as a system and "gcc" as compiler and without jit. But then after that it wouldn't work, so I decided to wait until all the beginning lumps were beaten out of it and it showed up as a port.

I'm attaching the debug statements for MoarVM which *seems* to build, but not without a lot of complaining. Beyond that, nqp fails to build, and I'm attaching its build log as well. I have a feeling there's a problem with 32-bitness, and perhaps this flag: -D_DARWIN_USE_64_BIT_INODE=1 but I am not sure.

The warnings from clang are:

clang: warning: argument unused during compilation: '-fno-optimize-sibling-calls'
clang: warning: argument unused during compilation: '-O3'
warning: unknown warning option '-Wno-logical-op-parentheses' [-Wunknown-warning-option]

and

src/jit/emit_x64.dasc:1443:328: warning: shift count >= width of type
        dasm_put(Dst, 2235, Dt1E([cont]), DtC(->st), DtF(->container_spec), (unsigned int)((uintptr_t)("Cannot assign to an immutable value")), (unsigned int)(((uintptr_t)("Cannot assign to an immutable value"))>>32), (unsigned int)((uintptr_t)&MVM_exception_throw_adhoc), (unsigned int)(((uintptr_t)&MVM_exception_throw_adhoc)>>32), Dt1E([obj]));

My research online seems to show that MoarVM is possible on 10.6.8, and recently (August). If this has changed, I guess I probably need to know that. Otherwise, I'm wondering if it is possible to add variants to the port for, say, a gcc compile or no jit?

If I am completely off the mark, apologies in advance. Thanks for any assistance.

Attachments (7)

moarvm-install.log (320.1 KB) - added by drennanelawar (Daniel Drennan ElAwar) 9 years ago.
Debug readout of MoarVM install
nqp-main.log (18.5 KB) - added by drennanelawar (Daniel Drennan ElAwar) 9 years ago.
nqp main log
moarvm-nojit.diff (621 bytes) - added by mojca (Mojca Miklavec) 9 years ago.
disable JIT for MoarVM when building for i386 or universal
patch-src-jit-emit_x64.dasc.diff (609 bytes) - added by mojca (Mojca Miklavec) 9 years ago.
moarvm-nojit-in-i386.2.diff (1.9 KB) - added by mojca (Mojca Miklavec) 9 years ago.
disable JIT for MoarVM in i386 only
moarvm-nojit-in-i386.diff (1.9 KB) - added by mojca (Mojca Miklavec) 9 years ago.
disable JIT for MoarVM in i386 only
MoarVM-build-output.txt (348.1 KB) - added by drennanelawar (Daniel Drennan ElAwar) 9 years ago.
DEBUG output from MoarVM install

Download all attachments as: .zip

Change History (19)

Changed 9 years ago by drennanelawar (Daniel Drennan ElAwar)

Attachment: moarvm-install.log added

Debug readout of MoarVM install

Changed 9 years ago by drennanelawar (Daniel Drennan ElAwar)

Attachment: nqp-main.log added

nqp main log

comment:1 Changed 9 years ago by mf2k (Frank Schima)

Cc: mojca@… added
Keywords: MoarVM nqp rakudo removed
Owner: changed from macports-tickets@… to will@…

In the future, please Cc the port maintainers (port info --maintainers MoarVM), if any.

Changed 9 years ago by mojca (Mojca Miklavec)

Attachment: moarvm-nojit.diff added

disable JIT for MoarVM when building for i386 or universal

comment:2 Changed 9 years ago by mojca (Mojca Miklavec)

Cc: larryv@… added
Version: 2.3.4

Please try the attachment that disables building JIT on 32-bit platforms (I'm not sure if it's 100% OK). I also don't know whether INODE should be taken care of separately.

I filed a bug report here:

comment:3 Changed 9 years ago by mojca (Mojca Miklavec)

Cc: raimue@… added

I'm also CC-ing Rainer just in case. He maintains libuv and might have some insight about -D_DARWIN_USE_64_BIT_INODE=1 that's inside libuv's Makefile.am.

comment:4 Changed 9 years ago by drennanelawar (Daniel Drennan ElAwar)

Disabling JIT worked.

danielibnzayd|GHIDORAH|perl6
I ran into a problem while trying to set up REPL completions:
Continuing without tab completions

> say "Houston, we have liftoff!";
Houston, we have liftoff!

Thank you! If you email me street addresses, I'll send trays of Lebanese sweets.... :-)

comment:5 Changed 9 years ago by mojca (Mojca Miklavec)

Resolution: fixed
Status: newclosed

comment:6 in reply to:  3 Changed 9 years ago by raimue (Rainer Müller)

Replying to mojca@…:

I'm also CC-ing Rainer just in case. He maintains libuv and might have some insight about -D_DARWIN_USE_64_BIT_INODE=1 that's inside libuv's Makefile.am.

Glad this was already resolved. For the record, _DARWIN_USE_64_BIT_INODE was introduced as a compatibility switch with OS X 10.5. It will change the definition of struct stat to use larger datatypes and the corresponding functions expect this definition. Defining this macro would only affect OS X 10.5, as all later versions use the 64-bit version by default. See the stat(2) man page for details.

Changed 9 years ago by mojca (Mojca Miklavec)

Changed 9 years ago by mojca (Mojca Miklavec)

Attachment: moarvm-nojit-in-i386.2.diff added

disable JIT for MoarVM in i386 only

comment:7 Changed 9 years ago by mojca (Mojca Miklavec)

Will, Drennan and others: can you please try the attached patch (moarvm-nojit-in-i386.diff) with 32-bit and tell me if it works as expected?

It's based on

Changed 9 years ago by mojca (Mojca Miklavec)

Attachment: moarvm-nojit-in-i386.diff added

disable JIT for MoarVM in i386 only

comment:8 Changed 9 years ago by mojca (Mojca Miklavec)

Resolution: fixed
Status: closedreopened

I'm reopeting this ticket because we would like to get this properly fixed upstream (I don't want to open a new uninformative ticket for that) and I would be grateful for some proper testing.

Changed 9 years ago by drennanelawar (Daniel Drennan ElAwar)

Attachment: MoarVM-build-output.txt added

DEBUG output from MoarVM install

comment:9 Changed 9 years ago by drennanelawar (Daniel Drennan ElAwar)

No problem, happy to test.....

Applied the patch, but I think jit compiled, based on the output here as well as the same error message as before....

Did not continue up the chain to nqp and rakudo.

Thanks,

Daniel

comment:10 Changed 9 years ago by mojca (Mojca Miklavec)

Which error message did you get? (Not the warnings, but the actual error.)

Can you please nevertheless try nqp and rakudo? The idea of upstream was to compile JIT, but disable it at runtime. Someone should test extensively whether that hack works at all.

comment:11 Changed 9 years ago by drennanelawar (Daniel Drennan ElAwar)

Of course.

Like before, there is no error during the installation of MoarVM; it just complains a lot.

I forced an upgrade of nqp just to be sure, and now re-installed rakudo and panda.

Everything works swimmingly. Thanks!

Daniel

comment:12 Changed 9 years ago by mojca (Mojca Miklavec)

Resolution: fixed
Status: reopenedclosed
Note: See TracTickets for help on using tickets.