[GRASS-dev] [GRASS GIS] #1757: LD_SEARCH_FLAGS incorrect for NetBSD

GRASS GIS trac at osgeo.org
Thu Mar 21 13:55:25 PDT 2013

#1757: LD_SEARCH_FLAGS incorrect for NetBSD
 Reporter:  brook        |       Owner:  grass-dev@…              
     Type:  defect       |      Status:  new                      
 Priority:  critical     |   Milestone:  7.0.0                    
Component:  Default      |     Version:  svn-trunk                
 Keywords:               |    Platform:  Other Unix               
      Cpu:  Unspecified  |  

Comment(by mmetz):

 Replying to [comment:4 glynn]:
 > Replying to [comment:3 mmetz]:
 > > Replying to [comment:2 glynn]:
 > > > 7.0 doesn't support any BSD systems yet. New platforms need to be
 added by people who actually have access to (and preferably knowledge of)
 the platform in question.
 > > However, I do not get 7.0 compiled on NetBSD 6.0.1, the error is
 > >
 ld: unrecognized option '-Wl,-rpath,/home/metz/src/grass-7.0.svn/dist.i386
 > Do NetBSD shared libraries support rpath? If not, the linker probably
 won't accept the switch.

 Yes, NetBSD shared libraries support rpath.
 > Also, -rpath is bad, as it hard-codes library paths, overriding
 LD_LIBRARY_PATH (and it will probably result in hard-coding the build
 directory into the installed binaries). -rpath-link is preferable, as that
 just sets the path for dependency checking without storing it in the

 NetBSD is a bit difficult, I have to check. Some more insights from
 working with NetBSD:

 I think I discovered inconsistencies, if not errors, in the G7 Make
 system: flags meant for cc are also passed to ld and vice versa, probably
 because it is assumed that ld = cc. For example, linking flags for cc must
 have the form

 the equivalent to ld, if ld != cc, is

 -rpath ${LIB_RUNTIME_DIR}

 But Shlib.make does
 even though LDFLAGS are meant for cc and SHLIB_LDFLAGS are meant for ld,
 at least aclocal.m4 says so. Shlib.make might also need LD_SEARCH_FLAGS.

 Grass.make does
 even though LDFLAGS are meant for cc and LD_SEARCH_FLAGS are meant for ld,
 at least aclocal.m4 says so.

Ticket URL: <https://trac.osgeo.org/grass/ticket/1757#comment:5>
GRASS GIS <http://grass.osgeo.org>

More information about the grass-dev mailing list