[GRASS5] [bug #3855] (grass) simlib is not build in Mac OS X

this bug's URL: http://intevation.de/rt/webrt?serial_num=3855
-------------------------------------------------------------------------

Subject: simlib is not build in Mac OS X

Platform: Mac OSX
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: 20050519

I have an error when I build simlib inside las grass 6.1.cvs (raster/simwe folder).
This is the error (first rows):

-----------------------------------------
simlib
cp waterglobs.h /Volumes/G4_APPLI/src/grass-6.1.cvs_src_snapshot_2005_11_19/dist.powerpc-
apple-darwin6.8/include/grass/waterglobs.h
gcc -I/Volumes/G4_APPLI/src/grass-6.1.cvs_src_snapshot_2005_11_19/include -I/Volumes/
G4_APPLI/src/grass-6.1.cvs_src_snapshot_2005_11_19/dist.powerpc-apple-darwin6.8/include/
grass -I/usr/X11R6/include -I/usr/local/grasslib/include -O3 -D_FILE_OFFSET_BITS=64 -Wall -
Wconversion -Wno-implicit-int -I/usr/X11R6/include -I/usr/local/grasslib/include -fno-common
-DPACKAGE=\""grasslibs"\" -DPACKAGE=\""grasslibs"\" -I/Volumes/G4_APPLI/src/
grass-6.1.cvs_src_snapshot_2005_11_19/include -I/Volumes/G4_APPLI/src/
grass-6.1.cvs_src_snapshot_2005_11_19/dist.powerpc-apple-darwin6.8/include/grass \
        -o OBJ.powerpc-apple-darwin6.8/input.o -c input.c
input.c: In function `input_data':
input.c:247: warning: passing arg 1 of `G_is_f_null_value' from incompatible pointer type
input.c:251: warning: passing arg 1 of `G_is_f_null_value' from incompatible pointer type
input.c:260: warning: passing arg 1 of `G_is_f_null_value' from incompatible pointer type
input.c:259: warning: suggest explicit braces to avoid ambiguous `else'
input.c:267: warning: passing arg 1 of `G_is_f_null_value' from incompatible pointer type
input.c:266: warning: suggest explicit braces to avoid ambiguous `else'
input.c:273: warning: suggest explicit braces to avoid ambiguous `else'
input.c:286: warning: suggest explicit braces to avoid ambiguous `else'
input.c:293: warning: suggest explicit braces to avoid ambiguous `else'
input.c:300: warning: suggest explicit braces to avoid ambiguous `else'
input.c:308: warning: passing arg 1 of `G_is_f_null_value' from incompatible pointer type
input.c:307: warning: suggest explicit braces to avoid ambiguous `else'
input.c:28: warning: `cell4b' might be used uninitialized in this function
input.c:29: warning: `cell9' might be used uninitialized in this function
input.c:29: warning: `cell10' might be used uninitialized in this function
input.c:29: warning: `cell11' might be used uninitialized in this function
input.c:30: warning: `cell4' might be used uninitialized in this function
input.c:30: warning: `cell4a' might be used uninitialized in this function
input.c:30: warning: `cell12' might be used uninitialized in this function
input.c:31: warning: `fd4' might be used uninitialized in this function
input.c:31: warning: `fd4a' might be used uninitialized in this function
input.c:31: warning: `fd4b' might be used uninitialized in this function
input.c:32: warning: `fd9' might be used uninitialized in this function
input.c:32: warning: `fd10' might be used uninitialized in this function
input.c:32: warning: `fd11' might be used uninitialized in this function
input.c:32: warning: `fd12' might be used uninitialized in this function
gcc -I/Volumes/G4_APPLI/src/grass-6.1.cvs_src_snapshot_2005_11_19/include -I/Volumes/
G4_APPLI/src/grass-6.1.cvs_src_snapshot_2005_11_19/dist.powerpc-apple-darwin6.8/include/
grass -I/usr/X11R6/include -I/usr/local/grasslib/include -O3 -D_FILE_OFFSET_BITS=64 -Wall -
Wconversion -Wno-implicit-int -I/usr/X11R6/include -I/usr/local/grasslib/include -fno-common
-DPACKAGE=\""grasslibs"\" -DPACKAGE=\""grasslibs"\" -I/Volumes/G4_APPLI/src/
grass-6.1.cvs_src_snapshot_2005_11_19/include -I/Volumes/G4_APPLI/src/
grass-6.1.cvs_src_snapshot_2005_11_19/dist.powerpc-apple-darwin6.8/include/grass \
        -o OBJ.powerpc-apple-darwin6.8/random.o -c random.c
gcc -I/Volumes/G4_APPLI/src/grass-6.1.cvs_src_snapshot_2005_11_19/include -I/Volumes/
G4_APPLI/src/grass-6.1.cvs_src_snapshot_2005_11_19/dist.powerpc-apple-darwin6.8/include/
grass -I/usr/X11R6/include -I/usr/local/grasslib/include -O3 -D_FILE_OFFSET_BITS=64 -Wall -
Wconversion -Wno-implicit-int -I/usr/X11R6/include -I/usr/local/grasslib/include -fno-common
-DPACKAGE=\""grasslibs"\" -DPACKAGE=\""grasslibs"\" -I/Volumes/G4_APPLI/src/
grass-6.1.cvs_src_snapshot_2005_11_19/include -I/Volumes/G4_APPLI/src/
grass-6.1.cvs_src_snapshot_2005_11_19/dist.powerpc-apple-darwin6.8/include/grass \
        -o OBJ.powerpc-apple-darwin6.8/hydro.o -c hydro.c
hydro.c: In function `main_loop':
hydro.c:25: warning: unused variable `icount'
hydro.c:29: warning: unused variable `nflw'
hydro.c:37: warning: unused variable `zx'
hydro.c:37: warning: unused variable `zy'
hydro.c:37: warning: unused variable `zd'
hydro.c:37: warning: unused variable `sinsl'
hydro.c:33: warning: `conn' might be used uninitialized in this function
gcc -I/Volumes/G4_APPLI/src/grass-6.1.cvs_src_snapshot_2005_11_19/include -I/Volumes/
G4_APPLI/src/grass-6.1.cvs_src_snapshot_2005_11_19/dist.powerpc-apple-darwin6.8/include/
grass -I/usr/X11R6/include -I/usr/local/grasslib/include -O3 -D_FILE_OFFSET_BITS=64 -Wall -
Wconversion -Wno-implicit-int -I/usr/X11R6/include -I/usr/local/grasslib/include -fno-common
-DPACKAGE=\""grasslibs"\" -DPACKAGE=\""grasslibs"\" -I/Volumes/G4_APPLI/src/
grass-6.1.cvs_src_snapshot_2005_11_19/include -I/Volumes/G4_APPLI/src/
grass-6.1.cvs_src_snapshot_2005_11_19/dist.powerpc-apple-darwin6.8/include/grass \
        -o OBJ.powerpc-apple-darwin6.8/output.o -c output.c
output.c: In function `output_data':
output.c:556: warning: comparison between pointer and integer
output.c:24: warning: unused variable `zx'
output.c:24: warning: unused variable `zy'
output.c:24: warning: unused variable `zd'
output.c:24: warning: unused variable `sinsl'
output.c:18: warning: `cell6' might be used uninitialized in this function
output.c:18: warning: `cell7' might be used uninitialized in this function
output.c:18: warning: `cell8' might be used uninitialized in this function
output.c:19: warning: `cell14' might be used uninitialized in this function
output.c:19: warning: `cell15' might be used uninitialized in this function
output.c:19: warning: `cell16' might be used uninitialized in this function
output.c:20: warning: `fd6' might be used uninitialized in this function
output.c:20: warning: `fd7' might be used uninitialized in this function
output.c:20: warning: `fd8' might be used uninitialized in this function
output.c:21: warning: `fd14' might be used uninitialized in this function
output.c:21: warning: `fd15' might be used uninitialized in this function
output.c:21: warning: `fd16' might be used uninitialized in this function
output.c: In function `output_et':
output.c:634: warning: `cell13' might be used uninitialized in this function
output.c:634: warning: `cell17' might be used uninitialized in this function
output.c:635: warning: `fd13' might be used uninitialized in this function
output.c:635: warning: `fd17' might be used uninitialized in this function
gcc -I/Volumes/G4_APPLI/src/grass-6.1.cvs_src_snapshot_2005_11_19/include -I/Volumes/
G4_APPLI/src/grass-6.1.cvs_src_snapshot_2005_11_19/dist.powerpc-apple-darwin6.8/include/
grass -I/usr/X11R6/include -I/usr/local/grasslib/include -O3 -D_FILE_OFFSET_BITS=64 -Wall -
Wconversion -Wno-implicit-int -I/usr/X11R6/include -I/usr/local/grasslib/include -fno-common
-DPACKAGE=\""grasslibs"\" -DPACKAGE=\""grasslibs"\" -I/Volumes/G4_APPLI/src/
grass-6.1.cvs_src_snapshot_2005_11_19/include -I/Volumes/G4_APPLI/src/
grass-6.1.cvs_src_snapshot_2005_11_19/dist.powerpc-apple-darwin6.8/include/grass \
        -o OBJ.powerpc-apple-darwin6.8/erod.o -c erod.c
cc -dynamiclib -flat_namespace -compatibility_version 6.1 -current_version 6.1 -install_name /
Applications/Grass/grass61cvs.app/Contents/Resources/grass-6.1.cvs/lib/libgrass_sim.dylib -o /
Volumes/G4_APPLI/src/grass-6.1.cvs_src_snapshot_2005_11_19/dist.powerpc-apple-darwin6.8/
lib/libgrass_sim.6.1.cvs.dylib -L/usr/X11R6/lib -L/usr/local/grasslib/lib -L/Volumes/G4_APPLI/src/
grass-6.1.cvs_src_snapshot_2005_11_19/dist.powerpc-apple-darwin6.8/lib -L/usr/local/pgsql/lib
OBJ.powerpc-apple-darwin6.8/input.o OBJ.powerpc-apple-darwin6.8/random.o OBJ.powerpc-apple-
darwin6.8/hydro.o OBJ.powerpc-apple-darwin6.8/output.o OBJ.powerpc-apple-darwin6.8/erod.o -
lgrass_gis -lgrass_datetime -lz -lintl -lgrass_bitmap -lgrass_dbmiclient -lgrass_dbmibase -
lgrass_gmath -L/usr/local/grasslib/lib -lfftw -framework vecLib -framework vecLib -lgrass_linkm
-lz -lgrass_sites && if [ -z ] ; then ln -f -s libgrass_sim.6.1.cvs.dylib /Volumes/G4_APPLI/src/
grass-6.1.cvs_src_snapshot_2005_11_19/dist.powerpc-apple-darwin6.8/lib/libgrass_sim.dylib; fi
ld: multiple definitions of symbol _bresx
OBJ.powerpc-apple-darwin6.8/input.o definition of _bresx in section (__DATA,__common)
OBJ.powerpc-apple-darwin6.8/random.o definition of _bresx in section (__DATA,__common)
ld: multiple definitions of symbol _bresy
OBJ.powerpc-apple-darwin6.8/input.o definition of _bresy in section (__DATA,__common)
OBJ.powerpc-apple-darwin6.8/random.o definition of _bresy in section (__DATA,__common)
ld: multiple definitions of symbol _bxma
OBJ.powerpc-apple-darwin6.8/input.o definition of _bxma in section (__DATA,__common)
OBJ.powerpc-apple-darwin6.8/random.o definition of _bxma in section (__DATA,__common)
ld: multiple definitions of symbol _bxmi
OBJ.powerpc-apple-darwin6.8/input.o definition of _bxmi in section (__DATA,__common)
OBJ.powerpc-apple-darwin6.8/random.o definition of _bxmi in section (__DATA,__common)
ld: multiple definitions of symbol _byma
OBJ.powerpc-apple-darwin6.8/input.o definition of _byma in section (__DATA,__common)
-----------------------------------------

All multiple definitions of symbols

-------------------------------------------- Managed by Request Tracker

On Tue, Nov 22, 2005 at 11:56:23AM +0100, Request Tracker wrote:

this bug's URL: http://intevation.de/rt/webrt?serial_num=3855
-------------------------------------------------------------------------

Subject: simlib is not build in Mac OS X

Platform: Mac OSX
grass obtained from: CVS
grass binary for platform: Compiled from Sources
GRASS Version: 20050519

I have an error when I build simlib inside las grass 6.1.cvs (raster/simwe folder).
This is the error (first rows):

-----------------------------------------
simlib
cp waterglobs.h /Volumes/G4_APPLI/src/grass-6.1.cvs_src_snapshot_2005_11_19/dist.powerpc-
apple-darwin6.8/include/grass/waterglobs.h
gcc -I/Volumes/G4_APPLI/src/grass-6.1.cvs_src_snapshot_2005_11_19/include -I/Volumes/

...

All multiple definitions of symbols

AFAIK all variables should be declared as extern etc such as
in other GRASS modules (e.g. r.profile).

Markus