[GRASS-dev] [GRASS GIS] #838: Compile error for lib/driver

GRASS GIS trac at osgeo.org
Tue Dec 15 15:52:19 EST 2009


#838: Compile error for lib/driver
-------------------------+--------------------------------------------------
 Reporter:  sprice       |       Owner:  grass-dev at lists.osgeo.org
     Type:  defect       |      Status:  new                      
 Priority:  normal       |   Milestone:  6.4.0                    
Component:  default      |     Version:  unspecified              
 Keywords:               |    Platform:  Unspecified              
      Cpu:  Unspecified  |  
-------------------------+--------------------------------------------------
 When compiling the GRASS GIS from SVN source (& RC5), I have this bug
 during compilation. I use this line for ./configure:
 {{{
 ./configure "CFLAGS=-g -Wall -O" --with-iconv --with-freetype --with-
 freetype-includes=/usr/local/include/freetype2 --with-opengl=aqua
 --without-tcltk --libdir=/usr/local/lib --with-cxx
 }}}

 But I have this error:

 {{{
 cp -f /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/bin./grass64
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/dist./grass64.tmp
 /usr/bin/install -c  tools/mkhtml.sh
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/dist./tools/
 2>/dev/null
 build_html_index.sh
 Generating HTML manual pages index (help system)...
 Generated HTML docs in ../dist./docs/html/index.html
 ----------------------------------------------------------------------
 Following modules are missing the 'description.html' file in src code:
 ----------------------------------------------------------------------
 GRASS GIS compilation log
 -------------------------
 Started compilation: Tue Dec 15 12:41:07 MST 2009
 --
 Errors in:
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/lib/driver
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/lib/pngdriver
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/lib/psdriver
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/lib/raster
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/lib/display
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/drivers/PNG
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/drivers/HTMLMAP
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/drivers/PS
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.ask
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.barscale
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.colorlist
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.colors
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.colortable
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.erase
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.extend
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.extract
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.font
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.frame
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.geodesic
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.graph
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.grid
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.his
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.histogram
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.info
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.legend
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.linegraph
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.mapgraph
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.measure
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.menu
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.mon/cmd
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.mon/pgms
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.nviz
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.paint.labels
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.path
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.profile
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.rast
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.rast.arrow
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.rast.num
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.rgb
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.rhumbline
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.save
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.text.new
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.thematic.area
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.title
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.vect
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.vect.chart
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.what.rast
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.what.vect
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.where
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/display/d.zoom
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/general/g.mapset
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/imagery/i.ask
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/raster/r.le/r.le.setup
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/raster/r.le/r.le.trace
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/raster/r.profile
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/raster/wildfire/r.spread
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/vector/v.label
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/vector/v.label.sa
 --
 In case of errors please change into the directory with error and run
 'make'.
 If you get multiple errors, you need to deal with them in the order they
 appear in the error log. If you get an error building a library, you will
 also get errors from anything which uses the library.
 --
 Finished compilation: Tue Dec 15 12:49:22 MST 2009
 make: *** [default] Error 1
 seth:grass-6.4.svn_src_snapshot_2009_12_12 sprice$ cd lib/driver/
 seth:driver sprice$ make
 cc -dynamiclib -compatibility_version 6.4 -current_version 6.4
 -install_name /usr/local/grass-6.4.0svn/lib/libgrass_driver.dylib -o
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/dist./lib/libgrass_driver.6.4.0svn.dylib
 -L/usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/dist./lib
 OBJ./Bitmap.o OBJ./Box.o OBJ./Client.o OBJ./Color.o OBJ./Cont.o
 OBJ./Draw.o OBJ./Erase.o OBJ./Font.o OBJ./Get_location.o OBJ./Get_t_box.o
 OBJ./Graph.o OBJ./Line_width.o OBJ./Move.o OBJ./Panel.o OBJ./Polydots.o
 OBJ./Polyline.o OBJ./Polygon.o OBJ./Raster.o OBJ./Respond.o OBJ./Returns.o
 OBJ./Set_window.o OBJ./Text.o OBJ./Text_size.o OBJ./Work.o OBJ./font2.o
 OBJ./font_freetype.o OBJ./init.o OBJ./pad.o OBJ./parse_ftcap.o
 OBJ./text2.o OBJ./text3.o OBJ./main.o OBJ./command.o OBJ./connect_sock.o
 -lgrass_gis -lgrass_datetime -lz     -lfreetype  -liconv   && \
         (cd
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/dist./lib; ln -f -s
 libgrass_driver.6.4.0svn.dylib
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/dist./lib/libgrass_driver.dylib)
 Undefined symbols:
   "_libiconv_close", referenced from:
       _draw_main in text3.o
   "_libiconv", referenced from:
       _draw_main in text3.o
   "_libiconv_open", referenced from:
       _draw_main in text3.o
 ld: symbol(s) not found
 collect2: ld returned 1 exit status
 make: ***
 [/usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/dist./lib/libgrass_driver.6.4.0svn.dylib]
 Error 1
 }}}

 So the simple fix for it is to add "-L/usr/local/lib" to the cc command.
 You can see from my './configure' above that I tried to force it to use
 the correct library directory, but somehow this is lost when compiling the
 driver. So I just copy-paste in the correct flag, and compile proceeds as
 it should.

 {{{
 seth:driver sprice$ cc -dynamiclib -compatibility_version 6.4
 -current_version 6.4 -install_name
 /usr/local/grass-6.4.0svn/lib/libgrass_driver.dylib -o
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/dist./lib/libgrass_driver.6.4.0svn.dylib
 -L/usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/dist./lib
 OBJ./Bitmap.o OBJ./Box.o OBJ./Client.o OBJ./Color.o OBJ./Cont.o
 OBJ./Draw.o OBJ./Erase.o OBJ./Font.o OBJ./Get_location.o OBJ./Get_t_box.o
 OBJ./Graph.o OBJ./Line_width.o OBJ./Move.o OBJ./Panel.o OBJ./Polydots.o
 OBJ./Polyline.o OBJ./Polygon.o OBJ./Raster.o OBJ./Respond.o OBJ./Returns.o
 OBJ./Set_window.o OBJ./Text.o OBJ./Text_size.o OBJ./Work.o OBJ./font2.o
 OBJ./font_freetype.o OBJ./init.o OBJ./pad.o OBJ./parse_ftcap.o
 OBJ./text2.o OBJ./text3.o OBJ./main.o OBJ./command.o OBJ./connect_sock.o
 -lgrass_gis -lgrass_datetime -lz     -lfreetype  -liconv
 -L/usr/local/lib && (cd
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/dist./lib; ln -f -s
 libgrass_driver.6.4.0svn.dylib
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12/dist./lib/libgrass_driver.dylib)
 seth:driver sprice$ cd -
 /usr/local/grass/grass-6.4.svn_src_snapshot_2009_12_12
 seth:grass-6.4.svn_src_snapshot_2009_12_12 sprice$ make
 }}}

 I'm filing this bug in the hopes that someone forgot to included the flag
 somewhere in the make process, and we can fix that.

-- 
Ticket URL: <http://trac.osgeo.org/grass/ticket/838>
GRASS GIS <http://grass.osgeo.org>


More information about the grass-dev mailing list