[GRASS-user] Grass7 on FreeBSD 9.1 : LD_SEARCH_FLAGS

Markus Metz markus.metz.giswork at gmail.com
Tue Mar 26 02:10:41 PDT 2013


On Mon, Mar 25, 2013 at 11:31 PM, Pierre Stévens <pierre at geobsd.com> wrote:
> There are some specific aspects on compiling Grass7 on FreeBSD 9.1.
>
>
> 1. Must use "gmake" instead of "make". 'Make' is different under BSD
> Environnement.

This seems to be true for most BSD and UNIX systems.

>
> 2. The 'gis.h' header try to include the 'alloca.h' header. On FreeBSD,
> alloca() is declared in 'stdlib.h'
> (http://forums.freebsd.org/showthread.php?t=30354).
>
> This issue was temporarily fixed with : ' #touch
> /usr/local/include/alloca.h '

gis.h is fixed in r55519.

>
>
> 3. Current error appears in ' grass7/dist.i386-freebsd/lib/manage ' :
>
>         ld: unrecognized option '-Wl, -rpath, /grass7/dist.i386-freebsd/lib
>
> Possible solution could be found in LD_SEARCH_FLAGS like in this post
> (https://trac.osgeo.org/grass/ticket/1757#comment:4).
>
> I try to modify line 562 in ' aclocal.m4 ' and replace
>
> SHLIB_LD="ld -Bshareable -x"
> by SHLIB_LD="${CC} -shared"
>
>
> But it didn't work.

If you use
SHLIB_LD="${CC} -shared"
you must also use
LD_SEARCH_FLAGS='-Wl,-rpath,${LIB_RUNTIME_DIR}'

You would also need to patch configure or run autoconf (version 2.13).

HTH,

Markus M

PS: grass 7 compiles for me on FreeBSD 9.0 with SHLIB_LD="ld
-Bshareable -x", even though it should actually fail.


More information about the grass-user mailing list