bpd1069 / naclports

Automatically exported from code.google.com/p/naclports
0 stars 0 forks source link

make sure nethack builds and runs with pnacl #32

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The naclports make file currently says that nethack doesn't work with pnacl:

  # missing header 'termio.h' and undef symbol 'rename'
  WORKS_FOR_PNACL:=$(subst examples/games/nethack-3.4.3,,$(WORKS_FOR_PNACL))

Let's figure out what's wrong and make it work.

Original issue reported on code.google.com by jvo...@google.com on 26 Jan 2012 at 8:39

GoogleCodeExporter commented 9 years ago
Hmm, even the nacl-gcc newlib build of nethack crashes for me...

Original comment by jvo...@google.com on 26 Jan 2012 at 9:20

GoogleCodeExporter commented 9 years ago
+cc bradn, jeffbailey in case this is a known issue. Are there important 
patches from the webstore version that haven't made it back? Webstore version 
works fine on chrome 18.

Before trying pnacl, I tried nacl-gcc. The nethack build from nacl ports with 
nacl-gcc from pepper17 bundle, on a chrome 18 browser does not start (just says 
"Loading..." in green).

- Newlib build: JS console says that the nacl module crashed
- Glibc build: JS console says "NativeClient: NaCl module load failed: could 
not create instance."

Original comment by jvo...@google.com on 26 Jan 2012 at 9:36

GoogleCodeExporter commented 9 years ago
The webstore version is using the code that's intended to be upstreamed, so is 
now in a separate repository.  The best way to get to the source is to install 
the webstore version and click on the "Source Code" link in the upper right 
hand corner.  That'll take you to the gitweb version.

If we compile with pNacl, will it work on current versions of Chrome?  I'm 
happy to work with you to get that moved over.

Original comment by jeffbailey@google.com on 26 Jan 2012 at 9:58

GoogleCodeExporter commented 9 years ago
Thanks for the pointer Jeff -- I'll check the git version.

(1) Compiling with pnacl to a bitcode "pexe" then to a nexe (just like 
nacl-gcc) should work with current versions of chrome.

(2) Compiling with pnacl to bitcode, then translating in the browser should 
also work with canary, with an extra set of files.

I'll try out (1) first to make sure there aren't any non-browser issues. Thanks!

Original comment by jvo...@google.com on 26 Jan 2012 at 10:19

GoogleCodeExporter commented 9 years ago
Oops, I'm an idiot. I had some printfs in nacl-mounts code where it shouldn't 
have been that was the cause of the crash. With a clean source tree nethack 
does work with pnacl.

Original comment by jvo...@google.com on 27 Jan 2012 at 9:59