-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
You cannot compile when using cross compilation #86
Comments
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? |
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. |
Have you tried linking against the aarch64 libs provided by DuckDB using:
|
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 |
Have you tried this golang/go#28966 ? |
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 |
How exactly do you use it? Can you add it directly to the repo? |
I really don't know how to complete the compilation, I have tried a lot of ways, still encountered a lot of errors |
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
|
+1 |
Is there a way to fix this? |
CGO_ENABLED=1 GOOS=linux GOARCH=arm64 CXX=/media/sd1data/opt/rockchip_rk3568/host/bin/aarch64-linux-g++ go build -o shmViewV2_main main.go
# runtime/cgo gcc_arm64.S: Assembler messages: gcc_arm64.S:28: Error: no such instruction:
stp x29,x30,[sp,'gcc_arm64.S:32: Error: too many memory references for
mov' gcc_arm64.S:34: Error: no such instruction:
stp x19,x20,[sp,'gcc_arm64.S:37: Error: no such instruction:
stp x21,x22,[sp,' gcc_arm64.S:40: Error: no such instruction:
stp x23,x24,[sp,'gcc_arm64.S:43: Error: no such instruction:
stp x25,x26,[sp,' gcc_arm64.S:46: Error: no such instruction:
stp x27,x28,[sp,'gcc_arm64.S:50: Error: too many memory references for
mov' gcc_arm64.S:51: Error: too many memory references for
mov'gcc_arm64.S:52: Error: too many memory references for
mov' gcc_arm64.S:54: Error: no such instruction:
blr x20'gcc_arm64.S:55: Error: no such instruction:
blr x19' gcc_arm64.S:57: Error: no such instruction:
ldp x27,x28,[sp,'gcc_arm64.S:60: Error: no such instruction:
ldp x25,x26,[sp,' gcc_arm64.S:63: Error: no such instruction:
ldp x23,x24,[sp,'gcc_arm64.S:66: Error: no such instruction:
ldp x21,x22,[sp,' gcc_arm64.S:69: Error: no such instruction:
ldp x19,x20,[sp,'gcc_arm64.S:72: Error: no such instruction:
ldp x29,x30,[sp],'
The text was updated successfully, but these errors were encountered: