Workaround to compile for 32bit

This is a workaround based on [this
comment](https://github.com/antlr/antlr4/issues/2433#issuecomment-774514106).
It is not a pretty solution but it worked well on my test file.

It runs once to compile, if make fails, then it apply the fix and try
again, this is done so builds that don't need workaround don't use it
and also because the workaround is done on top of downloaded files
during ethe first compilation.
This commit is contained in:
Rafael Blumberg 2021-10-28 17:23:49 +01:00
parent 0372093a19
commit 07b0038678

View File

@ -10,4 +10,13 @@ cd proton-bridge
git checkout v$VERSION
# Build
make build-nogui
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