On Tue, Sep 26, 2023 at 3:32 AM sbezverk <sbezv...@gmail.com> wrote: > > Thank you for your reply, I was under impression that prototype definitions > come from C header files, and since the compilation phase completes with > success, cgo finds all necessary function definitions. My problem is at the > linking phase when the linker by some reason tries to resolve ALL functions > from the shared library, even those which are not directly used/called in CGO > code.
I may have misunderstood the problem. Can you show more of the failing command? Ideally build with "go build -x" and show the failing command and the complete output. Thanks. > This causes CGO_LDFLAGS variable to be enormously long as I have to add > around 3k of libraries. Using LDFLAGS environment variable is no better, as > after adding all libraries to make LD happy, it exceeds the size limit and > pretty much kills bash. > > I am starting to get this: > > ``` > dev-1:/user/sbezverk/go_connect > ls > -bash: /bin/ls: Argument list too long > ``` > > For every internal bash command I try to execute. 3K in an environment variable doesn't sound like all that much. What operating system are you using? Ian -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/CAOyqgcUJS86q9S3yO7fOv-L-4GNrcR2cNqRoUyedytyuosoCig%40mail.gmail.com.