Installing GD for PHP, can't compile JPEG libraries on OS X

  • MacLuv
  • Novice
  • Novice
  • MacLuv
  • Posts: 19

Post 3+ Months Ago

Hi, I'm installing GD for PHP on my OS X system which is BSD Unix or whatever... I have a easy to follow guide at this location:

http://www.stepwise.com/Articles/Workbe ... 12.01.html

I'm trying to install the JPEG libraries that I need, but they won't complie on my system. I'm not sure what else I need. Please advise. Here is the code from the terminal window when I run "compile":

Code: [ Select ]
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking how to run the C preprocessor... gcc -E -traditional-cpp
checking for function prototypes... yes
checking for stddef.h... no
checking for stdlib.h... no
checking for string.h... no
checking for size_t... not ANSI, perhaps it is in sys/types.h
checking for sys/types.h... no
no
Type size_t is not defined in any of the usual places.
Try putting "typedef unsigned int size_t;" in jconfig.h.
checking for type unsigned char... yes
checking for type unsigned short... yes
checking for type void... yes
checking for working const... yes
checking for inline... __inline__
checking for broken incomplete types... ok
checking for short external names... ok
checking to see if char is signed... yes
checking to see if right shift is signed... yes
checking to see if fopen accepts b spec... no
checking for a BSD compatible install... /usr/bin/install -c
checking for ranlib... ranlib
checking libjpeg version number... 62
creating ./config.status
creating Makefile
creating jconfig.h
[meowith:/build-gd/jpeg-6b] chocky% make
gcc -O2 -I.  -c -o jcapimin.o jcapimin.c
jinclude.h:46: header file 'stdio.h' not found
jinclude.h:60: header file 'strings.h' not found
jpeglib.h:715: undefined type, found `size_t'
jpeglib.h:727: undefined type, found `size_t'
jpeglib.h:758: undefined type, found `size_t'
jpeglib.h:760: undefined type, found `size_t'
jpeglib.h:900: undefined type, found `size_t'
jpeglib.h:902: undefined type, found `size_t'
jpeglib.h:910: undefined type, found `FILE'
jpeglib.h:911: undefined type, found `FILE'
jpegint.h:378: undefined type, found `size_t'
jcapimin.c:30: undefined type, found `size_t'
jcapimin.c:38: illegal statement, missing `)' after `)'
jcapimin.c:51: illegal function call, found `sizeof'
cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
make: *** [jcapimin.o] Error 1
  1. checking for gcc... gcc
  2. checking whether the C compiler (gcc ) works... yes
  3. checking whether the C compiler (gcc ) is a cross-compiler... no
  4. checking whether we are using GNU C... yes
  5. checking how to run the C preprocessor... gcc -E -traditional-cpp
  6. checking for function prototypes... yes
  7. checking for stddef.h... no
  8. checking for stdlib.h... no
  9. checking for string.h... no
  10. checking for size_t... not ANSI, perhaps it is in sys/types.h
  11. checking for sys/types.h... no
  12. no
  13. Type size_t is not defined in any of the usual places.
  14. Try putting "typedef unsigned int size_t;" in jconfig.h.
  15. checking for type unsigned char... yes
  16. checking for type unsigned short... yes
  17. checking for type void... yes
  18. checking for working const... yes
  19. checking for inline... __inline__
  20. checking for broken incomplete types... ok
  21. checking for short external names... ok
  22. checking to see if char is signed... yes
  23. checking to see if right shift is signed... yes
  24. checking to see if fopen accepts b spec... no
  25. checking for a BSD compatible install... /usr/bin/install -c
  26. checking for ranlib... ranlib
  27. checking libjpeg version number... 62
  28. creating ./config.status
  29. creating Makefile
  30. creating jconfig.h
  31. [meowith:/build-gd/jpeg-6b] chocky% make
  32. gcc -O2 -I.  -c -o jcapimin.o jcapimin.c
  33. jinclude.h:46: header file 'stdio.h' not found
  34. jinclude.h:60: header file 'strings.h' not found
  35. jpeglib.h:715: undefined type, found `size_t'
  36. jpeglib.h:727: undefined type, found `size_t'
  37. jpeglib.h:758: undefined type, found `size_t'
  38. jpeglib.h:760: undefined type, found `size_t'
  39. jpeglib.h:900: undefined type, found `size_t'
  40. jpeglib.h:902: undefined type, found `size_t'
  41. jpeglib.h:910: undefined type, found `FILE'
  42. jpeglib.h:911: undefined type, found `FILE'
  43. jpegint.h:378: undefined type, found `size_t'
  44. jcapimin.c:30: undefined type, found `size_t'
  45. jcapimin.c:38: illegal statement, missing `)' after `)'
  46. jcapimin.c:51: illegal function call, found `sizeof'
  47. cpp-precomp: warning: errors during smart preprocessing, retrying in basic mode
  48. make: *** [jcapimin.o] Error 1


I imagine I need some compiling libraries but I don't know where to start looking or which ones I need. Any help appreciated.

:)
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9101
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

I am not sure if this will help, but you might make sure that you have libstdc++ installed on the system.

http://gcc.gnu.org/libstdc++/

Also I am not sure how old your GCC is, but you might get the latest there too:

http://gcc.gnu.org/

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 13 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.