couchdb icon indicating copy to clipboard operation
couchdb copied to clipboard

README needs updating for build instructions on macOS 10.15 catalina

Open M3S8 opened this issue 6 years ago • 10 comments

Description

couchjs segfaulting when run directly.

probably also when saving a view design doc cuz that causes what looks like from the logs some kind infinite loop inside the beam vm

Steps to Reproduce

brew install couchdb
cd /usr/local/Cellar/couchdb/3.1.0_1
bin/couchjs share/server/main.js

Expected Behaviour

No segfault.

Actual

segfault.

fish: 'bin/couchjs share/server/main.js' terminated by signal SIGSEGV (Address boundary error)

Your Environment

  • CouchDB version used:

related homebrew stuff:

couchdb: stable 3.1.0 (bottled)
https://github.com/Homebrew/homebrew-core/blob/master/Formula/couchdb.rb

spidermonkey: stable 1.8.5 (bottled), HEAD
https://github.com/Homebrew/homebrew-core/blob/master/Formula/spidermonkey.rb

nspr: stable 4.25 (bottled)
https://github.com/Homebrew/homebrew-core/blob/master/Formula/nspr.rb
  • Browser name and version:

n/a

  • Operating system and version:

macOS 10.15 catalina

Additional Context

The one in the couchdb app bundle does not segfault.

https://neighbourhood.ie/download-apache-couchdb-mac https://github.com/janl/couchdb-mac-app

Some otool output:

couchjs build via homebrew:

otool -L bin/couchjs
bin/couchjs:
	/usr/local/opt/spidermonkey/lib/libmozjs185.1.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.100.1)

otool -L /usr/local/opt/spidermonkey/lib/libmozjs185.1.0.dylib
/usr/local/opt/spidermonkey/lib/libmozjs185.1.0.dylib:
	/usr/local/opt/spidermonkey/lib/libmozjs185.1.0.dylib (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 23.0.0)
	/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
	/usr/local/opt/nspr/lib/libplds4.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/nspr/lib/libplc4.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/local/opt/nspr/lib/libnspr4.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 800.6.0)

couchjs from neighbourhood dmg:

otool -L bin/couchjs
couchjs:
	lib/libmozjs-60.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1252.250.1)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 400.9.4)

otool -L lib/libmozjs-60.dylib 
lib/libmozjs-60.dylib:
	/usr/local/opt/spidermonkey60/lib/libmozjs-60.dylib (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 228.0.0)
	/System/Library/Frameworks/ExceptionHandling.framework/Versions/A/ExceptionHandling (compatibility version 1.0.0, current version 13.0.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1281.0.0)
	lib/libicui18n.64.2.dylib (compatibility version 64.0.0, current version 64.2.0)
	lib/libicuuc.64.2.dylib (compatibility version 64.0.0, current version 64.2.0)
	lib/libicudata.64.2.dylib (compatibility version 64.0.0, current version 64.2.0)
	/usr/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.11)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 800.7.0)

M3S8 avatar May 21 '20 18:05 M3S8

Hey @m11m,

Someone will need to update the homebrew recipe. We don't maintain that. You'll need to work with the brew community to fix this one, I'm afraid.

https://github.com/Homebrew/homebrew-core/blob/master/Formula/couchdb.rb

wohali avatar May 21 '20 22:05 wohali

So should I open another issue regarding the build instructions contained in this repository?

I followed those instructions and got the same result.

M3S8 avatar May 22 '20 02:05 M3S8

@m11m I can reopen it and specifically make it about fixing the build instructions in README*.md for macOS.

wohali avatar May 22 '20 02:05 wohali

I appreciate it, thank you. I can fix the homebrew stuff if I get a little more detail into what's going on here.

M3S8 avatar May 22 '20 02:05 M3S8

Have you looked at how the macOS App is built? See https://github.com/janl/couchdb-mac-app .

If you can help write up the README PR, we'll be happy to merge it.

wohali avatar May 22 '20 02:05 wohali

My guess: SM1.8.5 probably won't build correctly on Catalina because 64-bitness, and SM that old has 64-bitness issues. You probably need to update to SM60.

wohali avatar May 22 '20 02:05 wohali

re: janl project, yes I'm looking into it more as I find time. Ok thanks, I will look into how to build against SM60.

I also smelled something about enabling / disabling JIT compilation when searching issues here, not sure if that's applicable or not.

M3S8 avatar May 22 '20 02:05 M3S8

this might come in handy: https://github.com/janl/homebrew-couchdb/blob/master/Formula/spidermonkey60.rb

janl avatar May 22 '20 14:05 janl

My guess: SM1.8.5 probably won't build correctly on Catalina because 64-bitness, and SM that old has 64-bitness issues. You probably need to update to SM60.

Sm185 runs fine as 64bit, all Catalina does is no longer allowing 32bit binaries, so I’m not sure this is it. It might be more likely some code signing weirdness

janl avatar May 22 '20 14:05 janl

ah right, I remember now, SM 1.8.5 can't run 32-bit on Solarises (including SmartOS.)

wohali avatar May 22 '20 17:05 wohali