Skip to content

Conversation

@lmarini
Copy link
Member

@lmarini lmarini commented Jul 1, 2022

No description provided.

@KastanDay
Copy link
Contributor

KastanDay commented Jul 8, 2022

Testing this on my M1 mac, it seems we need to use a more recent version of sharp from npm (for Apple Silicon/M1 support -- I can't speak to linux/arm64).

It appears the Dockerfile tries to install [email protected]. However, shap has only provided native M1 builds since [email protected]. They describe this in their official docs here: https://sharp.pixelplumbing.com/install#apple-m1

Could we move to a version of sharp >= 0.29.0?

For completeness, here's the full error message:

 => ERROR [clowder/clowder2-frontend clowder-build 5/8] RUN npm install                                                                                                                                       53.5s
------
 > [clowder/clowder2-frontend clowder-build 5/8] RUN npm install:
#0 0.414 npm WARN lifecycle [email protected]~preinstall: cannot run in wd [email protected] node tools/nodeVersionCheck.js (wd=/usr/src/app)
#0 51.85
#0 51.85 > [email protected] install /usr/src/app/node_modules/sharp
#0 51.85 > (node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)
#0 51.85
#0 51.93 sharp: Installation error: Use with glibc 2.28 requires manual installation of libvips >= 8.10.6
#0 51.93 sharp: Please see https://sharp.pixelplumbing.com/install for required dependencies
#0 52.64 npm WARN [email protected] No description
#0 52.65 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/webpack-dev-server/node_modules/fsevents):
#0 52.65 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})
#0 52.66 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/watchpack-chokidar2/node_modules/fsevents):
#0 52.66 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})
#0 52.67 npm WARN optional SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
#0 52.67 npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm64"})
#0 52.67
#0 52.68 npm ERR! code ELIFECYCLE
#0 52.68 npm ERR! errno 1
#0 52.69 npm ERR! [email protected] install: `(node install/libvips && node install/dll-copy && prebuild-install) || (node install/can-compile && node-gyp rebuild && node install/dll-copy)`
#0 52.69 npm ERR! Exit status 1
#0 52.69 npm ERR!
#0 52.69 npm ERR! Failed at the [email protected] install script.
#0 52.69 npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
#0 52.70
#0 52.70 npm ERR! A complete log of this run can be found in:
#0 52.70 npm ERR!     /root/.npm/_logs/2022-07-08T17_14_40_702Z-debug.log
------
failed to solve: executor failed running [/bin/sh -c npm install]: exit code: 1

@lmarini
Copy link
Member Author

lmarini commented Jul 18, 2022

Thank you @KastanDay. See if this fixes your issue. Checking to see if this fixes the github action as well.

lmarini and others added 2 commits July 18, 2022 16:34
This fixed the build issue for M1. I was unable to make sharp work. The blocker is a custom/manual libvips install.
@KastanDay
Copy link
Contributor

I talked with @longshuicy and she said we're not using favicons, so for now removing favicons and its dependency sharp should make the build work.

I'm pretty sure favicons depends on sharp 0.28.3 which is incompatible with M1.

@KastanDay
Copy link
Contributor

The build succeeded, I think this is safe to merge!

Down the line, we should probably use a different npm package for favicon support.

@KastanDay KastanDay marked this pull request as ready for review July 29, 2022 18:53
@longshuicy longshuicy self-requested a review July 29, 2022 19:30
@longshuicy
Copy link
Member

Looking at INCORE frontend. I'm not using favicon library.
I think just HtmlWebpackPlugin should work:

new HtmlWebpackPlugin({
    favicon: "./src/public/favicon.ico"
})

@lmarini
Copy link
Member Author

lmarini commented Jul 29, 2022

Thanks @KastanDay @longshuicy !

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

Successfully merging this pull request may close these issues.

linux/arm64 frontend github action fails because of sharp dependency

4 participants