Comments (12)
Have you tried compiling DuckDB on Linux/arm64? Looks like that DuckDB could not be compiled with your toolchain.
from go-duckdb.
Have you tried compiling DuckDB on Linux/arm64? Looks like that DuckDB could not be compiled with your toolchain.
The compile command is as follows:CGO_ENABLED=1 GOOS=linux GOARCH=arm64 CC=/opt/gcc-linaro-7.5.0-2019.12-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-gcc go build main.go
Does duckdb not support compilation under the linux arm64 architecture?
from go-duckdb.
Have you tried compiling DuckDB on Linux/arm64? Looks like that DuckDB could not be compiled with your toolchain.
I tried to compile in the linux arm64 ,It did not compile successfully. Duckdb is supported by linux arm64, does not need to add a layer of encapsulation or static library.
from go-duckdb.
Have you tried linking against the aarch64 libs provided by DuckDB using:
CGO_ENABLED=1 CGO_LDFLAGS="-L/path/to/libs" go build -tags=duckdb_use_lib main.go LD_LIBRARY_PATH=/path/to/libs ./main
from go-duckdb.
LD_LIBRARY_PATH=
This approach still doesn't solve my problem.Can you compile properly this way? I don't know what the problem is. He's been bothering me for three days. Your help is badly needed. Be grateful
from go-duckdb.
Have you tried this golang/go#28966 ?
from go-duckdb.
Hey @xmiyang, this repo doesn't have a precompiled static library for linux/arm64, but if dynamically linking like @marcboeker suggested doesn't work for you, you could also consider building DuckDB from source by passing -tags=duckdb_from_source
.
from go-duckdb.
Hey @xmiyang, this repo doesn't have a precompiled static library for linux/arm64, but if dynamically linking like @marcboeker suggested doesn't work for you, you could also consider building DuckDB from source by passing
-tags=duckdb_from_source
.
How exactly do you use it? Can you add it directly to the repo?
from go-duckdb.
Hey @xmiyang, this repo doesn't have a precompiled static library for linux/arm64, but if dynamically linking like @marcboeker suggested doesn't work for you, you could also consider building DuckDB from source by passing
-tags=duckdb_from_source
.
I really don't know how to complete the compilation, I have tried a lot of ways, still encountered a lot of errors
from go-duckdb.
First of all you should make sure, that you are able to compile DuckDB from source. If that's working, then you should link to the DuckDB libs, that you have compiled.
Please get the sources from the latest DuckDB release and run make
in the directory to see, if your toolchain can compile DuckDB. Once that's done, locate the libduckdb.a
in the source folder and link against it while building and executing your app.
# Build
CGO_ENABLED=1 CGO_LDFLAGS="-L/path/to/libs" go build -tags=duckdb_use_lib main.go
# Run
LD_LIBRARY_PATH=/path/to/libs ./main
/path/to/libs
is where the libduckdb.a
is located.
from go-duckdb.
+1
I'm working on a project which depends heavily on cross-compilation.
If you by any chance want to have a look at the ci pipeline, where this is being build:
https://github.com/kndndrj/nvim-dbee/actions/runs/5006378568
from go-duckdb.
+1 我正从一个严重依赖交译的项目开始。 如果您有机会想看正确在构建的ci管理路径: https://github.com/kndndrj/nvim-dbee/actions/runs/50063 78568
Is there a way to fix this?
from go-duckdb.
Related Issues (20)
- Add CI script to run gofumpt
- hope create a new tag for last update HOT 1
- Build failures on redhat linux HOT 1
- 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 2
- 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
- macos `go run` works but unable to execute the output of `go build` HOT 3
- Proposal: Support better error messages HOT 2
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.