Skip to content

Conversation

@desertstsung
Copy link
Contributor

I've got the similar problem like #6839, while compling my C code. According to the issue, I found out that Ten0/lightgbm-rs@243322e is a good solution, but not so robust, so I made this fix.

@desertstsung
Copy link
Contributor Author

@desertstsung please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree

@desertstsung desertstsung changed the title Bug-fix of include c_api.h in C code [C-API] Bug-fix of include c_api.h in C code Jul 22, 2025
Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

Thanks for your interest in LightGBM.

@Ten0 @borchero could you help review this?

@jameslamb jameslamb changed the title [C-API] Bug-fix of include c_api.h in C code [C-API] Avoid C++ includes from arrow.h when including c_api.h Jul 23, 2025
@desertstsung desertstsung requested a review from jameslamb July 24, 2025 02:21
@desertstsung
Copy link
Contributor Author

Sorry for clicking Re-request review by accident.

@jameslamb
Copy link
Collaborator

/AzurePipelines run

@StrikerRUS
Copy link
Collaborator

/AzurePipelines run

@StrikerRUS
Copy link
Collaborator

/AzurePipelines run

@StrikerRUS
Copy link
Collaborator

/AzurePipelines run

Copy link
Collaborator

@borchero borchero left a comment

Choose a reason for hiding this comment

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

I honestly don't know if this is the most ergonomic way to do this since I have too little experience with C(++) codebases 😅 as long as it works, I don't oppose it though

@desertstsung
Copy link
Contributor Author

An SSL error? I don't understand why this happened🧐

@jameslamb
Copy link
Collaborator

There are hundreds of network requests made for each run of LightGBM CI. It's rare but not THAT rare for some of them to fail due to temporary network disruptions. I've retriggered the failed jobs, we should expect them to pass.

Very very very unlikely those failures were related to your changes here.

@desertstsung
Copy link
Contributor Author

Ah I see. Thank you

Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

Thanks very much for the contribution!

I think we should have a smoke test in this repo compiling a small C program linking to lib_lightgbm.so and using its C API. That'd help catch things like this in the future and give us more confidence in solutions like this one.

That's tracked in #4609

But with all other CI passing here, I think this is safe to merge. Thanks very much for the contribution, we'd love to have you come contribute more in the future!

@jameslamb jameslamb merged commit 52dbf06 into microsoft:master Dec 29, 2025
102 of 106 checks passed
@desertstsung
Copy link
Contributor Author

I think we should have a smoke test in this repo compiling a small C program linking to lib_lightgbm.so and using its C API.

I agree that we should have a smoke test written in pure C and exercises the C API. I’ll work on this when I have some free time.

Thanks as well for keeping an eye on this PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants