Jose M Lechon
Jose M Lechon

Reputation: 5896

mupdf limits.h: No such file or directory in mac os x

I'm trying to compile the mupdf project for using it in a android application. I have done all the steps until arrive the point where I have to compile the "generated" folder in my S.O. I'm using Mac Os 10.7.5. The problem comes when I try to do "make" in the top folder of the project, and I always get the same error.

  CC build/debug/ft_ftbase.o
In file included from thirdparty/freetype-2.4.10/include/freetype/config/ftstdlib.h:60,
                 from thirdparty/freetype-2.4.10/include/freetype/config/ftconfig.h:43,
                 from thirdparty/freetype-2.4.10/include/freetype/freetype.h:33,
                 from thirdparty/freetype-2.4.10/src/base/ftpic.c:20,
                 from thirdparty/freetype-2.4.10/src/base/ftbase.c:23:
/Developer/usr/bin/../lib/gcc/i686-apple-darwin9/4.2.1/include/limits.h:10:25: error: limits.h: No such file or directory
In file included from thirdparty/freetype-2.4.10/include/freetype/config/ftconfig.h:43,
                 from thirdparty/freetype-2.4.10/include/freetype/freetype.h:33,
                 from thirdparty/freetype-2.4.10/src/base/ftpic.c:20,
                 from thirdparty/freetype-2.4.10/src/base/ftbase.c:23:
thirdparty/freetype-2.4.10/include/freetype/config/ftstdlib.h:77:20: error: string.h: No such file or directory
thirdparty/freetype-2.4.10/include/freetype/config/ftstdlib.h:101:19: error: stdio.h: No such file or directory
thirdparty/freetype-2.4.10/include/freetype/config/ftstdlib.h:119:20: error: stdlib.h: No such file or directory
thirdparty/freetype-2.4.10/include/freetype/config/ftstdlib.h:155:20: error: setjmp.h: No such file or directory
In file included from thirdparty/freetype-2.4.10/include/freetype/freetype.h:33,
thirdparty/freetype-2.4.10/include/freetype/config/ftconfig.h:127:19: error: errno.h: No such file or directory
In file included from thirdparty/freetype-2.4.10/src/base/ftbase.c:28:
thirdparty/freetype-2.4.10/src/base/ftgloadr.c: In function ‘FT_GlyphLoader_CheckPoints’:
thirdparty/freetype-2.4.10/src/base/ftgloadr.c:234: warning: implicit declaration of function ‘memmove’
thirdparty/freetype-2.4.10/src/base/ftgloadr.c:234: warning: incompatible implicit declaration of built-in function ‘memmove’
thirdparty/freetype-2.4.10/src/base/ftgloadr.c: In function ‘FT_GlyphLoader_CopyPoints’:
thirdparty/freetype-2.4.10/src/base/ftgloadr.c:375: warning: implicit declaration of function ‘memcpy’
thirdparty/freetype-2.4.10/src/base/ftgloadr.c:375: warning: incompatible implicit declaration of built-in function ‘memcpy’
In file included from thirdparty/freetype-2.4.10/src/base/ftobjs.c:22,
  from thirdparty/freetype-2.4.10/src/base/ftbase.c:29:
thirdparty/freetype-2.4.10/include/freetype/internal/ftvalid.h: At top level:
thirdparty/freetype-2.4.10/include/freetype/internal/ftvalid.h:87: error: expected specifier-qualifier-list before ‘jmp_buf’
In file included from thirdparty/freetype-2.4.10/src/base/ftbase.c:29:
thirdparty/freetype-2.4.10/src/base/ftobjs.c: In function ‘ft_service_list_lookup’:
thirdparty/freetype-2.4.10/src/base/ftobjs.c:58: warning: implicit declaration of function ‘strcmp’
thirdparty/freetype-2.4.10/src/base/ftobjs.c: In function ‘ft_validator_error’:
thirdparty/freetype-2.4.10/src/base/ftobjs.c:100: error: nested functions are disabled, use -fnested-functions to re-enable
thirdparty/freetype-2.4.10/src/base/ftobjs.c:100: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘*’ token
thirdparty/freetype-2.4.10/src/base/ftobjs.c:100: error: ‘jump_buffer’ undeclared (first use in this function)
thirdparty/freetype-2.4.10/src/base/ftobjs.c:100: error: (Each undeclared identifier is reported only once
thirdparty/freetype-2.4.10/src/base/ftobjs.c:100: error: for each function it appears in.)
thirdparty/freetype-2.4.10/src/base/ftobjs.c:100: error: ‘volatile struct FT_ValidatorRec_’ has no member named ‘jump_buffer’
thirdparty/freetype-2.4.10/src/base/ftobjs.c:107: warning: implicit declaration of function ‘longjmp’
thirdparty/freetype-2.4.10/src/base/ftobjs.c:107: error: ‘jmp_buf’ undeclared (first use in this function)
thirdparty/freetype-2.4.10/src/base/ftobjs.c:107: error: expected expression before ‘)’ token
thirdparty/freetype-2.4.10/src/base/ftobjs.c: In function ‘ft_glyphslot_clear’:
thirdparty/freetype-2.4.10/src/base/ftobjs.c:319: warning: implicit declaration of function ‘memset’
thirdparty/freetype-2.4.10/src/base/ftobjs.c:319: warning: incompatible implicit declaration of built-in function ‘memset’
thirdparty/freetype-2.4.10/src/base/ftobjs.c: In function ‘FT_Request_Metrics’:
thirdparty/freetype-2.4.10/src/base/ftobjs.c:2737: warning: incompatible implicit declaration of built-in function ‘memset’
In file included from thirdparty/freetype-2.4.10/src/base/ftbase.c:30:
thirdparty/freetype-2.4.10/src/base/ftoutln.c: In function ‘FT_Outline_Copy’:
thirdparty/freetype-2.4.10/src/base/ftoutln.c:404: warning: incompatible implicit declaration of built-in function ‘memcpy’
In file included from thirdparty/freetype-2.4.10/src/base/ftbase.c:31:
thirdparty/freetype-2.4.10/src/base/ftrfork.c: In function ‘FT_Raccess_Get_DataOffsets’:
thirdparty/freetype-2.4.10/src/base/ftrfork.c:213: warning: implicit declaration of function ‘qsort’
thirdparty/freetype-2.4.10/src/base/ftrfork.c: In function ‘raccess_guess_darwin_hfsplus’:
thirdparty/freetype-2.4.10/src/base/ftrfork.c:510: warning: implicit declaration of function ‘strlen’
thirdparty/freetype-2.4.10/src/base/ftrfork.c:510: warning: incompatible implicit declaration of built-in function ‘strlen’
thirdparty/freetype-2.4.10/src/base/ftrfork.c:523: warning: incompatible implicit declaration of built-in function ‘memcpy’
thirdparty/freetype-2.4.10/src/base/ftrfork.c: In function ‘raccess_guess_darwin_newvfs’:
thirdparty/freetype-2.4.10/src/base/ftrfork.c:546: warning: incompatible implicit declaration of built-in function ‘strlen’
thirdparty/freetype-2.4.10/src/base/ftrfork.c:559: warning: incompatible implicit declaration of built-in function ‘memcpy’
thirdparty/freetype-2.4.10/src/base/ftrfork.c: In function ‘raccess_make_file_name’:
thirdparty/freetype-2.4.10/src/base/ftrfork.c:791: warning: incompatible implicit declaration of built-in function ‘strlen’
thirdparty/freetype-2.4.10/src/base/ftrfork.c:795: warning: implicit declaration of function ‘strrchr’
thirdparty/freetype-2.4.10/src/base/ftrfork.c:795: warning: incompatible implicit declaration of built-in function ‘strrchr’
thirdparty/freetype-2.4.10/src/base/ftrfork.c:798: warning: implicit declaration of function ‘strncpy’
thirdparty/freetype-2.4.10/src/base/ftrfork.c:798: warning: incompatible implicit declaration of built-in function ‘strncpy’
thirdparty/freetype-2.4.10/src/base/ftrfork.c:808: warning: implicit declaration of function ‘strcat’
thirdparty/freetype-2.4.10/src/base/ftrfork.c:808: warning: incompatible implicit declaration of built-in function ‘strcat’
In file included from thirdparty/freetype-2.4.10/src/base/ftbase.c:33:
thirdparty/freetype-2.4.10/src/base/ftstream.c: In function ‘FT_Stream_ReadAt’:
thirdparty/freetype-2.4.10/src/base/ftstream.c:145: warning: incompatible implicit declaration of built-in function ‘memcpy’
thirdparty/freetype-2.4.10/src/base/ftstream.c: In function ‘FT_Stream_TryRead’:
thirdparty/freetype-2.4.10/src/base/ftstream.c:182: warning: incompatible implicit declaration of built-in function ‘memcpy’
thirdparty/freetype-2.4.10/src/base/ftstream.c: In function ‘FT_Stream_ReadFields’:
thirdparty/freetype-2.4.10/src/base/ftstream.c:770: warning: incompatible implicit declaration of built-in function ‘memcpy’
In file included from thirdparty/freetype-2.4.10/src/base/ftbase.c:35:
thirdparty/freetype-2.4.10/src/base/ftutil.c: In function ‘ft_mem_alloc’:
thirdparty/freetype-2.4.10/src/base/ftutil.c:58: warning: incompatible implicit declaration of built-in function ‘memset’
thirdparty/freetype-2.4.10/src/base/ftutil.c: In function ‘ft_mem_realloc’:
thirdparty/freetype-2.4.10/src/base/ftutil.c:104: warning: incompatible implicit declaration of built-in function ‘memset’
thirdparty/freetype-2.4.10/src/base/ftutil.c: In function ‘ft_mem_dup’:
thirdparty/freetype-2.4.10/src/base/ftutil.c:186: warning: incompatible implicit declaration of built-in function ‘memcpy’
thirdparty/freetype-2.4.10/src/base/ftutil.c: In function ‘ft_mem_strdup’:
thirdparty/freetype-2.4.10/src/base/ftutil.c:198: warning: incompatible implicit declaration of built-in function ‘strlen’
make: *** [build/debug/ft_ftbase.o] Error 1

I don't know what I can do because I have the "limits.h" file and the others that the compiler says that do not appear.

Thanks

Upvotes: 0

Views: 1883

Answers (1)

KenS
KenS

Reputation: 31199

Have you checked the location "/Developer/usr/bin/../lib/gcc/i686-apple-darwin9/4.2.1/include" to see if limits.h is present in that folder ? (I know you say you have the file, but where is it installed ?)

Our suspicion is that your gcc installation is broken, or that (possibly) there is some kind of path problem, given that the .h files which can't be found are system files, not part of MuPDF or the 3rd party libraries.

FWIW the lead developer of MuPDF does all his Android development work on a Mac, so we are pretty sure it works without any extra steps when installing gcc or MuPDF.

Upvotes: 2

Related Questions