Skip to content
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

Fix cgo linking flags to include the dynamic linking library #41

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

nderjung
Copy link
Contributor

This allows for static PIE builds.

This allows for static PIE builds.

Signed-off-by: Alexander Jung <alex@nder.sh>
@nderjung nderjung marked this pull request as draft August 29, 2024 19:43
@nderjung
Copy link
Contributor Author

nderjung commented Aug 29, 2024

Converted to a draft because this does not work as expected. Whilst the build can be linked, I'm receiving a timeout when connecting to a libSQL server connection, stuck within libsql_experimental.a's exported libsql_sync2 method:

error: creating connector: failed to sync database 
error code = 1: Error syncing database: replication error: Timeout performing handshake with primary

Nevermind. This does work.

The alternative is to supply -ldl via go build -ldflags='-linkmode external -extldflags "-static-pie -ldl'

@nderjung nderjung marked this pull request as ready for review August 29, 2024 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant