Changes between Initial Version and Version 1 of NetBSDBuild

May 14, 2007 10:39:07 AM (12 years ago)



  • NetBSDBuild

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