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

Require and use measurement-kit v0.10.11 #374

Merged
merged 1 commit into from
Feb 26, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/mk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: docker run -v`pwd`:/mk -w/mk openobservatory/mk-alpine:20200225 /mk/.github/workflows/mk.sh
- run: docker run -v`pwd`:/mk -w/mk openobservatory/mk-alpine:20200226 /mk/.github/workflows/mk.sh
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Docker image with MK v0.10.11

6 changes: 2 additions & 4 deletions measurementkit/mkcgo/mkcgo.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,17 @@ import (
// #cgo windows,amd64 CFLAGS: -I/usr/local/opt/mingw-w64-measurement-kit/include/
// #cgo windows,amd64 LDFLAGS: /usr/local/opt/mingw-w64-measurement-kit/lib/libmeasurement_kit.a
// #cgo windows,amd64 LDFLAGS: /usr/local/opt/mingw-w64-libmaxminddb/lib/libmaxminddb.a
// #cgo windows,amd64 LDFLAGS: /usr/local/opt/mingw-w64-curl/lib/libcurl.a
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MK v0.10.11 doesn't depend anymore on curl on Windows

// #cgo windows,amd64 LDFLAGS: /usr/local/opt/mingw-w64-libevent/lib/libevent_openssl.a
// #cgo windows,amd64 LDFLAGS: /usr/local/opt/mingw-w64-libressl/lib/libssl.a
// #cgo windows,amd64 LDFLAGS: /usr/local/opt/mingw-w64-libressl/lib/libcrypto.a
// #cgo windows,amd64 LDFLAGS: /usr/local/opt/mingw-w64-libevent/lib/libevent_core.a
// #cgo windows,amd64 LDFLAGS: /usr/local/opt/mingw-w64-libevent/lib/libevent_extra.a
// #cgo windows,amd64 LDFLAGS: -lws2_32
// #cgo windows,amd64 LDFLAGS: -fstack-protector-strong
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is inherited by LibreSSL, which forces this flag. It's super annoying because this flag is not allowed by CGO by default and, to be able to use it, we need to export CGO_LDFLAGS_ALLOW='-fstack-.*'

//
// #cgo linux,amd64,ooni LDFLAGS: -static
// #cgo linux,amd64,ooni LDFLAGS: /usr/local/lib/libmeasurement_kit.a
// #cgo linux,amd64,ooni LDFLAGS: /usr/lib/libmaxminddb.a
// #cgo linux,amd64,ooni LDFLAGS: /usr/lib/libcurl.a
// #cgo linux,amd64,ooni LDFLAGS: /usr/lib/libnghttp2.a
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also on Linux (the OONI flavour), we don't depend on libcurl and its dependencies anymore.

// #cgo linux,amd64,ooni LDFLAGS: /usr/lib/libevent_openssl.a
// #cgo linux,amd64,ooni LDFLAGS: /usr/lib/libssl.a
// #cgo linux,amd64,ooni LDFLAGS: /usr/lib/libcrypto.a
Expand All @@ -46,7 +44,7 @@ import (
//
// #cgo linux,!ooni LDFLAGS: -lmeasurement_kit
//
// #if MK_VERSION_NUMERIC != 0x00000000010000101LL
// #if MK_VERSION_NUMERIC != 0x00000000010000111LL
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here we're saying we want MK v0.10.11

// #error "Wrong measurement-kit version, please recompile measurement-kit"
// #endif
"C"
Expand Down