gimp/0001-Add-missing-lm-to-file-psd-plug-in.patch
2019-11-04 21:06:12 +01:00

45 lines
2.4 KiB
Diff

From 06b61daa802b80a93009abaafb843f574edcaa63 Mon Sep 17 00:00:00 2001
From: Pascal Terjan <pterjan@mageia.org>
Date: Tue, 29 Oct 2019 10:07:53 +0000
Subject: [PATCH] Add missing -lm to file-psd plug-in
psd-save.c uses RINT which uses floor(). Not sure why this only
caused a failure on our armv7hl build and why it used to work
but we get:
libtool: link: gcc -O2 -g -pipe -Wformat -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -march=armv7-a -mfloat-abi=hard -mfpu=vfpv3-d16 -Wall -Wdeclaration-after-statement -Wmissing-prototypes -Werror=missing-prototypes -Wmissing-declarations -Winit-self -Wpointer-arith -Wmissing-format-attribute -Wformat-security -Wlogical-op -Wtype-limits -fno-common -fdiagnostics-show-option -Wreturn-type -Wl,--as-needed -Wl,--no-undefined -Wl,-z -Wl,relro -Wl,-O1 -Wl,--build-id -Wl,--enable-new-dtags -o .libs/file-psd psd.o psd-util.o psd-load.o psd-save.o psd-thumb-load.o psd-image-res-load.o psd-layer-res-load.o -Wl,--export-dynamic -pthread -Wl,--export-dynamic -pthread ../../libgimp/.libs/libgimpui-2.0.so ../../libgimpwidgets/.libs/libgimpwidgets-2.0.so ../../libgimpconfig/.libs/libgimpconfig-2.0.so ../../libgimp/.libs/libgimp-2.0.so ../../libgimpcolor/.libs/libgimpcolor-2.0.so ../../libgimpmath/.libs/libgimpmath-2.0.so ../../libgimpbase/.libs/libgimpbase-2.0.so -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lpangoft2-1.0 -lpango-1.0 -lharfbuzz -lfontconfig -lfreetype -lgegl-0.4 -lgegl-npd-0.4 -lgmodule-2.0 -ljson-glib-1.0 -lgio-2.0 -lgobject-2.0 -lglib-2.0 -lbabl-0.1 -lz -ljpeg -pthread
/usr/bin/ld: psd-save.o: undefined reference to symbol 'floor@@GLIBC_2.4'
/usr/bin/ld: /lib/libm.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
make[3]: *** [Makefile:756: file-psd] Error 1
And adding -lm seems the right thing to do.
---
plug-ins/file-psd/Makefile.am | 3 +++
1 file changed, 3 insertions(+)
diff --git a/plug-ins/file-psd/Makefile.am b/plug-ins/file-psd/Makefile.am
index d8f4f3577e..10ce6485db 100644
--- a/plug-ins/file-psd/Makefile.am
+++ b/plug-ins/file-psd/Makefile.am
@@ -10,6 +10,8 @@ libgimpmath = $(top_builddir)/libgimpmath/libgimpmath-$(GIMP_API_VERSION).la
if OS_WIN32
mwindows = -mwindows
+else
+libm = -lm
endif
if HAVE_WINDRES
@@ -53,6 +55,7 @@ AM_CPPFLAGS = \
-I$(includedir)
file_psd_LDADD = \
+ $(libm) \
$(libgimpui) \
$(libgimpwidgets) \
$(libgimpconfig) \
--
2.23.0