Skip to contentSkip to conversation

gqview: Fix build failure due to missing -lm

PATCH New Valentine Barshak 5 participants 11 messages Oct 6, 2012 – Nov 7, 2012

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gqview: Fix build failure due to missing -lm

---
 package/gqview/gqview.mk | 1 +
 1 file changed, 1 insertion(+)
package/gqview/gqview.mk +1 -0
index 2f64cd0..7d09fda 100644
@@ -7,6 +7,7 @@ GQVIEW_VERSION = 2.1.5
 GQVIEW_SOURCE = gqview-$(GQVIEW_VERSION).tar.gz
 GQVIEW_SITE = http://prdownloads.sourceforge.net/gqview
 GQVIEW_DEPENDENCIES = host-pkg-config libgtk2
+GQVIEW_CONF_ENV = LIBS="-lm"
 
 $(eval $(autotools-package))
 
Signature · 1 line
1.7.11.4
#1 lore raw

PATCH 1/1 gqview: Fix build failure due to missing -lm

Quoted 11 lines · Valentine Barshak
---
  package/gqview/gqview.mk | 1 +
  1 file changed, 1 insertion(+)
package/gqview/gqview.mk +0 -0
index 2f64cd0..7d09fda 100644

package/gqview/gqview.mk GQVIEW_VERSION = 2.1.5 · line 13

Quoted 7 lines
package/gqview/gqview.mk +1 -0
@@ -7,6 +7,7 @@ GQVIEW_VERSION = 2.1.5
  GQVIEW_SOURCE = gqview-$(GQVIEW_VERSION).tar.gz
  GQVIEW_SITE = http://prdownloads.sourceforge.net/gqview
  GQVIEW_DEPENDENCIES = host-pkg-config libgtk2
+GQVIEW_CONF_ENV = LIBS="-lm"
 
  $(eval $(autotools-package))
 

Does this work for everyone else or is it just deprecated and nobody should use it?

I can't build without -lm neither in BR nor using my native host tools.

Thanks,
Val.

#2 lore raw

PATCH 1/1 gqview: Fix build failure due to missing -lm

Quoted 17 lines · Valentine Barshak
Quoted 16 lines · Valentine Barshak
---
  package/gqview/gqview.mk | 1 +
  1 file changed, 1 insertion(+)
package/gqview/gqview.mk +1 -0
index 2f64cd0..7d09fda 100644
@@ -7,6 +7,7 @@ GQVIEW_VERSION = 2.1.5
  GQVIEW_SOURCE = gqview-$(GQVIEW_VERSION).tar.gz
  GQVIEW_SITE = http://prdownloads.sourceforge.net/gqview
  GQVIEW_DEPENDENCIES = host-pkg-config libgtk2
+GQVIEW_CONF_ENV = LIBS="-lm"
 
Quoted 8 lines

package/gqview/gqview.mk GQVIEW_VERSION = 2.1.5 · line 13

Quoted 3 lines
package/gqview/gqview.mk +0 -0
  $(eval $(autotools-package))
 

Does this work for everyone else or is it just deprecated and nobody should use it?

I can't build without -lm neither in BR nor using my native host tools.

Which version of binutils are you using? 2.22?

#3 lore raw

PATCH 1/1 gqview: Fix build failure due to missing -lm

Quoted 25 lines · Will Newton
Quoted 24 lines · Valentine Barshak
Quoted 12 lines · Valentine Barshak
---
   package/gqview/gqview.mk | 1 +
   1 file changed, 1 insertion(+)
package/gqview/gqview.mk +0 -0
index 2f64cd0..7d09fda 100644

package/gqview/gqview.mk GQVIEW_VERSION = 2.1.5 · line 13

Quoted 7 lines
package/gqview/gqview.mk +1 -0
@@ -7,6 +7,7 @@ GQVIEW_VERSION = 2.1.5
   GQVIEW_SOURCE = gqview-$(GQVIEW_VERSION).tar.gz
   GQVIEW_SITE = http://prdownloads.sourceforge.net/gqview
   GQVIEW_DEPENDENCIES = host-pkg-config libgtk2
+GQVIEW_CONF_ENV = LIBS="-lm"
 
   $(eval $(autotools-package))
 

Does this work for everyone else or is it just deprecated and nobody should use it?

Quoted 4 lines
Quoted 1 line

I can't build without -lm neither in BR nor using my native host tools.

Which version of binutils are you using? 2.22?

Yes, 2.22.

Thanks,
Val.

#4 lore raw

PATCH 1/1 gqview: Fix build failure due to missing -lm

Quoted 31 lines · Valentine Barshak
Quoted 30 lines · Will Newton
Quoted 27 lines · Valentine Barshak
Quoted 13 lines · Valentine Barshak
---
   package/gqview/gqview.mk | 1 +
   1 file changed, 1 insertion(+)
package/gqview/gqview.mk +0 -0
index 2f64cd0..7d09fda 100644

package/gqview/gqview.mk GQVIEW_VERSION = 2.1.5 · line 13

Quoted 7 lines
package/gqview/gqview.mk +1 -0
@@ -7,6 +7,7 @@ GQVIEW_VERSION = 2.1.5
   GQVIEW_SOURCE = gqview-$(GQVIEW_VERSION).tar.gz
   GQVIEW_SITE = http://prdownloads.sourceforge.net/gqview
   GQVIEW_DEPENDENCIES = host-pkg-config libgtk2
+GQVIEW_CONF_ENV = LIBS="-lm"
 
   $(eval $(autotools-package))
 

Does this work for everyone else or is it just deprecated and nobody should
use it?

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

I can't build without -lm neither in BR nor using my native host tools.

Which version of binutils are you using? 2.22?

Yes, 2.22.

I believe this is caused by an issue with linking indirectly with the newer binutils. gqview relies on a library that is linked against libm but does not explicitly link against libm itself. Before 2.22 binutils would copy the DT_NEEDED entries from the library into gqview but it does not do this any more.

A number of packages are affected by this. I believe the correct fix is to modify the affected packages to link against the libraries they use explicitly.

#5 lore raw

PATCH 1/1 gqview: Fix build failure due to missing -lm

Quoted 38 lines · Will Newton
Quoted 37 lines · Valentine Barshak
Quoted 35 lines · Will Newton
Quoted 27 lines · Valentine Barshak
Quoted 13 lines · Valentine Barshak
---
    package/gqview/gqview.mk | 1 +
    1 file changed, 1 insertion(+)
package/gqview/gqview.mk +0 -0
index 2f64cd0..7d09fda 100644

package/gqview/gqview.mk GQVIEW_VERSION = 2.1.5 · line 13

Quoted 7 lines
package/gqview/gqview.mk +1 -0
@@ -7,6 +7,7 @@ GQVIEW_VERSION = 2.1.5
    GQVIEW_SOURCE = gqview-$(GQVIEW_VERSION).tar.gz
    GQVIEW_SITE = http://prdownloads.sourceforge.net/gqview
    GQVIEW_DEPENDENCIES = host-pkg-config libgtk2
+GQVIEW_CONF_ENV = LIBS="-lm"
 
    $(eval $(autotools-package))
 

Does this work for everyone else or is it just deprecated and nobody should
use it?

Quoted 1 line

I can't build without -lm neither in BR nor using my native host tools.

Which version of binutils are you using? 2.22?

Quoted 7 lines
Quoted 1 line

Yes, 2.22.

I believe this is caused by an issue with linking indirectly with the newer binutils. gqview relies on a library that is linked against libm but does not explicitly link against libm itself. Before 2.22 binutils would copy the DT_NEEDED entries from the library into gqview but it does not do this any more.

gqview calls pow() and sqrt() directly, though it doesn't link against libm.

Quoted 5 lines

A number of packages are affected by this. I believe the correct fix is to modify the affected packages to link against the libraries they use explicitly.

Is the above patch OK?

Or do you mean configure/makefile(.in) should be patched to add libm dependency?

Thanks,
Val.

#6 lore raw

PATCH 1/1 gqview: Fix build failure due to missing -lm

Quoted 60 lines · Valentine Barshak
Quoted 45 lines · Will Newton
Quoted 42 lines · Valentine Barshak
Quoted 39 lines · Will Newton
Quoted 29 lines · Valentine Barshak
Quoted 14 lines · Valentine Barshak
---
    package/gqview/gqview.mk | 1 +
    1 file changed, 1 insertion(+)
package/gqview/gqview.mk +0 -0
index 2f64cd0..7d09fda 100644

package/gqview/gqview.mk GQVIEW_VERSION = 2.1.5 · line 13

Quoted 7 lines
package/gqview/gqview.mk +1 -0
@@ -7,6 +7,7 @@ GQVIEW_VERSION = 2.1.5
    GQVIEW_SOURCE = gqview-$(GQVIEW_VERSION).tar.gz
    GQVIEW_SITE = http://prdownloads.sourceforge.net/gqview
    GQVIEW_DEPENDENCIES = host-pkg-config libgtk2
+GQVIEW_CONF_ENV = LIBS="-lm"
 
    $(eval $(autotools-package))
 

Does this work for everyone else or is it just deprecated and nobody should
use it?

Quoted 1 line

I can't build without -lm neither in BR nor using my native host tools.

Which version of binutils are you using? 2.22?

Quoted 8 lines
Quoted 1 line

Yes, 2.22.

I believe this is caused by an issue with linking indirectly with the newer binutils. gqview relies on a library that is linked against libm but does not explicitly link against libm itself. Before 2.22 binutils would copy the DT_NEEDED entries from the library into gqview but it does not do this any more.

