Bug 238664 - graphics/lightzone: Update to 4.1.9
Summary: graphics/lightzone: Update to 4.1.9
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Yuri Victorovich
URL: https://github.com/ktgw0316/LightZone...
Keywords: needs-patch
Depends on:
Blocks:
 
Reported: 2019-06-17 12:31 UTC by Jan Beich
Modified: 2023-08-07 17:19 UTC (History)
2 users (show)

See Also:
jbeich: maintainer-feedback? (yuri)


Attachments
WIP.patch (15.37 KB, patch)
2023-08-07 17:18 UTC, Yuri Victorovich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer freebsd_triage 2019-06-17 12:31:11 UTC
Upstream fix is https://github.com/ktgw0316/LightZone/commit/376ec67ddfb1

$ echo "DEFAULT_VERSIONS += gcc=9" >>/etc/make.conf
$ make
[...]
     [exec] -----> Entering dcraw
     [exec] gcc9 -c -g -march=pentium4 -mtune=generic -march=pentium4 -msse2 -mfpmath=sse -fPIC -O3 -fno-trapping-math -fomit-frame-pointer -fopenmp -Wno-unused-result  -DNODEPS -DLIGHTZONE -Dfgetc=getc_unlocked   dcraw_lz.c
     [exec] dcraw_lz.c: In function 'vng_interpolate':
     [exec] dcraw_lz.c:4543:10: warning: assignment to 'short unsigned int (*)[4]' from incompatible pointer type 'short unsigned int *' [-Wincompatible-pointer-types]
     [exec]  4543 |   rowtmp = (ushort*)malloc(4 * width * 4 * sizeof(ushort));
     [exec]       |          ^
     [exec] dcraw_lz.c: In function 'wavelet_denoise':
     [exec] dcraw_lz.c:4170:32: error: 'noise' not specified in enclosing 'parallel'
     [exec]  4170 |       thold = threshold * noise[lev];
     [exec]       |                           ~~~~~^~~~~
     [exec] dcraw_lz.c:4149:13: error: enclosing 'parallel'
     [exec]  4149 |     #pragma omp parallel for    \
     [exec]       |             ^~~
     [exec] dcraw_lz.c: In function 'xtrans_interpolate':
     [exec] dcraw_lz.c:4846:19: error: 'orth' not specified in enclosing 'parallel'
     [exec]  4846 |  if (fcol(row+orth[d],col+orth[d+2]) == 1) ng=0; else ng++;
     [exec]       |               ~~~~^~~
     [exec] dcraw_lz.c:4757:31: note: in definition of macro 'fcol'
     [exec]  4757 | #define fcol(row,col) xtrans[(row+6) % 6][(col+6) % 6]
     [exec]       |                               ^~~
     [exec] dcraw_lz.c:4827:9: error: enclosing 'parallel'
     [exec]  4827 | #pragma omp parallel default (none)   \
     [exec]       |         ^~~
     [exec] dcraw_lz.c:4849:25: error: 'patt' not specified in enclosing 'parallel'
     [exec]  4849 |    v = orth[d  ]*patt[g][c*2] + orth[d+1]*patt[g][c*2+1];
     [exec]       |                  ~~~~~~~^~~~~
     [exec] dcraw_lz.c:4827:9: error: enclosing 'parallel'
     [exec]  4827 | #pragma omp parallel default (none)   \
     [exec]       |         ^~~
     [exec] dcraw_lz.c:5021:7: error: 'dir' not specified in enclosing 'parallel'
     [exec]  5021 |  f=dir[d & 3];
     [exec]       |    ~~~^~~~~~~
     [exec] dcraw_lz.c:4827:9: error: enclosing 'parallel'
     [exec]  4827 | #pragma omp parallel default (none)   \
     [exec]       |         ^~~

http://pb2.nyi.freebsd.org/data/120i386-default-PR238330/2019-06-09_20h27m22s/logs/errors/lightzone-4.1.8.3_3.log
http://package18.nyi.freebsd.org/data/120amd64-default-PR238330/2019-06-09_20h26m27s/logs/errors/lightzone-4.1.8.3_3.log
Comment 1 Jan Beich freebsd_committer freebsd_triage 2019-06-25 13:48:57 UTC
Yuri, can you update the port to 4.1.9 or later?
Comment 2 commit-hook freebsd_committer freebsd_triage 2019-07-03 10:45:44 UTC
A commit references this bug:

Author: tobik
Date: Wed Jul  3 10:44:41 UTC 2019
New revision: 505744
URL: https://svnweb.freebsd.org/changeset/ports/505744

Log:
  graphics/lightzone: Fix build with GCC 9

  - Apply upstream commit 376ec67ddfb1 to update bundled dcraw to 9.28

  [...]
  [exec] -----> Entering dcraw
  [exec] gcc9 -c -g -march=pentium4 -mtune=generic -march=pentium4 -msse2 -mfpmath=sse -fPIC -O3 -fno-trapping-math -fomit-frame-pointer -fopenmp -Wno-unused-result  -DNODEPS -DLIGHTZONE -Dfgetc=getc_unlocked   dcraw_lz.c
  [exec] dcraw_lz.c: In function 'vng_interpolate':
  [exec] dcraw_lz.c:4543:10: warning: assignment to 'short unsigned int (*)[4]' from incompatible pointer type 'short unsigned int *' [-Wincompatible-pointer-types]
  [exec]  4543 |   rowtmp = (ushort*)malloc(4 * width * 4 * sizeof(ushort));
  [exec]       |          ^
  [exec] dcraw_lz.c: In function 'wavelet_denoise':
  [exec] dcraw_lz.c:4170:32: error: 'noise' not specified in enclosing 'parallel'
  [exec]  4170 |       thold = threshold * noise[lev];
  [exec]       |                           ~~~~~^~~~~
  [exec] dcraw_lz.c:4149:13: error: enclosing 'parallel'
  [exec]  4149 |     #pragma omp parallel for    \
  [exec]       |             ^~~
  [exec] dcraw_lz.c: In function 'xtrans_interpolate':
  [exec] dcraw_lz.c:4846:19: error: 'orth' not specified in enclosing 'parallel'
  [exec]  4846 |  if (fcol(row+orth[d],col+orth[d+2]) == 1) ng=0; else ng++;
  [exec]       |               ~~~~^~~
  [exec] dcraw_lz.c:4757:31: note: in definition of macro 'fcol'
  [exec]  4757 | #define fcol(row,col) xtrans[(row+6) % 6][(col+6) % 6]
  [exec]       |                               ^~~
  [exec] dcraw_lz.c:4827:9: error: enclosing 'parallel'
  [exec]  4827 | #pragma omp parallel default (none)   \
  [exec]       |         ^~~
  [exec] dcraw_lz.c:4849:25: error: 'patt' not specified in enclosing 'parallel'
  [exec]  4849 |    v = orth[d  ]*patt[g][c*2] + orth[d+1]*patt[g][c*2+1];
  [exec]       |                  ~~~~~~~^~~~~
  [exec] dcraw_lz.c:4827:9: error: enclosing 'parallel'
  [exec]  4827 | #pragma omp parallel default (none)   \
  [exec]       |         ^~~
  [exec] dcraw_lz.c:5021:7: error: 'dir' not specified in enclosing 'parallel'
  [exec]  5021 |  f=dir[d & 3];
  [exec]       |    ~~~^~~~~~~
  [exec] dcraw_lz.c:4827:9: error: enclosing 'parallel'
  [exec]  4827 | #pragma omp parallel default (none)   \
  [exec]       |         ^~~

  http://package18.nyi.freebsd.org/data/120amd64-default-PR238330/2019-06-09_20h26m27s/logs/errors/lightzone-4.1.8.3_3.log

  PR:		238664
  Reported by:	antoine (via exp-run in PR 238330)
  Submitted by:	jbeich
  Approved by:	yuri (maintainer timeout, 2 weeks)

Changes:
  head/graphics/lightzone/Makefile
  head/graphics/lightzone/distinfo
Comment 3 Tobias Kortkamp freebsd_committer freebsd_triage 2019-07-03 10:47:58 UTC
Applied the upstream commit.  Leaving this PR open to track progress
of update to 4.1.9.

The port compiles with different -march values on different machines.
The binary package from https://pkg.FreeBSD.org is probably useless
or broken on some machines.
Comment 4 kunda 2023-07-25 22:39:33 UTC
Any possibility of bumping to v4.2.4  
https://github.com/ktgw0316/LightZone/releases/tag/4.2.4
Comment 5 Yuri Victorovich freebsd_committer freebsd_triage 2023-08-07 17:18:39 UTC
Created attachment 243940 [details]
WIP.patch

The build downloads files during build.

Pending response from the upstream on how to avoid downloads and use pre-downloaded files.