[go: up one dir, main page]

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: issue #1269 #1281

Merged
merged 1 commit into from
Oct 9, 2023
Merged

fix: issue #1269 #1281

merged 1 commit into from
Oct 9, 2023

Conversation

t-mat
Copy link
Contributor
@t-mat t-mat commented Oct 8, 2023

This PR fixes #1269.

Since lz4/programs/Makefile:SRCFILES explicitly contains source code of lz4 CLI and liblz4, CMakeLists.txt must follow this settings.

It also means, lz4 CLI and legacy lz4c must avoid to link with liblz4.

This PR supports the following two expected scenarios: shared and static lib.

cd
git clone -b fix/issue-1269 https://github.com/t-mat/lz4.git lz4-issue-1269
cd lz4-issue-1269
cd build/cmake

# default (shared lib, cli and legacy lz4c)
rm -rf build
mkdir  build
pushd  build
cmake ..
make -j
readelf -h ./liblz4.so
readelf -h ./liblz4.a   # must be failed: No such file
popd

# static (static lib, cli and legacy lz4c)
rm -rf build
mkdir  build
pushd  build
cmake -DBUILD_STATIC_LIBS=ON -DBUILD_SHARED_LIBS=OFF ..
make -j
readelf -h ./liblz4.so  # must be failed: No such file
readelf -h ./liblz4.a
popd

I'll add these scenarios to the CI as a follow up PR.

Since `lz4/programs/Makefile:SRCFILES` explicitly contains source code of lz4 CLI and liblz4, `CMakeLists.txt` must follow this settings.

It also means, lz4 CLI and legacy lz4c must avoid to use `liblz4`.
t-mat added a commit to t-mat/lz4 that referenced this pull request Oct 9, 2023
This changeset is follow-up for lz4#1281.
To checks lz4#1269, this PR adds actual static library build test for cmake.
@Cyan4973 Cyan4973 merged commit 4514340 into lz4:dev Oct 9, 2023
59 checks passed
LocalSpook pushed a commit to LocalSpook/lz4 that referenced this pull request Oct 12, 2023
This changeset is follow-up for lz4#1281.
To checks lz4#1269, this PR adds actual static library build test for cmake.
LocalSpook pushed a commit to LocalSpook/lz4 that referenced this pull request Oct 12, 2023
This changeset is follow-up for lz4#1281.
To checks lz4#1269, this PR adds actual static library build test for cmake.
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.

can't build static lib
2 participants