ChainSafe / js-libp2p-quic

MIT License
6 stars 1 forks source link

Build issues #4

Open wemeetagain opened 5 days ago

wemeetagain commented 5 days ago

@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:

achingbrain commented 5 days ago

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.