Fix 32 bit build

This commit is contained in:
Xiaonan Shen
2022-05-04 20:47:17 +08:00
parent dbb734eae8
commit 62a2ad4034

View File

@@ -15,11 +15,14 @@ ls /build
rm -rf internal/frontend/cli
cp -r /build/http_rest_frontend/cli internal/frontend/cli
# Workaround for 32bit build. More details can be found in:
# https://github.com/antlr/antlr4/issues/2433#issuecomment-774514106
if [[ $(uname -m) == "armv7l" ]]; then
find $(go env GOPATH)/pkg/mod/github.com/\!proton\!mail/go-rfc5322*/ -type f -exec sed -i.bak 's/(1<</(int64(1)<</g' {} +
fi
# Build
if ! make build-nogui ; then
# If build fails it's probably because it is a 32bit
# system and there was a overflow error on the parser
# This is a workaround for this problem found at:
# https://github.com/antlr/antlr4/issues/2433#issuecomment-774514106
find $(go env GOPATH)/pkg/mod/github.com/\!proton\!mail/go-rfc5322*/ -type f -exec sed -i.bak 's/(1<</(int64(1)<</g' {} +
# Try again after implementing the workaround
make build-nogui
fi