installing gdal on mac os sierra - django

I have a Django project that I want to install and it uses GDAL. The documentation refers me to this page in the Django documentation. I have been able to install GEOS and PROJ.4. I wanted to use the latest GDAL which is 2.2.1 and ./configure command failed so I followed this instructions and it compiled. However, make command now fails with the following error
In file included from cpl_odbc.cpp:30:
/Users/DNG/gdal-2.2.1/port/cpl_odbc.h:39:10: fatal error: 'sql.h' file not found
#include <sql.h>
^
1 error generated.
make[1]: *** [cpl_odbc.o] Error 1
make: *** [port-target] Error 2
sudo find / -name sql.h outputs:
find: /dev/fd/DNG: No such file or directory
find: /dev/fd/DNG: No such file or directory
/usr/local/Cellar/unixodbc/2.3.4/include/sql.h
/usr/local/include/sql.h
/usr/local/php5-7.0.18-20170506-095200/include/sql.h

Related

fatal error: openssl/ssl.h: No such file or directory

I'm coming from Python and new to C++ and am trying to test a program which retrieves data via websockets.
I copied this github repository with
git clone https://github.com/tensaix2j/binacpp
I'm trying to run the example so I filled in the api key and secret in:
/binacpp/example/example.cpp
Now from /binacpp/example folder I'm trying
make example
and I'm getting this error:
Making example
g++ -I../lib/libcurl-7.56.0/include -I../lib/jsoncpp-1.8.3/include -I../lib/libwebsockets-2.4.0/include -I../lib/libbinacpp/include \
example.cpp \
-L../lib/libcurl-7.56.0/lib \
-L../lib/libwebsockets-2.4.0/lib \
-L../lib/libbinacpp/lib \
-lcurl -ljsoncpp -lcrypto -lwebsockets -lbinacpp -o example
In file included from ../lib/libbinacpp/include/binacpp_websocket.h:16:0,
from example.cpp:8:
../lib/libwebsockets-2.4.0/include/libwebsockets.h:214:10: fatal error: openssl/ssl.h: No such file or directory
#include <openssl/ssl.h>
^~~~~~~~~~~~~~~
compilation terminated.
Makefile:25: recipe for target 'example' failed
make: *** [example] Error 1
user#ip:/opt/binacpp/example$ ^C
user#ip:/opt/binacpp/example$ ./example.run.sh
./example: error while loading shared libraries: librtmp.so.0: cannot open shared object file: No such file or directory
I'm trying to figure out why I'm getting this error and what to do with it?
1) It says on the readme that the dependencies are
jsoncpp-1.8.3
libcurl-7.56.0
libwebsockets-2.4.0
However these are included in the repository
2) if maybe it is assumed that openssl normally is already installed, how do I know which version to install? And how do I install this, because with Python you can just use pip and everything will be placed in the correct directories for including it in your program.
It looks like that the development package for openssl is not installed:
https://stackoverflow.com/a/3016986/5147260

Cross-compile python arm

I want to cross-compile python 2.7.3 for ARM.
I've followed this example:
https://gist.github.com/bmount/6929380
But during the last step with make install, I get an error:
running install
running install_lib
creating /_install
error: could not create '/_install': Permission denied
make: *** [sharedinstall] Erreur 1
This is how I have done my cross-compilation:
./configure
make python Parser/pgen
mv python hostpython
mv Parser/pgen Parser/hostpgen
make distclean
patch -p1 < ../Python-2.7.3-xcompile.patch
CC=arm-unknown-linux-gnueabihf-gcc CXX=arm-unknown-linux-gnueabihf-g++ AR=arm-unknown-linux-gnueabihf-ar RANLIB=arm-unknown-linux-gnueabihf-ranlib ./configure --host=arm-unknown-linux --build=x86_64-linux-gnu --prefix=/python
make HOSTPYTHON=./hostpython HOSTPGEN=./Parser/hostpgen BLDSHARED="arm-unknown-linux-gnueabihf-gcc -shared" CROSS_COMPILE=arm-unknown-linux-gnueabihf- CROSS_COMPILE_TARGET=yes HOSTARCH=arm-unknown-linux BUILDARCH=x86_64-linux-gnu
make install HOSTPYTHON=./hostpython BLDSHARED="arm-unknown-linux-gnueabihf-gcc -shared" CROSS_COMPILE=arm-unknown-linux-gnueabihf- CROSS_COMPILE_TARGET=yes prefix=../Python-2.7.3/_install
If I run this command with "sudo", I get an other error:
Creating directory ../Python-2.7.3/_install/lib/python2.7/config
Creating directory ../Python-2.7.3/_install/lib/pkgconfig
/bin/sh: 7: arm-unknown-linux-gnueabihf-ranlib: not found
When you use "sudo", not found the "arm-unknown-linux-", maybe you should add the path of the "arm-unknow-linux-" to the root's envirenment.

