-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
cmd/go: compilation order of fortran files is significant #21605
Comments
The go tool is not designed to be an all-purpose build system. |
Thank you for your response. I understand that it is not meant to be an
all-purpose build tool. I think that most people that propose changes or
new features understand that.
Would it make sense to document that files are fed into the compiler in
alphabetical order, because in this case that is an important detail? Can
it be counted on that this behavior will not change in future releases? Or
is it something that should not be depended on?
…On Thu, Aug 24, 2017, 9:42 PM Ian Lance Taylor ***@***.***> wrote:
The go tool is not designed to be an all-purpose build system.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#21605 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AF6AAUMIkQNcj1Aw9rLdFnjZUAshOBBzks5sblCcgaJpZM4PCNBn>
.
|
Interesting question. Guaranteeing alphabetical order is not a problem, but at least for C code we would not want to guarantee that the compilations do not occur in parallel. Perhaps for Fortran we could make an exception and serialize the compilations. But that might give us some extra complexity for a very unusual use case. |
I'm not an expert, but wouldn't the parallel compilation happen within
whatever external tool the files are being fed into (e.g., gcc, gfortran),
and not within the go tool itself?
…On Thu, Aug 24, 2017, 10:16 PM Ian Lance Taylor ***@***.***> wrote:
Interesting question. Guaranteeing alphabetical order is not a problem,
but at least for C code we would not want to guarantee that the
compilations do not occur in parallel. Perhaps for Fortran we could make an
exception and serialize the compilations. But that might give us some extra
complexity for a very unusual use case.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#21605 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AF6AAQXSaMld4u1YNz5j4Nh616m1823qks5sblidgaJpZM4PCNBn>
.
|
The go tool effectively spawns separate processes |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.9 linux/amd64
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="{....}"
GORACE=""
GOROOT="/usr/local/go"
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build881373539=/tmp/go-build -gno-record-gcc-switches"
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"
What did you do?
I would like to build a go package that includes fortran source code files, similar to https://github.com/golang/go/tree/master/misc/cgo/fortran. The important difference from this example is that the package that I would like to compile includes fortran modules, for example:
I would expect to be able to compile this with
go build
.What did you expect to see?
successful compilation.
What did you see instead?
I think the problem might be that the order that fortran files are fed into the compiler is significant, and the go tool does not appear to account for this.
Potential fixes for this problem:
The text was updated successfully, but these errors were encountered: