Bug 220455 - graphics/GraphicsMagick: Fails to link (cannot find -lSM)
Summary: graphics/GraphicsMagick: Fails to link (cannot find -lSM)
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Po-Chuan Hsieh
Keywords: needs-qa
Depends on:
Reported: 2017-07-03 18:57 UTC by John Smith
Modified: 2018-01-21 13:54 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (sunpoet)
koobs: merge-quarterly?


Note You need to log in before you can comment on or make changes to this bug.
Description John Smith 2017-07-03 18:57:42 UTC
FreeBSD 11x64, GraphicsMagick-1.3.25_3,1
make config:
[x] DOCS
[ ] DPS
[ ] FPX
[x] JBIG
[x] JPEG
[x] LCMS2
[x] PNG
[ ] Q8BIT
[x] SSE
[ ] TEST (also tried with this option)
[x] TIFF
[x] WEBP
[x] WMF
[x] X11
[x] XML

Build log ends with:

/usr/local/bin/ld: cannot find -lSM
collect2: error: ld returned 1 exit status
*** [magick/libGraphicsMagick.la] Error code 1

make[2]: stopped in /construction/xports/graphics/GraphicsMagick/work/GraphicsMagick-1.3.25
1 error

make[2]: stopped in /construction/xports/graphics/GraphicsMagick/work/GraphicsMagick-1.3.25
*** [all] Error code 2

make[1]: stopped in /construction/xports/graphics/GraphicsMagick/work/GraphicsMagick-1.3.25
1 error

make[1]: stopped in /construction/xports/graphics/GraphicsMagick/work/GraphicsMagick-1.3.25
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

make: stopped in /xports/graphics/GraphicsMagick
Comment 1 Po-Chuan Hsieh freebsd_committer 2017-07-23 12:03:48 UTC
It's the default option but I cannot reproduce it (GraphicsMagick-1.3.26,1) on my poudriere (11 amd64).
Comment 2 Kurt Jaeger freebsd_committer 2017-12-10 19:46:24 UTC
On a box with other ports installed (not in poudriere) make stage-qa shows this:

====> Running Q/A tests (stage-qa)
Error: /usr/local/bin/gm is linked to /usr/local/lib/libSM.so.6 from x11/libSM but it is not declared as a dependency
Warning: you need USE_XORG+=sm
Error: /usr/local/bin/gm is linked to /usr/local/lib/libICE.so.6 from x11/libICE but it is not declared as a dependency
Warning: you need USE_XORG+=ice

Maybe there's some USE_XORG fix needed ?
Comment 3 Walter Schwarzenfeld freebsd_triage 2018-01-16 15:17:48 UTC
Is this still relevant?
Comment 4 John Smith 2018-01-16 18:42:17 UTC
(In reply to w.schwarzenfeld from comment #3)
Did you fix it?
Comment 5 Walter Schwarzenfeld freebsd_triage 2018-01-17 04:32:05 UTC
No, see comment1. i also cannot reproduce it.
Comment 6 Kurt Jaeger freebsd_committer 2018-01-17 20:09:56 UTC
John, did you build using poudriere or did you build on a system that already had some other ports installed ?
Comment 7 Po-Chuan Hsieh freebsd_committer 2018-01-21 13:15:21 UTC
The port builds fine in a clean environment (e.g. poudriere).

It may fail when you build it with libICE installed but libSM is not.
The upstream assume that libSM exists if libICE exists.
The configure checks libICE and then adds "-lSM -lICE" to LIBS.
Comment 8 commit-hook freebsd_committer 2018-01-21 13:52:56 UTC
A commit references this bug:

Author: sunpoet
Date: Sun Jan 21 13:51:55 UTC 2018
New revision: 459609
URL: https://svnweb.freebsd.org/changeset/ports/459609

  Fix build when libICE is installed but libSM is not

  - Bump PORTREVISION for dependency change

  PR:		220455
  Reported by:	John Smith <godevilove@ya.ru>