AWS CodeBuild: ERROR: Could not build wheels for cmake, ninja - amazon-web-services

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

Related

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

psycopg2-binary installation into a virtual environment fails when trying to compile source code

I am trying to install psycopg2-binary into my Django project. I am using a virtual environment and the command I'm running is
pip install psycopg2-binary
However, I'm getting a massive error message, the gist of it is this:
Error: pg_config executable not found.
pg_config is required to build psycopg2 from source. Please add the directory
containing pg_config to the $PATH or specify the full executable path with the
option:
python setup.py build_ext --pg-config /path/to/pg_config build ...
or with the pg_config option in 'setup.cfg'.
If you prefer to avoid building psycopg2 from source, please install the PyPI
'psycopg2-binary' package instead.
But, hey, I'm installing exactly 'psycopg2-binary'
Why am I getting all this mess?
Pip cannot find you processor+OS at https://pypi.org/project/psycopg2-binary/2.9.2/#files so it tried to install from sources (the last file at the page) and failed.
Compiling from sources is currently the only way. If you can donate some spare processor cycles to the Psycopg2 authors they perhaps could start compiling and publishing wheels for OSX on M1.

Google Cloud Build fails due to missing CMake

I am trying to deploy a Flask/ML app to Google Cloud but encountering this issue;
When I try to run gcloud builds submit --tag gcr.io/project-name/index with a requirements.txt file, it throws CMake must be installed to build dlib. Since now, I didn't have any problems working with dlib (I have cmake and build-essential already installed) and when I connect Google Cloud Shell via ssh, I can see both build-essential and cmake is installed and up to date on there too.
I tried to build on Ubuntu and Windows machines, same error consists.
Solved! CMake needs to be built in Dockerfile, not locally or in cloud shell.
Adding RUN apt-get update && apt-get -y install cmake before RUN pip install -r requirements.txt in Dockerfile resolved the issue.

Error: VNDK library: libandroid_net's ABI has EXTENDING CHANGES

I am setting up an environment to run AOSP code on Ubuntu 18.04.1 LTS and got the error "error: VNDK library: libandroid_net's ABI has EXTENDING CHANGES". Please help me to resolve this. I have searched for hours but didn't get the solution.
I have done following things:
Installed required packages: sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl zlib1g-dev gcc-multilib g++-multilib libc6-dev-i386 lib32ncurses5-dev x11proto-core-dev libx11-dev lib32z-dev libgl1-mesa-dev libxml2-utils xsltproc unzip
Installed community-maintained default set of udev rules for all Android devices: apt-get install adb
Install repo: https://source.android.com/setup/build/downloading.html
mkdir ~/bin
PATH=~/bin:$PATH
curl https://storage.googleapis.com/git-repo-downloads/repo > ~/bin/repo
chmod a+x ~/bin/repo
Initializing a Repo client
mkdir WORK
cd WORK
git config --global user.name "Your Name"
git config --global user.email "you#example.com"
repo init -u https://android.googlesource.com/platform/manifest
Installed pixel 3 XL binaries which include google-devices and qcom blueline. Used Extractor and ./*.sh command to extract them.
Copied qcom extracted vendor folder into Source Code and then copied pixel 3 xl vendor folder. Meged and replaced in all dialogs.
Run make clobber to clean the build directory.
Run . build/envsetup.sh to initialize the environment.
Run lunch aosp_arm-eng to select your run target as asop_arm BUILD with eng BUILDTYPE.
Run make -j16 to build the code.
Got build error:
error: VNDK library: libandroid_net's ABI has EXTENDING CHANGES
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000e7400000, 83886080, 0) failed; error='Not enough space' (errno=12)
OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000cac00000, 73400320, 0) failed; error='Not enough space' (errno=12)
For 'Not enough space' error: I am setting cache and configuring jack
export USE_CCACHE=1 to enable compiler cache
Failed to do prebuilts/misc/linux-x86/ccache/ccache -M 15G because there is no ccache folder exists.
export ANDROID_JACK_VM_ARGS="-Xmx4g -Dfile.encoding=UTF-8 -XX:+TieredCompilation" to configure Jack.
For resolving the VNDK issue I am not sure by may be binaries I have included are not correct so I have deleted the vendor folder that contains Pixel 3 XL binaries.
I am a newbie for this task and just started a week ago to look into this.
Please suggest.
Thank you in advance.

Cassandra C++ driver on MacOS High Sierra: make: no rule to make target

Following these instructions to install the DataStax C++ Driver on MacOS High Sierra, as a pre-requisite to installing the DataStax PHP Driver for Cassandra.
Everything runs great until I get to the line "make install" in the "Building and installing the C/C++ driver" section. That's where I get the message: "make: *** No rule to make target `install'. Stop."
Can someone help me get past this step?
** SOLVED ** a friend helped me stumble across the solution. Two things to remember when installing on MacOS High Sierra:
1.) You need to run the install of cpp-driver (which isn't a step in the DataStax instructions referenced in the question) and then
2.) You have to fully qualify the cmake .. command to point to the OpenSSL install.
Here are the amended instructions that worked for me:
# Datastax C++ driver dependencies
brew install libuv cmake
brew install openssl
brew link --force openssl
# Install git if you dont have it
brew install git
# Retrieve the cpp
git clone https://github.com/datastax/cpp-driver.git --depth=1
mkdir cpp-driver/build
cd cpp-driver/build
# Build with qualified path to OpenSSL location
cmake -DOPENSSL_ROOT_DIR=/usr/local/opt/openssl/ -DOPENSSL_LIBRARIES=/usr/local/opt/openssl/lib ..
make
make install
# Install pecl driver
pecl install cassandra
Once that's complete you should be good to go.