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

Automatic fetching of missing libraries #539

Closed
carlocab opened this issue Dec 10, 2020 · 4 comments
Closed

Automatic fetching of missing libraries #539

carlocab opened this issue Dec 10, 2020 · 4 comments
Labels
build system Build system and script changes

Comments

@carlocab
Copy link

Posting an issue as discussed here: Homebrew/homebrew-core#66598 (comment)

In summary, it would be useful for package managers like Homebrew if it were possible to turn off all automatic fetching behaviour. If this were the default, then even better.

At the moment it seems to only be possible to do this for zlib and zstd:

https://github.com/nmoinvaz/minizip/blob/318e848843667f982f81dbcb72334e415ba482a5/CMakeLists.txt#L33-L34

I'll also mention the variable seems to be named the opposite of its description, which is confusing.

Thanks for the work you've put into minizip!

nmoinvaz added a commit that referenced this issue Dec 13, 2020
@nmoinvaz
Copy link
Member

I have added -DMZ_FETCH_LIBS=OFF that should allow you to disable fetching of third-party libraries. I hesitate to default it to OFF because there may be more people already relying on the way it is even if it isn't ideal.

carlocab added a commit to carlocab/homebrew-core that referenced this issue Dec 14, 2020
@carlocab
Copy link
Author

Thanks for looking into it so quickly. I think the reason you give for not making it default is a good one, and I'm fine with just the option to deactivate it.

It doesn't quite work as expected yet, unfortunately:

==> cmake . -DIconv_IS_BUILT_IN=on -DMZ_FETCH_LIBS=OFF -DCMAKE_C_FLAGS_RELEASE=-DNDEBUG -DCMAKE_CXX_FLAGS_RELEASE=-DNDEBUG -DCMAKE_INSTALL_PREFIX=/usr/local/Cellar/minizip2/2.10.5 -DCMAKE_INSTALL_LIBDIR=lib -DCMAKE_BUILD_TYPE=Release -DCMAKE_FIND_FRAMEWORK=LAST -DCMAKE_VERBOSE_MAKEFILE=ON -Wno-dev -DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX11.0.sdk
-- Using CMake version 3.19.1
-- The C compiler identification is AppleClang 12.0.0.12000032
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/local/Homebrew/Library/Homebrew/shims/mac/super/clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for inttypes.h
-- Looking for inttypes.h - found
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of off64_t
-- Check size of off64_t - failed
-- Looking for fseeko
-- Looking for fseeko - found
-- Using ZLIB 1.2.11
-- Using BZIP2 1.0.6
-- Checking for module 'liblzma'
--   No package 'liblzma' found
-- Using LZMA 5.2.5
-- Checking for module 'libzstd'
--   No package 'libzstd' found
-- Fetching zstd https://github.com/facebook/zstd master

It seems it's still trying to fetch zstd even if I've told it not to. Of course, I rigged this environment so that it won't find zstd and lzma just to see how it would behave. It still behaves the way I expect it to when it can find zstd/lzma.

BrewTestBot pushed a commit to Homebrew/homebrew-core that referenced this issue Dec 14, 2020
* minizip2 2.10.5
* Deactivate automatic fetching of missing libraries
  See zlib-ng/minizip-ng#539

Closes #66892.

Signed-off-by: FX Coudert <fxcoudert@gmail.com>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
@nmoinvaz
Copy link
Member

Should be resolved now.

@carlocab
Copy link
Author

Thank you!

@nmoinvaz nmoinvaz added 2.0 build system Build system and script changes labels Jan 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build system Build system and script changes
Projects
None yet
Development

No branches or pull requests

2 participants