bazel Failed to create temporary file - c++

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

Related

Building Assimp with MSYS

Hello i tried to build Assimp.
I'm using gcc (10.2.0) and MSYS2.
It's possible to download Assimp package from MSYS package repository but i prefer to build Assimp from scratch.
while building Assimp a error message appeared:
/c/Users/MY_NAME/Downloads/assimp-5.0.1/assimp-5.0.1/include/assimp/StringComparison.h: In function ‘int Assimp::ASSIMP_stricmp(const char*, const char*)’:
/c/Users/MY_NAME/Downloads/assimp-5.0.1/assimp-5.0.1/include/assimp/StringComparison.h:146:14: error: ‘::strcasecmp’ has not been declared; did you mean ‘strncmp’?
I executed cmake with following commands:
cmake CMakelists.txt -S ./ -B ./BUILD_ASSIMP
then i executed "make"
Could you help me?
the function call, which is creating your issue is an extension of the Posix-standard. e have our own implementation for this when the function is not supported by your compiler. Unfortunately, the check if the call exists was not correct for your environment.
I just prepared an update on our current master to work aroundAsset-Importer-Lib#github this issue. It would be great if you can use the latest master. The issue will be closed in the next release.

PowerBI Visuals Tools - error after pbiviz start command

I trying to start my custom visual (like usually) but after I updated powerbi-custom-visual to version beta 3.0.11 from version 3.0.10 I got the following error:
error ENOENT: no such file or directory, open '/Users/mar/CustomVisuals/rangechart/.tmp/precompile/visualPlugin.ts'
(node:1454) UnhandledPromiseRejectionWarning: Error: Failed to generate visualPlugin.ts
at generateVisualPlugin.then.catch.ex (/usr/local/lib/node_modules/powerbi-visuals-tools/node_modules/powerbi-visuals-webpack-plugin/index.js:168:12)
at <anonymous>
Does anyone knows why is that? I returned back to the previous beta version of powerbi-custom-visual but it did not help. With version 2.3.0 everything works fine.
I ran into something similar after I deleted the .tmp folder in my project to clean up from an old build. I found that I had to manually (re)create the .tmp/precompile directories inside my project folder. Not sure why the tool couldn't handle creating them itself.

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.

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.

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.