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

Build issues #4

Open
wemeetagain opened this issue Sep 26, 2024 · 2 comments
Open

Build issues #4

wemeetagain opened this issue Sep 26, 2024 · 2 comments

Comments

@wemeetagain
Copy link
Member

@achingbrain
I'd like to get an alpha of this published but I'm currently blocked on build issues in CI.
Seeing as how some of the failing targets are apple-darwin, perhaps you can try building locally to see what you encounter?

Should be as simple as:

  • ensure you have a rust toolchain (https://rustup.rs/)
  • corepack enable
  • yarn && yarn build - I'm assuming there will be errors on this step
@achingbrain
Copy link
Collaborator

achingbrain commented Sep 27, 2024

I had to apply this patch to the post-build script for it to work not error on Mac OS, I guess sed is slightly incompatible:

diff --git a/scripts/postbuild.sh b/scripts/postbuild.sh
index 48fa449..fa60d28 100755
--- a/scripts/postbuild.sh
+++ b/scripts/postbuild.sh
@@ -12,6 +12,6 @@ OUTPUT="src/napi.js"
 { cat scripts/JS_GEN_PREFIX; cat $OUTPUT; } > ${OUTPUT}.tmp
 mv ${OUTPUT}.tmp $OUTPUT
 
-sed -i "s/\.\/libp2p/..\/..\/libp2p/" $OUTPUT
-sed -i "s/'libp2p/'..\/..\/libp2p/" $OUTPUT
-sed -i "s/module\.exports\.\(.*\) = \(.*\)/export { \2 }/g" $OUTPUT
\ No newline at end of file
+sed -i '' "s/\.\/libp2p/..\/..\/libp2p/" $OUTPUT
+sed -i '' "s/'libp2p/'..\/..\/libp2p/" $OUTPUT
+sed -i '' "s/module\.exports\.\(.*\) = \(.*\)/export { \2 }/g" $OUTPUT

Basically adding '' after -i.

@achingbrain
Copy link
Collaborator

This works on MacOS for me now, even without the above patch 👍

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