1
0
Fork 0

Merge pull request #911 from rqlite/static-compilation

Statically link libc
master
Philip O'Toole 3 years ago committed by GitHub
commit bc73067dc3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -63,7 +63,7 @@ jobs:
- checkout - checkout
- run: sudo apt-get install python-requests - run: sudo apt-get install python-requests
- run: go get -t -d -v ./... - run: go get -t -d -v ./...
- run: go install ./... - run: go install -tags osusergo,netgo,sqlite_omit_load_extension -ldflags="-extldflags=-static" ./...
- run: - run:
command: system_test/full_system_test.py command: system_test/full_system_test.py
environment: environment:

@ -42,7 +42,13 @@ cd rqlite
go get -d ./... go get -d ./...
LINKER_PKG_PATH=github.com/rqlite/rqlite/cmd LINKER_PKG_PATH=github.com/rqlite/rqlite/cmd
go install -ldflags="-X $LINKER_PKG_PATH.Version=$VERSION -X $LINKER_PKG_PATH.Branch=$branch -X $LINKER_PKG_PATH.Commit=$commit -X $LINKER_PKG_PATH.Buildtime=$buildtime" ./... go install -tags osusergo,netgo,sqlite_omit_load_extension -ldflags="-extldflags=-static -X $LINKER_PKG_PATH.Version=$VERSION -X $LINKER_PKG_PATH.Branch=$branch -X $LINKER_PKG_PATH.Commit=$commit -X $LINKER_PKG_PATH.Buildtime=$buildtime" ./...
ldd $GOPATH/bin/rqlited
if [ $? -ne 1 ]; then
echo "Failed to confirm fully static linking"
exit 1
fi
release=`echo rqlite-$VERSION-$kernel-$machine | tr '[:upper:]' '[:lower:]'` release=`echo rqlite-$VERSION-$kernel-$machine | tr '[:upper:]' '[:lower:]'`
release_pkg=${release}.tar.gz release_pkg=${release}.tar.gz

Loading…
Cancel
Save