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

[package] minizip/1.2.13: Windows MinGW Clang fails to compile #14440

Open
LargoUsagi opened this issue Nov 26, 2022 · 6 comments
Open

[package] minizip/1.2.13: Windows MinGW Clang fails to compile #14440

LargoUsagi opened this issue Nov 26, 2022 · 6 comments
Labels
bug Something isn't working

Comments

@LargoUsagi
Copy link

Description

This compiles using GCC and Clang under Arch Linux, and GCC using mingw on windows, but I had the preference of using clang through mingw.

Package and Environment Details

  • Package Name/Version: minizip/1.2.13
  • Operating System+version: Windows 10
  • Compiler+version: Clang 15
  • Conan version: conan 1.54.0
  • Python version: Python 3.10.8

Conan profile

[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=clang
compiler.version=15
compiler.libcxx=libstdc++11
[options]
[build_requires]
[env]
CC=C:/msys64/mingw64/bin/clang
CXX=C:/msys64/mingw64/bin/clang++

Steps to reproduce

conan install . --build=missing --profile=gcc -if=cmake-build-release -s build_type=Release
conan install . --build=missing --profile=gcc -if=cmake-build-debug -s build_type=Debug

[requires]
glfw/3.3.8
glm/cci.20220420
assimp/5.2.2

[generators]
cmake

Logs

Click to expand log
minizip/1.2.13: Copying sources to build folder
minizip/1.2.13: Building your package in C:\Users\LargoUsagi\.conan\data\minizip\1.2.13\_\_\build\3822ec74d7dc1a129150f4f5e1c981542581f77c
minizip/1.2.13: Generator txt created conanbuildinfo.txt
minizip/1.2.13: Calling generate()
minizip/1.2.13: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
minizip/1.2.13: Preset 'debug' added to CMakePresets.json. Invoke it manually using 'cmake --preset debug'
minizip/1.2.13: If your CMake version is not compatible with CMakePresets (<3.19) call cmake like: 'cmake <path> -G "MinGW Makefiles" -DCMAKE_TOOLCHAIN_FILE=C:\Users\LargoUsagi\.conan\data\minizip\1.2.13\_\_\build\3822ec74d7dc1a129150f4f5e1c981542581f77c\build\gener
ators\conan_toolchain.cmake -DCMAKE_SH=CMAKE_SH-NOTFOUND -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=Debug'
minizip/1.2.13: WARN: Using the new toolchains and generators without specifying a build profile (e.g: -pr:b=default) is discouraged and might cause failures and unexpected behavior
minizip/1.2.13: Aggregating env generators
minizip/1.2.13: Calling build()
minizip/1.2.13: CMake command: cmake -G "MinGW Makefiles" -DCMAKE_TOOLCHAIN_FILE="C:/Users/LargoUsagi/.conan/data/minizip/1.2.13/_/_/build/3822ec74d7dc1a129150f4f5e1c981542581f77c/build/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/Users/LargoUsagi/.c
onan/data/minizip/1.2.13/_/_/package/3822ec74d7dc1a129150f4f5e1c981542581f77c" -DCMAKE_SH="CMAKE_SH-NOTFOUND" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Debug" "C:\Users\LargoUsagi\.conan\data\minizip\1.2.13\_\_\build\3822ec74d7dc1a129150f4f5e1c9815425
81f77c\src\.."
-- Using Conan toolchain: C:/Users/LargoUsagi/.conan/data/minizip/1.2.13/_/_/build/3822ec74d7dc1a129150f4f5e1c981542581f77c/build/generators/conan_toolchain.cmake
-- Conan toolchain: Setting BUILD_SHARED_LIBS = OFF
-- The C compiler identification is Clang 15.0.3
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: C:/msys64/mingw64/bin/clang.exe - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Conan: Target declared 'ZLIB::ZLIB'
CMake Error at build/generators/cmakedeps_macros.cmake:39 (message):
  Library 'zlib' not found in package.  If 'zlib' is a system library,
  declare it with 'cpp_info.system_libs' property
Call Stack (most recent call first):
  build/generators/ZLIB-Target-debug.cmake:34 (conan_package_library_targets)
  build/generators/ZLIBTargets.cmake:26 (include)
  build/generators/ZLIBConfig.cmake:10 (include)
  CMakeLists.txt:11 (find_package)


-- Configuring incomplete, errors occurred!
See also "C:/Users/LargoUsagi/.conan/data/minizip/1.2.13/_/_/build/3822ec74d7dc1a129150f4f5e1c981542581f77c/build/Debug/CMakeFiles/CMakeOutput.log".
minizip/1.2.13: 
minizip/1.2.13: ERROR: Package '3822ec74d7dc1a129150f4f5e1c981542581f77c' build failed
minizip/1.2.13: WARN: Build folder C:\Users\LargoUsagi\.conan\data\minizip\1.2.13\_\_\build\3822ec74d7dc1a129150f4f5e1c981542581f77c\build\Debug
ERROR: minizip/1.2.13: Error in build() method, line 78
        cmake.configure(build_script_folder=os.path.join(self.source_folder, os.pardir))
        ConanException: Error 1 while executing cmake -G "MinGW Makefiles" -DCMAKE_TOOLCHAIN_FILE="C:/Users/LargoUsagi/.conan/data/minizip/1.2.13/_/_/build/3822ec74d7dc1a129150f4f5e1c981542581f77c/build/generators/conan_toolchain.cmake" -DCMAKE_INSTALL_PREFIX="C:/Us
ers/LargoUsagi/.conan/data/minizip/1.2.13/_/_/package/3822ec74d7dc1a129150f4f5e1c981542581f77c" -DCMAKE_SH="CMAKE_SH-NOTFOUND" -DCMAKE_POLICY_DEFAULT_CMP0091="NEW" -DCMAKE_BUILD_TYPE="Debug" "C:\Users\LargoUsagi\.conan\data\minizip\1.2.13\_\_\build\3822ec74d7dc1a129
150f4f5e1c981542581f77c\src\.."

@LargoUsagi LargoUsagi added the bug Something isn't working label Nov 26, 2022
@LargoUsagi
Copy link
Author

This profile passed on the same system will complete successfully

[settings]
os=Windows
os_build=Windows
arch=x86_64
arch_build=x86_64
build_type=Release
compiler=gcc
compiler.version=12
compiler.libcxx=libstdc++11
[options]
[build_requires]
[env]
CC=C:/msys64/mingw64/bin/gcc
CXX=C:/msys64/mingw64/bin/g++

@SpaceIm
Copy link
Contributor

SpaceIm commented Nov 26, 2022

This is a never ended story where we fix a clang windows flavor and break another one, until we can have some conan helper like conan-io/conan#12336. For the moment assume that conan-center recipes don't support clang flavors targeting Windows, because we don't have any easy way to predict lib names of libraries built with CMake when they rely on MINGW or MSVC variables to change lib name.

/cc @memsharded

@LargoUsagi
Copy link
Author

This is a never ended story where we fix a clang windows flavor and break another one, until we can have some conan helper like conan-io/conan#12336. For the moment assume that conan-center recipes don't support clang flavors targeting Windows.

/cc @memsharded

Does that include if you use clang/llvm with MSVC

@SpaceIm
Copy link
Contributor

SpaceIm commented Nov 26, 2022

Yes, it may or may not work. Most recipes should work, and other fail to predict correct lib name or even use the proper build system.

@SpaceIm SpaceIm mentioned this issue Dec 8, 2022
4 tasks
@SpaceIm
Copy link
Contributor

SpaceIm commented Dec 8, 2022

Does it work with #14644?

@seppeon
Copy link
Contributor

seppeon commented Jul 2, 2023

I've submitted this to resolve this issue:
#18283

If possible, please approve my PR: User-approval pending

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants