Ubuntu: “Can not compile without isnan function or macro” when trying to compile geos on 14.04



Question:

Using a procedure for building geos on ubuntu 12.04, I'm trying to build geos on 14.04 and get the error, "Can not compile without isnan function or macro" when make is executed.

sudo apt-get -y install build-essential    wget http://download.osgeo.org/geos/geos-3.4.2.tar.bz2    tar xvfj geos-3.4.2.tar.bz2  cd geos-3.4.2  ./configure  make   

for some reason the isnan() macro doesn't seem to be available on 14.04, how can I get this to compile?


Solution:1

libgeos-3.4.2 is in main Ubuntu repository for Ubuntu 14.04. So you dont need to execute difficult compiling methods.

libgeos-3.4.2 and its needed packages can be installed with :

sudo apt-get install libgeos-3.4.2 libgeos-c1 libgeos-dbg libgeos-dev libgeos-doc libgeos-ruby1.8 ruby-geos libgeos++-dev  


Solution:2

I had the same problem. For me it came about from the following sequence of steps

  • ./configure
  • make
  • Discover missing g++ and install it: sudo aptitude install g++
  • make

The problem is that configure had made some decisions based on what tools were installed, but they were the wrong ones. The solution is to rerun configure after installing g++.

@user224082 Although Ubuntu 14.04 provides libgeos, it does not provide the PHP bindings, so you still have to compile by hand if you need those.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »