Bug 246351 - devel/gmake 4.3 does not build on stable/12 armv7
Summary: devel/gmake 4.3 does not build on stable/12 armv7
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: arm Any
: --- Affects Only Me
Assignee: Tijl Coosemans
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-05-10 07:26 UTC by Herbert J. Skuhra
Modified: 2020-05-10 12:11 UTC (History)
1 user (show)

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


Attachments
config.log (30.94 KB, application/gzip)
2020-05-10 09:36 UTC, Herbert J. Skuhra
no flags Details
patch (1013 bytes, patch)
2020-05-10 10:58 UTC, Tijl Coosemans
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Herbert J. Skuhra 2020-05-10 07:26:50 UTC
The build of devel/make 4.3 fails on my Raspberry Pi 2B which runs 12.1-STABLE armv7 (r360560):

1.

src/job.c:507:15: warning: implicit declaration of function 'siggetmask' is invalid in C99 [-Wimplicit-function-declaration]
  sigsetmask (siggetmask (0) & ~fatal_signal_mask)
              ^
src/job.c:507:51: error: expected ';' after expression
  sigsetmask (siggetmask (0) & ~fatal_signal_mask)
                                                  ^
                                                  ;
If I add the missing ";" in job.c I get

2. 

--- make ---
cc  -O -pipe  -fstack-protector-strong -fno-strict-aliasing -Wl,--export-dynamic -fstack-protector-strong -o make src/ar.o src/arscan.o  src/commands.o src/default.o src/dir.o  src/expand.o src/file.o src/function.o  src/getopt.o src/getopt1.o src/guile.o  src/hash.o src/implicit.o src/job.o  src/load.o src/loadapi.o src/main.o  src/misc.o src/output.o src/read.o  src/remake.o src/rule.o src/signame.o  src/strcache.o src/variable.o  src/version.o src/vpath.o  src/posixos.o   src/remote-stub.o   lib/libgnu.a   /usr/local/lib/libintl.so -Wl,-rpath -Wl,/usr/local/lib 
ld: error: undefined symbol: siggetmask

The build succeeds without the line "#define HAVE_SIGSETMASK 1" in src/config.h.

No issues on my RPI3 (aarch64).
Comment 1 Herbert J. Skuhra 2020-05-10 07:53:48 UTC
In the meantime I use the below patch:

===================================================================
--- devel/gmake/Makefile        (revision 534817)
+++ devel/gmake/Makefile        (working copy)
@@ -18,8 +18,11 @@
 
 GNU_CONFIGURE= yes
 CONFIGURE_ARGS=        --program-prefix=g \
-               --without-guile
+               --without-guile \
+               ${CONFIGURE_ARGS_${ARCH}}
 
+CONFIGURE_ARGS_armv7+=ac_cv_func_sigsetmask=no
+
 USES=          cpe tar:lz
 CPE_VENDOR=    gnu
Comment 2 Tijl Coosemans freebsd_committer freebsd_triage 2020-05-10 09:06:48 UTC
Can you attach a config.log?  That code should not be used at all.  It should use the sigprocmask code.
Comment 3 Herbert J. Skuhra 2020-05-10 09:36:22 UTC
Created attachment 214341 [details]
config.log

Gzipped config.log attached.
Comment 4 Tijl Coosemans freebsd_committer freebsd_triage 2020-05-10 10:58:12 UTC
Created attachment 214346 [details]
patch

Can you try this patch?
Comment 5 Herbert J. Skuhra 2020-05-10 11:45:33 UTC
Yes, patch works for me! Thanks.
Comment 6 commit-hook freebsd_committer freebsd_triage 2020-05-10 11:52:22 UTC
A commit references this bug:

Author: tijl
Date: Sun May 10 11:51:32 UTC 2020
New revision: 534846
URL: https://svnweb.freebsd.org/changeset/ports/534846

Log:
  Fix build on arm.

  PR:		246351
  Reported by:	Herbert J. Skuhra <herbert@mailbox.org>

Changes:
  head/devel/gmake/files/patch-src-makeint.h
Comment 7 Andrew "RhodiumToad" Gierth 2020-05-10 12:11:10 UTC
(In reply to Tijl Coosemans from comment #4)

I also just ran into this issue, and that patch works for me at least to the extent of building gmake and half a dozen gmake-dependent ports (with -j4).