Bug 235123

Summary: net/openmpi: Includes malloc.h which we flag as "ERROR" (on FreeBSD 12.0)
Product: Ports & Packages Reporter: dgilbert
Component: Individual Port(s)Assignee: Danilo Egea Gondolfo <danilo>
Status: Closed Not Enough Information    
Severity: Affects Some People Keywords: needs-qa
Priority: --- Flags: bugzilla: maintainer-feedback? (danilo)
koobs: merge-quarterly?
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
patch to remove malloc.h include. none

Description dgilbert 2019-01-22 13:41:13 UTC
Created attachment 201328 [details]
patch to remove malloc.h include.

I don't know if this is the "blessed" way.  Obviously this is part of the port's autoconfig machinery, but including malloc.h is now an error and this patch makes it work on 12.
Comment 1 Kubilay Kocak freebsd_committer freebsd_triage 2019-01-22 13:47:51 UTC
@dgilbert Could you include an example of the build failure, as an attachment please
Comment 2 dgilbert 2019-01-23 01:24:12 UTC
I shouldn't really need to.  Including malloc.h is an error in 12.0.  As an example of this...:

[1:116:416]dgilbert@canoe:~> echo "#include <malloc.h>" >foo.c
[1:117:417]dgilbert@canoe:~> cc -o foo.o foo.c
In file included from foo.c:1:
/usr/include/malloc.h:3:2: error: "<malloc.h> has been replaced by <stdlib.h>"
#error "<malloc.h> has been replaced by <stdlib.h>"
 ^
1 error generated.
[1:118:418]dgilbert@canoe:~> uname -a
FreeBSD canoe.dclg.ca 12.0-RELEASE-p2 FreeBSD 12.0-RELEASE-p2 r342929 GENERIC  amd64

... any include of malloc.h is an ERROR on 12.x FreeBSD.  This patch stops the port from including malloc.h.  The only discussion that need be had is _how_ you stop malloc from being included.  My solution is just to delete the #include ... but there may be a more elegant way to do it.
Comment 3 Danilo Egea Gondolfo freebsd_committer freebsd_triage 2019-01-27 22:27:57 UTC
Hello, I'm planning to update net/openmpi to OpenMPI 4.0. OpenMPI 1.x is retired now and unmaintained. Are you getting this error when build with VampirTrace enable? VT was deprecated also.
Comment 4 dgilbert 2019-01-28 03:08:04 UTC
I was actually trying to build FreeCAD.  I might have turned on some
options somewhere, but this was being pulled in during the FreeCAD
install.  I don't know if I care about OpenMPI itself ... not sure what
"it" is without googling.
Comment 5 Danilo Egea Gondolfo freebsd_committer freebsd_triage 2020-04-21 19:43:27 UTC
Closing as I couldn't reproduce the issue and net/openmpi was upgraded to version 4.