wiki:MapServerCompilation

Version 15 (modified by dmiddlecamp, 12 years ago) ( diff )

fixing label

Compiling MapServer

This page offers tips and tricks for successfully compiling MapServer on different operating systems. Note! Some of these pages may be out of date. More general instructions for compiling MapServer are available here | Compiling MapServer on Unix

Using the "--with" option

I'm just building mapserver right now with as many of the options as I could feasibly get together. I ran "./configure" and it appeared to work correctly. When I went to run "make" though I get a cryptic error: "no input files" and it didn't do anything. Well, turns out, after 20 minutes of confusion (it had always compiled just fine before!!) I realized what I had done. I was trying to build in postgis support so I used the "--with-postgis" option. I had to tell it more specifically where to look for pg_config, so I used:

"--with-postgis=/usr/local/pgsql/bin" (where the pg_config program is located) But that wasn't right. I didn't notice it during the ./configure process, but it was complaining a dozen or so lines from the end - saying that I had specified a "directory" (as opposed to a file). So I then had to change it to "--with-postgis=/usr/local/pgsql/bin/pg_config" and now "make" actually does something.

So I learned my lesson - sometimes the "--with" options need only a directory (ie. --with-proj=../proj) and sometimes, like above, they need a path to a specific file. I assume this applies to more than just my php example.

You can check if a file or a directory is needed by typing ./configure --help and check the listing there.

"make clean" is your friend…

don't forget too that when tying out lots of ./configure --with-foo options to run "make clean" between compilations.

We haven't had luck with make clean as far as we can notice. jsbj

"make distclean" seems to work. ank


Home

Note: See TracWiki for help on using the wiki.