microsoft / vcpkg

C++ Library Manager for Windows, Linux, and MacOS
MIT License
23.27k stars 6.42k forks source link

[librabbitmq] build failure #12518

Closed PversusNP closed 4 years ago

PversusNP commented 4 years ago

Host Environment

To Reproduce Steps to reproduce the behavior: ./vcpkg install librabbitmq

Console output log Computing installation plan... The following packages will be built and installed: librabbitmq[core]:x86-windows

Additional packages (*) will be modified to complete this operation. Warning: The following VS instances are excluded because the English language pack is unavailable. C:\Program Files (x86)\Microsoft Visual Studio\2019\Community Please install the English language pack. Detecting compiler hash for triplet x86-windows... Starting package 1/3: openssl-windows:x86-windows Building package openssl-windows[core]:x86-windows... Could not locate cached archive: C:\Users\Giorgio_Brs\AppData\Local\vcpkg\archives\d7\d7df23be95fe47c4d6a9511f6556a98a83 1fdaf9.zip -- Downloading https://strawberry.perl.bot/download/5.30.0.1/strawberry-perl-5.30.0.1-32bit.zip... -- Downloading https://www.openssl.org/source/openssl-1.1.1g.tar.gz... -- Extracting source D:/vcpkg/vcpkg/downloads/openssl-1.1.1g.tar.gz -- Using source at D:/vcpkg/vcpkg/buildtrees/openssl-windows/src/openssl-1-bb2a9a5801.clean -- Downloading http://www.nasm.us/pub/nasm/releasebuilds/2.14.02/win32/nasm-2.14.02-win32.zip... -- Downloading http://download.qt.io/official_releases/jom/jom_1_1_3.zip... -- Copying openssl release source files... -- Copying openssl release source files... done -- Configure x86-windows-rel -- Configure x86-windows-rel done -- Build x86-windows-rel CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:72 (message): Command failed: nmake -f makefile install_sw install_ssldirs Working Directory: D:/vcpkg/vcpkg/buildtrees/openssl-windows/x86-windows-rel Error code: 2 See logs for more information: D:\vcpkg\vcpkg\buildtrees\openssl-windows\build-x86-windows-rel-1-out.log D:\vcpkg\vcpkg\buildtrees\openssl-windows\build-x86-windows-rel-1-err.log

Call Stack (most recent call first): ports/openssl-windows/portfile.cmake:95 (vcpkg_execute_required_process) scripts/ports.cmake:79 (include)

Error: Building package openssl-windows:x86-windows failed with: BUILD_FAILED Please ensure you're using the latest portfiles with .\vcpkg update, then submit an issue at https://github.com/Microsoft/vcpkg/issues including: Package: openssl-windows:x86-windows Vcpkg version: 2020.06.15-nohash

Additional context I tried any workaround found on internet about VS2015 SDK paths (as running vcvarsall.bat or reinstalling VS2015 sdk).

PhoebeHui commented 4 years ago

@PversusNP, could you install English language pack and try again?

I tried to build it with VS2015 update3, it installed successfully for me.

PversusNP commented 4 years ago

I need to build for VS2015 update3 only, but I also have VS2019 installed. I installed VS2015 ENU language pack and then reinstalled VS2015 sdk too.

Can you help me?

PhoebeHui commented 4 years ago

See commnets in issue https://github.com/microsoft/vcpkg/issues/12519

PversusNP commented 4 years ago

Ok, thank you, this step was completed. But the following error happened, could you help me again?

Computing installation plan... The following packages will be built and installed: librabbitmq[core]:x86-windows-vc140

Call Stack (most recent call first): scripts/cmake/vcpkg_build_cmake.cmake:91 (vcpkg_execute_build_process) scripts/cmake/vcpkg_install_cmake.cmake:24 (vcpkg_build_cmake) ports/librabbitmq/portfile.cmake:23 (vcpkg_install_cmake) scripts/ports.cmake:79 (include)

Error: Building package librabbitmq:x86-windows-vc140 failed with: BUILD_FAILED Please ensure you're using the latest portfiles with .\vcpkg update, then submit an issue at https://github.com/Microsoft/vcpkg/issues including: Package: librabbitmq:x86-windows-vc140 Vcpkg version: 2020.06.15-nohash

install-x86-windows-vc140-dbg-out.log

PhoebeHui commented 4 years ago

@PversusNP, from your log, the below libs that links to the project are unexpect for me, I checked the log, I didn't find it in my building log. Could you double check?

