rgonomic / rgo

R/Go integration
BSD 3-Clause "New" or "Revised" License
52 stars 3 forks source link

Tests are failing, under Ubuntu 20.04.1 (gollvm) #10

Closed advancedwebdeveloper closed 3 years ago

advancedwebdeveloper commented 4 years ago

Hi.

I am not sure what I am missing - not really dealing with R.

I was curious to run your tests:

$ go test ./... ? github.com/rgonomic/rgo [no test files] ok github.com/rgonomic/rgo/internal/camel (cached) ok github.com/rgonomic/rgo/internal/codegen (cached) --- FAIL: TestLicenses (0.19s) license_test.go:66: failed to find Go LICENSE text in GOROOT license_test.go:69: failed to find Go LICENSE path in GOROOT FAIL FAIL github.com/rgonomic/rgo/internal/mod 32.117s

2020/10/17 19:31:15 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/bool_array_in_0 2020/10/17 19:31:23 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/bool_array_out_0 2020/10/17 19:31:32 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/bool_array_out_named_0 2020/10/17 19:31:41 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/bool_in_0 2020/10/17 19:31:49 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/bool_out_0 2020/10/17 19:31:57 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/bool_out_named_0 2020/10/17 19:32:04 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/bool_slice_in_0 2020/10/17 19:32:04 warning: slice type []bool 2020/10/17 19:32:12 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/bool_slice_out_0 2020/10/17 19:32:19 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/bool_slice_out_named_0 2020/10/17 19:32:26 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/byte_array_in_0 2020/10/17 19:32:34 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/byte_array_out_0 2020/10/17 19:32:42 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/byte_array_out_named_0 2020/10/17 19:32:48 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/byte_in_0 2020/10/17 19:32:54 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/byte_out_0 2020/10/17 19:33:02 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/byte_out_named_0 2020/10/17 19:33:11 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/byte_slice_in_0 2020/10/17 19:33:11 warning: slice type []uint8 2020/10/17 19:33:19 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/byte_slice_out_0 2020/10/17 19:33:26 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/byte_slice_out_named_0 2020/10/17 19:33:31 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/complex128_array_in_0 2020/10/17 19:33:37 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/complex128_array_out_0 2020/10/17 19:33:43 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/complex128_array_out_named_0 2020/10/17 19:33:49 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/complex128_in_0 2020/10/17 19:33:57 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/complex128_out_0 2020/10/17 19:34:04 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/complex128_out_named_0 2020/10/17 19:34:13 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/complex128_slice_in_0 2020/10/17 19:34:13 warning: slice type []complex128 2020/10/17 19:34:19 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/complex128_slice_out_0 2020/10/17 19:34:28 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/complex128_slice_out_named_0 2020/10/17 19:34:40 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/complex64_array_in_0 2020/10/17 19:34:48 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/complex64_array_out_0 2020/10/17 19:34:56 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/complex64_array_out_named_0 2020/10/17 19:35:06 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/complex64_in_0 2020/10/17 19:35:13 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/complex64_out_0 2020/10/17 19:35:21 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/complex64_out_named_0 2020/10/17 19:35:27 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/complex64_slice_in_0 2020/10/17 19:35:27 warning: slice type []complex64 2020/10/17 19:35:33 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/complex64_slice_out_0 2020/10/17 19:35:41 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/complex64_slice_out_named_0 2020/10/17 19:35:48 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/float32_array_in_0 2020/10/17 19:35:58 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/float32_array_out_0 2020/10/17 19:36:11 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/float32_array_out_named_0 2020/10/17 19:36:20 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/float32_in_0 2020/10/17 19:36:30 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/float32_out_0 2020/10/17 19:36:46 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/float32_out_named_0 2020/10/17 19:36:59 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/float32_slice_in_0 2020/10/17 19:36:59 warning: slice type []float32 2020/10/17 19:37:10 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/float32_slice_out_0 2020/10/17 19:37:23 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/float32_slice_out_named_0 2020/10/17 19:37:32 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/float64_array_in_0 2020/10/17 19:37:43 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/float64_array_out_0 2020/10/17 19:37:53 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/float64_array_out_named_0 2020/10/17 19:38:04 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/float64_in_0 2020/10/17 19:38:17 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/float64_out_0 2020/10/17 19:38:30 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/float64_out_named_0 2020/10/17 19:38:45 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/float64_slice_in_0 2020/10/17 19:38:45 warning: slice type []float64 2020/10/17 19:38:56 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/float64_slice_out_0 2020/10/17 19:39:06 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/float64_slice_out_named_0 2020/10/17 19:39:16 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/int16_array_in_0 2020/10/17 19:39:24 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/int16_array_out_0 2020/10/17 19:39:34 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/int16_array_out_named_0 2020/10/17 19:39:43 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/int16_in_0 2020/10/17 19:39:53 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/int16_out_0 2020/10/17 19:40:01 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/int16_out_named_0 2020/10/17 19:40:15 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/int16_slice_in_0 2020/10/17 19:40:15 warning: slice type []int16 2020/10/17 19:40:25 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/int16_slice_out_0 2020/10/17 19:40:36 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/int16_slice_out_named_0 2020/10/17 19:40:48 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/int32_array_in_0 2020/10/17 19:41:03 wrapping: github.com/rgonomic/rgo/internal/pkg/testdata/int32_array_out_0 panic: test timed out after 10m0s

