Bug 232276

Summary: textproc/regex2dfa: fix build with GCC-based architectures
Product: Ports & Packages Reporter: Piotr Kubaj <pkubaj>
Component: Individual Port(s)Assignee: freebsd-ports-bugs (Nobody) <ports-bugs>
Status: Closed FIXED    
Severity: Affects Only Me CC: araujo, beat, egypcio, linimon, rene
Priority: --- Flags: egypcio: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch
none
[PATCH] textproc/regex2dfa: fix build with GCC-based architectures none

Description Piotr Kubaj freebsd_committer freebsd_triage 2018-10-15 09:50:07 UTC
Created attachment 198167 [details]
patch

This patch is necessary to fix build with GCC, which is used by architectures using GCC in base.

Tested on powerpc64 and amd64.

Hardware sponsored by IntegriCloud.
Comment 1 Vinícius Zavam freebsd_committer freebsd_triage 2018-10-15 10:33:19 UTC
Hi Piotr,
thank you for taking time to patch this port!

I'll have a look and should get back to you ASAP. // btw, how did you test it? native hardware or any emulation with QEMU+Poudriere?

if you can host your build/test logs so we all can access it, would be appreciated.

once again: thanks! []
Comment 2 Piotr Kubaj freebsd_committer freebsd_triage 2018-10-15 11:59:49 UTC
(In reply to Vinícius Zavam from comment #1)
I'm build-testing on native powerpc64 (no runtime tests).

I will set up WWW server with Poudriere logs shortly.
Comment 3 Piotr Kubaj freebsd_committer freebsd_triage 2018-10-15 16:28:31 UTC
(In reply to Vinícius Zavam from comment #1)
Have a look at https://talos.anongoth.pl
Comment 4 Piotr Kubaj freebsd_committer freebsd_triage 2018-10-16 17:55:41 UTC
(In reply to Vinícius Zavam from comment #1)
This server is not mine and I don't have physical access to it, so if something breaks and requires physical intervention, I need to wait for IntegriCloud's technician to take care of it. Since I don't pay for it (I got root access for doing open-source stuff), I'm the low priority for their tickets.

Just wanted to clarify if you can't connect now (it crashed, it looks like POWER9 still requires some fixes, this error seems entirely on BMC's side, since not even BMC is available).
Comment 5 Vinícius Zavam freebsd_committer freebsd_triage 2018-10-16 20:18:16 UTC
(In reply to Piotr Kubaj from comment #4)

Hello Piotr,

I did build it under a amd64 machine; with poudriere, using jails.

the patch you sent applied just fine, but I would re-create it from the root of the PORTSDIR. I can do this and attach it here late on (using svn and extra contexts).

was there any other extra modifications you did? any additional make.conf tweaks? I see we do not have USE_GCC on this port's Makefile.
Comment 6 Piotr Kubaj freebsd_committer freebsd_triage 2018-10-16 20:25:56 UTC
(In reply to Vinícius Zavam from comment #5)
Nope, no modifications. Base GCC can compile it just fine with this patch, so there's no reason to use ports GCC.
Comment 7 Vinícius Zavam freebsd_committer freebsd_triage 2018-10-17 13:09:44 UTC
(In reply to Piotr Kubaj from comment #6)

gcc is no longer in base for amd64; that's also why I would need to check the logs again. I ran it with native clang to see if nothing broke, and went fine.

what I can do is to patch this file only for ppc64 (sounds reasonable, right?).
Comment 8 Piotr Kubaj freebsd_committer freebsd_triage 2018-10-17 13:16:51 UTC
(In reply to Vinícius Zavam from comment #7)
No problem, I can give you logs once I get my POWER server online (which doesn't depend on me).

It's not only powerpc64 that is problematic here, this error will happen on every architecture that uses base GCC (so also powerpc, powerpcspe, sparc64, mips and mips64).
Comment 9 Vinícius Zavam freebsd_committer freebsd_triage 2018-10-17 16:09:14 UTC
Created attachment 198274 [details]
[PATCH] textproc/regex2dfa: fix build with GCC-based architectures


recreated the patch, from PORTSDIR;
also changed the new added patch with `svn propset svn:keywords FreeBSD=%H`.
Comment 11 Vinícius Zavam freebsd_committer freebsd_triage 2018-10-19 14:03:40 UTC
(In reply to Piotr Kubaj from comment #10)

many thanks! appreciated your time and concern on this one.

I should just discuss with my mentors if I can commit it directly, or if we are missing any additional QA for the patch.

[]
Comment 12 Rene Ladan freebsd_committer freebsd_triage 2018-10-21 11:34:29 UTC
Vinícius: the patch looks good to me, and survives some simple build tests.
Comment 13 commit-hook freebsd_committer freebsd_triage 2018-10-23 12:33:54 UTC
A commit references this bug:

Author: egypcio
Date: Tue Oct 23 12:32:59 UTC 2018
New revision: 482835
URL: https://svnweb.freebsd.org/changeset/ports/482835

Log:
  fix build with GCC-based architectures.

   prior to this patch, some archs still using GCC could not compile the port;
   tested on powerpc64 (sponsored hardware);
   also tested on other archs to check if nothing broke.

   * original patch modified just to bump PORTREVISION, and use PORTSDIR root.

  PR:             232276
  Submitted by:   Piotr Kubaj <pkubaj@anongoth.pl>
  Approved by:    rene (mentor)
  Sponsored by:   IntegriCloud

Changes:
  head/textproc/regex2dfa/Makefile
  head/textproc/regex2dfa/files/
  head/textproc/regex2dfa/files/patch-third__party_openfst_src_include_fst_replace.h
Comment 14 Vinícius Zavam freebsd_committer freebsd_triage 2018-10-23 12:36:52 UTC
committed with minor changes, as described in the commit log (used my patch, but credit goes to the author of this PR. tyvm).

thank you both! appreciated :)