Summary: | third party build fails | ||
---|---|---|---|
Product: | MuPDF | Reporter: | Henry Stiles <henry.stiles> |
Component: | mupdf | Assignee: | Tor Andersson <tor.andersson> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | christinedelight.top85, vincent.torri |
Priority: | P4 | ||
Version: | unspecified | ||
Hardware: | Macintosh | ||
OS: | MacOS X | ||
Customer: | Word Size: | --- |
I can't compile openjpeg out of the box even with Makefile.osx: $ make -f Makefile.osx gcc -O3 -fPIC -Ilibopenjpeg -c libopenjpeg/bio.c -o libopenjpeg/bio.o In file included from libopenjpeg/opj_includes.h:104, from libopenjpeg/bio.c:32: libopenjpeg/opj_malloc.h:80:25: error: malloc.h: No such file or directory I've been reluctant to change the source in mupdf-thirdparty, preferring to keep it pristine so we don't have to keep patching it when we upgrade the packages in it. (In reply to comment #1) > I can't compile openjpeg out of the box even with Makefile.osx: > > $ make -f Makefile.osx > gcc -O3 -fPIC -Ilibopenjpeg -c libopenjpeg/bio.c -o libopenjpeg/bio.o > In file included from libopenjpeg/opj_includes.h:104, > from libopenjpeg/bio.c:32: > libopenjpeg/opj_malloc.h:80:25: error: malloc.h: No such file or directory including malloc.h is usually a bad idea. It's better to include stdlib.h This problem looks like it has been fixed in openjpeg 1.4. |
cc -o build/debug/opj_bio.o -c thirdparty/openjpeg/libopenjpeg/bio.c -Ifitz -Imupdf -Wall -pipe -g -I/usr/X11R6/include -m32 -Ithirdparty/jbig2dec -Ithirdparty/openjpeg/libopenjpeg -Ithirdparty/jpeg -Ithirdparty/zlib -Ithirdparty/freetype/include -DOPJ_STATIC In file included from thirdparty/openjpeg/libopenjpeg/opj_includes.h:104, from thirdparty/openjpeg/libopenjpeg/bio.c:32: thirdparty/openjpeg/libopenjpeg/opj_malloc.h:84:25: error: malloc.h: No such file or directory make: *** [build/debug/opj_bio.o] Error 1 uname -a Darwin henry-stiles2s-macbook-pro.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 the header file malloc.h which can't be found is in /usr/include/malloc/ - note the Makefile.osx makefile distributed with openjpeg compiles the code okay. I temporarily patched the code a follows, after which all was well on my mac diff -r ./libopenjpeg/opj_malloc.h ../../../thirdparty/openjpeg/libopenjpeg/opj_malloc.h 79,80c79,80 < /* #define HAVE_MEMALIGN */ < #include <malloc/malloc.h> --- > #define HAVE_MEMALIGN > #include <malloc.h> but that's a hack for my machine, generally the third party zip should be integrated better with mupdf.