Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 253012 - openjpeg-1.3 malloc fails
Summary: openjpeg-1.3 malloc fails
Status: RESOLVED FIXED
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: FreeBSD (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo/BSD Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-29 16:58 UTC by Dan Coats
Modified: 2009-04-26 21:03 UTC (History)
0 users

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


Attachments
openjpeg-1.3-malloc.patch (openjpeg-1.3-malloc.patch,598 bytes, patch)
2009-01-14 15:53 UTC, Dan Coats
Details | Diff
ebuild to apply the patch (openjpeg-1.3.ebuild,1.39 KB, text/plain)
2009-01-14 15:55 UTC, Dan Coats
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dan Coats 2008-12-29 16:58:39 UTC
malloc.h:3:2: error: #error "<malloc.h> has been replaced by <stdlib.h>"

Reproducible: Always

Steps to Reproduce:
1.emerge -1av =media-libs/openjpeg-1.3
2.
3.

Actual Results:  
>>> Unpacking source...
>>> Unpacking openjpeg_v1_3.tar.gz to /var/tmp/portage/media-libs/openjpeg-1.3/work
 [32;01m*[0m Applying openjpeg-1.2-Makefile.patch ...
[A[132C  [34;01m[ [32;01mok[34;01m ][0m
>>> Source unpacked.
>>> Compiling source in /var/tmp/portage/media-libs/openjpeg-1.3/work/OpenJPEG_v1_3 ...
gmake -j1 CC=i686-gentoo-freebsd6.2-gcc AR=i686-gentoo-freebsd6.2-ar 'COMPILERFLAGS=-O2 -mtune=i686 -pipe -std=c99 -fPIC' 
i686-gentoo-freebsd6.2-gcc -O2 -mtune=i686 -pipe -std=c99 -fPIC -Ilibopenjpeg -c libopenjpeg/bio.c -o libopenjpeg/bio.o
In file included from libopenjpeg/opj_malloc.h:80,
                 from libopenjpeg/opj_includes.h:104,
                 from libopenjpeg/bio.c:32:
/usr/include/malloc.h:3:2: error: #error "<malloc.h> has been replaced by <stdlib.h>"
gmake: *** [libopenjpeg/bio.o] Error 1
 [31;01m*[0m 
 [31;01m*[0m ERROR: media-libs/openjpeg-1.3 failed.
 [31;01m*[0m Call stack:
 [31;01m*[0m               ebuild.sh, line   49:  Called src_compile
 [31;01m*[0m             environment, line 2036:  Called die
 [31;01m*[0m The specific snippet of code:
 [31;01m*[0m       emake CC="$(tc-getCC)" AR="$(tc-getAR)" COMPILERFLAGS="${CFLAGS} -std=c99 -fPIC" || die "emake failed";
 [31;01m*[0m  The die message:
 [31;01m*[0m   emake failed
 [31;01m*[0m 
 [31;01m*[0m If you need support, post the topmost build error, and the call stack if relevant.
 [31;01m*[0m A complete build log is located at '/var/log/portage/media-libs:openjpeg-1.3:20081229-165218.log'.
 [31;01m*[0m The ebuild environment file is located at '/var/tmp/portage/media-libs/openjpeg-1.3/temp/environment'.
 [31;01m*[0m

Expected Results:  
compile and install
Comment 1 Dan Coats 2009-01-14 15:53:10 UTC
Created attachment 178489 [details, diff]
openjpeg-1.3-malloc.patch

here is the patch, please commit
Comment 2 Dan Coats 2009-01-14 15:55:16 UTC
Created attachment 178490 [details]
ebuild to apply the patch
Comment 3 Fabian Groffen gentoo-dev 2009-04-26 20:49:24 UTC
freebsd folks apply this themselves, but it looks like that patch contains garbage to me (empty typo-ed #if):

http://www.freebsd.org/cgi/cvsweb.cgi/ports/graphics/openjpeg/files/patch-opj_malloc.h?rev=1.1

Comment 4 Fabian Groffen gentoo-dev 2009-04-26 21:03:02 UTC
I modified FreeBSD's patch a bit, as I need it for FreeBSD 7.1 with Gentoo Prefix as well.  Committed now in gentoo-x86, thanks!