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:
Blocks:
 
Reported: 2020-08-24 22:00 UTC by Vladimir Druzenko
Modified: 2020-08-26 05:41 UTC (History)
2 users (show)

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


Attachments
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 Vladimir Druzenko freebsd_committer freebsd_triage 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:
https://svnweb.freebsd.org/ports/head/audio/codec2/files/patch-src__freedv_api.c?r1=478929&r2=546107

This commit:
https://svnweb.freebsd.org/ports?view=revision&revision=546107
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 freebsd_triage 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

Log:
  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

Changes:
  head/audio/codec2/Makefile
  head/audio/codec2/files/patch-src__freedv_api.c
Comment 3 Vladimir Druzenko freebsd_committer freebsd_triage 2020-08-26 05:41:44 UTC
Build fine now.
Thanks.