Makefile error raspberry-pi 3 - c++

I have an issue with Codelite compilation, running on raspbian jessie - these are the (known) steps I have taken to produce it.
First I installed Codelite with apt-get install Codelite, then produced a c++ project.
When running build project I get the error:
/bin/sh -c ' -j 4 -e -f Makefile'
/bin/sh: 1: -j: not found
0 errors, 0 warnings
I note that this error has been found and corrected previously, through running a different version of Codelite from 6.1.1 (that which apt-get installs). I therefore found the updated version of armhf .deb codelite from the rasbian archive with gdebi-gtk. However the updated version (9.1.1) produces the following error (install attempt with the graphical debian):
Error: Dependency is not satisfiable: libclang 1-3.8 (>=3.2)
I do not understand why the package manager cannot update these packages - do they not exist for the pi? I ran the manager as root, so I do not think it is a permissions issue.
EDIT 1:
Thank you for that Fabre. My Enviromental Variables file now looks like this:
CodeLiteDir=/usr/share/codelite
export MAKE=make
I still get the same error however.

Related

Running configure file in MinGW64: default build_alias command and default prefix not found

I'm using MinGW64 via an MSYS2 download and am currently trying to install the Solar Geometry 2 library (http://www.oie.mines-paristech.fr/Valorisation/Outils/Solar-Geometry/) for use. I'm following their install README, which states to navigate to the directory and "configure" (I've been typing "./configure". However, when I do so, I get the following message in my terminal:
$ ./configure
configure: loading site script /mingw64/etc/config.site
/mingw64/etc/config.site: line 13: config.site:13: default build_alias set to x6_64-w64-mingw32: command not found
/mingw64/etc/config.site: line 20: config.site:20: default prefix set to /mingw4: No such file or directory
configure: error: cannot find install-sh or install.sh in . ./.. ./../..
When I initially installed MSYS2 I set up the etc/fstab file as recommended. However, I'm quite new to MSYS so I'm assuming I botched something in my setup. I haven't edited anything in the config.site file mentioned in the errors, so I'm wondering if it's something in there.
Any help is greatly appreciated, thank you
No where in the directions for "Solar Geometry" do I see reference to MSys or MSys2.
I suggest you install the compiler toolchain and base development file. No idea if you editing /etc/fstab will cause problems. I do not normmaly edit it!
Install MinGW Package build packages. You might need more packages installed.
pacman -S --needed base-devel mingw-w64-x86_64-toolchain

C++ compiling project with shared object (libtensorflow_cc.so) failed

at the moment I'm facing some problems compiling (and running) a (huge) own project with support of Tensorflow. On my own system (Ubuntu 16.04 LTS) everything works fine. Same procedure on a cluster leads to a compile error and I'm not able to find a solution yet.
System information
Have I written custom code: YES
OS Platform and Distribution (e.g., Linux Ubuntu 16.04): CentOS 7.4.1708
TensorFlow installed from (source or binary): source (using the git repo)
TensorFlow version (use command below): 1.9
Python version: 2.7.15
Bazel version (if compiling from source): 0.16
GCC/Compiler version (if compiling from source): 7.30
CUDA/cuDNN version: not used
GPU model and memory: Tesla K20m
Exact command to reproduce:
Cloned tensorflow repo from github
Configure Bazel (./configure in tensorflow repo)
Built libtensorflow_cc.so with bazel (worked fine!!!)
Downloaded dependencies with delivered script tensorflow/contrib/makefile/download_dependencies.sh
(tried installing protobuf & eigen manually, too)!
Installed protobuf with ./autogen.sh && ./configure && make && make install
Installed Eigen from downloaded dependencies
Copied libraries, headers and includes into own project:
$ cp bazel-bin/tensorflow/libtensorflow_cc.so ../tf_project/lib/
$ cp bazel-bin/tensorflow/libtensorflow_framework.so ../tf_project/lib/
$ cp /tmp/proto/lib/libprotobuf.a ../tf_project/lib/
$ mkdir -p ../tf_project/include/tensorflow
$ cp -r bazel-genfiles/ * ../tf_project/include/
$ cp -r tensorflow/cc ../tf_project/include/tensorflow
$ cp -r tensorflow/core ../tf_project/include/tensorflow
$ cp -r third_party ../tf_project/include
$ cp -r /tmp/proto/include/ * ../tf_project/include
$ cp -r /tmp/eigen/include/eigen3/ * ../tf_project/include
Remark: On my own system it works this way for weeks now. I can use tensorflow in my own project with an exported model trained with keras inside a python project. I make predictions using client_sessions and many other functions of the tensorflow framework and it works properly.
Problem: At the cluster I can compile tensorflow as dynamic library, install protobuf and eigen.
When I try to compile my project (similar process regarding my own system) without significant changes it doesn't work and stops with following error message:
.../tensorflow/include/tensorflow/core/framework/tensor.pb.h:12:2: error: #error This file was generated by a newer version of protoc which is
#error This file was generated by a newer version of protoc which is
^~~~~
.../include/tensorflow/core/framework/tensor.pb.h:13:2: error: #error incompatible with your Protocol Buffer headers. Please update
#error incompatible with your Protocol Buffer headers. Please update
^~~~~
.../include/tensorflow/core/framework/tensor.pb.h:14:2: error: #error your headers.
#error your headers.
^~~~~
.../include/tensorflow/core/framework/tensor.pb.h:27:10: fatal error: google/protobuf/inlined_string_field.h: No such file or directory
#include <google/protobuf/inlined_string_field.h>
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
So, clearly this should be the issue:
This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer headers. Please update your headers.
and
fatal error: google/protobuf/inlined_string_field.h: No such file or directory
Tried solutions:
I tried different versions of protobuf but there was an error every single try.
I tried installing protobuf and eigen manually (without the download_dependencies.sh script)
I'm wondering because my own installation following exact the same steps works properly. Maybe there is an issue with one of the components unless I tried different versions to make sure that these aren't "new" issues.
Can someone help me solving this error that I can compile and run this project at the other machine?
Looking forward to get helpful solutions :) Thank you very much for the support!
Best regards from Germany!
First, I checked on github, tensorflow r1.9 requires protobuf >=3.6.0. With download_dependencies.sh script, you always get protobuf 3.5.0, in which lack of inlined_string_field.h and some other headers.
Second, some errors that ask you to update protobuf version. I tried many versions of protobuf too. Only version 3.6.0 works well, rather than version 3.6.1 or older ones.
For these errors,
error This file was generated by a newer version of protoc which is
fatal error: google/protobuf/inlined_string_field.h: No such file or directory
It is a mismatch version problem. My solutions is that manually download protobuf 3.6.0 from
https://github.com/protocolbuffers/protobuf/releases/download/v3.6.0/protoc-3.6.0-linux-x86_64.zip
install it and cp /usr/local/include/google to somewhere/tf/include. It works quite well for me. I don't know if you tried version 3.6.0.
download_dependencies.sh script would provide a mismatch version of
protobuf. See the issue I posted on github
https://github.com/tensorflow/tensorflow/issues/22536
Also, I noticed your copied files are different from mine. I did in this way.
sudo mkdir /usr/local/tensorflow/include
sudo cp -r tensorflow/contrib/makefile/downloads/eigen/Eigen /usr/local/tensorflow/include/
sudo cp -r tensorflow/contrib/makefile/downloads/eigen/unsupported /usr/local/tensorflow/include/
sudo cp -r tensorflow/contrib/makefile/gen/protobuf/include/google /usr/local/tensorflow/include/
sudo cp tensorflow/contrib/makefile/downloads/nsync/public/* /usr/local/tensorflow/include/
sudo cp -r bazel-genfiles/tensorflow /usr/local/tensorflow/include/
sudo cp -r tensorflow/cc /usr/local/tensorflow/include/tensorflow
sudo cp -r tensorflow/core /usr/local/tensorflow/include/tensorflow
sudo mkdir /usr/local/tensorflow/include/third_party
sudo cp -r third_party/eigen3 /usr/local/tensorflow/include/third_party/
sudo mkdir /usr/local/tensorflow/lib
sudo cp bazel-bin/tensorflow/libtensorflow_*.so /usr/local/tensorflow/lib
Btw, I run build_all_linux.sh instead of download_dependencies.sh.
I hope it will be helpful for you.
I meet this problem before, following is my solution:
I successfully built tensorflow-r1.8 with bazel. And I found protoc in following path is 3.5.0:
/home/zsb/.cache/bazel/_bazel_zsb/1372f28eb0671f692e7ac38330377d8c/execroot/org_tensorflow/bazel-out/host/bin/external/protobuf_archive/protoc --version
but actually my system config is using protoc version 3.4.0
I confirmed this by type "protoc --version" directly.
So finally I update system protobuffer version to 3.5.0 and this problem fixed.

ERROR: Failed to build PhantomJS! Building Qt Base failed

I have Debian Linux(64-bit) in VirtualBox.
Ram: 8Gb (for Debian 4Gb)
CPU: i5-3470
If any other details are needed please tell me.
I have followed instructions written here, and here you can see the console log.
For some reason I am unable to to build phantomjs and I can't understand why its not working... Have searched a lot, but couldn't find any thread which would be about this error.
--- EDIT ---
When I executed this command:
./configure --with-openssl-includes=/usr/include/openssl-1.0/ --with-openssl-libraries=/usr/lib/openssl-1.0/
Output was this:
--with-openssl-includes=/usr/include/openssl-1.0/: invalid command-line switch
--with-openssl-libraries=/usr/lib/openssl-1.0/: invalid command-line switch
The output of the console has changed but I still get errors: https://pastebin.com/wbgi8syg
Looks like you are on stretch (or later) and that you are already aware of the libssl vs libssl1.0 case.
Therefore, if you don't have libssl-dev installed, this line will get you further:
python build.py --qt-config "-I /usr/include/openssl-1.0/ -L /usr/lib/openssl-1.0/"
If you already have it installed and my suggestion doesn't work, you can uninstall libssl-dev for the time to build phantomjs which will likely avoid having to play further with configuration related variables.

autotools syntax error with ax_check_compile_flag

I am using autotools for building my C++ application. In my configure.ac I have the following line:
AX_CHECK_COMPILE_FLAG([-Wall], [CPPFLAGS="$CPPFLAGS -Wall"])
which causes the following error when executing ./configure (after running autoreconf -i):
./configure: line 3825: syntax error near unexpected token `-Wall,'
./configure: line 3825: `AX_CHECK_COMPILE_FLAG(-Wall, CPPFLAGS="$CPPFLAGS -Wall")'
My system: Linux web 3.2.0-4-amd64 #1 SMP Debian 3.2.65-1+deb7u2 x86_64 GNU/Linux
On my Ubuntu machine it works well, why do I get this error?
autoreconf isn't magic (though I encounter package maintainers who obviously believe this). When you ran autoreconf, it failed to find the AX_CHECK_COMPILE_FLAG macro, and produced a corrupt configure script. Usually that produces an error/diagnostic message at the same time.
'AX_CHECK_COMPILE_FLAG` comes from the autoconf archive project, and Debian has a package which provides this, named autoconf-archive. Likely, you forgot to install it:
sudo apt-get install autoconf-archive

How do I specify LDFLAGS and CPPFLAGS for ./configure?

I am using a Mac running OS X 10.8.3. I am trying to compile cgminer 3.0.0. On my first run of ./configure I got the message:
checking for LIBCURL... no
checking for LIBCURL... no
configure: error: Missing required libcurl dev >= 7.18.2
So I installed the latest version of libcurl using homebrew:
brew install curl
That seemed to do the trick. I got this message:
downloaded: /Library/Caches/Homebrew/curl-7.30.0.tar.gz
==> ./configure --prefix=/usr/local/Cellar/curl/7.30.0
==> make install
==> Caveats
This formula is keg-only: so it was not symlinked into /usr/local.
Mac OS X already provides this software and installing another version in
parallel can cause all kinds of trouble.
The libcurl provided by Leopard is too old for CouchDB to use.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
LDFLAGS: -L/usr/local/opt/curl/lib
CPPFLAGS: -I/usr/local/opt/curl/include
==> Summary
/usr/local/Cellar/curl/7.30.0: 75 files, 2.0M, built in 61 seconds
Okay, so it's installed but not symlinked into /usr/local, that's fine with me. I tried this:
export LDFLAGS=-L/usr/local/opt/curl/lib
export CPPFLAGS=-I/usr/local/opt/curl/include
./configure
But I got the same message: configure: error: Missing required libcurl dev >= 7.18.2
So I tried this:
env LDFLAGS=-L/usr/local/opt/curl/lib CPPFLAGS=-I/usr/local/opt/curl/include ./configure
I'm still getting the "missing required libcurl" message. Any ideas?
After some more thorough investigation, I determined that the configure file for cgminer does not pay attention to LDFLAGS or CPPFLAGS when testing for libcurl. Instead, it checks for LIBCURL_CFLAGS and LIBCURL_LIBS. So, I tried:
export LIBCURL_CFLAGS=-I/usr/local/opt/curl/include
export LIBCURL_LIBS=-L/usr/local/opt/curl/lib
./configure
and I got:
checking for LIBCURL... yes
And the rest of the configuration went off without a hitch. SUCCESS!