GoogleCloudPlatform Buildpacks failed to build - google-cloud-platform

I haven't changed anything recently in my project, but when I tried to deploy it last, I received this error in the logs: ERROR: Could not build wheels for pyarrow, which is required to install pyproject.toml-based projects
See the full log here: log-d20114fe-3eeb-4a8d-8926-3a971882894c.txt
This is my requirements.txt:
requirements.txt
It seems like it is an issue with the dependencies for the snowflake-connector-python package, but I am not really sure what would have caused this. I see in the logs:
-- Running cmake for pyarrow
Step #0 - "Buildpack": cmake -DPYTHON_EXECUTABLE=/layers/google.python.runtime/python/bin/python3 -DPython3_EXECUTABLE=/layers/google.python.runtime/python/bin/python3 "" -DPYARROW_BUILD_CUDA=off -DPYARROW_BUILD_FLIGHT=off -DPYARROW_BUILD_GANDIVA=off -DPYARROW_BUILD_DATASET=off -DPYARROW_BUILD_ORC=off -DPYARROW_BUILD_PARQUET=off -DPYARROW_BUILD_PARQUET_ENCRYPTION=off -DPYARROW_BUILD_PLASMA=off -DPYARROW_BUILD_S3=off -DPYARROW_BUILD_HDFS=off -DPYARROW_USE_TENSORFLOW=off -DPYARROW_BUNDLE_ARROW_CPP=off -DPYARROW_BUNDLE_BOOST=off -DPYARROW_GENERATE_COVERAGE=off -DPYARROW_BOOST_USE_SHARED=on -DPYARROW_PARQUET_USE_SHARED=on -DCMAKE_BUILD_TYPE=release /tmp/pip-install-w1g_50oc/pyarrow_4a54282bee5f4c3c8399d3428e4134e6
Step #0 - "Buildpack": error: command 'cmake' failed: No such file or directory
This makes me think CMake is the problem, but I tried explicitly adding CMake to my requirements file and had the same result.
I also looked at the last successful build, and it looks like I was running python version 3.10.8, and the one that failed first was running 3.11. How can I change what python version cloud build uses? I am using the cloudbuild.yaml file instead of docker.

Figured it out! The issue was with not specifying a version in Cloud Build for Python, so it was defaulting to 3.11, which does not yet have support for pyarrow. I ended up setting the version in the cloud build yaml file to 3.10.8 like so:
steps:
- name: gcr.io/k8s-skaffold/pack
env:
- GOOGLE_ENTRYPOINT=$_ENTRYPOINT
- GOOGLE_RUNTIME_VERSION=$_RUNTIME_VERSION
args:
- build
- '$_GCR_HOSTNAME/$PROJECT_ID/$REPO_NAME/$_SERVICE_NAME:$COMMIT_SHA'
- '--builder=gcr.io/buildpacks/builder:v1'
- '--network=cloudbuild'
- '--path=.'
- '--env=GOOGLE_ENTRYPOINT'
- '--env=GOOGLE_RUNTIME_VERSION'

For those of you who are using a Procfile
I was able to fix by creating a .python-version file that contains just the version number needed,
i.e. 3.10.4

Related

How to add trix.css when it is removed after pruning?

After pruning with the command "docker system prune -a" nodejs wont build anymore beacuse trix.css is missing. I am assuming this was probably deleted while pruning. How can I resolve this error (see the error below)? Why is it not created again while building the container again since the file is in the docker file.
Required path doesn't exist: /code/bower_components/trix/dist/trix.css trix
[13:57:39] 'vendorcss' errored after 1.63 ms
[13:57:39] Error: Promise rejected without Error
at Domain.onError (/usr/local/lib/node_modules/gulp/node_modules/async-done/index.js:49:15)
at Object.onceWrapper (events.js:315:30)
at emitOne (events.js:116:13)
at Domain.emit (events.js:211:7)
at Domain._errorHandler (domain.js:134:21)
at process._fatalException (bootstrap_node.js:375:33)
[13:57:39] 'staging' errored after 41 ms
ERROR: Service 'nodejs' failed to build: The command '/bin/sh -c gulp staging' returned a non-
zero code: 1
Usually I use this command : "sudo docker-compose -f docker-compose-staging.yml build nodejs" when I want to build the container again. I am very new to this and would be greatfull for some help.
For me, this was the case:
The issue exists because trix.css was removed in the latest version. It has nothing to do with docker system prune as far as I understand.
You can compare the two versions here: https://github.com/basecamp/trix/compare/1.3.1...v2.0.0
Basically, in order to fix this issue, you need to do
yarn install
yarn build
inside bower_components. This is suggested in the official updated README of the trix repository: https://github.com/basecamp/trix.
Once done with that, you will have trix.css and trix.umd.min.js files for your perusal.

Yesod Quick Start Fails at Stack Build

