|Version 2 (modified by jmckenna, 4 years ago)|
This page offers tips and tricks for successfully compiling MapServer on different operating systems.
* LinuxRedHat? * RedHat?8AndMapserver37 * RedHat?9AndMapserver40b * RedHat?9AndMapserver40 * Mandrake 9.1 * DebianLinux * MicrosoftWindows * MacOS X * Solaris 8 * Static Binary for Solaris * FedoraC2 Mapserver4.2.3 Postgis0.9.0 etc(Spanish)
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