Building QtWebKit with QT 5.6 on Mac 10.11

I'm trying to build Qt 5.6.0 (new release) with Qt Webkit on Mac OS 10.11 and I have a compiling error when I try.
I downloaded the tar.gz source of 5.6.0, then I downloaded QtWebkit source from Community folder for 5.6.0. I added the qtwebkit folder in the same folder of qtbase like previous version. Anything else is needed?
I'm using this configure:
OPENSSL_LIBS='-L/usr/local/opt/openssl/lib -lssl -lcrypto' ./configure -nomake examples -opensource -openssl-linked -I /usr/local/opt/openssl/include
After a few hour of compilation, I have this error message:
.pch/debug/QtWebKitWidgets_debug/c++.pch
../include/QtWebKitWidgets/QtWebKitWidgetsDepends:7:10: fatal error: 'QtWebKit/QtWebKit' file not found
#include <QtWebKit/QtWebKit>
^
1 error generated.
make[4]: *** [.pch/debug/QtWebKitWidgets_debug/c++.pch] Error 1
make[3]: *** [debug-all] Error 2
make[2]: *** [sub-widgetsapi-pri-make_first-ordered] Error 2
make[1]: *** [sub-Source-QtWebKit-pro-make_first-ordered] Error 2
make: *** [module-qtwebkit-make_first] Error 2
Thanks for your help
I found the issue while searching some mailing: http://lists.qt-project.org/pipermail/development/2016-March/025358.html
The tarball was not properly made and the synqct step is missing.
To fix, create an empty .git folder (in qtwidget) and execute qmake, then manually execute syncqt for Qtwebkit:
cd qtwidget
mkdir .git
qmake
syncqt.pl Source -version 5.6.0

Error while compiling srilm in linux ubuntu 12.04

I am trying to install SRILM on my computer using os linux ubuntu 12.04, the gcc version 4.6.3 and the machine type is i686. at the end of the process it gives result of 2 errors as follows:
-o ../obj/i686/tclmain.o tclmain.cc
tclmain.cc:8:17: fatal error: tcl.h: No such file or directory
compilation terminated.
make[2]: * [../obj/i686/tclmain.o] Error 1
make[2]: Leaving directory /home/supriadi/workspace/srilm/misc/src'
make[1]: *** [release-libraries] Error 1
make[1]: Leaving directory/home/supriadi/workspace/srilm'
make: * [World] Error 2
what should I do to fix this problem? thanks friend
You're missing the dev files of tcl. Use
sudo apt-get install tcl-dev tk-dev
You need to install tcl development files.
You can find tcl-dev package for ubuntu 12.04 here https://launchpad.net/ubuntu/precise/+package/tcl-dev
Try this instead of make:
make MACHINE_TYPE=i686-m64 World
or
make NO_TCL=1 MACHINE_TYPE=i686-ubuntu World
In my case this lead me into another error
/usr/include/features.h:323:26: fatal error: bits/predefs.h: No such
file or directory
Which I found a fix here, such that:
sudo aptitude install libc6-dev-amd64

Error building llvm 3.0

I was trying to get llvm 3.0 on my machine, but I get the following errors when I give make -k.
chethan#ubuntu:~/llvm-3.0$ make
make[1]: Entering directory `/home/chethan/llvm-3.0/lib/Support'
llvm[1]: Compiling APFloat.cpp for Release build
In file included from APFloat.cpp:15:
In file included from /home/chethan/llvm-3.0/include/llvm/ADT/APFloat.h:104:
In file included from /home/chethan/llvm-3.0/include/llvm/ADT/APInt.h:18:
In file included from /home/chethan/llvm-3.0/include/llvm/ADT/ArrayRef.h:13:
In file included from /home/chethan/llvm-3.0/include/llvm/ADT/SmallVector.h:17:
/home/chethan/llvm-3.0/include/llvm/Support/type_traits.h:20:10: fatal error: 'utility' file not found
#include <utility>
^
1 error generated.
make[1]: *** [/home/chethan/llvm-3.0/lib/Support/Release/APFloat.o] Error 1
make[1]: Leaving directory `/home/chethan/llvm-3.0/lib/Support'
make: *** [all] Error 1
I follow these steps to build llvm on my machine.
Get the llvm source zip file from llvm download page and unzipped to folder llvm-3.0
cd /home/chethan/llvm-3.0
./configure
make -k
Although in this case, I just gave 'make' so that it stops on first error. I have llvm-gcc 4.2 installed on my machine.
I followed the same steps today morning in my home machine, and llvm-3.0 built successfully! Any idea what might be missing here?
configure with CC=gcc CXX=g++. It looks like the configure script is finding a version of clang that isn't actually set up correctly to compile C++ code.