Flatpak (flatpak-build) fatal error when building submodules - opensuse

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.

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.

Google certificate-transparency build error: `configure: error: cannot find install-sh, install.sh, or shtool`

I got this error from the gclient sync --disable-syntax-validation command while building Google's certificate-transparency:
configure: error: cannot find install-sh, install.sh, or shtool
in spite of the fact that shtool was in fact installed.
Although I did have shtool installed, I must have installed it after I had run the configuration command (gclient config --name="certificate-transparency" https://github.com/google/certificate-transparency.git).
I deleted the ct directory (i.e. all the source code downloaded from github), reran the config command and gclient sync --disable-syntax-validation and this time did not experience the error.

bazel Failed to create temporary file

I have download the git repo containing the c++ tutorial for bazel and I am trying to compile the examples.
When performing the command bazel build //main:hello-world, I get the following error:
ccache: error: Failed to create temporary file for /home/username/.ccache/tmp/tmp.cpp_stderr: Read-only file system
Thus I tried several actions: sudo bazel, change permission to /.ccache/tmp/ folder but none has worked. How can I get ride of this error ?
I work on fedora27.
The reason for this error is that ccache is used and requires write access ~/.ccache.
See in Ondrej's comment to: Bazel building C++ sample with ccache fails
Using --sandbox_writable_path ~/.ccache fixes the issue without disabling the sandbox feature.
Solved using the option --strategy=CppCompile=standalone :
bazel build //main:hello-world --strategy=CppCompile=standalone

include sympy library into chaquo

include sympy python packages into Chaquopy:
I started with the example python provided by Chaquopy available at github (https://github.com/chaquo/chaquopy) for Android studio 3.0.1.
Than I created 2 wheel files from the sympy source () files, based on python 3.6.3, see the below files that wheel generated:
"mpmath-1.0.0-py3-none-any.whl"
"sympy-1.1.1-py3-none-any.whl"
I tried to install the above files into the build.gradle of the demo example from 1., for testing purposes I tried some of there own wheel files (that process succeeded), but could not install my own wheel files.
I am fairly certain that the local wheel files that I generated are placed in the proper directory, because if I change the directory in the gradle file it complains that it cannot find the file.
I included the wheel files in the build.gradle(Module:app) file as follows:
python {
// Enable and edit the following line if "python" is not on your PATH.
// buildPython "C:/Python27/python.exe"
version "3.6.3"
// Android UI demo
pip {
install "Pygments==2.2.0" // Also used in Java API demo
}
pip {
install "wheels/mpmath-1.0.0-py3-none-any.whl"
// install "wheels/sympy-1.1.1-py3-none-any.whl"
// install "numpy==1.9.2"
// install "numpy==1.14.0"
}
When created the build gradle generates the following error:
sympy-1.1.1-py3-none-any.whl is not a supported wheel on this platform.
Exit status 1
:app:generatePy2DebugPythonRequirements FAILED
FAILURE: Build failed with an exception.
What went wrong:
Execution failed for task ':app:generatePy2DebugPythonRequirements'.
Process 'command 'python'' finished with non-zero exit value 1
Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 2s
7 actionable tasks: 1 executed, 6 up-to-date
Does anyone have an idea what could be wrong?
sympy and mpmath have now been added to the Chaquopy wheel repository (https://github.com/chaquo/chaquopy/issues/20), so you don't need to build your own anymore.
Did some further investigation and did see that I somehow compiled for Py2, while my wheel files where version 3 changing this resulted in a correct executable.
It did run into a different issue, while the mpmath module could be imported into the interactive python console (part of the demo app), the sympy module gave an error:
ModuleNotFoundError: no module named 'distutils'
Let me know if anyone ran into a similar problem!

ocaml-glpk (glpk bindings) and OASIS

Preface: I am new to OCaml, OPAM, and OASIS.
tldr question: How do I properly set up a package with opam that is not already available in the repository (I can't just do opam install X)? More details follow:
I am trying to include ocaml-glpk in an OCaml project. I installed ocaml-glpk just by running make and make install as stated in the README, and the given example compiles and runs correctly. However, I am using OASIS to generate the build system of my project, and I am not sure how to set it up. I have the same example (renamed to glpkExample.ml in a src folder) and the following in my _oasis file:
Executable "glpkExample"
Path: src
MainIs: glpkExample.ml
CompiledObject: best
BuildDepends:
glpk
After running oasis setup -setup-update dynamic, I run make and get the following error:
ocaml setup.ml -build
Finished, 0 targets (0 cached) in 00:00:00.
+ /home/dimitrios/.opam/system/bin/ocamlfind ocamlopt -g -linkpkg -package glpk src/glpkExample.cmx -o src/glpkExample.native
File "_none_", line 1:
Error: Cannot find file /home/dimitrios/.opam/system/lib/glpk/glpk.cmxa
Command exited with code 2.
Compilation unsuccessful after building 4 targets (3 cached) in 00:00:00.
E: Failure("Command ''/usr/bin/ocamlbuild' src/glpkExample.native -tag debug' terminated with error code 10")
make: *** [build] Error 1
It seems the glpk library is missing a cmxa file needed to compile a native executable. I am not sure how to fix this. To compile glpkExample.ml correctly, my Makefile includes /home/dimitrios/.opam/system/lib/glpk and also uses the OCamlMakefile, which is extremely long and convoluted. Any help on setting this up with OASIS or how to get ocaml-glpk to work nicely with OASIS would be greatly appreciated.
Thanks!
This website is not appropriate for bug reports. You should really report it here.
The temporary solution is to use CompiledObject: byte to compile in bytecode.
If you're using opam then it is best to install application with it, not manually. Try to clean up your system and remove whatever you installed, and then do:
$ eval `opam config env`
$ opam install ocaml-glpk
Afterwards, if glpk is packaged in opam correctly, it should work with your setup, i.e., just with oasis's BuildDepends field and nothing more.