Build fails as follows: gmake -j5 Scanning dependencies of target openjpeg [ 2%] [ 5%] [ 7%] Building C object libopenjpeg/CMakeFiles/openjpeg.dir/cio.c.o Building C object libopenjpeg/CMakeFiles/openjpeg.dir/dwt.c.o [ 10%] Building C object libopenjpeg/CMakeFiles/openjpeg.dir/event.c.o Building C object libopenjpeg/CMakeFiles/openjpeg.dir/bio.c.o [ 13%] Building C object libopenjpeg/CMakeFiles/openjpeg.dir/image.c.o In file included from /var/tmp/portage/media-libs/openjpeg-1.5.0/work/openjpeg-1.5.0/libopenjpeg/opj_malloc.h:89:0, from /var/tmp/portage/media-libs/openjpeg-1.5.0/work/openjpeg-1.5.0/libopenjpeg/opj_includes.h:108, from /var/tmp/portage/media-libs/openjpeg-1.5.0/work/openjpeg-1.5.0/libopenjpeg/cio.c:32: /usr/include/malloc.h:3:2: error: #error "<malloc.h> has been replaced by <stdlib.h>" In file included from /var/tmp/portage/media-libs/openjpeg-1.5.0/work/openjpeg-1.5.0/libopenjpeg/opj_malloc.h:89:0, from /var/tmp/portage/media-libs/openjpeg-1.5.0/work/openjpeg-1.5.0/libopenjpeg/opj_includes.h:108, from /var/tmp/portage/media-libs/openjpeg-1.5.0/work/openjpeg-1.5.0/libopenjpeg/dwt.c:38: /usr/include/malloc.h:3:2: error: #error "<malloc.h> has been replaced by <stdlib.h>" In file included from /var/tmp/portage/media-libs/openjpeg-1.5.0/work/openjpeg-1.5.0/libopenjpeg/opj_malloc.h:89:0, from /var/tmp/portage/media-libs/openjpeg-1.5.0/work/openjpeg-1.5.0/libopenjpeg/opj_includes.h:108, from /var/tmp/portage/media-libs/openjpeg-1.5.0/work/openjpeg-1.5.0/libopenjpeg/image.c:27: /usr/include/malloc.h:3:2: error: #error "<malloc.h> has been replaced by <stdlib.h>" gmake[2]: *** [libopenjpeg/CMakeFiles/openjpeg.dir/dwt.c.o] Error 1 gmake[2]: *** Waiting for unfinished jobs.... gmake[2]: *** [libopenjpeg/CMakeFiles/openjpeg.dir/cio.c.o] Error 1 gmake[2]: *** [libopenjpeg/CMakeFiles/openjpeg.dir/image.c.o] Error 1 In file included from /var/tmp/portage/media-libs/openjpeg-1.5.0/work/openjpeg-1.5.0/libopenjpeg/opj_malloc.h:89:0, from /var/tmp/portage/media-libs/openjpeg-1.5.0/work/openjpeg-1.5.0/libopenjpeg/opj_includes.h:108, from /var/tmp/portage/media-libs/openjpeg-1.5.0/work/openjpeg-1.5.0/libopenjpeg/event.c:27: /usr/include/malloc.h:3:2: error: #error "<malloc.h> has been replaced by <stdlib.h>" In file included from /var/tmp/portage/media-libs/openjpeg-1.5.0/work/openjpeg-1.5.0/libopenjpeg/opj_malloc.h:89:0, from /var/tmp/portage/media-libs/openjpeg-1.5.0/work/openjpeg-1.5.0/libopenjpeg/opj_includes.h:108, from /var/tmp/portage/media-libs/openjpeg-1.5.0/work/openjpeg-1.5.0/libopenjpeg/bio.c:32: /usr/include/malloc.h:3:2: error: #error "<malloc.h> has been replaced by <stdlib.h>" gmake[2]: *** [libopenjpeg/CMakeFiles/openjpeg.dir/event.c.o] Error 1 gmake[2]: *** [libopenjpeg/CMakeFiles/openjpeg.dir/bio.c.o] Error 1 gmake[1]: *** [libopenjpeg/CMakeFiles/openjpeg.dir/all] Error 2 gmake: *** [all] Error 2 A modified version of this patch fixes build on Gentoo/FreeBSD: http://sources.gentoo.org/cgi-bin/viewvc.cgi/gentoo-x86/media-libs/openjpeg/files/openjpeg-1.3-freebsd.patch?r1=text&r2=text&tr1=1.1&tr2=1.1&view=patch
Created attachment 310719 [details, diff] patch
G/FBSD is dead.