Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

spidermonkey 89.0 #78997

Closed
wants to merge 4 commits into from
Closed

Conversation

paperchalice
Copy link
Contributor

@paperchalice paperchalice commented Jun 9, 2021

  • Have you followed the guidelines for contributing?
  • Have you ensured that your commits follow the commit style guide?
  • Have you checked that there aren't other open pull requests for the same formula update/change?
  • Have you built your formula locally with brew install --build-from-source <formula>, where <formula> is the name of the formula you're submitting?
  • Is your test running fine brew test <formula>, where <formula> is the name of the formula you're submitting?
  • Does your build pass brew audit --strict <formula> (after doing brew install --build-from-source <formula>)? If this is a new formula, does it pass brew audit --new <formula>?

From https://archive.mozilla.org/pub/spidermonkey/README.txt

We have stopped uploading specific releases. SpiderMonkey source packages are
not an official Mozilla product, though we do try to keep them working.
https://github.com/mozilla-spidermonkey/spidermonkey-embedding-examples is the
best source of information for these releases, though you will also want to
visit the main SpiderMonkey documentation page at https://spidermonkey.dev/
The easiest way to fetch the version corresponding to the current Firefox
release is to visit the treeherder page for the release repository and click on
the first SM(pkg) link you see. That will open a small window in the bottom
left with a line like
artifact uploaded: mozjs-86.0.1.tar.xz
where the 'mozjs-*.tar.xz' part will be a link to the actual file.
For the SpiderMonkey package corresponding to the current Firefox release:
https://treeherder.mozilla.org/#/jobs?repo=mozilla-release&filter-searchStr=spidermonkey-sm-package
For the SpiderMonkey package corresponding to the latest ESR (Extended Support
Release), select "Repos" from the above page and choose the latest
"mozilla-esrNN" repository, then follow the instructions above. For example,
for esr78 that would take you to:
https://treeherder.mozilla.org/jobs?repo=mozilla-esr78&filter-searchStr=spidermonkey-sm-package
Build instructions are in a toplevel INSTALL file.
To contact us via various mechanisms (realtime chat, forum, mailing list, etc.)
see the "Where to find us" section at https://spidermonkey.dev/

The version number here follows firefox.

remove libjs_static.ajs because https://www.linuxfromscratch.org/blfs/view/svn/general/js78.html

@BrewTestBot BrewTestBot added no ARM bottle Formula has no ARM bottle python Python use is a significant feature of the PR or issue rust Rust use is a significant feature of the PR or issue labels Jun 9, 2021
@paperchalice paperchalice force-pushed the spidermonkey branch 5 times, most recently from 23f6998 to f8ad41f Compare June 10, 2021 03:01
Formula/couchdb.rb Outdated Show resolved Hide resolved
@paperchalice paperchalice force-pushed the spidermonkey branch 2 times, most recently from 2b20e3d to 5482334 Compare June 10, 2021 08:17
Formula/couchdb.rb Outdated Show resolved Hide resolved
Formula/couchdb.rb Outdated Show resolved Hide resolved
{
"-DXP_UNIX -I/usr/include/mozjs-60 -I/usr/local/include/mozjs-60 -std=c++14 -Wno-invalid-offsetof",
- "-L/usr/local/lib -std=c++14 -lmozjs-60 -lm"
+ "-L/usr/local/lib -std=c++14 -lmozjs-60 -lm -lstdc++"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This might explain why using llvm didn't work, btw. If we want to use llvm this should probably be -lc++. In fact, it might work with Xcode Clang on Catalina/Big Sur if we just made this -lc++ -stdlib=libc++

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a template related issue, here we use spidermonky 78, the standard library is not specified in this case, btw, gcc support c++20 better than clang currently.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CC @Bo98 in case you have thoughts on this.

@paperchalice
Copy link
Contributor Author

paperchalice commented Jun 10, 2021

I think I should create versioned formulae for spidermonkey. One for firefox ESR, now is 78.x, one for 1.8.5, the last version of spidermonkey before mozilla stopping shipping spidermonkey separately , because couchdb 3.1.1 only support spidermonkey 1.8.5, 60 and 68(depends on python2 and llvm 3.9~6.0) if without patching, and one for the latest.
BTW gjs can also depends on spidermonkey
This formula is called js78 or libmozjs in other Linux distributions.

@paperchalice paperchalice changed the title spidermonkey: 78.11.0 spidermonkey 89.0 Jun 10, 2021
@paperchalice paperchalice force-pushed the spidermonkey branch 4 times, most recently from b07475c to 88d7619 Compare June 11, 2021 06:00
@paperchalice paperchalice force-pushed the spidermonkey branch 4 times, most recently from c1902db to 7e6a1a1 Compare June 11, 2021 12:45
@paperchalice paperchalice force-pushed the spidermonkey branch 2 times, most recently from ab425be to 2a12fbe Compare June 12, 2021 01:18
@paperchalice
Copy link
Contributor Author

paperchalice commented Jun 12, 2021

@@ -92,3 +117,90 @@ def plist
assert_equal "Welcome", output["couchdb"]
end
end

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change


conflicts_with "narwhal", because: "both install a js binary"
uses_from_macos "libedit"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use readline?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a libreadline in sdk

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm aware of that, but I'm not sure that explains why we should change it...

@@ -0,0 +1,60 @@
class SpidermonkeyAT78 < Formula
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I still don't understand why we need this. Didn't couchdb build with spidermonkey 89?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Supported version is hard-coded here

@@ -20,49 +21,52 @@ class Spidermonkey < Formula
sha256 cellar: :any, mojave: "8c0b46bc04a7e95f99262969b22cc311ee1f7d83413af05865318743ccd96944"
end

depends_on :macos # Due to Python 2
depends_on "autoconf@2.13" => :build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why doesn't this work with autoconf or autoconf@2.69?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mozilla project requires autoconf 2.13 https://bugzilla.mozilla.org/show_bug.cgi?id=297544

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yes. gjs also depends on autoconf 2.13.

Comment on lines +41 to +43
inreplace "config/rules.mk",
"-install_name $(_LOADER_PATH)/$(SHARED_LIBRARY) ",
"-install_name #{lib}/$(SHARED_LIBRARY) "
Copy link
Member

@carlocab carlocab Jun 20, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure we still need this? If it's using @loader_path it might work for us now.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is copied from formular gjs. I'm not sure whether this formula needs this

@github-actions
Copy link
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@github-actions github-actions bot added the stale No recent activity label Jul 12, 2021
@github-actions github-actions bot closed this Jul 19, 2021
@github-actions github-actions bot added the outdated PR was locked due to age label Aug 18, 2021
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 18, 2021
@paperchalice paperchalice deleted the spidermonkey branch October 20, 2021 04:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
no ARM bottle Formula has no ARM bottle outdated PR was locked due to age python Python use is a significant feature of the PR or issue rust Rust use is a significant feature of the PR or issue stale No recent activity
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants