Skip to content

travis cgo ubuntu doesn't like c11 #22

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

Open
wsc1 opened this issue Sep 27, 2018 · 3 comments
Open

travis cgo ubuntu doesn't like c11 #22

wsc1 opened this issue Sep 27, 2018 · 3 comments
Labels
help wanted Extra attention is needed

Comments

@wsc1
Copy link
Member

wsc1 commented Sep 27, 2018

despite the fact that the compiler version supports it and CFLAGS are set, we're getting no such file or directory for stdatomic.h

$ gimme version
v1.5.2
$ go version
go version go1.10 linux/amd64
go.env
$ go env
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/travis/.cache/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/travis/gopath"
GORACE=""
GOROOT="/home/travis/.gimme/versions/go1.10.linux.amd64"
GOTMPDIR=""
GOTOOLDIR="/home/travis/.gimme/versions/go1.10.linux.amd64/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build560165872=/tmp/go-build -gno-record-gcc-switches"
5.88s$ sudo apt-get install libasound2-dev && go get -t zikichombo.org/sio/...
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  libasound2-doc
The following NEW packages will be installed:
  libasound2-dev
0 upgraded, 1 newly installed, 0 to remove and 251 not upgraded.
Need to get 59.3 kB of archives.
After this operation, 479 kB of additional disk space will be used.
Get:1 http://us-central1.gce.archive.ubuntu.com/ubuntu trusty/main amd64 libasound2-dev amd64 1.0.27.2-3ubuntu7 [59.3 kB]
Fetched 59.3 kB in 0s (5,570 kB/s)
Selecting previously unselected package libasound2-dev:amd64.
(Reading database ... 93696 files and directories currently installed.)
Preparing to unpack .../libasound2-dev_1.0.27.2-3ubuntu7_amd64.deb ...
Unpacking libasound2-dev:amd64 (1.0.27.2-3ubuntu7) ...
Setting up libasound2-dev:amd64 (1.0.27.2-3ubuntu7) ...
# zikichombo.org/sio/libsio
In file included from ../../../zikichombo.org/sio/libsio/cb.go:6:0:
./cb.h:4:23: fatal error: stdatomic.h: No such file or directory
 #include <stdatomic.h>
                       ^
compilation terminated.
@mewmew
Copy link
Member

mewmew commented Sep 27, 2018

Perhaps check the GCC version, just to make sure.

If GCC is not installed, or the version is too old, add something along the lines of

before_install:
  - sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
  - sudo apt-get update -q
  - sudo apt-get install gcc-8 -y

@wsc1
Copy link
Member Author

wsc1 commented Sep 27, 2018

thanks for the suggestion. tried that, same error :(

@mewmew
Copy link
Member

mewmew commented Sep 27, 2018

That's a shame. Not sure what else may be wrong. What you could do is to run find /usr/include -type f -name 'stdatomic.h on Travis, and see where the file is located. Perhaps you would have to add an include path for Cgo.

@wsc1 wsc1 added the help wanted Extra attention is needed label Sep 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants