Skip to content

"Build with Maven" fails on macOS Sonoma #1241

@divnull

Description

@divnull

On a Mac with Sonoma, openJDK, and Maven installed, with a fresh copy of the camel-website source, running mvn clean package fails.

The first problem is a simple version incompatibility (which probably happens on all maven installations):

[INFO] Usage Error: This tool requires a Node version compatible with >=18.12.0 (got 16.13.2). Upgrade Node, or set `YARN_IGNORE_NODE=1` in your environment.

You can fix this in the pom.xml easily enough (to, say, v20.17.0), but then the real Mac problem starts. The build seems to install node and yarn well enough, but then fails with an error like:

[INFO] Running 'yarn build' in /Users/me/camel-website-main/antora-ui-camel
[INFO] [11:38:27] Using gulpfile ~/camel-website-main/antora-ui-camel/gulpfile.js
[INFO] [11:38:27] Starting 'bundle'...
[INFO] [11:38:27] Starting 'clean'...
[INFO] [11:38:27] Finished 'clean' after 6.36 ms
[INFO] [11:38:27] Starting 'lint:css'...
[INFO] [11:38:27] Starting 'lint:js'...
[INFO] [11:38:28] Finished 'lint:js' after 906 ms
[INFO] [11:38:28] Finished 'lint:css' after 1.37 s
[INFO] [11:38:28] Starting 'build'...
[INFO] [11:38:28] Finished 'build' after 56 ms
[INFO] [11:38:28] Starting 'bundle:pack'...
[INFO] [11:38:28] Antora option: --ui-bundle-url=/Users/me/camel-website-main/antora-ui-camel/build/ui-bundle.zip
[INFO] [11:38:28] Finished 'bundle:pack' after 203 ms
[INFO] [11:38:28] Finished 'bundle' after 1.64 s
[INFO] node:events:497
[INFO]       throw er; // Unhandled 'error' event
[INFO]       ^
[INFO]
[INFO] <ref *1> PluginError: spawn Unknown system error -8
[INFO]     at ChildProcess.spawn (node:internal/child_process:421:11)
[INFO]     at Object.spawn (node:child_process:762:9)
[INFO]     at module.exports (/Users/me/camel-website-main/antora-ui-camel/.yarn/cache/execa-npm-0.7.0-3f4e53d884-7c1721de38.zip/node_modules/execa/index.js:139:26)
[INFO]     at /Users/me/camel-website-main/antora-ui-camel/.yarn/cache/exec-buffer-npm-3.2.0-c76d6fdd08-b3d5441dcd.zip/node_modules/exec-buffer/index.js:35:15
[INFO]     at async file:///Users/me/camel-website-main/antora-ui-camel/.yarn/cache/p-pipe-npm-4.0.0-0124a5a8f9-d2638c08e1.zip/node_modules/p-pipe/index.js:10:19
[INFO]     at async gulpPlugin.onFinish (file:///Users/me/camel-website-main/antora-ui-camel/.yarn/__virtual__/gulp-imagemin-virtual-13d6664539/0/cache/gulp-imagemin-npm-9.0.0-f59ad46b99-b7b1cf5546.zip/node_modules/gulp-imagemin/index.js:59:16)
[INFO]     at async file:///Users/me/camel-website-main/antora-ui-camel/.yarn/cache/gulp-plugin-extras-npm-0.2.2-1d6b889ea0-96ce1f063f.zip/node_modules/gulp-plugin-extras/index.js:19:12
[INFO]     at async file:///Users/me/camel-website-main/antora-ui-camel/.yarn/cache/easy-transform-stream-npm-1.0.1-eecd4538b8-3d783ad3ff.zip/node_modules/easy-transform-stream/index.js:14:20
[INFO] Emitted 'error' event on Domain instance at:
[INFO]     at Transform.emit (node:domain:539:12)
[INFO]     at Transform.onerror (/Users/me/camel-website-main/antora-ui-camel/.yarn/cache/readable-stream-npm-2.3.6-db500d5cd3-18e6084c93.zip/node_modules/readable-stream/lib/_stream_readable.js:640:52)
[INFO]     at Transform.emit (node:events:519:28)
[INFO]     at Transform.emit (node:domain:488:12)
[INFO]     at emitErrorNT (node:internal/streams/destroy:169:8)
[INFO]     at emitErrorCloseNT (node:internal/streams/destroy:128:3)
[INFO]     at process.processTicksAndRejections (node:internal/process/task_queues:82:21) {
[INFO]   showStack: true,
[INFO]   showProperties: true,
[INFO]   fileName: '/Users/me/camel-website-main/antora-ui-camel/src/img/logo-camel-medium.png',
[INFO]   error: Error: spawn Unknown system error -8
[INFO]       at ChildProcess.spawn (node:internal/child_process:421:11)
[INFO]       at Object.spawn (node:child_process:762:9)
[INFO]       at module.exports (/Users/me/camel-website-main/antora-ui-camel/.yarn/cache/execa-npm-0.7.0-3f4e53d884-7c1721de38.zip/node_modules/execa/index.js:139:26)
[INFO]       at /Users/me/camel-website-main/antora-ui-camel/.yarn/cache/exec-buffer-npm-3.2.0-c76d6fdd08-b3d5441dcd.zip/node_modules/exec-buffer/index.js:35:15
[INFO]       at async file:///Users/me/camel-website-main/antora-ui-camel/.yarn/cache/p-pipe-npm-4.0.0-0124a5a8f9-d2638c08e1.zip/node_modules/p-pipe/index.js:10:19
[INFO]       at async gulpPlugin.onFinish (file:///Users/me/camel-website-main/antora-ui-camel/.yarn/__virtual__/gulp-imagemin-virtual-13d6664539/0/cache/gulp-imagemin-npm-9.0.0-f59ad46b99-b7b1cf5546.zip/node_modules/gulp-imagemin/index.js:59:16)
[INFO]       at async file:///Users/me/camel-website-main/antora-ui-camel/.yarn/cache/gulp-plugin-extras-npm-0.2.2-1d6b889ea0-96ce1f063f.zip/node_modules/gulp-plugin-extras/index.js:19:12
[INFO]       at async file:///Users/me/camel-website-main/antora-ui-camel/.yarn/cache/easy-transform-stream-npm-1.0.1-eecd4538b8-3d783ad3ff.zip/node_modules/easy-transform-stream/index.js:14:20 {
[INFO]     errno: -8,
[INFO]     code: 'Unknown system error -8',
[INFO]     syscall: 'spawn'
[INFO]   },

There doesn't seem to be anything wrong with the file in question:

> ls -l /Users/me/camel-website-main/antora-ui-camel/src/img/logo-camel-medium.png
-rw-r--r--@ 1 me  staff  22001 Sep 26 05:26 /Users/me/camel-website-main/antora-ui-camel/src/img/logo-camel-medium.png

I can also open the file and see the Camel logo just fine.

I think what might be happening is that macos Sonoma has added some "chroot jail" type of stuff that prevents use of full pathnames if you are running inside one. A similar thing happens now, for example, if you try to sudo certain things from the command line: you get put into a virtual root that can't see the whole file system. I ran into similar problems when trying to build directly with node and yarn. I suspect that however ChildProcess.spawn is implemented, it might be opened in a similar virtual root, so would need pathnames relative to whatever that virtual root is.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions