[GRASS-dev] [GRASS GIS] #69: grass build fails when build with -as-needed linker flag

#69: grass build fails when build with -as-needed linker flag
---------------------+------------------------------------------------------
Reporter: wrobell | Owner: grass-dev@lists.osgeo.org
     Type: defect | Status: new
Priority: minor | Milestone: 6.3.0
Component: default | Version: 6.3.0 RCs
Keywords: |
---------------------+------------------------------------------------------
grass build fails when build with -as-needed linker flag (see ld manual).

it is simply solved by patch

http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/grass-link.patch

the patch was created by Jakub Bogusz (qboosh at pld-linux dot org)
and updated by me for grass 6.3.0RC5.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/69&gt;
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/

#69: grass build fails when build with -as-needed linker flag
----------------------+-----------------------------------------------------
  Reporter: wrobell | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: minor | Milestone: 6.3.0
Component: default | Version: 6.3.0 RCs
Resolution: | Keywords:
----------------------+-----------------------------------------------------
Comment (by glynn):

Replying to [ticket:69 wrobell]:
> grass build fails when build with -as-needed linker flag (see ld
manual).
>
> it is simply solved by patch
>
> http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SOURCES/grass-link.patch

This should use $(MATHLIB) rather than -lm.

E.g. -lm won't work on Windows, which doesn't have libm; math functions
are in MSVCRT.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/69#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/

#69: grass build fails when build with -as-needed linker flag
----------------------+-----------------------------------------------------
  Reporter: wrobell | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: minor | Milestone: 6.3.0
Component: default | Version: 6.3.0 RCs
Resolution: | Keywords:
----------------------+-----------------------------------------------------
Comment (by wrobell):

i've updated the patch (see above link) to use $(MATHLIB). seems to work.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/69#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/

#69: grass build fails when build with -as-needed linker flag
----------------------+-----------------------------------------------------
  Reporter: wrobell | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: minor | Milestone: 6.4.0
Component: default | Version: 6.3.0 RCs
Resolution: | Keywords:
----------------------+-----------------------------------------------------
Changes (by neteler):

  * milestone: 6.3.0 => 6.4.0

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/69#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/

#69: grass build fails when build with -as-needed linker flag
----------------------+-----------------------------------------------------
  Reporter: wrobell | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: minor | Milestone: 6.4.0
Component: default | Version: 6.3.0 RCs
Resolution: | Keywords:
----------------------+-----------------------------------------------------
Comment (by neteler):

Developers, can we apply this patch?

Markus

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/69#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#69: grass build fails when build with -as-needed linker flag
----------------------+-----------------------------------------------------
  Reporter: wrobell | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: new
  Priority: minor | Milestone: 6.4.0
Component: default | Version: 6.3.0 RCs
Resolution: | Keywords:
----------------------+-----------------------------------------------------
Comment (by glynn):

Replying to [comment:4 neteler]:
> Developers, can we apply this patch?

I think so.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/69#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#69: grass build fails when build with -as-needed linker flag
----------------------+-----------------------------------------------------
  Reporter: wrobell | Owner: grass-dev@lists.osgeo.org
      Type: defect | Status: closed
  Priority: minor | Milestone: 6.4.0
Component: default | Version: 6.3.0 RCs
Resolution: fixed | Keywords:
----------------------+-----------------------------------------------------
Changes (by neteler):

  * status: new => closed
  * resolution: => fixed

Comment:

Done as r31422 (6.4) and r31423 (trunk).

Markus

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/69#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>