= NetBSD Build Page =
My first try at building ossim (OSSIM060711 snapshot) on NetBSD-2.1-STABLE made me run into some obstacles.
This is not a complete and final instruction, but just a hint on what to expect.
* make vs. gmake (GNU make) issues
* gcvt() legacy function
* values.h legacy(?) header file
First I used the following configure parameters:
{{{
./configure --prefix=/usr/pkg --with-libtiff=/usr/pkg --with-jpeg=/usr/pkg --with-geotiff=no --with-openthreads=no
}}}
The (previously installed) tiff and jpeg libraries from the NetBSD pkgsrc are recognized and used.
On NetBSD (as on other BSDs AFAIK) the GNU make utility's name is gmake
.
Most of the Makefiles created in the ./configure stage make use of the
variable $(MAKE) to overcome this difference, i.e. they correctly call gmake
again, when you invoked the top level Makefile with gmake
.
In the ossim/src/Makefile, however, the first target reads
{{{
apps: libs
(cd apps; make all; )
}}}
I just replaced make
with $(MAKE)
to continue.
I believe there's another one or two places in the top level Makefile or Makefile.common,
where make is used instead of $(MAKE)
The gcvt(3) function seems to be a Linux (e.g. http://www.die.net/doc/linux/man/man3/gcvt.3.html) and
Mac OSX (e.g. http://www.hmug.org/man/3/gcvt.php) legacy function. Both man pages tell the function
is to be obsoleted. The MacOS X man page has a note on how to replace the function by snprintf(3),
the Linux man page suggests sprintf(3)... I decided for myself to prefer snprintf(3).
I changed the two instances of gcvt() calls in ossim/src/ossim/vpfutil/vpfdisp.c
{{{
line 411:
- gcvt(f,6,num)
+ snprintf(num,20,"%6g",f);
line 427:
- gcvt(fptr[j],6,num);
+ snprintf(num,20,"%6g",fptr[j]);
}}}
I don't yet know if this change is adequately reflecting what gcvt() is supposed to do.
The 20 as max. length of the string is the number of characters allocated for num; the constant 20 better
had been replaced by a macro #define MAXNUMLEN 20
or similiar in all places.
The values.h file seems to be required to pull in some machine specific
constants. On NetBSD I tried to simply include limits.h instead, and I
saw neither a warning nor an error.
I changed file ossim/src/ossim/vpfutil/vpfcntnt.c line 28 to
{{{
# include
}}}
After these changes I was at least able to build the ossim libraries and binaries,
and I am right now trying to get ossim_qt to work.