gqview calls pow() and sqrt() directly, though it doesn't link against libm.

Quoted 1 line
Quoted 6 lines
Quoted 4 lines

A number of packages are affected by this. I believe the correct fix is to modify the affected packages to link against the libraries they use explicitly.

Is the above patch OK?

I think so, although it could do with a comment to say why it is needed. Peter or Thomas may disagree though?

Quoted 2 lines

Or do you mean configure/makefile(.in) should be patched to add libm dependency?

That is the proper long term fix that should be pushed to gqview upstream.

#7 lore raw

PATCH 1/1 gqview: Fix build failure due to missing -lm

Quoted 66 lines · Will Newton
Quoted 65 lines · Valentine Barshak
Quoted 45 lines · Will Newton
Quoted 42 lines · Valentine Barshak
Quoted 39 lines · Will Newton
Quoted 29 lines · Valentine Barshak
Quoted 14 lines · Valentine Barshak
---
     package/gqview/gqview.mk | 1 +
     1 file changed, 1 insertion(+)
package/gqview/gqview.mk +0 -0
index 2f64cd0..7d09fda 100644

package/gqview/gqview.mk GQVIEW_VERSION = 2.1.5 · line 13

Quoted 7 lines
package/gqview/gqview.mk +1 -0
@@ -7,6 +7,7 @@ GQVIEW_VERSION = 2.1.5
     GQVIEW_SOURCE = gqview-$(GQVIEW_VERSION).tar.gz
     GQVIEW_SITE = http://prdownloads.sourceforge.net/gqview
     GQVIEW_DEPENDENCIES = host-pkg-config libgtk2
+GQVIEW_CONF_ENV = LIBS="-lm"
 
     $(eval $(autotools-package))
 

Does this work for everyone else or is it just deprecated and nobody should
use it?

Quoted 1 line

I can't build without -lm neither in BR nor using my native host tools.

Which version of binutils are you using? 2.22?

Quoted 8 lines
Quoted 1 line

Yes, 2.22.

I believe this is caused by an issue with linking indirectly with the newer binutils. gqview relies on a library that is linked against libm but does not explicitly link against libm itself. Before 2.22 binutils would copy the DT_NEEDED entries from the library into gqview but it does not do this any more.

gqview calls pow() and sqrt() directly, though it doesn't link against libm.

Quoted 5 lines

A number of packages are affected by this. I believe the correct fix is to modify the affected packages to link against the libraries they use explicitly.

Quoted 4 lines
Quoted 1 line

Is the above patch OK?

I think so, although it could do with a comment to say why it is needed. Peter or Thomas may disagree though?

I thought it was kind of obvious.

Quoted 6 lines
Quoted 3 lines

Or do you mean configure/makefile(.in) should be patched to add libm dependency?

That is the proper long term fix that should be pushed to gqview upstream.

Gqview is no longer supported. There's a Geeqie project that has been forked from gqview and is currently active.

I still use gqview since it has all the features I need and is smaller than geeqie. I also prefer gqview because it opens a window and shows a "broken image" icon for unsupported image types, while geeqie doesn't create any window (even an error message box), which is a bit confusing.

Thanks,
Val.

#8 lore raw

PATCH 1/1 gqview: Fix build failure due to missing -lm

In reply to Valentine Barshak
Quoted 1 line · Valentine Barshak

Problem can be reproduced on e.g. x86_64 with external toolchain.

And since upstream is dead, the simple addition of -lm to LIBS is an
adequate solution.

Regards,
Arnout

Quoted 16 lines
---
  package/gqview/gqview.mk | 1 +
  1 file changed, 1 insertion(+)
package/gqview/gqview.mk +1 -0
index 2f64cd0..7d09fda 100644
@@ -7,6 +7,7 @@ GQVIEW_VERSION = 2.1.5
  GQVIEW_SOURCE = gqview-$(GQVIEW_VERSION).tar.gz
  GQVIEW_SITE = http://prdownloads.sourceforge.net/gqview
  GQVIEW_DEPENDENCIES = host-pkg-config libgtk2
+GQVIEW_CONF_ENV = LIBS="-lm"
 
  $(eval $(autotools-package))
 
Signature · 6 lines
Arnout Vandecappelle                               arnout at mind be
Senior Embedded Software Architect                 +32-16-286540
Essensium/Mind                                     http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium                BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#9 lore raw

PATCH 1/1 gqview: Fix build failure due to missing -lm

Quoted 8 lines · Arnout Vandecappelle
Quoted 2 lines · Valentine Barshak
Quoted 9 lines

Problem can be reproduced on e.g. x86_64 with external toolchain.

And since upstream is dead, the simple addition of -lm to LIBS is an
adequate solution.

Regards,
Arnout

Works for me as well.

Signature · 2 lines
Regards,
Markos