I work at a large company that recently started using Bazel for compiling instead of cmake which I was more familiar with. Recently my bazel autocomplete stopped working, which is quite important in my case since I have to write these long, clunky build statements.
Simultaneously my Clion with built in bazel plugin stopped reading symbols. I assume these two issues are related.
I am pretty sure that I have only one bazel installation on my computer.
$ which bazel
/usr/local/bin/bazel
$ which bazel-real
/usr/local/bin/bazel-real
$ whereis bazel
bazel: /usr/local/bin/bazel /usr/local/lib/bazel
$ whereis bazel-real
bazel-real: /usr/local/bin/bazel-real
I am running Ubuntu 16.04 LTS, Bazel v0.19.1, Bazel plugin v2018.04.23.0.4, CLion v2017.3.4
Related
So I've boned my system. I'm running LFS with xfce and it has been running perfectly. I needed to install a video editing package and some dependencies (AppStream, stemmer) but they failed during the install. At the time I didn't think much about it and decided to come back to it later. Now when I run the configure, it get a message:
error: C compiler cannot create executables
I decided to create a test file that just outputs "Yo Dude!" in the terminal. When I try to compile it I get the message:
error: no include path in which to search for stdc-predef.h
It seems as if it can't find the library files, even putting the absolute path to stdio.h doesn't work. I did notice that gcc now shows as 11.2.0 but when I installed the system, I installed 12.2.0. I downloaded 12.2.0 but it won't compile. I can't compile because gcc is broke and I can't install gcc because gcc is broke. I'm trying not to re-install the system. Any suggestions on how I can get around this?
Ubuntu 18.04 ARM64
I have download and built vscode and this appears to be working.
I can see the extension market place and install extensions. The C/C++ IntelliSense, debugging, and code browsing install but gets a dependency install failure sometimes:
Updating C/C++ dependencies...
Downloading package 'Mono Framework Assemblies' (5368 KB) Done!
Installing package 'Mono Framework Assemblies'
Failed at stage: installPackages
Error: end of central directory record signature not found
It seems to succeed on the second attempt but I'm not convinced.
So I have cloned vscode-cpptools and would like to built it myself but I'm not sure what dependencies it has or how to build it correctly.
Any tips appreciated!
So following the build and debug guide at:
$ git clone -b release https://github.com/Microsoft/vscode-cpptools
$ cd vscode-cpptools/Extension
$ npm install ! should install all dependencies but it forgets gulp
$ npm install gulp ! Manually install. I wonder what else it forgets
$ vsce package ! Should trigger the build and make the vsix package.
So the package is created and when I try and install it via the vscode extensions I get
Unable to start the C/C++ language server. IntelliSense features will be disabled. Error: Missing binary at ~/.vscode-oss-dev/extensions/ms-vscode.cpptools-0.22.1/bin/Microsoft.VSCode.CPP.Extension.linux.
Me thinks there are a lot of other dependencies that are missing!!!
Looking in the Extension bin folder and two important binaries are missing:
Microsoft.VSCode.CPP.Extension.linux
Microsoft.VSCode.CPP.IntelliSense.Msvc.linux
I also tried this on Intel Ubuntu 18.04 and while the Intel build appeared to do a whole lot more it also fails to build the binaries.
Found the answer in here : github.com/Microsoft/vscode-cpptools/issues/429 which indicates there is no support for Aaarch64 Arm64 at this point in time.
I am building a netbeans 8.1 platform application for CentOS6 and CentOS7. These OS's host rpmbuild 4.8.0 and 4.11.3 respectively.
On each OS, I can package the application into a ZIP file distribution in the netbeans 8.1 IDE, which is then referenced in my .spec file.
On both OS, the resulting rpm is built fine (by which I mean, an rpm is produced with no errors).
When I install the rpm on CentOS6, it installs fine and the application runs.
When I install the rpm on CentOS7, rpm returns the following error:
D: Requires: osgi(org.tmatesoft.sqljet) NO
(In fact I get a bunch of osgi references, but all the others have satisfied dependencies).
If I list the rpm dependencies with
rpm -qpR package.rpm
I get the same list of dependencies on both OS, except that on CentOS7 it finds a bunch of osgi() dependencies - these are not present on CentOS6.
Since the only difference between these two proceedures is the version of rpmbuild I am using, I suspect that this is the problem. However, I'm not sure how best to resolve the problem on CentOS7 - I've tried using --nodeps in the rpmbuild command and I've tried adding module dependencies to the project in netbeans, but to no avail. Any help much appreciated.
I am working on building and installing tensorflow on my institution's cluster computer, which is running CentOS 6.5.
Obviously, the first step is building and installing bazel. The build works just fine, but when I try to run the bazel binary, I get the following error:
Error: unexpected result from F_SETLK: Function not implemented
gcc version is 4.7.2
java version is jdk1.8.0_65
edit: I have also tried compiling gcc 4.9.4 and building with this version, and I have tried building both the latest dist of bazel, and the 0.3.1 from the git repo. All variants get the same error.
This happens if the filesystem where Bazel tries to install itself (unpack its embedded tools) doesn't support locking.
Workaround (until the relevant issue is resolved) is to specify a path on a local, writable (and file-lockable) filesystem for --output_user_root, for example:
bazel --output_user_root=/usr/local/$USER/bazelout build <targets>
I try to include sbt into docker images. However, it never works and always stuck at Getting org.scala-sbt sbt 0.13.7 ... Also, it is also not working for changing the sbt version.
Here is the snippet of docker file
FROM ubuntu:14.04
RUN echo "deb https://dl.bintray.com/sbt/debian /" | sudo tee -a /etc/apt/sources.list.d/sbt.list
RUN sudo apt-get update
RUN sudo apt-get install sbt //also I used force--yes
also, I try to install it on the container manually by using
wget http://dl.bintray.com/sbt/debian/sbt-0.13.5.deb
sudo apt-get update
sudo dpkg -i sbt-0.13.5.deb
When I run sbt compile, it also stuck trying to get Getting org.scala-sbt ...
but it is working for sbt --version
Basically, I dont know why sbt stucks trying to get Getting org.scala-sbt ...
You will need a Java Virtual Machine for SBT and so I think it's a good think you start from the java official docker image. Here is a basic docker file that uses the official ubuntu installation method:
FROM java
RUN echo "deb http://dl.bintray.com/sbt/debian /" | tee -a /etc/apt/sources.list.d/sbt.list
RUN apt-key update
RUN apt-get update
RUN apt-get -y --force-yes install sbt
NOTE: --force-yes has to be there because it is not an authenticated package. I tried adding RUN apt-key update, but that didn't make a difference so you can omit this line.
Then, build a test image: docker build -t test/sbt ., create an interactive container docker run -i -t test/sbt sbt and play with it.
This works for me, but I noticed the download times were slow for launching SBT, so be patient at this step.
This is because the SBT executable in itself is really light and will fetch a bunch of libraries on the first run to accomplish its task. It's also a way for SBT to support multiple projects using multiple SBT versions. If you are stuck at libraries resolution, check your networking configuration. For SBT errors, they are mostly printed on the command line, but you can configure logging if you want.
What's left for you to figure out is to add your project files and issue a compile command to test it.
sbt will try to download a higher version of itself if the project require a higher version than the currently installed sbt version. Usually there is a {projectFolder}/project/build.properties which specifies the desired sbt version for a sbt project. for example: sbt.version=0.13.7 requires version 0.13.7
You seem to get stuck at Getting org.scala-sbt sbt 0.13.7 .... But I believe sbt is actually trying to download sbt 0.13.7 to your local. As the package is not small, depending on your network speed, it may take a while.
It is also likely that there is a network connectivity issue that prevents sbt from downloading its package. So you can try to verify first your network connectivity is not a problem.
If your network is fine, another approach you can try is to go to sbt site to download 0.13.7 package manually to your docker and install it there by following instructions you can find from sbt site.
Hope this helps.
Sometimes sbt stuck when downloading files. You can periodically check size ~/.ivy2 folder and if size isn't grow kick sbt process and rerun sbt.
For me only after 5 kicks sbt download all files!!!