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

Inexplicably fix OS X's make happy by removing spaces #1

Merged
merged 1 commit into from
Mar 7, 2019

Conversation

tyler
Copy link
Collaborator

@tyler tyler commented Mar 7, 2019

When attempting to make package on OS X, I was confronted with this error:

#
# Collect metadata on the sysroot and perform sanity checks.
#
mkdir -p "/opt/wasi-sdk/share/sysroot/share/wasm32-wasi"
# Collect symbol information.
# TODO: Use llvm-nm --extern-only instead of grep. This is blocked on
# LLVM PR40497, which is fixed in 9.0, but not in 8.0.
/opt/wasi-sdk/bin/llvm-nm --defined-only "/opt/wasi-sdk/share/sysroot/lib/wasm32-wasi"/libc.a "/opt/wasi-sdk/share/sysroot/lib/wasm32-wasi"/*.o \
        |grep ' [[:upper:]] ' |sed 's/.* [[:upper:]] //' |LC_COLLATE=C sort > "/opt/wasi-sdk/share/sysroot/share/wasm32-wasi/defined-symbols.txt"
for undef_sym in $(/opt/wasi-sdk/bin/llvm-nm --undefined-only "/opt/wasi-sdk/share/sysroot/lib/wasm32-wasi"/*.a "/opt/wasi-sdk/share/sysroot/lib/wasm32-wasi"/*.o |grep ' U ' |sed 's/.* U //' |LC_COLLATE=C sort |uniq); do \
        grep -q '\<'$undef_sym'\>' "/opt/wasi-sdk/share/sysroot/share/wasm32-wasi/defined-symbols.txt" || echo $undef_sym; \
    done   > "/opt/wasi-sdk/share/sysroot/share/wasm32-wasi/undefinols.txt"ls.txt"
/bin/sh: -c: line 0: unexpected EOF while looking for matching `"'
/bin/sh: -c: line 1: syntax error: unexpected end of file
make[1]: *** [finish] Error 2
make: *** [build/reference-sysroot.BUILT] Error 2

It appears that the done > "/opt/wasi-sdk/share/sysroot/share/wasm32-wasi/undefinols.txt"ls.txt" bit is getting corrupted. I tried several things to figure out what was going on. However, simply removing the extra spaces between done and > seems to have fixed it. I have no idea why. But the build reliably works now.

@pchickey pchickey merged commit d0d8bc4 into master Mar 7, 2019
@pchickey pchickey deleted the tyler/makefile-tweak branch March 7, 2019 19:27
waynr pushed a commit to waynr/wasix-libc that referenced this pull request May 30, 2023
badeend pushed a commit to badeend/wasi-libc that referenced this pull request Dec 5, 2023
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.

2 participants