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 update from 4.5.3 to 4.6.0 (dyld: lazy symbol binding failed: Symbol not found: _pthread_jit_write_protect_supported_np) #15614

Closed
molul opened this issue Jan 27, 2023 · 12 comments · Fixed by #15725
Labels
issue: bug Issue reporting a bug severity: high If it breaks the basic use of the product source: dependencies Source is dependency problem status: confirmed Confirmed by a Strapi Team member or multiple community members

Comments

@molul
Copy link

molul commented Jan 27, 2023

Bug report

Required System information

  • Node.js version: v18.12.1
  • NPM version: 9.1.3
  • Strapi version: 4.6.0 (updating from 4.5.3)
  • Database: sqlite
  • Operating system: MacOS

Describe the bug

I followed the update guide, but Strapi can't launch when I run "npm run develop".

Steps to reproduce the behavior

I followed the update guide. No migration needed as I was in 4.5.3. So the steps have been:

1- Change package.json. Mine's dependencies were:

"dependencies": {
    "@strapi/plugin-i18n": "4.5.3",
    "@strapi/plugin-users-permissions": "4.5.3",
    "@strapi/provider-email-nodemailer": "^4.5.3",
    "@strapi/strapi": "4.5.3",
    "better-sqlite3": "7.4.6",
    "node-postgres": "^0.6.2",
    "pg": "^8.8.0"
  },

And I changed it to:

  "dependencies": {
    "@strapi/plugin-i18n": "4.6.0",
    "@strapi/plugin-users-permissions": "4.6.0",
    "@strapi/provider-email-nodemailer": "^4.6.0",
    "@strapi/strapi": "4.6.0",
    "better-sqlite3": "7.4.6",
    "node-postgres": "^0.6.2",
    "pg": "^8.8.0"
  },

2- Then I run "npm install", and "npm run build" after that, as said in the guide. So far so good.

3- Then I run "npm run develop" and got this message:

yarn run v1.22.19
$ strapi develop
dyld: lazy symbol binding failed: Symbol not found: _pthread_jit_write_protect_supported_np
  Referenced from: /Users/luis/Desktop/buscogrupo/repos/buscogrupo-cms/node_modules/@strapi/plugin-upload/node_modules/sharp/build/Release/../.././vendor/8.13.3/darwin-x64/lib/libvips-cpp.42.dylib
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: _pthread_jit_write_protect_supported_np
  Referenced from: /Users/luis/Desktop/buscogrupo/repos/buscogrupo-cms/node_modules/@strapi/plugin-upload/node_modules/sharp/build/Release/../.././vendor/8.13.3/darwin-x64/lib/libvips-cpp.42.dylib
  Expected in: /usr/lib/libSystem.B.dylib

Also tried yarn develop. Obviously same result. Strapi can't launch, so I rolled back to 4.5.3.

Expected behavior

I'd expect that "npm run build" would launch Strapi 4.6.0

@molul molul changed the title Can't update from 4.5.3 to 4.60 (dyld: lazy symbol binding failed: Symbol not found: _pthread_jit_write_protect_supported_np) Can't update from 4.5.3 to 4.6.0 (dyld: lazy symbol binding failed: Symbol not found: _pthread_jit_write_protect_supported_np) Jan 28, 2023
@derrickmehaffy derrickmehaffy added the status: can not reproduce Not enough information to reproduce label Feb 2, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2023

This is a templated message

Hello @molul,

Thank you for reporting this bug, however we are unable to reproduce the issue you described given the information we have on hand. Can you please create a fresh project that you are able to reproduce the issue in, provide clear steps to reproduce this issue, and either upload this fresh project to a new GitHub repo or compress it into a .zip and upload it on this issue?

We would greatly appreciate your assistance with this, by working in a fresh project it will cut out any possible variables that might be unrelated.
Please note that issues labeled with status: can not reproduce will be closed in 14 days if there is no activity.

Thank you!

@Enache-Ionut
Copy link

Enache-Ionut commented Feb 3, 2023

