I freshly installed Mac OS Sierra (no update, erased disk), downloaded Java, and Spoofax (2.0.0 and nightly, w/ and w/o JRE) afterwards. Project creation is broken in all these versions, caused by a build error. Building existing projects is also broken. Root cause seems to be denied permission to execute sdf2table. Fix modulo path to Eclipse and version numbers:

chmod +x ~/Applications/spoofax2/Eclipse.app/Contents/Eclipse/plugins/org.metaborg.spoofax.nativebundle_2.0.0/org/metaborg/s
poofax/nativebundle/native/macosx/sdf2table

Otherwise, project builds give the following stack trace:

15:29 | INFO  | s.e.m.b.GenerateSourcesBuilder - Generating sources for language project eclipse:///org.metaborg.example.externalref.expressions
15:29 | INFO  | o.m.c.build.Builder            - Building eclipse:///org.metaborg.example.externalref.expressions
15:29 | INFO  | o.m.c.build.Builder            - Building 1 sources, 0 includes of language impl. org.metaborg:org.metaborg.meta.lang.esv:2.0.0
15:29 | INFO  | o.m.s.e.m.b.CompileBuilder     - Building language project eclipse:///org.metaborg.example.externalref.expressions
15:29 | INFO  | Build log                      - Execute pack-sdf -i /Users/oracle/Cloud/git/forks/metaborg-api-usage/org.metaborg.example.externalref.expressions/src-gen/syntax/ExpressionLanguage.sdf -o /Users/oracle/Cloud/git/forks/metaborg-api-usage/org.metaborg.example.externalref.expressions/src-gen/syntax/ExpressionLanguage.def -I /Users/oracle/Cloud/git/forks/metaborg-api-usage/org.metaborg.example.externalref.expressions/syntax -I /Users/oracle/Cloud/git/forks/metaborg-api-usage/org.metaborg.example.externalref.expressions/src-gen -I /Users/oracle/Cloud/git/forks/metaborg-api-usage/org.metaborg.example.externalref.expressions -I /Users/oracle/Cloud/git/forks/metaborg-api-usage/org.metaborg.example.externalref.expressions/src-gen/syntax
15:29 | INFO  | Build log                      - Execute make-permissive -i /Users/oracle/Cloud/git/forks/metaborg-api-usage/org.metaborg.example.externalref.expressions/src-gen/syntax/ExpressionLanguage.def -o /Users/oracle/Cloud/git/forks/metaborg-api-usage/org.metaborg.example.externalref.expressions/src-gen/syntax/ExpressionLanguage-permissive.def --optimize on --semantic-completions off --syntactic-completions off
15:29 | INFO  | Build log                      - Execute sdf2table
15:29 | ERROR | o.m.s.e.m.b.CompileBuilder     - Exception thrown during build
org.metaborg.core.MetaborgException: Rebuilding failed.
	at org.metaborg.spoofax.meta.core.build.LanguageSpecBuilder.compile(LanguageSpecBuilder.java:138) ~[org.metaborg.spoofax.meta.core_2.0.0.jar:na]
	at org.metaborg.spoofax.eclipse.meta.build.CompileBuilder$1.run(CompileBuilder.java:49) ~[org.metaborg.spoofax.eclipse.meta_2.0.0.jar:na]
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2240) [org.eclipse.core.resources_3.11.0.v20160503-1608.jar:na]
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2267) [org.eclipse.core.resources_3.11.0.v20160503-1608.jar:na]
	at org.metaborg.spoofax.eclipse.meta.build.CompileBuilder.build(CompileBuilder.java:69) [org.metaborg.spoofax.eclipse.meta_2.0.0.jar:na]
	at org.metaborg.spoofax.eclipse.meta.build.Builder.build(Builder.java:53) [org.metaborg.spoofax.eclipse.meta_2.0.0.jar:na]
	at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:735) [org.eclipse.core.resources_3.11.0.v20160503-1608.jar:na]
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) [org.eclipse.equinox.common_3.8.0.v20160509-1230.jar:na]
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:206) [org.eclipse.core.resources_3.11.0.v20160503-1608.jar:na]
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:246) [org.eclipse.core.resources_3.11.0.v20160503-1608.jar:na]
	at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:301) [org.eclipse.core.resources_3.11.0.v20160503-1608.jar:na]
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42) [org.eclipse.equinox.common_3.8.0.v20160509-1230.jar:na]
	at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:304) [org.eclipse.core.resources_3.11.0.v20160503-1608.jar:na]
	at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:360) [org.eclipse.core.resources_3.11.0.v20160503-1608.jar:na]
	at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:383) [org.eclipse.core.resources_3.11.0.v20160503-1608.jar:na]
	at org.eclipse.core.internal.resources.Workspace.buildInternal(Workspace.java:487) [org.eclipse.core.resources_3.11.0.v20160503-1608.jar:na]
	at org.eclipse.core.internal.resources.Workspace.build(Workspace.java:406) [org.eclipse.core.resources_3.11.0.v20160503-1608.jar:na]
	at org.eclipse.ui.actions.BuildAction$1.runInWorkspace(BuildAction.java:285) [org.eclipse.ui.ide_3.12.0.v20160601-1609.jar:na]
	at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:39) [org.eclipse.core.resources_3.11.0.v20160503-1608.jar:na]
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55) [org.eclipse.core.jobs_3.8.0.v20160509-0411.jar:na]
Caused by: build.pluto.builder.RequiredBuilderFailed: Required builder failed. Error occurred in build step "Compile grammar to parse table": problems while executing /private/var/folders/w8/bpj8t9qd3nv28z8s1hrjrksh0000gn/T/AppTranslocation/DBCF9B68-1612-44D0-A5D0-547D0DDA072D/d/Eclipse.app/Contents/Eclipse/plugins/org.metaborg.spoofax.nativebundle_2.0.0/org/metaborg/spoofax/nativebundle/native/macosx/sdf2table: Cannot run program "/private/var/folders/w8/bpj8t9qd3nv28z8s1hrjrksh0000gn/T/AppTranslocation/DBCF9B68-1612-44D0-A5D0-547D0DDA072D/d/Eclipse.app/Contents/Eclipse/plugins/org.metaborg.spoofax.nativebundle_2.0.0/org/metaborg/spoofax/nativebundle/native/macosx/sdf2table": error=13, Permission denied:  /private/var/folders/w8/bpj8t9qd3nv28z8s1hrjrksh0000gn/T/AppTranslocation/DBCF9B68-1612-44D0-A5D0-547D0DDA072D/d/Eclipse.app/Contents/Eclipse/plugins/org.metaborg.spoofax.nativebundle_2.0.0/org/metaborg/spoofax/nativebundle/native/macosx/sdf2table -t -i /Users/oracle/Cloud/git/forks/metaborg-api-usage/org.metaborg.example.externalref.expressions/src-gen/syntax/ExpressionLanguage-permissive.def -m ExpressionLanguage -o /Users/oracle/Cloud/git/forks/metaborg-api-usage/org.metaborg.example.externalref.expressions/target/metaborg/sdf.tbl
	at build.pluto.builder.RequiredBuilderFailed.init(RequiredBuilderFailed.java:83) ~[pluto-1.9.1.jar:na]
	at build.pluto.builder.BuildManager.executeBuilder(BuildManager.java:118) ~[pluto-1.9.1.jar:na]
	at build.pluto.builder.BuildManager.require(BuildManager.java:328) ~[pluto-1.9.1.jar:na]
	at build.pluto.builder.Builder.requireBuild(Builder.java:215) ~[pluto-1.9.1.jar:na]
	at build.pluto.builder.Builder.requireBuild(Builder.java:234) ~[pluto-1.9.1.jar:na]
	at org.metaborg.spoofax.meta.core.pluto.build.main.GenerateSourcesBuilder.build(GenerateSourcesBuilder.java:205) ~[org.metaborg.spoofax.meta.core_2.0.0.jar:na]
	at org.metaborg.spoofax.meta.core.pluto.build.main.GenerateSourcesBuilder.build(GenerateSourcesBuilder.java:1) ~[org.metaborg.spoofax.meta.core_2.0.0.jar:na]
	at build.pluto.builder.Builder.triggerBuild(Builder.java:134) ~[pluto-1.9.1.jar:na]
	at build.pluto.builder.BuildManager.executeBuilder(BuildManager.java:95) ~[pluto-1.9.1.jar:na]
	at build.pluto.builder.BuildManager.require(BuildManager.java:328) ~[pluto-1.9.1.jar:na]
	at build.pluto.builder.BuildManagers.build(BuildManagers.java:72) ~[pluto-1.9.1.jar:na]
	at org.metaborg.spoofax.meta.core.build.LanguageSpecBuilder.plutoBuild(LanguageSpecBuilder.java:292) ~[org.metaborg.spoofax.meta.core_2.0.0.jar:na]
	at org.metaborg.spoofax.meta.core.build.LanguageSpecBuilder.compile(LanguageSpecBuilder.java:133) ~[org.metaborg.spoofax.meta.core_2.0.0.jar:na]
	... 19 common frames omitted
