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

Can't run ./scripts/build-container.sh on Macs using ARM64 architecture #601

Closed
trackleft opened this issue Nov 9, 2022 · 2 comments
Closed

Comments

@trackleft
Copy link
Member

Problem/Motivation

When following instructions here: https://digital.arizona.edu/arizona-bootstrap/docs/2.0/getting-started/build-tools/

I was unable to run ./scripts/build-container.sh
And received the following error:

#18 21.92 npm WARN deprecated har-validator@5.1.5: this library is no longer supported
#18 21.95 npm WARN deprecated uuid@3.4.0: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
#18 22.33 npm WARN deprecated @npmcli/move-file@1.1.2: This functionality has been moved to @npmcli/fs
#18 22.51 npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
#18 25.44 npm WARN deprecated popper.js@1.16.1: You can find the new Popper v2 at @popperjs/core, this package is dedicated to the legacy v1
#18 28.29 npm ERR! code 1
#18 28.29 npm ERR! path /azbuild/arizona-bootstrap/node_modules/node-sass
#18 28.29 npm ERR! command failed
#18 28.29 npm ERR! command sh -c -- node scripts/build.js
#18 28.30 npm ERR! Building: /usr/local/bin/node /azbuild/arizona-bootstrap/node_modules/node-gyp/bin/node-gyp.js rebuild --verbose --libsass_ext= --libsass_cflags= --libsass_ldflags= --libsass_library=
#18 28.30 npm ERR! gyp info it worked if it ends with ok
#18 28.30 npm ERR! gyp verb cli [
#18 28.30 npm ERR! gyp verb cli   '/usr/local/bin/node',
#18 28.30 npm ERR! gyp verb cli   '/azbuild/arizona-bootstrap/node_modules/node-gyp/bin/node-gyp.js',
#18 28.30 npm ERR! gyp verb cli   'rebuild',
#18 28.30 npm ERR! gyp verb cli   '--verbose',
#18 28.30 npm ERR! gyp verb cli   '--libsass_ext=',
#18 28.30 npm ERR! gyp verb cli   '--libsass_cflags=',
#18 28.30 npm ERR! gyp verb cli   '--libsass_ldflags=',
#18 28.30 npm ERR! gyp verb cli   '--libsass_library='
#18 28.30 npm ERR! gyp verb cli ]
#18 28.30 npm ERR! gyp info using node-gyp@8.4.1
#18 28.30 npm ERR! gyp info using node@16.18.0 | linux | arm64
#18 28.30 npm ERR! gyp verb command rebuild []
#18 28.30 npm ERR! gyp verb command clean []
#18 28.30 npm ERR! gyp verb clean removing "build" directory
#18 28.30 npm ERR! gyp verb command configure []
#18 28.30 npm ERR! gyp verb find Python Python is not set from command line or npm configuration
#18 28.30 npm ERR! gyp verb find Python Python is not set from environment variable PYTHON
#18 28.30 npm ERR! gyp verb find Python checking if "python3" can be used
#18 28.30 npm ERR! gyp verb find Python - executing "python3" to get executable path
#18 28.30 npm ERR! gyp verb find Python - "python3" is not in PATH or produced an error
#18 28.30 npm ERR! gyp verb find Python checking if "python" can be used
#18 28.30 npm ERR! gyp verb find Python - executing "python" to get executable path
#18 28.30 npm ERR! gyp verb find Python - "python" is not in PATH or produced an error
#18 28.30 npm ERR! gyp ERR! find Python 
#18 28.30 npm ERR! gyp ERR! find Python Python is not set from command line or npm configuration
#18 28.30 npm ERR! gyp ERR! find Python Python is not set from environment variable PYTHON
#18 28.30 npm ERR! gyp ERR! find Python checking if "python3" can be used
#18 28.30 npm ERR! gyp ERR! find Python - "python3" is not in PATH or produced an error
#18 28.30 npm ERR! gyp ERR! find Python checking if "python" can be used
#18 28.30 npm ERR! gyp ERR! find Python - "python" is not in PATH or produced an error
#18 28.30 npm ERR! gyp ERR! find Python 
#18 28.30 npm ERR! gyp ERR! find Python **********************************************************
#18 28.30 npm ERR! gyp ERR! find Python You need to install the latest version of Python.
#18 28.30 npm ERR! gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
#18 28.30 npm ERR! gyp ERR! find Python you can try one of the following options:
#18 28.30 npm ERR! gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
#18 28.30 npm ERR! gyp ERR! find Python   (accepted by both node-gyp and npm)
#18 28.30 npm ERR! gyp ERR! find Python - Set the environment variable PYTHON
#18 28.30 npm ERR! gyp ERR! find Python - Set the npm configuration variable python:
#18 28.30 npm ERR! gyp ERR! find Python   npm config set python "/path/to/pythonexecutable"
#18 28.30 npm ERR! gyp ERR! find Python For more information consult the documentation at:
#18 28.30 npm ERR! gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
#18 28.30 npm ERR! gyp ERR! find Python **********************************************************
#18 28.30 npm ERR! gyp ERR! find Python 
#18 28.30 npm ERR! gyp ERR! configure error 
#18 28.30 npm ERR! gyp ERR! stack Error: Could not find any Python installation to use
#18 28.30 npm ERR! gyp ERR! stack     at PythonFinder.fail (/azbuild/arizona-bootstrap/node_modules/node-gyp/lib/find-python.js:330:47)
#18 28.30 npm ERR! gyp ERR! stack     at PythonFinder.runChecks (/azbuild/arizona-bootstrap/node_modules/node-gyp/lib/find-python.js:159:21)
#18 28.30 npm ERR! gyp ERR! stack     at PythonFinder.<anonymous> (/azbuild/arizona-bootstrap/node_modules/node-gyp/lib/find-python.js:202:16)
#18 28.30 npm ERR! gyp ERR! stack     at PythonFinder.execFileCallback (/azbuild/arizona-bootstrap/node_modules/node-gyp/lib/find-python.js:294:16)
#18 28.30 npm ERR! gyp ERR! stack     at exithandler (node:child_process:410:5)
#18 28.30 npm ERR! gyp ERR! stack     at ChildProcess.errorhandler (node:child_process:422:5)
#18 28.30 npm ERR! gyp ERR! stack     at ChildProcess.emit (node:events:513:28)
#18 28.30 npm ERR! gyp ERR! stack     at Process.ChildProcess._handle.onexit (node:internal/child_process:291:12)
#18 28.30 npm ERR! gyp ERR! stack     at onErrorNT (node:internal/child_process:485:16)
#18 28.30 npm ERR! gyp ERR! stack     at processTicksAndRejections (node:internal/process/task_queues:83:21)
#18 28.30 npm ERR! gyp ERR! System Linux 5.10.47-linuxkit
#18 28.30 npm ERR! gyp ERR! command "/usr/local/bin/node" "/azbuild/arizona-bootstrap/node_modules/node-gyp/bin/node-gyp.js" "rebuild" "--verbose" "--libsass_ext=" "--libsass_cflags=" "--libsass_ldflags=" "--libsass_library="
#18 28.30 npm ERR! gyp ERR! cwd /azbuild/arizona-bootstrap/node_modules/node-sass
#18 28.30 npm ERR! gyp ERR! node -v v16.18.0
#18 28.30 npm ERR! gyp ERR! node-gyp -v v8.4.1
#18 28.30 npm ERR! gyp ERR! not ok 
#18 28.30 npm ERR! Build failed with error code: 1
#18 28.30 
#18 28.30 npm ERR! A complete log of this run can be found in:
#18 28.30 npm ERR!     /home/node/.npm/_logs/2022-11-09T21_23_41_323Z-debug-0.log
------
executor failed running [/bin/sh -c mkdir /home/node/.npm   && chown node:node /home/node/.npm   && npm config set cache='/home/node/.npm'   && npm install   && find node_modules -name '.DS_Store' -exec rm {} \;   && chown -R node:node "$AZ_BOOTSTRAP_FROZEN_DIR"]: exit code: 1
** Failed to build a new az-nodejs-ephemeral Docker image preconfigured with the /azbuild/arizona-bootstrap npm directory.
@trackleft
Copy link
Member Author

trackleft commented Nov 9, 2022

Then I switch from node-sass to sass and see

/lib64/ld-linux-x86-64.so.2: No such file or directory
ERROR: "docs-serve-external" exited with 255.
Exited with status 1.

@joeparsons
Copy link
Member

The failures we're seeing seem to be caused by known issues with 2 of our NPM dependencies (or dependencies of dependencies):

node-sass

node-sass and libsass are deprecated and not compatible with arm64 architectures as far we can tell.

hugo-bin

See fenneclab/hugo-bin#118 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants