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 darwin do not support --export-dynamic #50

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

Conversation

zwpaper
Copy link

@zwpaper zwpaper commented Dec 21, 2023

which will met error:

go/pkg/tool/darwin_amd64/link: running clang failed: exit status 1
ld: unknown option: --export-dynamic
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@zwpaper
Copy link
Author

zwpaper commented Dec 25, 2023

Hi @nvvfedorov, can you please also look at this one

@nvvfedorov
Copy link
Collaborator

Hi @nvvfedorov, can you please also look at this one

Thank you for your contribution. The dcgm (https://docs.nvidia.com/datacenter/dcgm/latest/user-guide/getting-started.html#supported-platforms) doesn't support platforms other than Linux. The fix may help compile dcgm-exporter for development purposes. However, the binary will not work on the Mac without the DCGM library, and the build doesn't guarantee that the compiled binary works as expected.

I think it makes sense to add a VS CODE dev container to the repository and use it for development. Here is the example from the DCGM library: https://github.com/NVIDIA/DCGM/blob/master/.devcontainer/devcontainer.json

@zwpaper
Copy link
Author

zwpaper commented Dec 27, 2023

Hi @nvvfedorov, I agree with you mostly, with my little two cents:

The dcgm doesn't support platforms other than Linux. The fix may help compile dcgm-exporter for development purposes.

yes, and local development is important for developers.

However, the binary will not work on the Mac without the DCGM library, and the build doesn't guarantee that the compiled binary works as expected.

it does not have to guarantee that, it works for development is all good enough, or there will be plant warnings in editors. and we will always build the test/release binary in a container.

I think it makes sense to add a VS CODE dev container to the repository and use it for development.

developers other than VSCode, it does not always have the container development env setup, or is not that necessary to setup one just for rolling into the development.

what's more, the go-dcgm has offered a darwin cgo header, it should offer a correct one.

@nvvfedorov
Copy link
Collaborator

Hi @nvvfedorov, I agree with you mostly, with my little two cents:

The dcgm doesn't support platforms other than Linux. The fix may help compile dcgm-exporter for development purposes.

yes, and local development is important for developers.

However, the binary will not work on the Mac without the DCGM library, and the build doesn't guarantee that the compiled binary works as expected.

it does not have to guarantee that, it works for development is all good enough, or there will be plant warnings in editors. and we will always build the test/release binary in a container.

I think it makes sense to add a VS CODE dev container to the repository and use it for development.

developers other than VSCode, it does not always have the container development env setup, or is not that necessary to setup one just for rolling into the development.

what's more, the go-dcgm has offered a darwin cgo header, it should offer a correct one.

It makes sense to me. @nikkon-dev , @glowkey, what do you think?

@nvvfedorov
Copy link
Collaborator

I am going to test the PR, and I will be back this week.

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.

2 participants