Bug 278621 - graphics/giflib 5.2.2 fails to build
Summary: graphics/giflib 5.2.2 fails to build
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: freebsd-desktop (Team)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-04-27 19:38 UTC by tjlegg
Modified: 2024-04-28 11:55 UTC (History)
8 users (show)

See Also:
vishwin: maintainer-feedback+


Attachments
graphics-giflib-Install-original-giflib-logo.gif.patch (5.97 KB, patch)
2024-04-28 11:52 UTC, Tijl Coosemans
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description tjlegg 2024-04-27 19:38:27 UTC
===>   giflib-5.2.2 depends on file: /usr/local/bin/ccache - found
===>   Returning to build of giflib-5.2.2
===========================================================================
=======================<phase: lib-depends    >============================
===== env: USE_PACKAGE_DEPENDS_ONLY=1 USER=root UID=0 GID=0
===========================================================================
=======================<phase: configure      >============================
===== env: NO_DEPENDS=yes USER=root UID=0 GID=0
===>  Missing "ghead" to create a binary alias at "/wrkdirs/usr/ports/graphics/giflib/work/.bin/head"
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/giflib
=>> Cleaning up wrkdir
===>  Cleaning for giflib-5.2.2
build of graphics/giflib | giflib-5.2.2 ended at Sun Apr 28 03:24:36 HKT 2024
build time: 00:00:34
Comment 1 tjlegg 2024-04-27 20:42:48 UTC
Added BUILD_DEPENDS = coreutils

and

1 warning generated.
1 warning generated.
1 warning generated.
gmake -C doc
gmake[1]: Entering directory '/wrkdirs/usr/ports/graphics/giflib/work/giflib-5.2.2/doc'
convert ../pic/gifgrid.gif -resize 50x50 giflib-logo.gif
gmake[1]: convert: No such file or directory
gmake[1]: *** [Makefile:46: giflib-logo.gif] Error 127
gmake[1]: Leaving directory '/wrkdirs/usr/ports/graphics/giflib/work/giflib-5.2.2/doc'
gmake: *** [Makefile:94: all] Error 2
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/giflib
=>> Cleaning up wrkdir
===>  Cleaning for giflib-5.2.2
build of graphics/giflib | giflib-5.2.2 ended at Sun Apr 28 04:29:24 HKT 2024
build time: 00:00:07
!!! build failure encountered !!!
$ which convert
/usr/local/bin/convert
$ pkg which /usr/local/bin/convert
/usr/local/bin/convert was installed by package ImageMagick7-7.1.1.26_3

Sensing a circular dependency chain.
Comment 2 Florian Walpen 2024-04-27 23:41:32 UTC
I think the source download is missing this commit:

https://sourceforge.net/p/giflib/code/ci/d54b45b0240d455bbaedee4be5203d2703e59967/

My quickfix workaround was to replace `convert` with `cp` in the Makefile, but I suppose the correct fix would be to include the missing commits since release. There's some more build related fixes, didn't check if they are in the source download.
Comment 3 jakub_lach 2024-04-28 04:16:59 UTC
Same here
Comment 4 Charlie Li freebsd_committer freebsd_triage 2024-04-28 04:39:07 UTC
The BINARY_ALIAS oops was fixed in ports 5a022ef6a46f5b3e8d4a9f87151dfea3861c64bb

Since the referenced upstream commit after release adds a non-text file, we will have to manually copy the file into the correct source directory from ${FILESDIR}.
Comment 5 commit-hook freebsd_committer freebsd_triage 2024-04-28 04:58:09 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=5007109903fc271e3ef0ba01d78781c1fed99f3f

commit 5007109903fc271e3ef0ba01d78781c1fed99f3f
Author:     Charlie Li <vishwin@FreeBSD.org>
AuthorDate: 2024-04-28 04:57:21 +0000
Commit:     Charlie Li <vishwin@FreeBSD.org>
CommitDate: 2024-04-28 04:57:21 +0000

    graphics/giflib: avoid build dependency on ImageMagick

    Otherwise build will try to run convert(1) to generate giflib-logo.gif.

    Based on: https://sourceforge.net/p/giflib/code/ci/d54b45b0240d455bbaedee4be5203d2703e59967/

    PR: 278621

 graphics/giflib/Makefile                    |   3 +++
 graphics/giflib/files/giflib-logo.gif (new) | Bin 0 -> 1253 bytes
 2 files changed, 3 insertions(+)
Comment 6 Tijl Coosemans freebsd_committer freebsd_triage 2024-04-28 11:52:39 UTC
Created attachment 250280 [details]
graphics-giflib-Install-original-giflib-logo.gif.patch

Apologies for messing up the update.  Charlie, thanks for fixing the problem.  Is it okay to keep binary files in the ports tree?  With this patch it can be avoided.