go build
fails in transaction.go with undefined: conn
#313
-
I have a project where we're using DuckDB using this driver. When I try to build, I get the following error
I noticed that this error only occurs when building from Ubuntu but works fine when building from Mac. |
Beta Was this translation helpful? Give feedback.
Replies: 16 comments
-
Are you building with |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
It might be that your GCC is building to a newer standard for C. Newer standards for C don't allow implicit function declarations; however in general GCC builds according to older standards that allow implicit function calls with just a warning. Is it possible that your GCC is building to a newer standard (like C99 or C11)? If so, it'll likely error out, rather than just giving you a warning and building anyways. Try setting GCC to build to an older standard like C90, |
Beta Was this translation helpful? Give feedback.
-
Looks like you may need a cross-compiler to build linux binary executable files on MacOS. Alternatively, you can choose to compile a Linux executable in a docker container (in this case a ubuntu image is recommended because you want the binary file to run on Ubuntu systems), and then you can copy the compiled file to the Linux environment. |
Beta Was this translation helpful? Give feedback.
-
This is not only in MacOS. I tried building in a ubuntu 24.04 VM and I got the same issue. But a week ago, in a similar configured VM, I didn't get that issue. Only difference between both VMs are the regions. Everything else is identical |
Beta Was this translation helpful? Give feedback.
-
Bumping on this issue. Along with @jay-mtl since the release of duckdb 1.8.0. We are also encountering an issue with the debugger with the following error message
Downgrading to 1.7.1 seems to fix the issue. However, is there any significant changes that has been made with this latest release ? |
Beta Was this translation helpful? Give feedback.
-
Run this will solve the problem. I had this issue before
|
Beta Was this translation helpful? Give feedback.
-
Thanks a lot @vincenttat22 . You're a life saver. |
Beta Was this translation helpful? Give feedback.
-
@srirampetavue my pleasure, I'm glad it helped. |
Beta Was this translation helpful? Give feedback.
-
I'll close this issue as resolved by the above fix. |
Beta Was this translation helpful? Give feedback.
-
Hello I am getting the same error on Windows
Do you know if there's a solution for this? |
Beta Was this translation helpful? Give feedback.
-
Unfortunately, I couldn't get it working on Windows either. I reckon you either run your Go App on Linux or WSL2 on Windows. |
Beta Was this translation helpful? Give feedback.
-
Did you try following the build steps in the |
Beta Was this translation helpful? Give feedback.
-
I managed to get it working by installing first gcc:
|
Beta Was this translation helpful? Give feedback.
-
Links to the solutions in this comment section: |
Beta Was this translation helpful? Give feedback.
-
Anyone have a solution for MacOS that doesn't involve spinning up a Docker Ubuntu image? |
Beta Was this translation helpful? Give feedback.
Links to the solutions in this comment section: