Skip to content
This repository has been archived by the owner on Mar 6, 2020. It is now read-only.

Tests fail when toolchain defaults to PIE #607

Closed
mwhudson opened this issue Jun 13, 2016 · 9 comments
Closed

Tests fail when toolchain defaults to PIE #607

mwhudson opened this issue Jun 13, 2016 · 9 comments

Comments

@mwhudson
Copy link

As you can see on https://launchpadlibrarian.net/263962603/buildlog_ubuntu-yakkety-amd64.gb_0.4.1-1_BUILDING.txt.gz

This was fixed in Go by https://go-review.googlesource.com/18359. I guess you need something similarly gross for gb.

@ghost
Copy link

ghost commented Oct 18, 2016

This is also screwing me when trying to compile https:/mattn/go-sqlite3.

I can't really decipher what they did in that patch, but I'm guessing it's not something I can solve myself by passing flags to gb build -ldflags or -gcflags?

@davecheney
Copy link
Contributor

Can you please post some details, including the gb env and go env.

On 19 Oct. 2016, at 04:15, Matt Reyer [email protected] wrote:

This is also screwing me when trying to compile https:/mattn/go-sqlite3.

I can't really decipher what they did in that patch, but I'm guessing it's not something I can solve myself by passing flags to gb build -ldflags or -gcflags?


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

@ghost
Copy link

ghost commented Oct 19, 2016

Ubuntu 16.10.

This doc may be of some help: https://wiki.ubuntu.com/SecurityTeam/PIE

gb env:

GB_PROJECT_DIR="/home/matt/dev/fitness-liberator"
GB_SRC_PATH="/home/matt/dev/fitness-liberator/src:/home/matt/dev/fitness-liberator/vendor/src"
GB_PKG_DIR="/home/matt/dev/fitness-liberator/pkg/linux-amd64"
GB_BIN_SUFFIX="-linux-amd64"
GB_GOROOT="/usr/local/go"

go env:

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/matt/.go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build847199824=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"

@davecheney
Copy link
Contributor

Does this only happen with the version of Go that Ubuntu ships?

On Wed, 19 Oct 2016, 11:08 Matt Reyer [email protected] wrote:

Ubuntu 16.10.

This doc may be of some help: https://wiki.ubuntu.com/SecurityTeam/PIE

gb env:

GB_PROJECT_DIR="/home/matt/dev/fitness-liberator"
GB_SRC_PATH="/home/matt/dev/fitness-liberator/src:/home/matt/dev/fitness-liberator/vendor/src"
GB_PKG_DIR="/home/matt/dev/fitness-liberator/pkg/linux-amd64"
GB_BIN_SUFFIX="-linux-amd64"
GB_GOROOT="/usr/local/go"

go env:

GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/matt/.go"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build847199824=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"


You are receiving this because you commented.

Reply to this email directly, view it on GitHub
#607 (comment),
or mute the thread
https:/notifications/unsubscribe-auth/AAAcA6QJn5dvCQyM5oyH7gfXsNOJ6oinks5q1XuNgaJpZM4Iz-sR
.

@ghost
Copy link

ghost commented Oct 19, 2016

@davecheney Not sure. I'm using go 1.7.1 linux/amd64 downloaded directly from https://golang.org

@ghost
Copy link

ghost commented Nov 7, 2016

Updated to go 1.7.3, problem persists.

Tried to install @rdwilliamson's fork but I get this error when using go get github.com/rdwilliamson/gb/...:

package github.com/rdwilliamson/gb
    imports github.com/constabulary/gb/internal/debug: use of internal package not allowed
...

@davecheney how can I pull the @rdwilliamson fork to try it out?

Also to note, this doesn't break on every package, only some of them. Here's some I've found so far:

@rdwilliamson
Copy link
Contributor

cd $GOPATH/src/github.com/constabulary/gb
git remote add rdwilliamson https:/rdwilliamson/gb.git
git fetch rdwilliamson
git cherry-pick rdwilliamson/master
go install github.com/constabulary/gb/...

As a note, I'm only seeing this problem on my Debian testing/stretch machine and not the stable/jessie ones.

@mwhudson
Copy link
Author

mwhudson commented Nov 8, 2016

As a note, I'm only seeing this problem on my Debian testing/stretch machine and not the stable/jessie ones.

That would be because PIE is only the default in stretch, not jessie.

@davecheney
Copy link
Contributor

Fixed by #655

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants