[go-nuts] How to develop with Go source code change?
Hey, I'm trying to do some Go source code development. But I'm confused about how to do the development. The Go source code is cloned from https://github.com/golang/go master branch. Originally, I run `cd src &^ ./all.bash` to build the latest Go 1.22 version. It works fine. Then I'm trying to do some source code development. For example, I'm looking at this issue https://github.com/golang/go/issues/64824. It's something about devirtualize.go. So I added two debug lines like `// fmt.Printf("rulin DevirtualizeAndInlineFunc is called\n")` to `src/compile/internal/interleaved/interleaved.go`. Then I tried to build an updated Go version with the updated Go source code `./all.bash`. It failed with ``` rulin DevirtualizeAndInlineFunc is called rulin DevirtualizeAndInlineFunc is called rulin DevirtualizeAndInlineFunc is called rulin DevirtualizeAndInlineFunc is called rulin DevirtualizeAndInlineFunc is called FAIL FAIL cmd/vet 20.524s FAIL go tool dist: Failed: exit status 1 ``` My original development plan is to add the debug line, build the updated Go version, run test code with the updated Go version, and check the debug output message at Go source code. Somehow this doesn't work. At least, it stops at the first step to build an updated Go version with debug message. So here're two questions: 1. What did I do wrong in above steps? 2. Do I have to rebuild Go version every time I make changes to Go source code? and then use the updated Go version to test other existing Go code. Thanks! -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/467e0fca-0d5e-4d98-9402-29965c917246n%40googlegroups.com.
[go-nuts] Assistance Needed with Go Compilation for PostgreSQL FDW on Linux
I am developing a version of the `steampipe-postgres-fdw` - a PostgreSQL Foreign Data Wrapper (FDW) written in Go. It is a part of the bigger `steampipe` project. While the project builds successfully on Darwin systems, I am encountering a specific challenge on Linux when integrating with PostgreSQL 14 using `pgxs.mk`. Initially I suspected that the issue might be the size of the `.a` file, but the complication arises specifically when including the `github.com/aquasecurity/trivy` package. Including this package leads to errors during the linking phase, as exemplified below: ``` /usr/bin/ld: steampipe_postgres_fdw.a(go.o): relocation R_AARCH64_ADR_PREL_PG_HI21 against symbol `type:string' which may bind externally can not be used when making a shared object; recompile with -fPIC /usr/bin/ld: DWARF error: line info data is bigger (0x65f0639) than the space remaining in the section (0xe86ef9) ... ``` This leads me to believe the issue may lie in how the `trivy` package is being compiled or integrated within the project. I am reaching out for insights and advice on the following: 1. Techniques or best practices for resolving compilation and linking errors related to specific Go packages, particularly in a PostgreSQL FDW context. 2. Guidance on compiling Go code with `-fPIC` and other necessary flags for successful integration with PostgreSQL on Linux, especially when dealing with complex package dependencies. 3. Understanding the underlying causes of these specific errors and potential solutions when integrating third-party Go packages like `trivy` in a PostgreSQL extension. Any advice, experience, or pointers you could share regarding these issues would be immensely helpful. Thank you for your time and support. Best regards, Binaek Sarkar I have a minimum reproducible version at https://github.com/turbot/steampipe-postgres-fdw/tree/debug_trivy -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/da8d76f6-1d1c-4a8b-9647-ef29350f9974n%40googlegroups.com.
Re: [go-nuts] Hello, world! - A technical overview of the software powering bgammon.org
On Tue, 2 Jan 2024, at 2:39 AM, Trevor Slocum wrote: > I’ve just published a blog post about the software powering bgammon.org and > my experience creating it using free and open source tools: > > https://bgammon.org/blog/20240101-hello-world/ This was a great read, thank you. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/fac33f2a-a1d7-4a3f-9cde-1a78d56c5029%40app.fastmail.com.