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

error: binding.gyp linking to /osx32 folder #295

Open
podrivo opened this issue Jul 18, 2021 · 1 comment
Open

error: binding.gyp linking to /osx32 folder #295

podrivo opened this issue Jul 18, 2021 · 1 comment

Comments

@podrivo
Copy link

podrivo commented Jul 18, 2021

Hello!

I've been trying different builds the past days and came across this.
I was able to build in Windows, but when went to macOS, I got this error:

Building module: greenworks, Completed: 0ld: warning: directory not found for option '-L/Library/WebServer/Documents/_dev/greenworks-test/node_modules/greenworks/deps/steamworks_sdk/redistributable_bin/osx32/'
ld: warning: directory not found for option '-L/Library/WebServer/Documents/_dev/greenworks-test/node_modules/greenworks/deps/steamworks_sdk/public/steam/lib/osx32/'
ld: library not found for -lsteam_api
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Release/greenworks-osx64.node] Error 1
✖ Rebuild Failed

An unhandled error occurred inside electron-rebuild
node-gyp failed to rebuild '/Library/WebServer/Documents/_dev/greenworks-test/node_modules/greenworks'.
Error: `make` failed with exit code: 2

Error: node-gyp failed to rebuild '/Library/WebServer/Documents/_dev/greenworks-test/node_modules/greenworks'.
Error: `make` failed with exit code: 2

    at ModuleRebuilder.rebuildNodeGypModule (/Library/WebServer/Documents/_dev/greenworks-test/node_modules/electron-rebuild/lib/src/module-rebuilder.js:193:19)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async Rebuilder.rebuildModuleAt (/Library/WebServer/Documents/_dev/greenworks-test/node_modules/electron-rebuild/lib/src/rebuild.js:190:9)
    at async Rebuilder.rebuild (/Library/WebServer/Documents/_dev/greenworks-test/node_modules/electron-rebuild/lib/src/rebuild.js:152:17)
    at async /Library/WebServer/Documents/_dev/greenworks-test/node_modules/electron-rebuild/lib/src/cli.js:146:9
error Command failed with exit code 255.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Error is saying that it can't find the /osx32/ folder, but I guess this folder shouldn't exist? I wasn't sure, so I went and edit the bindings.gyp and removed the number 32:

greenworks/binding.gyp

Lines 47 to 52 in 4fbf54a

'variables': {
'redist_bin_dir': 'osx32',
'public_lib_dir': 'osx32',
'lib_steam': 'libsteam_api.dylib',
'lib_encryptedappticket': 'libsdkencryptedappticket.dylib',
},

And after this edit, the build passed!

⠦ Building module: greenworks, Completed: 026 warnings generated.
⠧ Building module: greenworks, Completed: 0  SOLINK_MODULE(target) Release/greenworks-osx64.node
⠇ Building module: greenworks, Completed: 0  ACTION binding_gyp_copy_binaries_target_Copy_Binaries lib
⠏ Building module: greenworks, Completed: 0  TOUCH Release/obj.target/copy_binaries.stamp
✔ Rebuild Complete
✨  Done in 51.71s.

Can't tell, but is this a bug? I'm just happy it works! ✨

@podrivo podrivo changed the title binding.gyp linking to /osx32 folder error: binding.gyp linking to /osx32 folder Jul 18, 2021
@qq253498229
Copy link

Oh my God, thank you so much, your answer has helped me so much!

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