Bug 262039 - graphics/jasper: Update to 3.0.2
Summary: graphics/jasper: Update to 3.0.2
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
URL: https://github.com/jasper-software/ja...
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-18 20:00 UTC by Daniel Engberg
Modified: 2022-04-16 20:58 UTC (History)
8 users (show)

See Also:
bugzilla: maintainer-feedback? (sunpoet)


Attachments
Patch for jasper (24.52 KB, patch)
2022-02-18 20:00 UTC, Daniel Engberg
no flags Details | Diff
Log for xv (145.05 KB, text/plain)
2022-02-18 20:02 UTC, Daniel Engberg
no flags Details
Log for netpbm (242.54 KB, text/plain)
2022-02-18 20:02 UTC, Daniel Engberg
no flags Details
Log for qt5-imageformats (105.70 KB, text/plain)
2022-02-18 20:03 UTC, Daniel Engberg
no flags Details
Patch for jasper v2 (4.22 KB, patch)
2022-02-19 00:56 UTC, Daniel Engberg
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Daniel Engberg freebsd_committer freebsd_triage 2022-02-18 20:00:26 UTC
Created attachment 231925 [details]
Patch for jasper

Update jasper to 3.0.2

Compiled tested on FreeBSD 13.0-STABLE #2 stable/13-n248607-93a95ebbf7c (amd64) (make, make check-plist)
Poudriere testport OK 12.3-RELEASE (amd64)

