Bug 243616

Summary: deskutils/cfiles : Fails to build on FreeBSD 12.1-RELEASE-p1 powerpc 32 bit:error: 'for' loop initial declaration used outside C99 mode
Product: Ports & Packages Reporter: canardo <canardo909>
Component: Individual Port(s)Assignee: Yuri Victorovich <yuri>
Status: Closed FIXED    
Severity: Affects Only Me CC: danfe, pkubaj, powerpc, w.schwarzenfeld
Priority: ---    
Version: Latest   
Hardware: powerpc   
OS: Any   
URL: https://github.com/mananapr/cfiles/issues/51

Description canardo 2020-01-26 16:00:39 UTC
Problem found when building deskutils/cfiles on FreeBSD 12.1-RELEASE-p1 powerpc 32 bit, running on Apple Powerbook 17".



/usr/ports/deskutils/cfiles # make -DBATCH install clean
===>  License MIT accepted by the user
===>   cfiles-1.8_1 depends on file: /usr/local/sbin/pkg - found
===> Fetching all distfiles required by cfiles-1.8_1 for building
===>  Extracting for cfiles-1.8_1
=> SHA256 Checksum OK for mananapr-cfiles-v1.8_GH0.tar.gz.
===>  Patching for cfiles-1.8_1
===>  Applying FreeBSD patches for cfiles-1.8_1
===>   cfiles-1.8_1 depends on file: /usr/local/lib/libncurses.so.6 - found
===>   cfiles-1.8_1 depends on package: pkgconf>=1.3.0_1 - found
===>  Configuring for cfiles-1.8_1
===>  Building for cfiles-1.8_1
cc -O2 -pipe  -fstack-protector-strong -fno-strict-aliasing  `pkg-config --cflags ncursesw` cf.c -o cfiles  `pkg-config --libs ncursesw`
cf.c: In function 'replace':
cf.c:592: error: 'for' loop initial declaration used outside C99 mode
*** [all] Error code 1

make[1]: stopped in /usr/ports/deskutils/cfiles/work/cfiles-1.8
1 error

make[1]: stopped in /usr/ports/deskutils/cfiles/work/cfiles-1.8
===> 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/deskutils/cfiles
Comment 1 Piotr Kubaj freebsd_committer freebsd_triage 2020-01-31 16:12:50 UTC
This port needs textproc/fzf, which uses go to build. Go is not available for powerpc.
Comment 2 Alexey Dokuchaev freebsd_committer freebsd_triage 2020-02-01 01:40:59 UTC
(In reply to Piotr Kubaj from comment #1)
> This port needs textproc/fzf
It's just a run-time dependency.  Looking at the COMMENT, the port is a file manager, and textproc/fzf is one of the external tools it uses.  It has nothing to do with the build.
Comment 3 Yuri Victorovich freebsd_committer freebsd_triage 2020-02-01 01:56:30 UTC
I reported it upstream.
Comment 4 commit-hook freebsd_committer freebsd_triage 2020-05-25 16:49:51 UTC
A commit references this bug:

Author: yuri
Date: Mon May 25 16:49:14 UTC 2020
New revision: 536477
URL: https://svnweb.freebsd.org/changeset/ports/536477

Log:
  deskutils/cfiles: Update 1.8 -> 1.8-6

  Attempt to fix the powerpc 32 build failure from bug#243616
  based on the upstream comment https://github.com/mananapr/cfiles/issues/51#issuecomment-633644871

  PR:		243616

Changes:
  head/deskutils/cfiles/Makefile
  head/deskutils/cfiles/distinfo
Comment 5 Yuri Victorovich freebsd_committer freebsd_triage 2020-05-25 16:50:10 UTC
Hi canardo,

Please let me know if the latest commit fixed the problem.

Thanks,
Yuri
Comment 6 canardo 2020-05-27 20:02:13 UTC
(In reply to Yuri Victorovich from comment #5)

Hi Yuri,

It seems some new dependencies have been added :

# cd /usr/ports/deskutils/cfiles/
# make -DBATCH install clean
===>  Staging for cfiles-1.8.6
===>   cfiles-1.8.6 depends on file: /usr/local/libexec/w3m/w3mimgdisplay - found
===>   cfiles-1.8.6 depends on executable: atool - found
===>   cfiles-1.8.6 depends on executable: bash - found
===>   cfiles-1.8.6 depends on executable: fzf - not found
===>   fzf-0.19.0 depends on file: /usr/local/bin/go - not found
===>  go-1.14.3,1 is only for aarch64 amd64 armv6 armv7 i386, while you are
running powerpc.
*** Error code 1

Stop.
make[2]: stopped in /usr/ports/lang/go
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/textproc/fzf
*** Error code 1

Stop.
make: stopped in /usr/ports/deskutils/cfiles


Maybe someone else using a different arch can test it.

Don't worry about cfiles for me, I can live without it, especially since there's a hardware problem on my Powerbook. I might not be able to test powerpc builds anymore.
Comment 7 Yuri Victorovich freebsd_committer freebsd_triage 2020-05-27 20:52:36 UTC
Fix committed.

Removed the runtime dependency on textproc/fzf on powerpc because Go isn't available on powerpc.

Thanks for reporting the problem!
Comment 8 commit-hook freebsd_committer freebsd_triage 2020-05-27 20:53:04 UTC
A commit references this bug:

Author: yuri
Date: Wed May 27 20:52:31 UTC 2020
New revision: 536718
URL: https://svnweb.freebsd.org/changeset/ports/536718

Log:
  deskutils/cfiles: Remove the runtime dependency on textproc/fzf on powerpc because Go isn't available on powerpc

  PR:		243616
  Reported by:	canardo909@gmx.com

Changes:
  head/deskutils/cfiles/Makefile
Comment 9 commit-hook freebsd_committer freebsd_triage 2020-05-27 21:43:12 UTC
A commit references this bug:

Author: yuri
Date: Wed May 27 21:42:14 UTC 2020
New revision: 536721
URL: https://svnweb.freebsd.org/changeset/ports/536721

Log:
  deskutils/cfiles: Make runtime dependency on textproc/fzf depend on the hard-coded golang ARCH availability

  PR:		243616

Changes:
  head/deskutils/cfiles/Makefile
Comment 10 canardo 2020-05-28 09:44:44 UTC
I managed to build the last version of my faulty hardware : works ok !


===>  Installing for cfiles-1.8.6_2
===>  Checking if cfiles is already installed
===>   Registering installation for cfiles-1.8.6_2
Installing cfiles-1.8.6_2...
===>  Cleaning for w3m-img-0.5.3.20200316
===>  Cleaning for poppler-utils-0.88.0
===>  Cleaning for cfiles-1.8.6_2
Comment 11 Yuri Victorovich freebsd_committer freebsd_triage 2020-05-28 16:20:37 UTC
(In reply to canardo from comment #10)

Cool!