gonum / internal

Internal routines for the gonum project [DEPRECATED]
21 stars 9 forks source link

Missing textflag.h #42

Closed akiross closed 7 years ago

akiross commented 7 years ago

I tried to get gonum/floats but a certain header is missing:

$ go get github.com/gonum/floats
# github.com/gonum/internal/asm
../github.com/gonum/internal/asm/daxpyinc_amd64.s:43:22: fatal error: textflag.h: No such file or directory
 #include "textflag.h"
                      ^
compilation terminated.
$ go version
go version go1.6.1 gccgo (GCC) 6.3.1 20161221 (Red Hat 6.3.1-1) linux/amd64

I am on Fedora 25, installed go using the distro package manager and then set my GOPATH according to the Developer's guide, but maybe I am missing something.

EDIT: Maybe this is of interest

$go env
GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/user/MyGo"
GORACE=""
GOROOT="/usr"
GOTOOLDIR="/usr/libexec/gcc/x86_64-redhat-linux/6.3.1"
GO15VENDOREXPERIMENT="1"
CC="/usr/bin/gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0"
CXX="/usr/bin/g++"
CGO_ENABLED="1"
kortschak commented 7 years ago

textflag.h is part of the Go runtime[1] and should be present in your distro's package. Check the rpm and of its not there, complain.

[1]https://golang.org/src/runtime/textflag.h

akiross commented 7 years ago

Thanks. Yes, I noticed that golang-src was installed and textflag.h is available on my system in /usr/lib/golang/src/runtime/textflag.h but apparently it can't be found when compiling.

kortschak commented 7 years ago

I don't use a package manager to install Go, so I'm afraid I can't help with this. I'd suggest asking on golang-nuts.

kortschak commented 7 years ago

I've just noticed that you are using gcc-go. Have you tried with gc (the standard compiler suite)?

akiross commented 7 years ago

Yes, that solves it. I didn't know that Fedora automatically switched to gcc-go as default go compiler if it's installed in the system. Thanks!