I'm trying to configure MapServer 6.2.0 for compilation on CentOS 6.3, but always run into the same problem, no matter what configure options I supply (also the same with no options at all, just plain configure).

It has something to do with g++ (although I do not really understand why it tries to use it).

Here is the output:


What is wrong?

EDIT: This problem was solved with yum install gcc-c++, as suggested by @steko. Now, I have another error, which is weird in my opinion:

configure: checking whether we should include PROJ.4 support...
configure: error: "Could not find proj_api.h or libproj.a/libproj.so in /usr/lib64."

Although locate proj_api.h gives /usr/include/proj_api.h (I also set --with-proj=/usr/include for configure, not as in the paste bin).

  • 1
    Re: proj, according to mapserver.org/installation/unix.html#compiling you should only do --with-proj=/usr or --with-proj=/usr/local respectively if installed from package or from source.
    – steko
    Dec 18, 2012 at 16:29
  • --with-proj=/usr did the trick, although I don't know why, since a more exact path definition should be working as well.
    – grssnbchr
    Dec 18, 2012 at 16:46
  • The reason is because the Mapserver configure script knows where the Proj.4 files are installed with respect to the base install path, that is /usr. Includes are in /usr/include but binaries are in /usr/bin and so on. Proj.4 doesn't have a "pkg-config" executable like GDAL.
    – steko
    Dec 18, 2012 at 16:50
  • There's a reason why most people use compiled binary packages from distributions :-) yum install curl-devel. You will need to do this for all libraries that are missing.
    – steko
    Dec 18, 2012 at 16:58
  • Saw that. Well I thought I have all the necessary libs installed, but turned out now. In this case I only had libcurl installed, not libcurl-devel. Concerning binaries, MapServer doesn't have one. Correct me if I'm wrong.
    – grssnbchr
    Dec 18, 2012 at 17:04

1 Answer 1


Judging from the last few lines of output:

checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether we are using the GNU C++ compiler... no
checking whether g++ accepts -g... no
checking whether the C++ compiler works... configure: error: g++ cannot compile

you are missing the g++ compiler and you should be able to install it with

yum install gcc-c++

You will need also GDAL/OGR and the Proj.4 library. In general, follow the step-by-step instructions at http://www.mapserver.org/installation/unix.html#compiling

  • Yeah, but why does it say then: checking whether we are using the GNU C++ compiler... no?
    – grssnbchr
    Dec 18, 2012 at 16:07
  • Alright, it solved THAT problem, thanks.. now I have another error in my configure script, don't know whether I should open up a new question.
    – grssnbchr
    Dec 18, 2012 at 16:10
  • If it is again related to something missing, it should be ok to rephrase the question as "What packages to I need to install on CentOS to compile MapServer from source"
    – steko
    Dec 18, 2012 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.