C:\Users\Giorgio_Brs\Documents\Visual Studio 2015\Projects\OpenSSL-Win32.1.0.2m\lib\VC\ssleay32MDd.lib C:\Users\Giorgio_Brs\Documents\Visual Studio 2015\Projects\OpenSSL-Win32.1.0.2m\lib\VC\libeay32MDd.lib

I tried it, it built sucessfully for me, the command line in my building log is:

cmake.exe -E vs_link_dll --intdir=librabbitmq\CMakeFiles\rabbitmq.dir --rc=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\rc.exe --mt=C:\PROGRA~2\WI3CF2~1\10\bin\100190~1.0\x64\mt.exe --manifests  -- C:\PROGRA~2\MICROS~1.0\VC\bin\AMD64_~2\link.exe  librabbitmq\CMakeFiles\rabbitmq.dir\amqp_framing.c.obj librabbitmq\CMakeFiles\rabbitmq.dir\amqp_api.c.obj librabbitmq\CMakeFiles\rabbitmq.dir\amqp_connection.c.obj librabbitmq\CMakeFiles\rabbitmq.dir\amqp_mem.c.obj librabbitmq\CMakeFiles\rabbitmq.dir\amqp_socket.c.obj librabbitmq\CMakeFiles\rabbitmq.dir\amqp_table.c.obj librabbitmq\CMakeFiles\rabbitmq.dir\amqp_url.c.obj librabbitmq\CMakeFiles\rabbitmq.dir\amqp_tcp_socket.c.obj librabbitmq\CMakeFiles\rabbitmq.dir\amqp_time.c.obj librabbitmq\CMakeFiles\rabbitmq.dir\amqp_consumer.c.obj librabbitmq\CMakeFiles\rabbitmq.dir\amqp_openssl.c.obj librabbitmq\CMakeFiles\rabbitmq.dir\amqp_openssl_hostname_validation.c.obj librabbitmq\CMakeFiles\rabbitmq.dir\amqp_hostcheck.c.obj librabbitmq\CMakeFiles\rabbitmq.dir\amqp_openssl_bio.c.obj librabbitmq\CMakeFiles\rabbitmq.dir\win32\threads.c.obj  /out:librabbitmq\rabbitmq.4.dll /implib:librabbitmq\rabbitmq.4.lib /pdb:librabbitmq\rabbitmq.4.pdb /dll /version:4.4 /machine:X86 /nologo  /debug /INCREMENTAL  F:\vcpkg\phoebe\vcpkg\installed\x86-windows-v140\debug\lib\libssl.lib  F:\vcpkg\phoebe\vcpkg\installed\x86-windows-v140\debug\lib\libcrypto.lib  ws2_32.lib  kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib 

Starting package 3/3: librabbitmq:x86-windows-v140 Building package librabbitmq[core]:x86-windows-v140...

-- Using community triplet x86-windows-v140. This triplet configuration is not guaranteed to succeed. -- [COMMUNITY] Loading triplet configuration from: F:\vcpkg\phoebe\vcpkg\triplets\community\x86-windows-v140.cmake -- Downloading https://github.com/alanxz/rabbitmq-c/archive/d416b8b16d196085106cfe137a0ff6919a9f6752.tar.gz... -- Extracting source F:/vcpkg/phoebe/vcpkg/downloads/alanxz-rabbitmq-c-d416b8b16d196085106cfe137a0ff6919a9f6752.tar.gz -- Applying patch fix-uwpwarning.patch -- Using source at F:/vcpkg/phoebe/vcpkg/buildtrees/librabbitmq/src/919a9f6752-5e598e0daf.clean -- Configuring x86-windows-v140 -- Building x86-windows-v140-dbg -- Building x86-windows-v140-rel -- Installing: F:/vcpkg/phoebe/vcpkg/packages/librabbitmq_x86-windows-v140/share/librabbitmq/copyright -- Performing post-build validation -- Performing post-build validation done

Building package librabbitmq[core]:x86-windows-v140... done Installing package librabbitmq[core]:x86-windows-v140... Installing package librabbitmq[core]:x86-windows-v140... done Elapsed time for package librabbitmq:x86-windows-v140: 28.42 s

Total elapsed time: 11.14 min

The package librabbitmq:x86-windows-v140 provides CMake targets:

find_package(rabbitmq-c CONFIG REQUIRED)
target_link_libraries(main PRIVATE rabbitmq::rabbitmq rabbitmq::rabbitmq-static)
PhoebeHui commented 4 years ago

It should rely on the openssl installed by vcpkg, it seems that you installed OpenSSL-Win32.1.0.2m, that cause this confict.

PversusNP commented 4 years ago

Yes, I uninstalled OpenSSL-Win32.1.0.2m, deleted vcpkg cache e reinstalled. It worked! Thank you very much.