Bug 240270

Summary: multimedia/dvdauthor: Fails to build if GraphicsMagick is installed (and IMAGEMAGICK=OFF)
Product: Ports & Packages Reporter: Ting-Wei Lan <lantw44>
Component: Individual Port(s)Assignee: freebsd-ports-bugs mailing list <ports-bugs>
Status: Open ---    
Severity: Affects Some People CC: pawel, w.schwarzenfeld
Priority: --- Keywords: needs-qa
Version: LatestFlags: koobs: merge-quarterly?
Hardware: Any   
OS: Any   
Description Flags
Full build log
config.log none

Description Ting-Wei Lan 2019-09-02 08:45:23 UTC
It fails with the following messages:

gmake[3]: Entering directory '/wrkdirs/usr/ports/multimedia/dvdauthor/work/dvdauthor/src'
/bin/sh ../libtool  --tag=CC   --mode=link cc -Wall -O2 -pipe  -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing   -fstack-protector-strong  -o dvdauthor dvdauthor.o dvdcompile.o d
vdvml.o dvdvmy.o dvdifo.o dvdvob.o dvdpgc.o dvdcli.o readxml.o conffile.o compat.o  -L/usr/local/lib -lxml2 -lz -L/usr/lib -llzma -L/usr/lib -lm -L/usr/local/lib
libtool: link: cc -Wall -O2 -pipe -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing -fstack-protector-strong -o dvdauthor dvdauthor.o dvdcompile.o dvdvml.o dvdvmy.o dvdifo.o dvdvob
.o dvdpgc.o dvdcli.o readxml.o conffile.o compat.o  -L/usr/local/lib -lxml2 -lz -L/usr/lib -llzma -lm
cc -DHAVE_CONFIG_H -I.  -DSYSCONFDIR="\"/usr/local/etc\"" -I/usr/local/include/libxml2 -I/usr/include -I/usr/local/include/libpng16  -I/usr/local/include/freetype2 -I/usr/local/include/fribidi -I/usr/local/include  -I/us
r/local/include -I/usr/local/include/freetype2  -DLIBICONV_PLUG -isystem /usr/local/include -Wall -O2 -pipe  -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -MT subgen-image.o -
MD -MP -MF .deps/subgen-image.Tpo -c -o subgen-image.o subgen-image.c
subgen-image.c:33:10: fatal error: 'magick/api.h' file not found
#include <magick/api.h>
1 error generated.
gmake[3]: *** [Makefile:597: subgen-image.o] Error 1
gmake[3]: Leaving directory '/wrkdirs/usr/ports/multimedia/dvdauthor/work/dvdauthor/src'
gmake[2]: *** [Makefile:412: all] Error 2
gmake[2]: Leaving directory '/wrkdirs/usr/ports/multimedia/dvdauthor/work/dvdauthor/src'
gmake[1]: *** [Makefile:414: all-recursive] Error 1
gmake[1]: Leaving directory '/wrkdirs/usr/ports/multimedia/dvdauthor/work/dvdauthor'
*** Error code 1

It can be worked around by enabling IMAGEMAGICK option. I didn't spend time figuring out the proper way to fix it.
Comment 1 Walter Schwarzenfeld freebsd_triage 2019-09-02 09:56:06 UTC
Created attachment 207094 [details]

Include magick/api.h from GraphicsMagick results in a linker error.
So I remove defined(HAVE_GMAGICK) from subgen-image.c.
Comment 2 Kubilay Kocak freebsd_committer freebsd_triage 2019-09-03 02:45:01 UTC
@Ting-Wei Could you please include additional information:

- Full build log (as an attachment)
- WRKSRC/config.log output (as an attachment)
- pkg version -v output (as an attachment)
- System information (uname -a)
- /etc/make.conf contents (as an attachment)

Note: The port currently contains the following block to (apparently) disable imagemagick in the case the option is disabled:

    @${REINPLACE_CMD} 's|usemagick=1|usemagick=0|g' \

Presumably this is insufficient. It was added in ports r305215 (committer CC'd)
Comment 3 Ting-Wei Lan 2019-09-04 17:42:03 UTC
Created attachment 207189 [details]
Full build log
Comment 4 Ting-Wei Lan 2019-09-04 17:42:36 UTC
Created attachment 207190 [details]
Comment 5 Ting-Wei Lan 2019-09-04 17:46:55 UTC
(In reply to Kubilay Kocak from comment #2)
> - pkg version -v output (as an attachment)
All packages are up-to-date. I tested it with ports r510311.

> - System information (uname -a)
FreeBSD 12_0-amd64-default 12.0-RELEASE-p10 FreeBSD 12.0-RELEASE-p10 amd64

> - /etc/make.conf contents (as an attachment)
There was no custom settings in /etc/make.conf. It was generated by poudriere.