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

[Task] Go Client warning messages during compilation #3177

Closed
tjzhang-BQ opened this issue Feb 14, 2025 · 4 comments
Closed

[Task] Go Client warning messages during compilation #3177

tjzhang-BQ opened this issue Feb 14, 2025 · 4 comments
Assignees
Labels
go golang wrapper
Milestone

Comments

@tjzhang-BQ
Copy link
Collaborator

tjzhang-BQ commented Feb 14, 2025

Description

ld: warning: ignoring duplicate libraries: '-lglide_rs', '-lm'
ld: warning: search path '/Users/runner/work/valkey-glide/valkey-glide/go/api/../rustbin/aarch64-apple-darwin' not found
ld: warning: search path '/Users/runner/work/valkey-glide/valkey-glide/go/api/../rustbin/aarch64-apple-darwin' not found
ld: warning: search path '/Users/runner/work/valkey-glide/valkey-glide/go/api/../rustbin/aarch64-apple-darwin' not found
ld: warning: search path '/Users/runner/work/valkey-glide/valkey-glide/go/api/../rustbin/aarch64-apple-darwin' not found
ld: warning: search path '/Users/runner/work/valkey-glide/valkey-glide/go/api/errors/../rustbin/aarch64-apple-darwin' not found
ld: warning: search path '/Users/runner/work/valkey-glide/valkey-glide/go/api/target/release' not found
ld: warning: '/private/var/folders/2s/h6hvv9ps03xgz_krkkstvq_r0000gn/T/go-link-197988188/000019.o' has malformed LC_DYSYMTAB, expected 98 undefined symbols to start at index 1626, found 95 undefined symbols starting at index 1626
ld: warning: object file (/Users/runner/work/valkey-glide/valkey-glide/go/target/release/libglide_rs.a[3](25ac62e5b3c53843-curve25519.o)) was built for newer 'macOS' version (14.5) than being linked (14.0)
ld: warning: object file (/Users/runner/work/valkey-glide/valkey-glide/go/target/release/libglide_rs.a[4](0bbbd18bda93c05b-aes_nohw.o)) was built for newer 'macOS' version (14.5) than being linked (14.0)
ld: warning: object file (/Users/runner/work/valkey-glide/valkey-glide/go/target/release/libglide_rs.a[5](00c879ee3285a50d-montgomery.o)) was built for newer 'macOS' version (14.5) than being linked (14.0)
ld: warning: object file (/Users/runner/work/valkey-glide/valkey-glide/go/target/release/libglide_rs.a[6](00c879ee3285a50d-montgomery_inv.o)) was built for newer 'macOS' version (14.5) than being linked (14.0)
ld: warning: object file (/Users/runner/work/valkey-glide/valkey-glide/go/target/release/libglide_rs.a[7](a0330e891e733f4e-ecp_nistz.o)) was built for newer 'macOS' version (14.5) than being linked (14.0)
ld: warning: object file (/Users/runner/work/valkey-glide/valkey-glide/go/target/release/libglide_rs.a[9](a0330e891e733f4e-gfp_p384.o)) was built for newer 'macOS' version (14.5) than being linked (14.0)
ld: warning: object file (/Users/runner/work/valkey-glide/valkey-glide/go/target/release/libglide_rs.a[11](aaa1ba3e455ee2e1-limbs.o)) was built for newer 'macOS' version (14.5) than being linked (14.0)
ld: warning: object file (/Users/runner/work/valkey-glide/valkey-glide/go/target/release/libglide_rs.a[12](a4019cc0736b0423-mem.o)) was built for newer 'macOS' version (14.5) than being linked (14.0)
ld: warning: object file (/Users/runner/work/valkey-glide/valkey-glide/go/target/release/libglide_rs.a[14](a0330e891e733f4e-p256-nistz.o)) was built for newer 'macOS' version (14.5) than being linked (14.0)
ld: warning: object file (/Users/runner/work/valkey-glide/valkey-glide/go/target/release/libglide_rs.a[15](c322a0bcc369f531-chacha-armv8-ios64.o)) was built for newer 'macOS' version (14.5) than being linked (14.0)
ld: warning: object file (/Users/runner/work/valkey-glide/valkey-glide/go/target/release/libglide_rs.a[16](c322a0bcc369f531-chacha20_poly1305_armv8-ios64.o)) was built for newer 'macOS' version (14.5) than being linked (14.0)
ld: warning: object file (/Users/runner/work/valkey-glide/valkey-glide/go/target/release/libglide_rs.a[17](c322a0bcc369f531-aesv8-armx-ios64.o)) was built for newer 'macOS' version (14.5) than being linked (14.0)
ld: warning: object file (/Users/runner/work/valkey-glide/valkey-glide/go/target/release/libglide_rs.a[18](c322a0bcc369f531-vpaes-armv8-ios64.o)) was built for newer 'macOS' version (14.5) than being linked (14.0)
ld: warning: object file (/Users/runner/work/valkey-glide/valkey-glide/go/target/release/libglide_rs.a[19](c322a0bcc369f531-armv8-mont-ios64.o)) was built for newer 'macOS' version (14.5) than being linked (14.0)
ld: warning: object file (/Users/runner/work/valkey-glide/valkey-glide/go/target/release/libglide_rs.a[20](c322a0bcc369f531-p256-armv8-asm-ios64.o)) was built for newer 'macOS' version (14.5) than being linked (14.0)
ld: warning: object file (/Users/runner/work/valkey-glide/valkey-glide/go/target/release/libglide_rs.a[21](c322a0bcc369f531-aesv8-gcm-armv8-ios64.o)) was built for newer 'macOS' version (14.5) than being linked (14.0)
ld: warning: object file (/Users/runner/work/valkey-glide/valkey-glide/go/target/release/libglide_rs.a[22](c322a0bcc369f531-ghash-neon-armv8-ios64.o)) was built for newer 'macOS' version (14.5) than being linked (14.0)
ld: warning: object file (/Users/runner/work/valkey-glide/valkey-glide/go/target/release/libglide_rs.a[23](c322a0bcc369f531-ghashv8-armx-ios64.o)) was built for newer 'macOS' version (14.5) than being linked (14.0)
ld: warning: object file (/Users/runner/work/valkey-glide/valkey-glide/go/target/release/libglide_rs.a[24](c322a0bcc369f531-sha-armv8-ios64.o)) was built for newer 'macOS' version (14.5) than being linked (14.0)
ld: warning: object file (/Users/runner/work/valkey-glide/valkey-glide/go/target/release/libglide_rs.a[25](c322a0bcc369f531-sha256-armv8-ios64.o)) was built for newer 'macOS' version (14.5) than being linked (14.0)