goroutine 891 [running]: testing.func1 /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/testing/testing.go:1664 created by time.goFunc /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/time/sleep.go:167 +0x4d

goroutine 1 [chan receive, 8 minutes]: testing.T.Run /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/testing/testing.go:1215 testing.runTests..func1 /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/testing/testing.go:1485 testing.tRunner /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/testing/testing.go:1163 testing.runTests /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/testing/testing.go:1483 testing.M.Run /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/testing/testing.go:1393 main.main /tmp/go-build/b085/_testmain.go:43

goroutine 6 [select]: gocommand.runCmdContext /home/oceanfish81/rgo/vendor/golang.org/x/tools/internal/gocommand/invoke.go:204 golang.x2eorg..z2fx..z2ftools..z2finternal..z2fgocommand.Invocation.run /home/oceanfish81/rgo/vendor/golang.org/x/tools/internal/gocommand/invoke.go:190 golang.x2eorg..z2fx..z2ftools..z2finternal..z2fgocommand.Invocation.runWithFriendlyError /home/oceanfish81/rgo/vendor/golang.org/x/tools/internal/gocommand/invoke.go:139 golang.x2eorg..z2fx..z2ftools..z2finternal..z2fgocommand.Runner.runConcurrent /home/oceanfish81/rgo/vendor/golang.org/x/tools/internal/gocommand/invoke.go:96 golang.x2eorg..z2fx..z2ftools..z2finternal..z2fgocommand.Runner.RunRaw /home/oceanfish81/rgo/vendor/golang.org/x/tools/internal/gocommand/invoke.go:71 golang.x2eorg..z2fx..z2ftools..z2fgo..z2fpackages.golistState.invokeGo /home/oceanfish81/rgo/vendor/golang.org/x/tools/go/packages/golist.go:839 golang.x2eorg..z2fx..z2ftools..z2fgo..z2fpackages.golistState.createDriverResponse /home/oceanfish81/rgo/vendor/golang.org/x/tools/go/packages/golist.go:425 packages.goListDriver /home/oceanfish81/rgo/vendor/golang.org/x/tools/go/packages/golist.go:198 packages.defaultDriver /home/oceanfish81/rgo/vendor/golang.org/x/tools/go/packages/packages.go:251 golang.x2eorg..z2fx..z2ftools..z2fgo..z2fpackages.Load /home/oceanfish81/rgo/vendor/golang.org/x/tools/go/packages/packages.go:234 pkg.typesFor /home/oceanfish81/rgo/internal/pkg/types_test.go:80 github.x2ecom..z2frgonomic..z2frgo..z2finternal..z2fpkg.TestAnalyse /home/oceanfish81/rgo/internal/pkg/types_test.go:67 testing.tRunner /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/testing/testing.go:1163 created by testing.T.Run /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/testing/testing.go:1214 +0x41c

goroutine 888 [IO wait]: internal..z2fpoll.runtime_pollWait /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/runtime/netpoll.go:226 internal..z2fpoll.pollDesc.wait /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/internal/poll/fd_poll_runtime.go:87 internal..z2fpoll.pollDesc.waitRead /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/internal/poll/fd_poll_runtime.go:92 internal..z2fpoll.FD.Read /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/internal/poll/fd_unix.go:159 os.File.read /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/os/file_posix.go:31 os.File.Read /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/os/file.go:116 bytes.Buffer.ReadFrom /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/bytes/buffer.go:204 io.copyBuffer /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/io/io.go:395 io.Copy /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/io/io.go:368 exec.func1 /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/os/exec/exec.go:311 exec.func1 /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/os/exec/exec.go:441 created by os..z2fexec.Cmd.Start /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/os/exec/exec.go:440 +0x6fb

goroutine 890 [syscall]: goroutine in C code; stack unavailable created by golang.x2eorg..z2fx..z2ftools..z2finternal..z2fgocommand.Invocation.run /home/oceanfish81/rgo/vendor/golang.org/x/tools/internal/gocommand/invoke.go:190 +0x8c0

goroutine 889 [IO wait]: internal..z2fpoll.runtime_pollWait /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/runtime/netpoll.go:226 internal..z2fpoll.pollDesc.wait /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/internal/poll/fd_poll_runtime.go:87 internal..z2fpoll.pollDesc.waitRead /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/internal/poll/fd_poll_runtime.go:92 internal..z2fpoll.FD.Read /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/internal/poll/fd_unix.go:159 os.File.read /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/os/file_posix.go:31 os.File.Read /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/os/file.go:116 bytes.Buffer.ReadFrom /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/bytes/buffer.go:204 io.copyBuffer /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/io/io.go:395 io.Copy /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/io/io.go:368 exec.func1 /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/os/exec/exec.go:311 exec.func1 /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/os/exec/exec.go:441 created by os..z2fexec.Cmd.Start /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/os/exec/exec.go:440 +0x6fb FAIL github.com/rgonomic/rgo/internal/pkg 601.089s go build github.com/rgonomic/rgo/sexp: invalid flag in pkg-config --libs: -Wl,-Bsymbolic-functions panic: test timed out after 10m0s

goroutine 107 [running]: testing.func1 /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/testing/testing.go:1664 created by time.goFunc /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/time/sleep.go:167 +0x4d

goroutine 1 [chan receive, 9 minutes]: testing.T.Run /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/testing/testing.go:1215 testing.runTests..func1 /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/testing/testing.go:1485 testing.tRunner /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/testing/testing.go:1163 testing.runTests /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/testing/testing.go:1483 testing.M.Run /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/testing/testing.go:1393 main.main /tmp/go-build/b088/_testmain.go:43

goroutine 3 [chan receive]: testing.T.Run /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/testing/testing.go:1215 github.x2ecom..z2frgonomic..z2frgo..z2finternal..z2frgo.TestRgo /home/oceanfish81/rgo/internal/rgo/rgo_test.go:55 testing.tRunner /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/testing/testing.go:1163 created by testing.T.Run /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/testing/testing.go:1214 +0x41c

goroutine 105 [syscall]: goroutine in C code; stack unavailable created by testing.T.Run /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/testing/testing.go:1214 +0x41c

goroutine 106 [IO wait]: internal..z2fpoll.runtime_pollWait /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/runtime/netpoll.go:226 internal..z2fpoll.pollDesc.wait /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/internal/poll/fd_poll_runtime.go:87 internal..z2fpoll.pollDesc.waitRead /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/internal/poll/fd_poll_runtime.go:92 internal..z2fpoll.FD.Read /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/internal/poll/fd_unix.go:159 os.File.read /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/os/file_posix.go:31 os.File.Read /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/os/file.go:116 bytes.Buffer.ReadFrom /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/bytes/buffer.go:204 io.copyBuffer /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/io/io.go:395 io.Copy /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/io/io.go:368 exec.func1 /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/os/exec/exec.go:311 exec.func1 /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/os/exec/exec.go:441 created by os..z2fexec.Cmd.Start /home/oceanfish81/workarea/llvm-project/llvm/tools/gollvm/gofrontend/libgo/go/os/exec/exec.go:440 +0x6fb FAIL github.com/rgonomic/rgo/internal/rgo 602.606s ? github.com/rgonomic/rgo/internal/tool [no test files] ? github.com/rgonomic/rgo/internal/vfs/osfs [no test files] ok github.com/rgonomic/rgo/internal/vfs/txtar (cached)

