Error: Building package bzip2:x86-windows failed with: BUILD_FAILED - vcpkg

I'm new to vcpkg and I am trying to install gdal but it seems to fail while trying to install bzip2
when I run
.\vcpkg install bzip2
I get the following error message
The following packages will be built and installed:
bzip2[core]:x86-windows
Starting package 1/1: bzip2:x86-windows
Building package bzip2[core]:x86-windows...
-- Downloading http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz...
-- Downloading http://www.bzip.org/1.0.6/bzip2-1.0.6.tar.gz... Failed. Status: 56;"Failure when receiving data from the peer"
CMake Error at scripts/cmake/vcpkg_download_distfile.cmake:151 (message):
Failed to download file.
If you use a proxy, please set the HTTPS_PROXY and HTTP_PROXY environment
variables to "https://user:password#your-proxy-ip-address:port/".
Otherwise, please submit an issue at https://github.com/Microsoft/vcpkg/issues
Call Stack (most recent call first):
ports/bzip2/portfile.cmake:4 (vcpkg_download_distfile)
scripts/ports.cmake:71 (include)
Error: Building package bzip2: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: bzip2:x86-windows
Vcpkg version: 0.0.113-nohash
Additionally, attach any relevant sections from the log files above
I'm not using a proxy so I am not sure why this is failing

Related

How to install Conan build tools in the Jenkins machine

I have an installation of Jenkins on Azure and wish to build a c++ project using Conan. Many examples show the following pipeline command to initiate Conan:
def conanClient = Artifactory.newConanClient()
however this throws an error:
sh: 1: conan: not found ERROR: Couldn't execute Conan task.
RuntimeException: Conan build failed with exit code 127
I assumed the newConanClient() would install Conan but that is not the case as verified by:
sh 'conan -v' resulting in conan: not found
From the JFrog documentation you would think there shouldn't be any problems as they say:
There is no need for any special setup for it, just install Conan and
your build tools in the Jenkins machine and call the needed Conan
commands.
https://docs.conan.io/en/latest/integrations/ci/jenkins.html?highlight=jenkins
So how does one "just install Conan" in Jenkins?
From the Documentation:
Conan can be installed in many Operating Systems. It has been extensively
used and tested in Windows, Linux (different distros), OSX, and is also
actively used in FreeBSD and Solaris SunOS. There are also several
additional operating systems on which it has been reported to work.
Based on your OS, you can install from here. newConanClient() method is part of the Artifactory plugin for Jenkins but doesn't install Conan
Now you can verify the installation
conan -v
and further can execute commands in Jenkins pipeline
sh 'conan build .'

AWS CodeBuild: ERROR: Could not build wheels for cmake, ninja

Running command pip install --no-binary ':all:' ddtrace cause i need to install arm64 version (cause default pkg uses binary code). On local system i got it installed correctly, but on AWS i got an error:
Failed to build cmake ninja
ERROR: Could not build wheels for cmake, ninja which use PEP 517 and cannot be installed directly
Python version - 3.9.6
PIP version - 21.1.3

Can't Install xmlsec for Mac

