Re: [go-nuts] How to Create Dynamically Linked Go Programs Redux

2023-08-12 Thread jlfo...@berkeley.edu
Believe me, it's not something I want to do. But, it's the only way that building a Go program with dynamic linking will work. Here's what I mean: % go build -linkshared file1.go internal/abi: go build internal/abi: copying

Re: [go-nuts] How to Create Dynamically Linked Go Programs Redux

2023-08-12 Thread Ian Lance Taylor
On Sat, Aug 12, 2023 at 10:27 AM jlfo...@berkeley.edu wrote: > > Thanks. > > There's a more fundamental problem, though. Try running > > go build -linkshared hello.go > > as a non-privileged user. You'll get a bunch of permission denied messages. > (I had mentioned this > back in January). This

Re: [go-nuts] How to Create Dynamically Linked Go Programs Redux

2023-08-12 Thread jlfo...@berkeley.edu
Thanks. There's a more fundamental problem, though. Try running go build -linkshared hello.go as a non-privileged user. You'll get a bunch of permission denied messages. (I had mentioned this back in January). This is why I'm fooling around running the compiler and linker manually. I

Re: [go-nuts] How to Create Dynamically Linked Go Programs Redux

2023-08-11 Thread Ian Lance Taylor
On Fri, Aug 11, 2023 at 6:15 PM jlfo...@berkeley.edu wrote: > > Now that Go 1.21 has been released, I've returned to trying to figure out how > to > dynamically link a Go program. Back in January I posted the results of my > first attempt > with an earlier version of Go, which was: > > 1)

[go-nuts] How to Create Dynamically Linked Go Programs Redux

2023-08-11 Thread jlfo...@berkeley.edu
Now that Go 1.21 has been released, I've returned to trying to figure out how to dynamically link a Go program. Back in January I posted the results of my first attempt with an earlier version of Go, which was: 1) Building a Go shared library by running go install -buildmode=shared