Most of them are failing. Please specify what I should provide.

$ go version go version go1.15.2 gollvm LLVM 12.0.0git linux/amd64

Thanks

advancedwebdeveloper commented 4 years ago

$ go env GO111MODULE="" GOARCH="amd64" GOBIN="" GOCACHE="/home/oceanfish81/.cache/go-build" GOENV="/home/oceanfish81/.config/go/env" GOEXE="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/oceanfish81/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/oceanfish81/go" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/home/oceanfish81/gollvm_dist" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/home/oceanfish81/gollvm_dist/tools" GCCGO="/home/oceanfish81/gollvm_dist/bin/llvm-goc" AR="ar" CC="/usr/bin/clang" CXX="/usr/bin/clang++" CGO_ENABLED="1" GOMOD="/home/oceanfish81/rgo/go.mod" 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 -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build063060413=/tmp/go-build -gno-record-gcc-switches -funwind-tables"

kortschak commented 4 years ago

Thanks for the report. I don't use gollvm, so I'm not at all sure where to start with this.

advancedwebdeveloper commented 4 years ago

@kortschak , you can simply use a container or a VM. You would require an environment, which is "clean" - so there would be no pre-installed Go distros. Simply extract Clang/LLVM into one folder - and gollvm into another folder. Then you have to execute the following, in each of those:

$ sudo cp -R /usr/ . Or if you would login into root - simply do # cp -R /usr/ . Then you can check your installation, by running $go env && go version . Oh, and do not forget to check whether you have as installed (binutils package).

In my case - I am on Ubuntu 20.04.1 - but I could help you with any other x86_64 Linux.

kortschak commented 4 years ago

The first failure is based on the assumption of the existence of the gc toolchain (the test looks for a LICENSE file that I expect to be there). The second fails because of the requirement for the gcc flags -Wl,-Bsymbolic-functions; if you can find the equivalents for llvm? You will also need to set the equivalent white-listing env var as specified in the .travis.yml at the root of the repo.

advancedwebdeveloper commented 4 years ago

CC @thanm @cherrymui @ianlancetaylor

ianlancetaylor commented 4 years ago

How is -Wl,-Bsymbolic-functions passed? If this appears in a #cgo LDFLAGS then I would expect it work for GoLLVM.

kortschak commented 4 years ago

They are passed via #cgo pkg-config.

ianlancetaylor commented 4 years ago

Thanks. I would still expect it to work. But perhaps here is some bug with #cgo pkg-config and GoLLVM.

advancedwebdeveloper commented 4 years ago

Thanks. I would still expect it to work. But perhaps here is some bug with #cgo pkg-config and GoLLVM.

And how do you propose to track that down? Any specific logs, which I should collect?

ianlancetaylor commented 4 years ago

It would help if someone wrote a small standalone test case that uses #cgo pkg-config to check whether linker flags are handled correctly for gccgo/GoLLVM. That could then be filed as an issue at https://golang.org/issue. Thanks.

advancedwebdeveloper commented 4 years ago

Could pkgconfig be of help here? CC @rjeczalik, @chriskillpack

thanm commented 4 years ago

I built a small example that uses pkg-config. That works fine with gollvm as far as I can tell.

It looks as though the problem is related the use of a non-approved flag in the pkg-config libs value:

go build github.com/rgonomic/rgo/sexp: invalid flag in pkg-config --libs: -Wl,-Bsymbolic-functions

The support for enabling this flag was added on Sep 2 of this year in CL 252698 by @kortschak , reviewed by @ianlancetaylor. The problem is that Gollvm is currently at Go 1.5 for std.libgo; the CL in question is present in trunk but not Go 1.15.

https://github.com/rgonomic/rgo/blame/abc1c4469e0013c2183e6f8ef6915c45c3f69c2d/go.mod#L3 says "go 1.15", which seems like a problem.

kortschak commented 4 years ago

Thanks, @thanm.

@advancedwebdeveloper, above I said "You will also need to set the equivalent white-listing env var as specified in the .travis.yml at the root of the repo." Did you try this? The required env var is here.