Open tmiseikis opened 9 months ago
As workaround, I have added the following to the generate
method in my conanfile.py
:
from conan.tools.files import rename
def generate(self):
if self.settings.os == "Windows":
cppunit_libdir = self.dependencies["cppunit"].cpp_info.libdir
cppunit_from_name = f"{cppunit_libdir}/libcppunit.a"
cppunit_to_name = f"{cppunit_libdir}/cppunit.lib"
if os.path.isfile(cppunit_from_name):
rename(self, cppunit_from_name, cppunit_to_name)
Ran into this issue as well. Apparently it only happens for Windows x86 target with shared lib. Anyone know where the issue might be?
cppunit/1.15.1: RUN: "/c/users/jenkins/.conan2/p/b/cppun1cf6f4be913ff/b/src/configure" --enable-shared --disable-static --prefix=/ --bindir=${prefix}/bin --sbindir=${prefix}/bin --libdir=${prefix}/lib --includedir=${prefix}/include --oldincludedir=${prefix}/include --host=i686-unknown-windows --build=x86_64-unknown-windows --enable-debug=no --enable-doxygen=no --enable-dot=no --enable-werror=no --enable-html-docs=no
checking whether the /c/users/jenkins/.conan2/p/autome371915acf95c/p/res/automake-1.16/compile cl -nologo linker (link -nologo) supports shared libraries... no
Could be configure
, automake
, or conan core problem?
supports shared libraries... no
I have other packages with this same configuration and they work fine.
Description
Hi,
I am building 32-bit version of
cppunit/1.15.1
library on Windows using msvc compiler, but it looks like the resulting library that is built is named after Unix convention:libcppunit.a
. However, since I am building for Windows platform I would have expected it to be calledcppunit.lib
. Because of this thefind_package
call in CMake fails:If I manually rename the built library from
libcppunit.a
tocppunit.lib
then CMake'sfind_package
no longer fails.Package and Environment Details
Conan profile
Profile host:
Profile build:
Steps to reproduce
conan_profiles/build
andconan_profiles/host
files based on the conan profiles specified above.conan install -s:a build_type=Release --profile:build=conan_profiles/build --profile:host=conan_profiles/host . --build=missing
Logs
Click to expand log
``` cppunit/1.15.1: package(): Packaged 1 '.exe' file: DllPlugInTester.exe cppunit/1.15.1: package(): Packaged 70 '.h' files cppunit/1.15.1: package(): Packaged 1 '.a' file: libcppunit.a cppunit/1.15.1: package(): Packaged 1 file: COPYING cppunit/1.15.1: Created package revision d9ecfcae26c91d43ee539a6b0e22fe38 cppunit/1.15.1: Package '229a27e22d41023d147ff16c00b2d96a6e09029f' created cppunit/1.15.1: Full package reference: cppunit/1.15.1#ab7aa369cbf20014946964574a427088:229a27e22d41023d147ff16c00b2d96a6e09029f#d9ecfcae26c91d43ee539a6b0e22fe38 cppunit/1.15.1: Package folder C:\Users\xxx\.conan2\p\b\cppun6ef23a1501b95\p ```