Tested with following users on 12.3-RELEASE (amd64):
comms/xastir
graphics/GraphicsMagick
graphics/aaphoto
graphics/darktable38
graphics/dcraw
graphics/dcraw-m
graphics/devil
graphics/digikam
graphics/gdal
graphics/gegl
graphics/libkdcraw
graphics/netpbm (fails, see log)
graphics/qt5-imageformats (fails, see log)
graphics/simage
graphics/ufraw
graphics/xv (fails, see log)
math/saga
net-im/kopete
print/ghostscript8-base
science/cdo
science/cgribex
Comment 1 Daniel Engberg freebsd_committer freebsd_triage 2022-02-18 20:02:31 UTC
Created attachment 231926 [details]
Log for xv
Comment 2 Daniel Engberg freebsd_committer freebsd_triage 2022-02-18 20:02:56 UTC
Created attachment 231927 [details]
Log for netpbm
Comment 3 Daniel Engberg freebsd_committer freebsd_triage 2022-02-18 20:03:24 UTC
Created attachment 231928 [details]
Log for qt5-imageformats
Comment 4 Tatsuki Makino 2022-02-18 20:43:37 UTC
(In reply to Daniel Engberg from comment #1)

The release notes for 3.0.0 write something like "Merged support for JasPer 3.0.0 into the XV software at:", does this have anything to do with it?
Comment 5 Tatsuki Makino 2022-02-18 20:52:30 UTC
And...
(In reply to Daniel Engberg from comment #0)

There are hashes and sequential numbers in pkg-plist that may be caused by doxygen, so please use PORTDOCS=* to sidestep the creation of pkg-plist :)
Comment 6 Daniel Engberg freebsd_committer freebsd_triage 2022-02-18 20:58:21 UTC
Ahh, I didn't see that fork of xv ( https://github.com/jasper-software/xv ) , good catch!
dinoex ^

The docs list is indeed not ideal, I just made a quick hack to get a build running (which btw takes on 24h on my box) but it should be adjusted.

Best regards,
Daniel
Comment 7 Tatsuki Makino 2022-02-18 21:52:24 UTC
(In reply to Daniel Engberg from comment #6)

Totally unrelated to this, poudriere has been stalling on the following parts of the recent porttree.
(I have contacted the people who committed the changes here.)
If you add it from the side of a running poudriere, it may accelerate next time :)

diff --git a/Mk/Uses/pyqt.mk b/Mk/Uses/pyqt.mk
index 51d41f0b6..602dc0111 100644
--- a/Mk/Uses/pyqt.mk
+++ b/Mk/Uses/pyqt.mk
@@ -174,7 +174,7 @@ post-patch:

 .    if !target(do-build)
 do-build:
-	(cd ${WRKSRC}; ${SIP} ${SIP_ARGS}; ${MAKE} -C ./build)
+	(cd ${WRKSRC}; ${SIP} ${SIP_ARGS}; ${MAKE} ${_MAKE_JOBS} -C ./build)

 .    endif  # !target(do-build)
Comment 8 Daniel Engberg freebsd_committer freebsd_triage 2022-02-19 00:56:32 UTC
Created attachment 231937 [details]
Patch for jasper v2

Add support for unit tests
Use PORTDOCS= * as suggested by Tatsuki Makino

Tested on FreeBSD 13.0-STABLE #2 stable/13-n248607-93a95ebbf7c (amd64) (make test)
Poudriere testport OK 13.0-RELEASE (i386)
Comment 9 Tatsuki Makino 2022-02-19 01:34:33 UTC
(In reply to Daniel Engberg from comment #2)

netpbm-10.91.01/converter/other/jpeg2000/pamtojpeg2k.c doesn't include the header that includes <stddef.h>.
Since jasper uses max_align_t, maybe we should include <stddef.h> on the jasper side.
Comment 10 Tatsuki Makino 2022-03-01 08:03:24 UTC
(In reply to Daniel Engberg from comment #8)

I built jasper-3.0.2 using attachment 231937 [details].
And the subsequent build of netpbm-10.91.01 was completed successfully.

=>> Building graphics/netpbm
build started at Tue Mar  1 07:47:56 UTC 2022
port directory: /usr/ports/graphics/netpbm
package name: netpbm-10.91.01
building for: FreeBSD src-git-job-01 12.3-STABLE FreeBSD 12.3-STABLE 1203506 amd64
Poudriere version: 3.3.7_1
Host OSVERSION: 1203506
Jail OSVERSION: 1203506
Comment 11 Tatsuki Makino 2022-03-01 08:22:22 UTC
And building qt5-imageformats-5.15.2p3 was also successful.

=>> Building graphics/qt5-imageformats
build started at Tue Mar  1 08:06:04 UTC 2022
port directory: /usr/ports/graphics/qt5-imageformats
package name: qt5-imageformats-5.15.2p3
building for: FreeBSD src-git-job-01 12.3-STABLE FreeBSD 12.3-STABLE 1203506 amd64
Poudriere version: 3.3.7_1
Host OSVERSION: 1203506
Jail OSVERSION: 1203506
Comment 12 Daniel Engberg freebsd_committer freebsd_triage 2022-03-01 20:02:15 UTC
Thanks for testing, I'm testing qt5-imageformats again but it needs to rebuild llvm and friends so my box is going to be busy for 12h or so.
Comment 13 Tatsuki Makino 2022-03-02 00:47:45 UTC
(In reply to Daniel Engberg from comment #12)

This is an unrelated piece of information to jasper.
But hopefully, it will accelerate the work of you and others who see this.

Probably the reason you are building llvm now is because llvm has lost python.
The reason why python was lost from llvm is that the readline was updated.
In this case, we can prevent the loss of llvm by building only python first.

poudriere bulk -j jailname -n -f origins-of-commonly-used-packages.txt
# got information about readline updates and the packages that will be delted by them.
poudriere bulk -j jailname -S -f origins-of-commonly-used-packages.txt
# Built only what can be built, ignoring the dependencies of updated packages. 
poudriere bulk -j jailname lang/python39 lang/python38 lang/python27
# Build only python. The resulting python and llvm maintain their dependencies on their own.
poudriere bulk -j jailname -n -f origins-of-commonly-used-packages.txt
# llvm shouldn't need to be built anymore.
Comment 14 Daniel Engberg freebsd_committer freebsd_triage 2022-03-02 08:12:58 UTC
Using a fresh tree qt5-imageformats still fails with the same error as before (12.3-RELEASE)
Comment 15 Daniel Engberg freebsd_committer freebsd_triage 2022-03-02 11:49:34 UTC
graphics/xv is fixed as of 27bea38852a7e0f5af8cdada0437c349e5d0aa57
Comment 16 commit-hook freebsd_committer freebsd_triage 2022-03-02 19:35:53 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2bab44dac97077cf7c47078bc3b41681b19bf9a9

commit 2bab44dac97077cf7c47078bc3b41681b19bf9a9
Author:     Tobias C. Berner <tcberner@FreeBSD.org>
AuthorDate: 2022-03-02 19:27:33 +0000
Commit:     Tobias C. Berner <tcberner@FreeBSD.org>
CommitDate: 2022-03-02 19:34:57 +0000

    graphics/qt5-imageformats: prepare for graphics/jsaper update

    The build fails on FreeBSD 12.3 due to undefined max_align_t:

            In file included from test.cc:2:
            In file included from /usr/local/include/jasper/jasper.h:78:
            In file included from /usr/local/include/jasper/jas_init.h:73:
            In file included from /usr/local/include/jasper/jas_malloc.h:81:
            In file included from /usr/local/include/jasper/jas_thread.h:84:
            In file included from /usr/include/c++/v1/stdlib.h:100:
            In file included from /usr/include/c++/v1/math.h:311:
            In file included from /usr/include/c++/v1/type_traits:417:
            /usr/include/c++/v1/cstddef:55:9: error: expected unqualified-id
            using ::max_align_t;
                    ^

    Include cstddef to make it available.

    PR:             262039

 .../files/patch-src_imageformats_configure.json (new)          | 10 ++++++++++
 1 file changed, 10 insertions(+)
Comment 17 Po-Chuan Hsieh freebsd_committer freebsd_triage 2022-03-03 21:40:42 UTC
This is what I'm using for jasper 3.0.2 update [1].
I got the same 3 failed ports, netpbm, qt5-imageformats and xv.
And I can confirm that qt5-imageformats and xv are fixed now.

A dirty hack for netpbm is to add "typedef __max_align_t max_align_t;" to converter/other/jpeg2000/jpeg2ktopam.c and converter/other/jpeg2000/pamtojpeg2k.c.

[1] https://people.freebsd.org/~sunpoet/patch/graphics-jasper.txt

(In reply to Daniel Engberg from comment #8)

I'll update the patch to add the test part.

(In reply to Tatsuki Makino from comment #9)

In fact, jasper do include stddef.h.
jasper/jasper.h -> jasper/jas_types.h -> stddef.h (max_align_t) -> sys/_types.h (__max_align_t)
Comment 18 Tatsuki Makino 2022-03-03 23:05:41 UTC
(In reply to Po-Chuan Hsieh from comment #17)

I am not sure what is causing this :)

converter/other/jpeg2000/jpeg2ktopam.c has #define _XOPEN_SOURCE 500.
This is downgrading _POSIX_C_SOURCE to 199506.
It further downgrades __ISOC_VISIBLE to 1990.
As a result, it does not pass the max_align_t typedef in stddef.h.
Comment 19 Tatsuki Makino 2022-03-04 05:43:32 UTC
(Continued from comment #18)

The following are different, so the build succeeds with my 12.3-STABLE and fails with 12.3-RELEASE.

https://cgit.freebsd.org/src/tree/sys/sys/cdefs.h?h=releng/12.3#n722
https://cgit.freebsd.org/src/tree/sys/sys/cdefs.h?h=stable/12&id=259bedb8f6dce40fcabf228d2019337f70a60867#n722

__STDC_VERSION__ is also 201112L in llvm 10.0.1 and 201710L in llvm 13.0.0, but both are greater than 201112L, so it doesn't matter.
Comment 20 Vieno Hakkerinen 2022-04-08 20:58:29 UTC
Is there any news here?

I stumbled over missing GLUT libraries as described in https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=262039

Would be nice to have a compiling jasper to continue compiling software that depends on jasper.
Comment 21 Po-Chuan Hsieh freebsd_committer freebsd_triage 2022-04-16 04:38:16 UTC
Update to 3.0.2 in cdcedd316da6d7c8509c394474160c683489a3ae.
graphics/devil (new failure) and graphics/netpbm are fixed.
Thanks!
Comment 22 Vladimir Druzenko freebsd_committer freebsd_triage 2022-04-16 17:03:42 UTC
All LIB_DEPENDS consumers of jasper need bump.
Comment 23 Po-Chuan Hsieh freebsd_committer freebsd_triage 2022-04-16 20:58:02 UTC
(In reply to VVD from comment #22)

You're right. It's done in 735ea04b67c5fe82399afbc9eb1d280d7fd1d7ba. Thanks.