Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 132793 - speex doesn't build on ALT platforms due to unconditionally including malloc.h
Summary: speex doesn't build on ALT platforms due to unconditionally including malloc.h
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All FreeBSD
: High trivial (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-05-09 07:28 UTC by Alex Unleashed
Modified: 2006-05-12 14:06 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
Kill #include <malloc.h> in libspeex/kiss_fft.h (speex-1.1.12-fix-malloc.h.patch,337 bytes, patch)
2006-05-09 07:30 UTC, Alex Unleashed
Details | Diff
Modify speex 1.1.12 ebuild to patch the sources with previous patch (speex-1.1.12.ebuild.addmalloc.h.patch,382 bytes, patch)
2006-05-09 07:32 UTC, Alex Unleashed
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Unleashed 2006-05-09 07:28:27 UTC
speex does not build in platforms where malloc.h is a trap, like FreeBSD. Currently, in speex 1.1.12, only one file does include it, having included stdlib.h previously. A straightforward fix is to kill just the line including malloc.h in libspeex/kiss_fft.h, which should have zero impact on other platforms.

Steps to reproduce:

1. emerge speex in any BSD-like C library, in which malloc.h is a trap.

Actual results:

emerge failed to compile with an #error popping up from <malloc.h>:

i686-gentoo-freebsd6.0-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../include -I.. -I/usr/include -march=athlon-xp -O -pipe -O3 -msse -MT fftwrap.lo -MD -MP -MF .deps/fftwrap.Tpo -c fftwrap.c  -fPIC -DPIC -o .libs/fftwrap.o
In file included from kiss_fft.h:8,
                 from kiss_fftr.h:4,
                 from fftwrap.c:134:
/usr/include/malloc.h:3:2: #error "<malloc.h> has been replaced by <stdlib.h>"
gmake[2]: *** [fftwrap.lo] Error 1

Expected results:

emerge compiling without problems the package.

Build & Platform:

speex 1.1.12 using gcc 3.4.6-r1 on Gentoo/FreeBSD

emerge info:

Gentoo Base System version 20060420
Portage 2.1_pre10-r4 (default-bsd/fbsd/6.1/x86, gcc-, freebsd-lib-6.0-r3, 6.0-RELEASE i386)
=================================================================
System uname: 6.0-RELEASE i386 i386
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.18
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r2
sys-devel/libtool:   1.5.22
virtual/os-headers:  6.0-r3
ACCEPT_KEYWORDS="x86-fbsd ~x86-fbsd"
AUTOCLEAN="yes"
CBUILD="i686-gentoo-freebsd6.0"
CFLAGS="-march=athlon-xp -O -pipe"
CHOST="i686-gentoo-freebsd6.0"
CONFIG_PROTECT="/etc /usr/kde/2/share/config /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/kde/3/share/config /usr/share/X11/xkb /usr/share/config /var/qmail/control"
CONFIG_PROTECT_MASK="/etc/eselect/compiler /etc/gconf /etc/revdep-rebuild /etc/terminfo /etc/env.d"
CXXFLAGS="-march=athlon-xp -O -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig collision-protect distlocks metadata-transfer sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage/portage-alt-overlay"
SYNC="rsync://192.168.2.1/gentoo-portage"
USE="x86-fbsd 3dnow X bash-completion cscope cups dri ffmpeg flac gdbm gif jpeg kde mailwrapper mmx mp3 ncurses ogg oss pam perl png python readline ruby speex sse sse2 ssl tcpd theora truetype usb vorbis xcomposite xine xml xv zeroconf zlib elibc_FreeBSD input_devices_keyboard input_devices_mouse input_devices_joystick kernel_FreeBSD userland_BSD video_cards_nvidia video_cards_nv"
Unset:  ASFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Alex Unleashed 2006-05-09 07:30:30 UTC
Created attachment 86481 [details, diff]
Kill #include <malloc.h> in libspeex/kiss_fft.h
Comment 2 Alex Unleashed 2006-05-09 07:32:10 UTC
Created attachment 86482 [details, diff]
Modify speex 1.1.12 ebuild to patch the sources with previous patch
Comment 3 Diego Elio Pettenò (RETIRED) gentoo-dev 2006-05-12 14:06:05 UTC
Thanks for the patch, added now and keyworded.