Changes between Initial Version and Version 1 of NetBSDBuild


Ignore:
Timestamp:
May 14, 2007, 10:39:07 AM (17 years ago)
Author:
mlucas
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • NetBSDBuild

    v1 v1  
     1= NetBSD Build Page =
     2
     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.
     5
     6* make vs. gmake (GNU make) issues
     7* gcvt() legacy function
     8* values.h legacy(?) header file
     9
     10First I used the following configure parameters:
     11
     12  ./configure --prefix=/usr/pkg --with-libtiff=/usr/pkg --with-jpeg=/usr/pkg --with-geotiff=no --with-openthreads=no
     13
     14The (previously installed) tiff and jpeg libraries from the NetBSD pkgsrc are recognized and used.
     15
     16<hr>
     17
     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>.
     22
     23In the ossim/src/Makefile, however, the first target reads
     24  apps: libs
     25    (cd apps; make all; )
     26
     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)
     30
     31<hr>
     32
     33The gcvt(3) function seems to be a Linux (e.g. http://www.die.net/doc/linux/man/man3/gcvt.3.html) and
     34Mac OSX (e.g. http://www.hmug.org/man/3/gcvt.php) 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).
     37
     38I changed the two instances of gcvt() calls in ossim/src/ossim/vpfutil/vpfdisp.c
     39
     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]);
     46
     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.
     50
     51<hr>
     52
     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.
     56
     57I changed file ossim/src/ossim/vpfutil/vpfcntnt.c line 28 to
     58{{{
     59 #   include <limits.h>
     60}}}
     61
     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.