Bug 248894 - audio/codec2: Fails to build after ports r546107 error: "<malloc.h> has been replaced by <stdlib.h>"
Summary: audio/codec2: Fails to build after ports r546107 error: "<malloc.h> has been ...
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Many People
Assignee: hamradio (Nobody)
URL: https://svnweb.freebsd.org/ports/head...
Keywords: regression
Depends on:
Reported: 2020-08-24 22:00 UTC by VVD
Modified: 2020-08-26 05:41 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (hamradio)
vvd: maintainer-feedback? (db)
koobs: merge-quarterly-

A quick patch to fix compiling. (894 bytes, patch)
2020-08-25 21:15 UTC, Eric Camachat
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description VVD 2020-08-24 22:00:53 UTC
12.1 amd64.

FAILED: src/CMakeFiles/codec2.dir/freedv_api.c.o 
/usr/bin/cc -DHORUS_L2_RX -DINTERLEAVER -DSCRAMBLER -Dcodec2_EXPORTS -I. -I/tmp/work/usr/ports/audio/codec2/work/codec2-0.8.1/src -O2 -pipe -march=core2  -fstack-protector-strong -fno-strict-aliasing -Wall -g -O3 -fPIC -O2 -pipe -march=core2  -fstack-protector-strong -fno-strict-aliasing -Wall -g -O3 -fPIC -MD -MT src/CMakeFiles/codec2.dir/freedv_api.c.o -MF src/CMakeFiles/codec2.dir/freedv_api.c.o.d -o src/CMakeFiles/codec2.dir/freedv_api.c.o -c /tmp/work/usr/ports/audio/codec2/work/codec2-0.8.1/src/freedv_api.c
In file included from /tmp/work/usr/ports/audio/codec2/work/codec2-0.8.1/src/freedv_api.c:39:
/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.

This patch broke the build:

This commit:
Comment 1 Eric Camachat 2020-08-25 21:15:19 UTC
Created attachment 217527 [details]
A quick patch to fix compiling.
Comment 2 commit-hook freebsd_committer 2020-08-25 23:28:23 UTC
A commit references this bug:

Author: db
Date: Tue Aug 25 23:27:41 UTC 2020
New revision: 546241
URL: https://svnweb.freebsd.org/changeset/ports/546241

  Thanks to Dima Panov <fluffy@FreeBSD.org> for pointing out it was
  older compilers not clang 11 failing this. *sigh*

  PR:		ports/248894
  Submitted by:	vvd@unislabs.com

Comment 3 VVD 2020-08-26 05:41:44 UTC
Build fine now.