Opened 11 years ago

Closed 10 years ago

Last modified 10 years ago

#40614 closed submission (fixed)

mozjs17 @17.0.0 new Portfile

Reported by: juanrgar (Juan R. García Blanco) Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version:
Keywords: Cc: ryandesign (Ryan Carsten Schmidt), akitada@…, nerdling (Jeremy Lavergne)
Port: mozjs17

Description (last modified by nerdling (Jeremy Lavergne))

Please find attached a Portfile for mozjs17-17.0.0. to js). There're two existing ports that could provide this software; they need a version update though. These two ports are spidermonkey and spidermonkey185. mozjs17-17.0.0 ships with an updated pkg-config .pc file, and it's now called mozjs17-17.0. This is, at least, required by gjs and gobject-introspection packages.

Attachments (3)

Portfile (2.2 KB) - added by juanrgar (Juan R. García Blanco) 11 years ago.
mozjs17@17.0.0 Portfile
config.log.xz (1.7 KB) - added by nerdling (Jeremy Lavergne) 10 years ago.
configure phase failure
mozjs17.tgz (1.5 KB) - added by juanrgar (Juan R. García Blanco) 10 years ago.
mozjs17 Portfile and patch

Download all attachments as: .zip

Change History (19)

comment:1 Changed 11 years ago by juanrgar (Juan R. García Blanco)

Cc: juanrgar@… added

Cc Me!

comment:2 Changed 11 years ago by mf2k (Frank Schima)

Keywords: js mozilla removed
Version: 2.2.0

comment:3 Changed 11 years ago by juanrgar (Juan R. García Blanco)

Please don't try to use this Portfile. It compiles and installs fine; you can even run the js console. However, the dylib seems to be not generated correctly. I'll update it soon.

comment:4 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: ryandesign@… added; juanrgar@… removed

Supersedes #40017. Last time I looked into the spidermonkey situation it seemed like a good idea to create separate ports for each major version of the engine. That's why we made a separate spidermonkey185 port instead of updating the spidermonkey port, and why I think this port should be called mozjs17 perhaps, not just mozjs.

comment:5 Changed 11 years ago by juanrgar (Juan R. García Blanco)

Ok. I just uploaded working Portfile. It still has not variants though. I plan to add a few ones soon, as I think mozjs has some interesting options. I've changed the port name; now it's called mozjs17, to avoid dangerous updates for future versions of mozjs.

comment:6 Changed 11 years ago by juanrgar (Juan R. García Blanco)

I forgot to mention that I'd be more than happy to apply fixes to this base Portfile. This is one of the first Portfiles I've written, so it's prone to errors ;)

Changed 11 years ago by juanrgar (Juan R. García Blanco)

Attachment: Portfile added

mozjs17@17.0.0 Portfile

comment:7 Changed 11 years ago by juanrgar (Juan R. García Blanco)

Just attached a new version of the Portfile with a couple of new variants added.

comment:8 Changed 10 years ago by nerdling (Jeremy Lavergne)

Cc: akitada@… snc@… added
Description: modified (diff)
Port: mozjs17 added; mozjs removed
Summary: mozjs @17.0.0 new Portfilemozjs17 @17.0.0 new Portfile

juanrgar: any particular reason why readline should be disabled? Do you also know when the llvm hacks are needed?

akitada: do you see any particular problems with this?

comment:9 Changed 10 years ago by nerdling (Jeremy Lavergne)

junargar: Variant name llvm-hacks is not valid; use [A-Za-z0-9_]+ only

comment:10 Changed 10 years ago by nerdling (Jeremy Lavergne)

This package also fails to configure for me.

checking that static assertion macros used in autoconf tests work... no
configure: error: Compiler cannot compile macros used in autoconf tests.
Command failed:  cd "/opt/pspp/var/macports/build/_Users_aeetes_dports_lang_mozjs17/mozjs17/work/mozjs17.0.0/js/src" && ./configure --prefix=/opt/pspp --with-system-nspr --enable-system-ffi --disable-readline --enable-threadsafe 
Exit code: 1

