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

cstool has dependency in static library but there is logical inconsistency in options #2025

Closed
Tracked by #2081
gdbinit opened this issue May 19, 2023 · 8 comments
Closed
Tracked by #2081
Labels
build & packaging Build system and packaging related
Milestone

Comments

@gdbinit
Copy link
Contributor

gdbinit commented May 19, 2023

If CAPSTONE_STATIC=NO is passed to make.sh the build will fail because cstool has dependency on libcapstone.a static library.

The only check made is when CAPSTONE_BUILD_CORE_ONLY is used for macOS kernel version and kind of is internal option only (not referred in documentation).

Does it make it sense to put a fix for this to not build cstool if CAPSTONE_STATIC=NO is set or is it just an implicit assumption and not relevant?

@XVilka
Copy link
Contributor

XVilka commented Jun 1, 2023

@Rot127 what do you think on this one. I personally think cstool should be independent of the type of the library it built with - static or dynamic, it should work in both cases.

@Rot127
Copy link
Collaborator

Rot127 commented Jun 3, 2023

what do you think on this one. I personally think cstool should be independent of the type of the library it built with - static or dynamic, it should work in both cases.

I agree. Though @kabeor mentioned often now that make.sh will not be supported anymore and only the cmake build will be maintained.

Using cmake one should be able to compile cstool statically or dynamically as they wish.

capstone/CMakeLists.txt

Lines 35 to 39 in a026fc4

# to configure the options specify them in in the command line or change them in the cmake UI.
# Don't edit the makefile!
option(BUILD_SHARED_LIBS "Build shared library" OFF)
option(CAPSTONE_BUILD_STATIC_RUNTIME "Embed static runtime" ${BUILD_SHARED_LIBS})
option(CAPSTONE_BUILD_DIET "Build diet library" OFF)

@XVilka XVilka mentioned this issue Jul 10, 2023
24 tasks
@XVilka
Copy link
Contributor

XVilka commented Jul 10, 2023

As the make.sh file is still here in 5.0, it's probably better to fix this. And if it's deprecated, better to remove it completely in the 6.0, for example.

@Rot127
Copy link
Collaborator

Rot127 commented Jul 13, 2023

Wasn't the make way of building to be removed anyway? @kabeor You mentioned this several times I think.

@XVilka
Copy link
Contributor

XVilka commented Jul 20, 2023

@kabeor @aquynh what should we do with that? Ideally, it would be nice to fixed, should we remove it?

@kabeor
Copy link
Member

kabeor commented Jul 20, 2023

Well for me, I just leave Makefile there and no plan to touch it. It's so complicated to contributors (always updating every building way which causes a lot of unnecessary confusion). But don't remove it, if anyone would like to maintain Makefile way, welcome. CMake way is the first tier in the future for Capstone.

@XVilka
Copy link
Contributor

XVilka commented Aug 1, 2023

Should be this closed then as there are no plans to fix it? @kabeor

@Rot127 Rot127 added this to the v5.0.2 milestone Mar 19, 2024
@Rot127 Rot127 added the build & packaging Build system and packaging related label Mar 20, 2024
@Rot127
Copy link
Collaborator

Rot127 commented Sep 10, 2024

Close this one now because the make build is considered deprecated. Especially with v6 Alpha coming.

@Rot127 Rot127 closed this as completed Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build & packaging Build system and packaging related
Projects
None yet
Development

No branches or pull requests

4 participants