Caused by: build.pluto.builder.RequiredBuilderFailed: Required builder failed. Error occurred in build step "Compile grammar to parse table": org.sugarj.common.Exec$ExecutionError: problems while executing /private/var/folders/w8/bpj8t9qd3nv28z8s1hrjrksh0000gn/T/AppTranslocation/DBCF9B68-1612-44D0-A5D0-547D0DDA072D/d/Eclipse.app/Contents/Eclipse/plugins/org.metaborg.spoofax.nativebundle_2.0.0/org/metaborg/spoofax/nativebundle/native/macosx/sdf2table: Cannot run program "/private/var/folders/w8/bpj8t9qd3nv28z8s1hrjrksh0000gn/T/AppTranslocation/DBCF9B68-1612-44D0-A5D0-547D0DDA072D/d/Eclipse.app/Contents/Eclipse/plugins/org.metaborg.spoofax.nativebundle_2.0.0/org/metaborg/spoofax/nativebundle/native/macosx/sdf2table": error=13, Permission denied:  /private/var/folders/w8/bpj8t9qd3nv28z8s1hrjrksh0000gn/T/AppTranslocation/DBCF9B68-1612-44D0-A5D0-547D0DDA072D/d/Eclipse.app/Contents/Eclipse/plugins/org.metaborg.spoofax.nativebundle_2.0.0/org/metaborg/spoofax/nativebundle/native/macosx/sdf2table -t -i /Users/oracle/Cloud/git/forks/metaborg-api-usage/org.metaborg.example.externalref.expressions/src-gen/syntax/ExpressionLanguage-permissive.def -m ExpressionLanguage -o /Users/oracle/Cloud/git/forks/metaborg-api-usage/org.metaborg.example.externalref.expressions/target/metaborg/sdf.tbl
	at build.pluto.builder.RequiredBuilderFailed.getCause(RequiredBuilderFailed.java:37) ~[pluto-1.9.1.jar:na]
	at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:58) ~[logback-classic-1.1.2.jar:na]
	at ch.qos.logback.classic.spi.ThrowableProxy.<init>(ThrowableProxy.java:61) ~[logback-classic-1.1.2.jar:na]
	at ch.qos.logback.classic.spi.LoggingEvent.<init>(LoggingEvent.java:121) ~[logback-classic-1.1.2.jar:na]
	at ch.qos.logback.classic.Logger.buildLoggingEventAndAppend(Logger.java:440) [logback-classic-1.1.2.jar:na]
	at ch.qos.logback.classic.Logger.filterAndLog_0_Or3Plus(Logger.java:396) [logback-classic-1.1.2.jar:na]
	at ch.qos.logback.classic.Logger.error(Logger.java:559) [logback-classic-1.1.2.jar:na]
	at org.metaborg.util.log.MetaborgLogger.error(MetaborgLogger.java:49) [org.metaborg.util_2.0.0.jar:na]
	at org.metaborg.spoofax.eclipse.meta.build.CompileBuilder$1.run(CompileBuilder.java:54) ~[org.metaborg.spoofax.eclipse.meta_2.0.0.jar:na]
	... 18 common frames omitted