Attaching config.log.

Changed 10 years ago by nerdling (Jeremy Lavergne)

Attachment: config.log.xz added

configure phase failure

comment:11 in reply to:  8 Changed 10 years ago by neverpanic (Clemens Lang)

Replying to snc@…:

juanrgar: any particular reason why readline should be disabled?

This was my suggestion and allows distributing the port. Since this is a JavaScript runtime often used by other dependent ports rather than used for local development (where having the readline stuff would be beneficiary), I think disabling it in favor of binary distribution is a good thing.

Last edited 10 years ago by neverpanic (Clemens Lang) (previous) (diff)

comment:12 Changed 10 years ago by juanrgar (Juan R. García Blanco)

I recently upgraded to Mavericks and the build started failing, so now I've included a source patch.

@snc

  • readline is disabled because of the reason cal gave. After reading a little bit about readline, I agree with him.
  • I've added a dependency on xorg-libXt after checking your config.log. Thank you very much for providing me with it. I didn't notice mozjs17 requires Intrinsic.h.
  • I've changed llvm-hacks to llvm_hacks as variant name; I actually don't know where are llvm-hacks needed. I did a quick search and found nothing; I think that if agreed this variant could be removed.

Could you please try the new port version? That would be very helpful for me to continue fixing errors. Also, since mozjs24 release is approaching, everything we learn from mozjs17 could potentially apply to the new version.

comment:13 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Some feedback:

  • The whitespace should conform to the modeline, i.e. indentations should be at multiples of 4 spaces.
  • The reinplace being done in post-extract should be done in post-patch.
  • configure.cc is being set to "clang" and configure.cxx is being set to "clang++". Why is this? Are llvm-gcc or gcc not suitable? If not, then they should be blacklisted with compiler.blacklist and MacPorts should be allowed to populate configure.compiler, configure.cc and configure.cxx itself.

comment:14 Changed 10 years ago by juanrgar (Juan R. García Blanco)

Thank you very much :)

  • I've got modelines disabled in vim. Now I think it's better formatted. Although I'm not sure if the two main columns are well indented; I mean sometimes the second column is not indented at a multiple of 4, although the first line is.
  • I guess the reinplace is the last thing I want to do before configuring and building the port.
  • I took that from the spidermonkey build instructions (https://developer.mozilla.org/en-US/docs/SpiderMonkey/Build_Documentation). They read as follows:

Note: If you are on Mac and getting an error similar to "checking whether the C compiler (gcc-4.2 ) works... no configure: error: installation or configuration problem: C compiler cannot create executables." You can try configuring like so: CC=clang CXX=clang++ ./configure

I've tested on SL, and I got that exact message. Anyways, I agree that the fact that gcc is not suitable does not mean that the only capable compiler would be clang. I've blacklisted all gcc compilers, since the docs do not specify which versions could cause trouble.

Changed 10 years ago by juanrgar (Juan R. García Blanco)

Attachment: mozjs17.tgz added

mozjs17 Portfile and patch

comment:15 Changed 10 years ago by neverpanic (Clemens Lang)

Resolution: fixed
Status: newclosed

Committed in r113785 with the following changes:

  • Added section that sets configure.cxx_stdlib to libstdc++ (or appends -stdlib=libstdc++ to configure.cxxflags for versions of base that don't have configure.cxx_stdlib support). This fixes the configure phase for me, which previously failed because the configure script apparently sets MACOSX_DEPLOYMENT_TARGET to a version that doesn't have the newer libc++ library, causing clang to refuse to build.

Thanks for your work and sorry that I didn't find some time to look at this any earlier.

comment:16 Changed 10 years ago by neverpanic (Clemens Lang)

Oh, and please test whether my fix works on a non-trunk installation – I didn't verify this (but I'm pretty sure it will work).

Note: See TracTickets for help on using tickets.