we should work on potentially suppress/reduce the warnings

Checklist

...

Additional Notes

No response

@tjzhang-BQ tjzhang-BQ added the go golang wrapper label Feb 14, 2025
@Yury-Fridlyand
Copy link
Collaborator

@Yury-Fridlyand
Copy link
Collaborator

Yury-Fridlyand commented Feb 15, 2025

Note: these error occurs only on mac.

There are few groups of warnings:

1

ignoring duplicate libraries: '-lglide_rs', '-lm'

caused by duplicating cgo directives in multiple places.

2

search path '/Users/runner/work/valkey-glide/valkey-glide/go/api/../rustbin/aarch64-apple-darwin' not found

caused only on a developer's PC, because rustbin dir is missing. It is created only during CD pipeline.

3

search path '/Users/runner/work/valkey-glide/valkey-glide/go/api/errors/../rustbin/aarch64-apple-darwin' not found
search path '/Users/runner/work/valkey-glide/valkey-glide/go/api/target/release' not found

caused by incorrect relative paths set in errors.go file (file was moved to another dir without fixing paths).

4

search path '/Users/runner/work/valkey-glide/valkey-glide/go/target/release' not found

visible for users only (apps which get GLIDE from pkg.go.dev), caused by missing target directory.

5

'/private/var/folders/2s/h6hvv9ps03xgz_krkkstvq_r0000gn/T/go-link-197988188/000019.o' has malformed LC_DYSYMTAB, expected 98 undefined symbols to start at index 1626, found 95 undefined symbols starting at index 1626

decribed in golang/go#61229 (comment).

6

object file (/Users/runner/work/valkey-glide/valkey-glide/go/target/release/libglide_rs.a[3](25ac62e5b3c53843-curve25519.o)) was built for newer 'macOS' version (14.5) than being linked (14.0)

caused by missing MACOSX_DEPLOYMENT_TARGET, read more in rust-lang/cargo#13115.
Note: this message appears for native client component only.

@Yury-Fridlyand
Copy link
Collaborator

Tested 1.3.0-rc3 with IT, confirm that all warnings except 5 disappear.
https://github.com/Bit-Quill/valkey-glide/actions/runs/13347873359/job/37280817815#step:5:63

@jamesx-improving
Copy link
Collaborator

On the 5th warning message of ... has malformed LC_DYSYMTAB, did some extra research and testing, and found out that:

  • No solution/workaround provided in cmd/link: issues with Apple's new linker in Xcode 15 golang/go#61229 (comment) works. Especially, the -ld_classic flag triggers a new warning stating this flag is deprecated.
  • Tested with the latest patch version of several most recent Go major versions (1.24.0, 1.23.6, 1.22.12, 1.20.14), malformed LC_DYSYMTAB warning message seen in all of them.
  • The only way to eliminate this warning message is to remove the -race flag from all our go test commands in Makefile.
  • [Credit to @jbrinkman ] Not much goroutine (Go's multithreading) is used in our current Go codebase, hence race detector doesn't do much for our project.

Based on above, created PR #3221 to remove -race flag, which has been merged.

In the future, only if more goroutines are used in our codebase will we evaluate the necessity of reintroducing the -race flag again.

Closing this issue as sloved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
go golang wrapper
Projects
Status: Done
Development

No branches or pull requests

4 participants