I attempted to do the yesod quick start guide last night and on step 4 running stack build yields the errror
Error parsing targets: The specified targets matched no packages.
Perhaps you need to run 'stack init'?
running stack init yields a big large error as well
Is there any resolution for this?
Edit: Adding error from the stack init command
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- ./
Selecting the best among 15 snapshots...
* Partially matches lts-13.21
aeson version 1.4.2.0 found
- edb-yesod requires >=0.6 && <1.4
classy-prelude version 1.5.0 found
- edb-yesod requires ==1.4.*
classy-prelude-conduit version 1.5.0 found
- edb-yesod requires ==1.4.*
classy-prelude-yesod version 1.5.0 found
- edb-yesod requires ==1.4.*
persistent version 2.9.2 found
- edb-yesod requires ==2.8.*
persistent-sqlite version 2.9.3 found
- edb-yesod requires ==2.8.*
yaml version 0.11.0.0 found
- edb-yesod requires ==0.8.*
Using package flags:
- edb-yesod: dev = False, library-only = False
Downloaded nightly-2019-05-18 build plan.
Unable to load cabal files for snapshot
----
Deleting cached snapshot file: /home/decapo/.stack/build-plan/nightly-2019-05-18.yaml
Recommendation: try running again. If this fails again, open an upstream issue at:
https://github.com/fpco/stackage-nightly/issues/new
----
Unable to parse cabal file for co-log-0.3.0.0#sha256:0eb5cf2598c3673f39a8e967a6a4f5043f4d1f1fcb50a844653c34fcf0cb068a,4508
- 0:0: Unsupported cabal-version. See https://github.com/haskell/cabal/issues/4899.
Edit 2
Adding output from stack new yesod-sqlite template
ยป stack new my-project-du yesod-sqlite
Downloading template "yesod-sqlite" to create project "my-project-du" in my-project-du/ ...
Looking for .cabal or package.yaml files to use to init the project.
Using cabal packages:
- my-project-du/
Selecting the best among 15 snapshots...
* Partially matches lts-13.21
aeson version 1.4.2.0 found
- my-project-du requires >=0.6 && <1.4
classy-prelude version 1.5.0 found
- my-project-du requires ==1.4.*
classy-prelude-conduit version 1.5.0 found
- my-project-du requires ==1.4.*
classy-prelude-yesod version 1.5.0 found
- my-project-du requires ==1.4.*
persistent version 2.9.2 found
- my-project-du requires ==2.8.*
persistent-sqlite version 2.9.3 found
- my-project-du requires ==2.8.*
yaml version 0.11.0.0 found
- my-project-du requires ==0.8.*
Using package flags:
- my-project-du: dev = False, library-only = False
Unable to load cabal files for snapshot
----
Deleting cached snapshot file: /home/decapo/.stack/build-plan/nightly-2019-05-18.yaml
Recommendation: try running again. If this fails again, open an upstream issue at:
https://github.com/fpco/stackage-nightly/issues/new
----
Unable to parse cabal file for co-log-0.3.0.0#sha256:0eb5cf2598c3673f39a8e967a6a4f5043f4d1f1fcb50a844653c34fcf0cb068a,4508
- 0:0: Unsupported cabal-version. See https://github.com/haskell/cabal/issues/4899.
Looks like something similar to the stack init command. For details on my system I'm running ubuntu mate 18.04 64-bit.

how to compile Ignite application on CMake?

I did compile Ignite Application successfully.
but The Binary didn't work.
/tmp/tmp.Nw0IPD6ru3/cmake-build-debug-local-container/planet_engine: error while loading shared libraries: libjvm.so: cannot open shared object file: No such file or directory
how can I make to it work?
Also, I compiled C++ Examples successfully. such as ignite-compute-example.
and, I execute that but I got an error message.
An error occurred: JVM library is not found (did you set JAVA_HOME environment variable?)
and I using a nightly release version 2.8.0.20190213 because I couldn't build to version 2.7 in my environment.
I posted environment values down.
IGNITE_HOME=
TERM=xterm-256color
SHELL=/bin/bash
LIBRARY_PATH=/root/jre1.8.0_201/lib/amd64/server:/root/jre1.8.0_201/lib/amd64/
LC_NUMERIC=ko_KR.UTF-8
SSH_TTY=/dev/pts/0
JRE_HOME=/root/jre1.8.0_201
USER=root
LS_COLORS=rs=0:d...
LD_LIBRARY_PATH=/root/jre1.8.0_201/lib/amd64/server:/root/jre1.8.0_201/lib/amd64/
CLASS_PATH=/root/jdk-11.0.2/lib:
LC_TELEPHONE=ko_KR.UTF-8
MAIL=/var/mail/root
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/jdk-11.0.2/bin
LC_IDENTIFICATION=ko_KR.UTF-8
JAVA_HOME=/root/jdk-11.0.2
LANG=en_US.UTF-8
LC_MEASUREMENT=ko_KR.UTF-8
JDK_HOME=/root/jdk-11.0.2/lib
SHLVL=1
HOME=/root
LOGNAME=root
LESSOPEN=| /usr/bin/lesspipe %s
LESSCLOSE=/usr/bin/lesspipe %s %s
LC_TIME=ko_KR.UTF-8
LC_NAME=ko_KR.UTF-8
_=/usr/bin/env
Thank you for reading. :)
I got it.
I am working on a docker container environment.
and therefore I am using remote build and debug with ssh and gdb.
finally, I found out why it couldn't find libjvm.so and why couldn't read environment values such as JAVA_HOME.
because it is working in gdb for now.
I confirmed that it is working when without gdb.
I will find a solution.
and, if I have been found, I will update the answer.
[Solved]
I share how I make solved that.
I was using an Oracle JDK-11 through source install.
but Ignite C++ client need something different with latest released jdk versions.
Ignite need a directory structure like this
JAVA_HOME/ (as JDK install directory)
- jre/
- lib/
- lib/
...
I solved by apt install openjdk-8-jdk.
openjdk-8-jdk have structure for what Ignite need.
i added JAVA_HOME, IGNITE_HOME, at /etc/environment.
It works finally.
but I got another problem. HAHA
I am so sad.
This also GDB problem..

