Comments (3)
Thanks for bringing this up. Does this strange behavior also occur with other go-duckdb based code or only with the examples/simple.go
program?
make test
also executes properly?
Can you try to attach to the executed binary with dlv as described here?
from go-duckdb.
Does this strange behavior also occur with other go-duckdb based code or only with the examples/simple.go program?
This occurs with other go-duckdb based code as well. As a simple case, the following code snippet will have the same buggy behavior:
package main
import (
"database/sql"
"fmt"
_ "github.com/marcboeker/go-duckdb"
)
func main() {
fmt.Println("Start")
_, err := sql.Open("duckdb", "")
if err != nil {
panic(err)
}
fmt.Println("End")
}
make test
also executes properly?
Yes, make test
executes properly and all tests are passing.
Can you try to attach to the executed binary with dlv?
Thanks for the suggestion. I haven't used dlv
before.
I tried to dlv attach <pid>
to a running process, but dlv
just hangs without any output.
I also tried to dlv exec <my_binary>
and I get the following output:
Warning: no debug info found, some functionality will be missing such as stack traces and variable evaluation.
could not launch process: could not read debug info (decoding dwarf section info at offset 0x0: too short) and could not read go symbol table (could not find rodata struct member)
from go-duckdb.
✅ I found a workaround. go build -ldflags="-s -w"
will produce a binary that I can execute.
Explanation
When I compared the output of go build -x .
and go run -x .
, the only significant difference was that go run
included the linker flags -s -w
. When I explicitly added -ldflags="-s -w"
to my go build
command, I was able to successfully execute the output binary.
Apparently, those linker flags will:
-s disable symbol table
-w disable DWARF generation
However, I'm not sure why this solved my problem though. 😅
In any case, feel free to close this issue.
from go-duckdb.
Related Issues (20)
- Support missing timestamp types in the appender HOT 1
- Detect incorrect column counts in the appender
- transaction.go:6:5: undefined: conn HOT 9
- Exposing filesystem interface HOT 1
- Make Apache Arrow Optional HOT 2
- Add support for the DATE type in the appender
- Does `go-duckdb` has a glibc version dependency? HOT 1
- Silent primary key violation in the appender HOT 2
- Appending a NULL in UUID[] column panics HOT 1
- found architecture 'arm64', required architecture 'x86_64' on mac os HOT 3
- libduckdb.a, building for macOS-x86_64 but attempting to link with file built for macOS-arm64 HOT 2
- Info: Deploying go-duckdb In A Distroless Docker Container
- DuckDB version mismatch in v1.6.5 release HOT 1
- Auto-load / auto-install in go-duckdb? And packaging JSON? HOT 1
- Cannot run duckdb v1.6.6 . Apache arrow lib broken HOT 1
- Proposal: Support better error messages HOT 2
- How to cross-compile an application which uses DuckDB? HOT 2
- how to use duckdb_vss? HOT 2
- Appender performance hangs (> 10 minutes) when flushing HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from go-duckdb.