Skip to content

build(bindings/java): support explicit cargo build target#3168

Merged
Xuanwo merged 5 commits intoapache:mainfrom
tisonkun:support-targets
Sep 24, 2023
Merged

build(bindings/java): support explicit cargo build target#3168
Xuanwo merged 5 commits intoapache:mainfrom
tisonkun:support-targets

Conversation

@tisonkun
Copy link
Copy Markdown
Member

This closes #3160.

With this patch, it's expected to fix the original issue with:

./mvnw verify -Dcargo-build.target=x86_64-unknown-linux-musl

@G-XD please give it a try.

Signed-off-by: tison <wander4096@gmail.com>
@github-actions github-actions Bot added the releases-note/build The PR modifies build related content or has a title that begins with "build" label Sep 24, 2023
@tisonkun tisonkun closed this Sep 24, 2023
@tisonkun
Copy link
Copy Markdown
Member Author

No. musl doesn't support dynamic linking. So basically it requires a container env for building.

Signed-off-by: tison <wander4096@gmail.com>
@tisonkun tisonkun reopened this Sep 24, 2023
@tisonkun
Copy link
Copy Markdown
Member Author

I work out a hack with suggestions at rust-lang/rust#44991.

@tisonkun tisonkun force-pushed the support-targets branch 6 times, most recently from 62b5992 to 895b35b Compare September 24, 2023 06:29
Signed-off-by: tison <wander4096@gmail.com>
Signed-off-by: tison <wander4096@gmail.com>
@tisonkun
Copy link
Copy Markdown
Member Author

Still you need to have musl-gcc installed or proper GLIBC version installed. There is little things we can help in this perspective.

But support explicit cargo build target helps users build with other toolchain so it's still valuable.

Comment thread bindings/java/.cargo/config
Copy link
Copy Markdown
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

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

Thanks!

@Xuanwo Xuanwo merged commit d36ce81 into apache:main Sep 24, 2023
@tisonkun tisonkun deleted the support-targets branch September 24, 2023 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

releases-note/build The PR modifies build related content or has a title that begins with "build"

Projects

None yet

Development

Successfully merging this pull request may close these issues.

failed to run on CentOS of binding/java

2 participants