Flatpak (flatpak-build) fatal error when building submodules

Following on from here, when using OpenSUSE Tumbleweed I cannot get flatpak-builder to compile submodule dependencies. I first noticed this issue when developing a console application within Gnome Builder using the Vala dependencies Gee and GXml.
As a test, I have installed org.gnome.Books.json and issued the following command (as documented here):
$ flatpak-builder --repo=repo books-app org.gnome.Books.json
The outcome is the same as I observed when developing my own application, the fatal error:
Initializing build dir
Committing stage init to cache
Starting build of org.gnome.Books
fuse: failed to exec fusermount: Permission denied
<more stuff>
Cloning into '/home/robin/Projects-CSim/org.gnome.books/.flatpak-builder/build/gnome-online-accounts-1/telepathy-account-widgets'...
Submodule path 'telepathy-account-widgets': checked out '7d944b79961dfb6291110ceb27597a224d329b36'
error: Build directory /home/<user>/Projects/org.gnome.books/.flatpak-builder/rofiles/rofiles-D4R4cZ not initialized, use flatpak build-init
Error: module gnome-online-accounts: module gnome-online-accounts: Child process exited with code 1
Effectively it fails to build the very first submodule. This is the same behaviour that I observed when invoked from Gnome-Builder on my project; it downloaded but failed to build the very first submodule - in that case it was libgee-0.8.
I've double checked the Flatpak (V0.10.4) installation here and cannot find a solution. I understand from the documentation that invoking flatpak-builder should automatically invoke flatpak build-init.
This is worrisome as Gnome-Builder seems be using Flatpak as the default packager. Any suggestions?
The problem is not Flatpak. It is a conflict between Flatpak and fuse. For some reason this was not occuring with valac or meson from the command line, only Flatpak.
From here we find a solution:
# chmod +x /usr/bin/fusermount
Is this a peculiarity of OpenSUSE Tumbleweed? In any case, after making this change, Flatpak builds submodules as expected. Magnificent!
Not sure about the security aspect of this, however - any comments would be welcomed.

yesod persistent dependencies missing

I have tried to follow the Yesod quick start from the official website, but when running yesod devel (after installation and running yesod init) it fails to build due to a missing dependency if I use sqlite, postgresql, postgresql+fay or mysql (the 'simple' option from yesod-init works fine).
The error messages given are:
For sqlite:
cabal: At least the following dependencies are missing:
persistent-sqlite ==1.3.*
For postgresql:
cabal: At least the following dependencies are missing:
persistent-postgresql ==1.3.*
For postgres + fay:
cabal: At least the following dependencies are missing:
fay >=0.16, persistent-postgresql ==1.3.*, yesod-fay >=0.5.0.1
For mysql:
cabal: At least the following dependencies are missing:
persistent-mysql ==1.3.*
For mongoDB:
cabal: At least the following dependencies are missing:
persistent-mongoDB ==1.3.*
Does anyone know what is going wrong and how it can be fixed?
Update:
I was able to fix some of the problems by installing, separately from the yesod-platform, some of the missing dependencies.
cabal install persistent-sqlite fixed any problems using sqlite.
cabal install persistent-postgresql and cabal install persistent-mysql worked after installing some extra distribution packages to my Mint 16 system (libpq-dev and libmysqlclient-dev).
cabal install persistent-mongodb failed with an error I could not resolve:
Resolving dependencies...
Configuring persistent-mongoDB-1.3.1...
Building persistent-mongoDB-1.3.1...
Preprocessing library persistent-mongoDB-1.3.1...
[1 of 1] Compiling Database.Persist.MongoDB ( Database/Persist/MongoDB.hs, dist/build/Database/Persist/MongoDB.o )
Database/Persist/MongoDB.hs:420:26:
Not in scope: type constructor or class `MonadThrow'
Failed to install persistent-mongoDB-1.3.1
cabal: Error: some packages failed to install:
persistent-mongoDB-1.3.1 failed during the building phase. The exception was:
ExitFailure 1
Does anybody know how to resolve this issue?
Update:
This final problem has been solved by the maintainer updating the cabal package.
There is a new version without this error (I have installed persistent-mongoDB-1.3.1.1, the previous version had the error you found).
Do a cabal update to refresh the packages list and try again.