Giter Site home page Giter Site logo

Comments (12)

marcboeker avatar marcboeker commented on July 24, 2024

Have you tried compiling DuckDB on Linux/arm64? Looks like that DuckDB could not be compiled with your toolchain.

from go-duckdb.

xmiyang avatar xmiyang commented on July 24, 2024

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.

xmiyang avatar xmiyang commented on July 24, 2024

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.

marcboeker avatar marcboeker commented on July 24, 2024

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.

xmiyang avatar xmiyang commented on July 24, 2024

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.

marcboeker avatar marcboeker commented on July 24, 2024

Have you tried this golang/go#28966 ?

from go-duckdb.

begelundmuller avatar begelundmuller commented on July 24, 2024

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.

xmiyang avatar xmiyang commented on July 24, 2024

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.

xmiyang avatar xmiyang commented on July 24, 2024

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.

marcboeker avatar marcboeker commented on July 24, 2024

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.

kndndrj avatar kndndrj commented on July 24, 2024

+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.

xmiyang avatar xmiyang commented on July 24, 2024

+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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.