I have the same issue with v4.6.0.

Starting the compilation for TypeScript files in /projectPath
dyld: lazy symbol binding failed: Symbol not found: _pthread_jit_write_protect_supported_np
  Referenced from: /projectPath/node_modules/sharp/build/Release/../.././vendor/8.13.3/darwin-x64/lib/libvips-cpp.42.dylib
  Expected in: /usr/lib/libSystem.B.dylib

dyld: Symbol not found: _pthread_jit_write_protect_supported_np
  Referenced from: /projectPath/node_modules/sharp/build/Release/../.././vendor/8.13.3/darwin-x64/lib/libvips-cpp.42.dylib
  Expected in: /usr/lib/libSystem.B.dylib

@molul did you find any solution for this?

Update

For me, it was the 'sharp v0.31.2' package. I installed the 0.31.1 version and this solved my problem.

@molul
Copy link
Author

molul commented Feb 3, 2023

@Enache-Ionut That didn't make the trick for me, unfortunately. I didn't have any sharp version installed.

Nevertheless, I tried running these commands one after another (with the package.json dependencies modified as in the OP):

npm uninstall sharp (just in case)
npm install
npm run build
npm run develop

But I got the same message. I wonder if it's something about these three dependencies I have:
"better-sqlite3": "7.4.6",
"node-postgres": "^0.6.2",
"pg": "^8.8.0"

I'll try to make a bank Strapi project this weekend to see if the issue can be reproduced

@molul
Copy link
Author

molul commented Feb 5, 2023

Ok, I created a Strapi 4.5.3 project, I checked it worked after installation, and then I updated to 4.6.0 and got the same error, so it's not something in my Strapi project (plugins, config or whatever). Maybe there's something wrong in my OS (MacOS Mojave) libraries.

Here are a couple of zip files for you:
-The original Strapi project (4.5.3, working)
-The same project updated to 4.6.0 (can't run it; I get the error described in the OP)

Hope it helps.

@Boegie19
Copy link
Collaborator

Boegie19 commented Feb 6, 2023

Upsteam issue with sharp:
lovell/sharp#3438

@derrickmehaffy derrickmehaffy added issue: bug Issue reporting a bug severity: high If it breaks the basic use of the product status: confirmed Confirmed by a Strapi Team member or multiple community members source: dependencies Source is dependency problem and removed status: can not reproduce Not enough information to reproduce labels Feb 6, 2023
@derrickmehaffy
Copy link
Member

Was able to confirm the issue is due to upstream dependency where the OS is MacOS Big Sur and lower

@PaulBratslavsky
Copy link
Contributor

Thankt you @Boegie19 and @derrickmehaffy Makes sense why I was not able to replicate the issue. Running mac os ventura.

@molul
Copy link
Author

molul commented Feb 6, 2023

@Boegie19 sorry for the noob question but I'm not sure if I can fix it myself already with the info in the link you provided (which I didn't fully understand) or if I should wait for some kind of instructions here ^_^U

Thanks in advance.

@derrickmehaffy
Copy link
Member

@Boegie19 sorry for the noob question but I'm not sure if I can fix it myself already with the info in the link you provided (which I didn't fully understand) or if I should wait for some kind of instructions here ^_^U

Thanks in advance.

He submitted a fix to the main repo, there are two ways you can resolve it for your project:

Use something like yarn resolutions to forcefully set the sharp version or upgrade your Mac beyond big sur.

@derrickmehaffy
Copy link
Member

Alternatively I'm trying to get his fixed merged for the 4.6.1 release on Wednesday.

@Boegie19
Copy link
Collaborator

Boegie19 commented Feb 7, 2023

got merged so in 4.6.1 it should be fixed

@molul
Copy link
Author

molul commented Feb 7, 2023

@Boegie19 awesome! Thank you very much :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue: bug Issue reporting a bug severity: high If it breaks the basic use of the product source: dependencies Source is dependency problem status: confirmed Confirmed by a Strapi Team member or multiple community members
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

5 participants