I'm new to django. i am tring to implement python3-saml which requires Xmlsec. i am trying to install it Using "pip install xmlsec" on my virtal environment. but throwing this error.
Collecting xmlsec
Using cached xmlsec-1.3.12.tar.gz (64 kB)
Installing build dependencies ... done
Getting requirements to build wheel ... done
Installing backend dependencies ... done
Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: lxml>=3.8 in
/opt/anaconda3/envs/conda_saml_env/lib/python3.10/site-packages (from xmlsec)
(4.8.0)
Building wheels for collected packages: xmlsec
Building wheel for xmlsec (pyproject.toml) ... error
error: subprocess-exited-with-error
× Building wheel for xmlsec (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
running bdist_wheel
running build
running build_py
package init file 'src/xmlsec/__init__.py' not found (or not a regular file)
creating build
creating build/lib.macosx-10.9-x86_64-3.10
creating build/lib.macosx-10.9-x86_64-3.10/xmlsec
copying src/xmlsec/py.typed -> build/lib.macosx-10.9-x86_64-3.10/xmlsec
copying src/xmlsec/tree.pyi -> build/lib.macosx-10.9-x86_64-3.10/xmlsec
copying src/xmlsec/__init__.pyi -> build/lib.macosx-10.9-x86_64-3.10/xmlsec
copying src/xmlsec/constants.pyi -> build/lib.macosx-10.9-x86_64-3.10/xmlsec
copying src/xmlsec/template.pyi -> build/lib.macosx-10.9-x86_64-3.10/xmlsec
running build_ext
error: xmlsec1 is not installed or not in path.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with
pip.
ERROR: Failed building wheel for xmlsec
Failed to build xmlsec
ERROR: Could not build wheels for xmlsec, which is required to install
pyproject.toml-based projects
I tried the following
brew install libxml2 libxmlsec1 pkg-config
Output for above command is
Warning: libxml2 2.9.12 is already installed and up-to-date.
To reinstall 2.9.12, run:
brew reinstall libxml2
Warning: libxmlsec1 1.2.33 is already installed and up-to-date.
To reinstall 1.2.33, run:
brew reinstall libxmlsec1
Warning: pkg-config 0.29.2_3 is already installed and up-to-date.
To reinstall 0.29.2_3, run:
brew reinstall pkg-config
I got the same issue when i tried on Linux OS. Then i was able to solve this by running this command
sudo apt-get install libxmlsec1-dev
But i'm not able to run this command on my Mac. Is there anything i'm missing.
Use these Commands :
xcode-select --install
brew upgrade
brew install libxml2 libxmlsec1
pip install xmlsec

Getting error "post-link script failed for package defaults ::ipykernel-4.10.0-py27_0" while installing ipykernel in anaconda with python 2.7

I am trying to install ipykernel in a separate python 2.7 environment (py27) for use of jupyter notebook. My base environment uses python3.9 that works great. When trying to use conda install ipykernel, I get the error below. Yes, this was done in a separate environment from my base and I am not aware of any virus softwares that are impeding this from successfully completing. Those are the only answers that I've seemed to find online. I also tried reinstalling anaconda. I did not attach the output from conda install -v ipykernel, but saw an error saying invalid syntax in decorator.py on line 162. It was pointing to the file=stderr in a print function call.
Similar to this problem https://github.com/conda/conda/issues/7351, but was unable to solve the problem with the suggestions.
(py27) C:\Users\Heath>conda install ipykernel
Collecting package metadata (current_repodata.json): done
Solving environment: failed with initial frozen solve. Retrying with flexible solve.
Solving environment: failed with repodata from current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done
## Package Plan ##
environment location: C:\Users\Heath\anaconda3\envs\py27
added / updated specs:
- ipykernel
The following NEW packages will be INSTALLED:
backports pkgs/main/noarch::backports-1.0-pyhd3eb1b0_2
backports.shutil_~ pkgs/main/noarch::backports.shutil_get_terminal_size-1.0.0-pyhd3eb1b0_3
backports_abc pkgs/main/noarch::backports_abc-0.5-py_1
colorama pkgs/main/noarch::colorama-0.4.4-pyhd3eb1b0_0
decorator pkgs/main/noarch::decorator-5.1.0-pyhd3eb1b0_0
enum34 pkgs/main/win-64::enum34-1.1.6-py27_1
futures pkgs/main/win-64::futures-3.3.0-py27_0
ipykernel pkgs/main/win-64::ipykernel-4.10.0-py27_0
ipython pkgs/main/win-64::ipython-5.8.0-py27_0
ipython_genutils pkgs/main/noarch::ipython_genutils-0.2.0-pyhd3eb1b0_1
jupyter_client pkgs/main/win-64::jupyter_client-5.3.4-py27_0
jupyter_core pkgs/main/win-64::jupyter_core-4.6.1-py27_0
libsodium pkgs/main/win-64::libsodium-1.0.16-h8b3e59e_0
pathlib2 pkgs/main/win-64::pathlib2-2.3.5-py27_0
pickleshare pkgs/main/win-64::pickleshare-0.7.5-py27_0
prompt_toolkit pkgs/main/win-64::prompt_toolkit-1.0.15-py27h3a8ec6a_0
pygments pkgs/main/noarch::pygments-2.5.2-py_0
python-dateutil pkgs/main/noarch::python-dateutil-2.8.2-pyhd3eb1b0_0
pywin32 pkgs/main/win-64::pywin32-227-py27h0c8e037_1
pyzmq pkgs/main/win-64::pyzmq-18.1.0-py27hc56fc5f_0
scandir pkgs/main/noarch::scandir-1.10.0-pyh5d7bf9c_3
simplegeneric pkgs/main/win-64::simplegeneric-0.8.1-py27_2
singledispatch pkgs/main/noarch::singledispatch-3.7.0-pyhd3eb1b0_1001
six pkgs/main/noarch::six-1.16.0-pyhd3eb1b0_0
tornado pkgs/main/win-64::tornado-5.1.1-py27h0c8e037_0
traitlets pkgs/main/win-64::traitlets-4.3.3-py27_0
wcwidth pkgs/main/noarch::wcwidth-0.2.5-pyhd3eb1b0_0
win_unicode_conso~ pkgs/main/win-64::win_unicode_console-0.5-py27hc037021_0
zeromq pkgs/main/win-64::zeromq-4.3.1-h2880e7c_3
Proceed ([y]/n)? y
Preparing transaction: done
Verifying transaction: done
Executing transaction: done
ERROR conda.core.link:_execute(699): An error occurred while installing package 'defaults::ipykernel-4.10.0-py27_0'.
Rolling back transaction: done
LinkError: post-link script failed for package defaults::ipykernel-4.10.0-py27_0
location of failed script: C:\Users\Heath\anaconda3\envs\py27\Scripts\.ipykernel-post-link.bat
==> script messages <==
<None>
==> script output <==
stdout:
stderr:
return code: 1
()```

Setting up Yesod on Ubuntu 13.10

After following the instructions on the QuickStart, I'm seeing some errors in Yesod when bringing up a webpage. The errors end in:
...
cannot satisfy -package-id wai-extra-1.3.4.6-62543d69d10941dae1d9b206c3eb3067:
wai-extra-1.3.4.6-62543d69d10941dae1d9b206c3eb3067 is unusable due to missing or recursive dependencies:
blaze-builder-conduit-1.0.0-1053545317cd68e3d51439dd9a0e622d zlib-conduit-1.0.0-b51dc7daf506ea4c5ecd031c5101d96a
(use -v for more information)
Build failure, pausing...
Hopefully related, the referenced tutorial has me run
cabal-dev install
on a fresh Yesod project, however that also gives me errors:
...
[1 of 1] Compiling Control.Monad.Logger ( Control/Monad/Logger.hs, dist/build/Control/Monad/Logger.o )
Control/Monad/Logger.hs:63:39:
Module System.Log.FastLogger' does not exportpushLogStr'
Control/Monad/Logger.hs:63:72:
Module System.Log.FastLogger' does not exportLoggerSet'
Control/Monad/Logger.hs:63:83:
Module System.Log.FastLogger' does not exportnewLoggerSet'
Control/Monad/Logger.hs:63:97:
Module System.Log.FastLogger' does not exportdefaultBufSize'
Failed to install monad-logger-0.3.3.0
...
On this later set of errors, I came across a page suggesting the issue has been fixed (SO won't let me post more than 2 links, but Google the error and it comes right up).
Any ideas?
Thanks in advance!
I'd suggest using cabal sandbox for each Yesod project, rather than installing the Yesod platform as part of your system libraries. Think of a cabal sandbox as a localized collection of Haskell packages in a single project, so you could have different versions of a package, say Data.Text, in 2 different cabal sandboxes. Using cabal sandbox takes longer time for compilation but it makes things simpler for dependency resolution (read more here: (read more here: http://coldwa.st/e/blog/2013-08-20-Cabal-sandbox.html). cabal sandbox requires a cabal version of at least 1.18 if I'm not mistaken.
Alright, enough of the talk. Let's get started.
To get the latest cabal, it's easier if you have cabal installed through a package manager, even if the package manager installs a cabal without cabal sandbox. Since you are on Ubuntu, just:
sudo apt-get install cabal
Once you have some version of cabal installed, run:
cabal sandbox
If you see something along the lines of this:
cabal: Please specify a subcommand (see 'help sandbox')
Then congratulations, the version of cabal that you have supports cabal sandbox, just move on Once you have a Cabal with cabal sandbox section of the answer.
If instead you see something like:
cabal: unrecognised command: sandbox (try --help)
Then you will need a more modern version of cabal. Simply clone the cabal repository on github:
git clone https://github.com/haskell/cabal.git
Go to the directory, and checkout the branch Cabal-v1.18.1.2, like so:
git checkout Cabal-v1.18.1.2
Then execute:
cabal install Cabal/ cabal-install/
This should install cabal in the $HOME/.cabal/bin folder. Be sure to prepend $HOME/.cabal/bin to your PATH environment variable, before the folder where the system's cabal is located.
Once you have a Cabal with cabal sandbox
Based on what I read from the Yesod quick start guide, you will want to install the yesod-bin package. It's hackage page is here. Basically, yesod-bin provides you with a yesod binary that allows you to initialize a scaffolded site. The latest version of yesod-bin is 1.2.5.6, and that's what we're going to install.
Create a directory named yesod-bin:
mkdir yesod-bin
Go into that directory, and set up a cabal sandbox in that it, like so:
cabal sandbox init
Fetch the latest package list from hackage using:
cabal update
Now, we are going to install the latest version of yesod-bin, 1.2.5.6, in a cabal sandbox. However, yesod-bin has a dependency on the mmorph package, which defaults to install version 1.01, and trying to install mmorph-1.01 will result in an error message like the following:
src/Control/Monad/Morph.hs:76:8:
Could not find module `Control.Applicative.Backwards'
Use -v to see a list of the files searched for.
Failed to install mmorph-1.0.1
cabal: Error: some packages failed to install:
mmorph-1.0.1 failed during the building phase. The exception was:
ExitFailure 1
and installing yesod-bin without specifiy the mmorph package version defaults to installing mmorph-1.0.1, resulting in the following error:
cabal: Error: some packages failed to install:
base64-conduit-1.0.0 depends on mmorph-1.0.1 which failed to install.
blaze-builder-conduit-1.0.0 depends on mmorph-1.0.1 which failed to install.
conduit-1.0.10 depends on mmorph-1.0.1 which failed to install.
http-client-conduit-0.2.0.1 depends on mmorph-1.0.1 which failed to install.
http-conduit-2.0.0.3 depends on mmorph-1.0.1 which failed to install.
http-reverse-proxy-0.3.0 depends on mmorph-1.0.1 which failed to install.
mmorph-1.0.1 failed during the building phase. The exception was:
ExitFailure 1
network-conduit-1.0.1 depends on mmorph-1.0.1 which failed to install.
project-template-0.1.3.2 depends on mmorph-1.0.1 which failed to install.
resourcet-0.4.10 depends on mmorph-1.0.1 which failed to install.
wai-2.0.0 depends on mmorph-1.0.1 which failed to install.
wai-logger-2.1.1 depends on mmorph-1.0.1 which failed to install.
warp-2.0.2 depends on mmorph-1.0.1 which failed to install.
yaml-0.8.5.3 depends on mmorph-1.0.1 which failed to install.
yesod-bin-1.2.5.6 depends on mmorph-1.0.1 which failed to install.
which seems to be related to these 2 issues in the mmorph github repo:
https://github.com/Gabriel439/Haskell-MMorph-Library/issues/8
https://github.com/Gabriel439/Haskell-MMorph-Library/pull/10
However, mmorph version 1.0.0 works fine. As such, we will have to specify the version of mmorph to be 1.0.0 when we install yesod-bin, like this:
cabal install mmorph-1.0.0 yesod-bin-1.2.5.6
This will take quite some time. cabal sandbox creates a directory named .cabal-sandbox inside the yesod-bin directory, and the yesod binary (along with several other binaries from the yesod-bin package) can be found in the .cabal-sandbox/bin folder. Simply add that folder into your PATH, and you should be able to do the yesod init and yesod devel as seen at the end of the quick start.
As an quick update to #yanhan great answer, since I have tried to follow his guidelines on Ubuntu 14.04 LTS and get stuck a bit.
If you don't have cabal executable preinstalled, you can also do:
git clone https://github.com/haskell/cabal.git
Then of course:
git checkout Cabal-v1.20.0.2
And then you can use the bootstrap.sh script to install cabal executable and Cabal package:
cd cabal-install && ./bootstrap.sh
It will take some time, but soon after you can check the version of newly installed cabal executable:
$HOME/.cabal/bin/cabal --version