Bug 240270 - multimedia/dvdauthor: Fails to build if GraphicsMagick is installed (and IMAGEMAGICK=OFF)
Summary: multimedia/dvdauthor: Fails to build if GraphicsMagick is installed (and IMAG...
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Tobias C. Berner
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2019-09-02 08:45 UTC by Ting-Wei Lan
Modified: 2021-01-09 12:20 UTC (History)
5 users (show)

See Also:
koobs: merge-quarterly?


Attachments
svn-diff-dvdauthor (2.02 KB, patch)
2019-09-02 09:56 UTC, Walter Schwarzenfeld
no flags Details | Diff
Full build log (23.78 KB, text/plain)
2019-09-04 17:42 UTC, Ting-Wei Lan
no flags Details
config.log (103.75 KB, text/plain)
2019-09-04 17:42 UTC, Ting-Wei Lan
no flags Details
svn diff from /usr/ports/multimedia/dvdauthor (2.44 KB, patch)
2020-10-01 23:00 UTC, Chad Jacob Milios
no flags Details | Diff
svn diff from /usr/ports/multimedia/dvdauthor (2.33 KB, patch)
2020-10-02 18:38 UTC, Chad Jacob Milios
no flags Details | Diff
Add possibility to build with and without GraphicsMagick and with ImageMagick7 installed (1.87 KB, patch)
2021-01-04 08:04 UTC, VVD
no flags Details | Diff
update to last commit on github - fixed build with GraphicsMagick/ImageMagick (3.99 KB, patch)
2021-01-05 15:56 UTC, VVD
no flags Details | Diff
update to last commit on github - fixed build with GraphicsMagick/ImageMagick (v3) (4.39 KB, patch)
2021-01-06 00:55 UTC, VVD
no flags Details | Diff
update to last commit on github - fixed build with GraphicsMagick/ImageMagick (v4) (4.44 KB, patch)
2021-01-07 17:30 UTC, VVD
no flags Details | Diff
update to last commit on github - fixed build with GraphicsMagick/ImageMagick (v5) (4.46 KB, patch)
2021-01-07 18:42 UTC, VVD
vvd: maintainer-approval?
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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]
svn-diff-dvdauthor

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:

pre-configure-IMAGEMAGICK-off:
    @${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]
config.log
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.
Comment 6 Chad Jacob Milios 2020-10-01 19:54:07 UTC
i ran into this same error today with IMAGEMAGICK both on or off. (i have both GraphicsMagick-1.3.35,1 and ImageMagick7-7.0.10.24 installed.)

Applying the patch resulted in a completed build with IMAGEMAGICK off, but not on. The same error still occurs when i try to build with IMAGEMAGICK support turned on.
Comment 7 Chad Jacob Milios 2020-10-01 23:00:55 UTC
Created attachment 218457 [details]
svn diff from /usr/ports/multimedia/dvdauthor

includes patch from earlier submission. should now support building and linking against ImageMagick6. see bug #250033 if you like keeping ImageMagick7 installed also like i did
Comment 8 Chad Jacob Milios 2020-10-02 18:38:43 UTC
Created attachment 218473 [details]
svn diff from /usr/ports/multimedia/dvdauthor
Comment 9 VVD 2021-01-04 08:04:42 UTC
Created attachment 221267 [details]
Add possibility to build with and without GraphicsMagick and with ImageMagick7 installed

It's hack, but detecting *Magick is very ugly in dvdauthor.

AFAIU, this bug is fixed in upstream already, but there is no new version yet. So 2nd option is update port to github commit.
Comment 10 VVD 2021-01-05 15:56:42 UTC
Created attachment 221291 [details]
update to last commit on github - fixed build with GraphicsMagick/ImageMagick

I have question about version of this port - what is better version name?
Comment 11 VVD 2021-01-06 00:55:43 UTC
Created attachment 221313 [details]
update to last commit on github - fixed build with GraphicsMagick/ImageMagick (v3)

PORTVERSION=0.7.2.20190419
It's date of the last commit.
Comment 12 VVD 2021-01-07 17:30:23 UTC
Created attachment 221356 [details]
update to last commit on github - fixed build with GraphicsMagick/ImageMagick (v4)
Comment 13 Tobias C. Berner freebsd_committer 2021-01-07 18:25:33 UTC
Moin moin 

It seems there is a missing depndency:

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  -I/usr/local/include/fribidi  -I/usr/local/include -I/usr/local/include/freetype2  -DLIBICONV_PLUG -isystem /usr/local/include -Wall -O2 -pipe -march=znver1  -DLIBICONV_PLUG -fstack-protector-strong -isystem /usr/local/include -fno-strict-aliasing  -MT dvdcompile.o -MD -MP -MF .deps/dvdcompile.Tpo -c -o dvdcompile.o dvdcompile.c
flex -s -B -Cem -odvdvml.c -Pdvdvm dvdvml.l
bison -o dvdvmy.c -d -p dvdvm dvdvmy.y
gmake[3]: bison: No such file or directory
gmake[3]: *** [Makefile:908: dvdvmy.h] Error 127
gmake[3]: *** Waiting for unfinished jobs....



mfg Tobias
Comment 14 VVD 2021-01-07 18:42:51 UTC
Created attachment 221363 [details]
update to last commit on github - fixed build with GraphicsMagick/ImageMagick (v5)

USES=bison:alias
Comment 15 commit-hook freebsd_committer 2021-01-09 10:50:18 UTC
A commit references this bug:

Author: tcberner
Date: Sat Jan  9 10:49:28 UTC 2021
New revision: 560847
URL: https://svnweb.freebsd.org/changeset/ports/560847

Log:
  multimedia/dvdauthor: Fails to build if GraphicsMagick is installed

  Switch to using latest commit from github. The handling of the image magic dependency has been
  improved in [1] in 2017, but the software has not seen a release since.

  [1] https://github.com/ldo/dvdauthor/commit/a0d57bebb3a5d7259a0508a07a898cfe044155a1

  PR:		240270
  Submitted by:	VVD <vvd@unislabs.com>
  Reported by:	Ting-Wei Lan <lantw44@gmail.com>

Changes:
  head/multimedia/dvdauthor/Makefile
  head/multimedia/dvdauthor/distinfo
  head/multimedia/dvdauthor/pkg-descr
  head/multimedia/dvdauthor/pkg-plist
Comment 16 VVD 2021-01-09 12:20:48 UTC
Ting-Wei Lan, you can test and close this PR.