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: math lib is not linked in linux #2

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

mattscamp
Copy link

The math lib is used upstream and not linked properly. This causes the below failures on linux.

/usr/lib/go/pkg/tool/linux_amd64/link: running gcc failed: exit status 1
/usr/bin/ld: /home/mattc/git/sdk-go/internal/cinterface/lib/linux-x64/libbitwarden_c.a(bitwarden_c.tokio-3c56ba4e3c4aa90a.tokio.db699ad6e67f3ec9-cgu.0.rcgu.o.rcgu.o): in function `tokio::runtime::scheduler::multi_thread::worker::run':
tokio.db699ad6e67f3ec9-cgu.0:(.text._ZN5tokio7runtime9scheduler12multi_thread6worker3run17h40b487d4e81f7731E+0x692): undefined reference to `pow'
/usr/bin/ld: tokio.db699ad6e67f3ec9-cgu.0:(.text._ZN5tokio7runtime9scheduler12multi_thread6worker3run17h40b487d4e81f7731E+0xc95): undefined reference to `pow'
/usr/bin/ld: /home/mattc/git/sdk-go/internal/cinterface/lib/linux-x64/libbitwarden_c.a(bitwarden_c.num_cpus-48d8c06d94ff50f9.num_cpus.baa012fa3dfb01b7-cgu.0.rcgu.o.rcgu.o): in function `std::sys::sync::once::futex::Once::call':
num_cpus.baa012fa3dfb01b7-cgu.0:(.text.unlikely._ZN3std3sys4sync4once5futex4Once4call17h8448e83b91b21622E.llvm.16575399225377328621+0x15de): undefined reference to `ceil'
collect2: error: ld returned 1 exit status

@mattscamp
Copy link
Author

@S-Kakar

@@ -3,7 +3,7 @@ package sdk
import (
"encoding/json"

"github.com/bitwarden/sdk-go/internal/cinterface"
"github.com/mattscamp/sdk-go/internal/cinterface"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You left in the module rewrites.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oof. Thought I pushed this to a different branch. Will fix ASAP.

@dani-garcia
Copy link
Member

Hey @mattscamp, thanks for the PR!

This repository is just used for publishing the Go library, but it is a read only mirror of the sdk monorepo, the changes from this PR should instead go on this file here: https://github.com/bitwarden/sdk/blob/main/languages/go/internal/cinterface/bitwarden_library.go

Would you mind opening a PR there instead? Thanks!

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.
You have signed the CLA already but the status is still pending? Let us recheck it.

@fawaf
Copy link

fawaf commented Oct 8, 2024

Created PR here bitwarden/sdk-sm#1120

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.

5 participants