[Bug 231393] lang/gprolog upgrade to 1.4.5 and fix for gcc8 run failure on FreeBSD11.2S, use clang 6.0.1.

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Sep 16 08:52:02 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=231393

            Bug ID: 231393
           Summary: lang/gprolog upgrade to 1.4.5 and fix for gcc8 run
                    failure on FreeBSD11.2S, use clang 6.0.1.
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Some People
          Priority: ---
         Component: Individual Port(s)
          Assignee: ports-bugs at FreeBSD.org
          Reporter: dewayne at heuristicsystems.com.au

Environment
FreeBSD 11.2-STABLE  r338612M amd64 hqdev-amd64-smp-vga 1102501 1102501
clang 6.0.1 and/or gcc8.2.0 

Suggest that the following changes are made to the Makefile
1. Remove the need for gcc.  As gprolog does NOT work with gcc8, clang 6.0.1 ok
2. Add the requirement to disable-regs for amd64 (already in place for i386)
3. Upgrade the version from 1.4.4 to 1.4.5

1. With gcc8, the package is correctly built, however both
gprolog
gplc $FILE
hang indefinitely. To my pleasant surprise this port works with clang 6.0.1.

2. Without disable-regs, on amd64 we get 
gplc -c -C '-pipe -g0 -fno-math-errno -fomit-frame-pointer -march=haswell -O3
-fno-stack-protector -fno-strict-aliasing' machine.c
receive error messages such as 
cc: error: unknown argument: '-ffixed-r12'
cc: error: unknown argument: '-ffixed-r13'
cc: error: unknown argument: '-ffixed-r14'
cc: error: unknown argument: '-ffixed-r15'

A similar result occurs on i386 (and yes there is a conditional in the Makefile
that sets this, but worth mentioning).

Perhaps an additional test would be in order
.if ${OPSYS} == FreeBSD && ${OSVERSION} > 1102500
CONFIGURE_ARGS+=               --disable-regs
.else
USE_GCC=       any
.endif

I spent a lot of time getting this to work, my Makefile is dotted with comments
otherwise I'd provide a diff.

3. After getting 1.4.4 to work again, I successfully built 1.4.5 with and
without FD.  However with "registers", a compile fails using both clang, refer
to message in point 2 above; while with gcc8 gprolog builds but hangs consuming
100% of a cpu (I suspect a spin lock).  So disable-regs is required.  I don't
have other gcc versions, though 1.4.4 did run successfully with gcc7 on
FreeBSD11.1S around May 2018.

An aside I also tested with cc -Ofast :)  all good; but I suspect that the
option has made no difference. :/

-r-xr-xr-x  1 root  wheel  685248 Sep 16 18:04
/usr/local//gprolog-1.4.5/bin/gprolog # O3
-r-xr-xr-x  1 root  wheel  685248 Sep 16 18:10
/usr/local//gprolog-1.4.5/bin/gprolog # Ofast


and a very simple PROLOG file compiles to 

-rwxr-xr-x  1 root  wheel  751056 Sep 16 17:59 /tmp/a  # O3
-rwxr-xr-x  1 root  wheel  751056 Sep 16 18:11 /tmp/a  # Ofast

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-ports-bugs mailing list