Skip to content
  • Pascal Terjan's avatar
    Add missing -lm to file-psd plug-in · 85c004ed
    Pascal Terjan authored and Jehan's avatar Jehan committed
    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.
    
    (cherry picked from commit 06b61daa)
    85c004ed