microsoft / vcpkg

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

[PortAudio x64] build failure #15575

Closed Tudi closed 3 years ago

Tudi commented 3 years ago

Host Environment

To Reproduce Steps to reproduce the behavior: vcpkg install portaudio:x64-windows

Failure logs CMake Error at scripts/cmake/vcpkg_execute_required_process.cmake:108 (message): Command failed: C:/msys64/usr/bin/git.exe fetch https://git.assembla.com/portaudio.git c5d2c51bd6fe354d0ee1119ba932bfebd3ebfacc --depth 1 -n Working Directory: D:/GitHub/ViorelTeodorescu/vcpkg/downloads/git-tmp Error code: 3328

Additional context this is my first contact with vcpkg

NancyLi1013 commented 3 years ago

Hi @Tudi

Thanks for posting this issue.

Command failed: C:/msys64/usr/bin/git.exe fetch https://git.assembla.com/portaudio.git

Seems your git doesn't work.

Could you please help confirm if you have add git path to system variables path? Make sure if you have access to download via git.

Tudi commented 3 years ago

Hi @NancyLi1013

I tested with tortoise git and i was able to download the the repo : https://git.assembla.com/portaudio.git Made sure git is at that specific path. It's indeed there Tried to run : C:/msys64/usr/bin/git.exe clone https://git.assembla.com/portaudio.git -> worked fine, it cloned the repo Tried to run : C:/msys64/usr/bin/git.exe fetch https://git.assembla.com/portaudio.git -> gives error : fatal: not a git repository (or any parent up to mount point /) Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

Not sure if relevant, I already have portaudio cloned and built for some other project( amazon) without vcpkg. I even have edits on this portaudio clone. Maybe that is why vcpkg fetch that fails ? Maybe he is supposed to do an init / clone first ( different location ? ) and after that the fetch ?

NancyLi1013 commented 3 years ago

It seems that you need to cd into the directory first:

if I use git fetch directly, it will also fail to get the sources:

C:\>git fetch https://git.assembla.com/portaudio.git
fatal: not a git repository (or any of the parent directories): .git

Please see this reference to get more info about this issue. https://stackoverflow.com/questions/11961600/fatal-not-a-git-repository-or-any-of-the-parent-directories-from-git-status

Here is the build process from my machine:

PS F:\test\vcpkg> .\vcpkg.exe install portaudio:x64-windows --editable
Computing installation plan...
A suitable version of cmake was not found (required v3.19.2). Downloading portable cmake v3.19.2...
Downloading cmake...
  https://github.com/Kitware/CMake/releases/download/v3.19.2/cmake-3.19.2-win32-x86.zip -> F:\test\vcpkg\downloads\cmake-3.19.2-win32-x86.zip
Extracting cmake...
The following packages will be built and installed:
    portaudio[core]:x64-windows -> 2020-02-02#2
Starting package 1/1: portaudio:x64-windows
Building package portaudio[core]:x64-windows...
-- Fetching https://git.assembla.com/portaudio.git...
-- Extracting source F:/test/vcpkg/downloads/portaudio-c5d2c51bd6fe354d0ee1119ba932bfebd3ebfacc.tar.gz
-- Applying patch fix-library-can-not-be-found.patch
-- Applying patch fix-include.patch
-- Using source at F:/test/vcpkg/buildtrees/portaudio/src/ebd3ebfacc-5ed52dac86
-- Configuring x64-windows
-- Building x64-windows-dbg
-- Building x64-windows-rel
-- Installing: F:/test/vcpkg/packages/portaudio_x64-windows/share/portaudio/copyright
-- Performing post-build validation
-- Performing post-build validation done
Building package portaudio[core]:x64-windows... done
Installing package portaudio[core]:x64-windows...
Installing package portaudio[core]:x64-windows... done
Elapsed time for package portaudio:x64-windows: 45.94 s

Total elapsed time: 46.01 s

The package portaudio:x64-windows provides CMake targets:

    find_package(portaudio CONFIG REQUIRED)
    target_link_libraries(main PRIVATE portaudio)
Tudi commented 3 years ago

@NancyLi1013 Sorry, I do not understand. Cd into which directory ? I wish to have a new build of portaudio. I do not yet have a directory to cd into because i do not have portaudio because it errored before i got portaudio.

I do not wish to use my old edited portaudio. I would like vcpkg to fetch a new clean version and do it's thing(build). I need vcpkg+portaudio combo because I have a secondary project that can only include portaudio through vcpkg ( bazel build nightmare ). Is there a way to specify vcpkg to make a clean clone of portaudio ?

I tried to clone your steps ( including cd into "vcpkg" directory) but I still get the same error.

Thank you for the help so far !

NancyLi1013 commented 3 years ago

Since there should be a git repository before using git fetch. Otherwise, it doesn't work.

So we can use git clone https://git.assembla.com/portaudio.git to get the repository. Then cd to the directory, such as portaudio if you don't rename it.

Tudi commented 3 years ago

@NancyLi1013 My expectations of vcpkg to be a helper tool is fading fast. Tried creating new directory. Tried install ..it failed. Tried clone than install...failed. Attaching screenshots, logs... maybe there is something obvious I'm missing. Stackoverflow said to add cygwin to path, but i do not have cygwin isntalled ? EnvironmentVariables

FailedVCpkgPortaudio git-fetch-x64-windows-err.log GitExistsInLocation

Tudi commented 3 years ago

I'm speechless. My hope in vcpkg was to not require to know git. I guess I might as well do everything manually. Sorry for "wasting a lot of your time". Though i never got around the issue, I feel I need a more noob friendly package manager. Will close this ticket to not bother you.

NancyLi1013 commented 3 years ago

@Tudi I'm sorry about this. I noticed that you used git in C:/msys64/usr/bin/git.exe. Could you please try to remove C:/msys64/usr/bin from PATH in environment variable and then rebuild this port?

Tudi commented 3 years ago

@NancyLi1013 restored faith in humanity. That was the issue. Thanks !