Submitted by Guido Wachsmuth on 26 September 2016 at 15:44

On 26 September 2016 at 15:45 Guido Wachsmuth commented:

Affects

Eclipse: org.eclipse.platform.ide 4.6.0.I20160606-1100
Spoofax: org.metaborg.spoofax.eclipse 2.0.0
System: Mac OS X x86_64 10.12

and

Eclipse: org.eclipse.platform.ide 4.6.0.I20160606-1100
Spoofax: org.metaborg.spoofax.eclipse 2.1.0.20160923-113919-master
System: Mac OS X x86_64 10.12

On 27 September 2016 at 11:45 Gabriël Konat commented:

That's odd, since we do set sdf2table to be executable: https://github.com/metaborg/spoofax/blob/master/org.metaborg.spoofax.meta.core/src/main/java/org/metaborg/spoofax/meta/core/pluto/build/misc/PrepareNativeBundle.java#L69

Any ideas on what might be causing this?


On 25 January 2017 at 11:55 Gabriël Konat commented:

This is a macOS Sierra issue: http://lapcatsoftware.com/articles/app-translocation.html. A new 'security feature' copies the entire Eclipse app into a read-only filesystem to 'prevent tampering'. You can circumvent this by moving the spoofax.app file to a different location, such as Applications. I've added a warning about this to the installation guide.


On 25 January 2017 at 11:55 Gabriël Konat closed this issue.

On 25 January 2017 at 11:55 Gabriël Konat tagged macos

Log in to post comments