joaquimrocha / Skeltrack

A Free Software skeleton tracking library
GNU Lesser General Public License v3.0
294 stars 63 forks source link

Does not compile on Mac OSx #13

Open golgobot opened 11 years ago

golgobot commented 11 years ago

Running

./autogen.sh --enable-examples=yes --enable-gtk-doc

and then configure

./configure --enable-examples=yes --enable-gtk-doc

Both output incorrect options according to the arguments supplied. The configuration always says build examples: no

Skeltrack 0.1.10
   =====================

              Install prefix:   /usr/local
    Build introspection data:   yes
     Build API documentation:   yes
           Enable debug mode:   no
      Enable automated tests:   yes
              Build examples:   no

and then when I run make, the compiler complains of multiple syntax errors.

make
(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /Users/jonathan/workspaces/native/Skeltrack/missing autoheader)
rm -f stamp-h1
touch config.h.in
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
make  all-recursive
Making all in skeltrack
  CC       libskeltrack-0.1_la-skeltrack-joint.lo
  CC       libskeltrack-0.1_la-skeltrack-skeleton.lo
  CC       libskeltrack-0.1_la-skeltrack-smooth.lo
  CC       libskeltrack-0.1_la-skeltrack-util.lo
  CCLD     libskeltrack-0.1.la
  GISCAN Skeltrack-0.1.gir
/usr/lib/clang/4.2/include/stddef.h:31: syntax error, unexpected '(' in 'typedef __typeof__(((int*)0)-((int*)0)) ptrdiff_t;' at '('
/usr/lib/clang/4.2/include/stddef.h:35: syntax error, unexpected SIZEOF in 'typedef __typeof__(sizeof(int)) size_t;' at 'sizeof'
/usr/include/time.h:131: syntax error, unexpected identifier in 'size_t strftime(char * restrict, size_t, const char * restrict, const struct tm * restrict) __asm("_" "strftime" );' at 'size_t'
/usr/include/time.h:131: syntax error, unexpected ',', expecting identifier or '(' in 'size_t strftime(char * restrict, size_t, const char * restrict, const struct tm * restrict) __asm("_" "strftime" );' at ','
/usr/include/time.h:131: syntax error, unexpected ',', expecting identifier or '(' in 'size_t strftime(char * restrict, size_t, const char * restrict, const struct tm * restrict) __asm("_" "strftime" );' at ','
/usr/include/time.h:131: syntax error, unexpected ')', expecting identifier or '(' in 'size_t strftime(char * restrict, size_t, const char * restrict, const struct tm * restrict) __asm("_" "strftime" );' at ')'
/usr/include/pthread.h:256: syntax error, unexpected identifier in '                                      size_t * restrict);' at 'size_t'
/usr/include/pthread.h:265: syntax error, unexpected identifier in '                                      void ** restrict, size_t * restrict);' at 'size_t'
/usr/include/pthread.h:269: syntax error, unexpected identifier in '                                      size_t * restrict);' at 'size_t'
/usr/include/pthread.h:273: syntax error, unexpected identifier in 'int pthread_attr_setguardsize(pthread_attr_t *, size_t );' at 'size_t'
/usr/include/pthread.h:282: syntax error, unexpected identifier in '                                      void *, size_t );' at 'size_t'
/usr/include/pthread.h:285: syntax error, unexpected identifier in 'int pthread_attr_setstacksize(pthread_attr_t *, size_t );' at 'size_t'
/usr/include/pthread.h:377: syntax error, unexpected identifier in 'int pthread_getname_np(pthread_t,char*,size_t) __attribute__((availability(macosx,introduced=10.6)));' at 'size_t'
/usr/include/pthread.h:384: syntax error, unexpected identifier in 'size_t pthread_get_stacksize_np(pthread_t);' at 'size_t'
/usr/include/unistd.h:478: syntax error, unexpected identifier in 'char *getcwd(char *, size_t);' at 'size_t'
/usr/include/unistd.h:501: syntax error, unexpected identifier in 'ssize_t read(int, void *, size_t) __asm("_" "read" );' at 'size_t'
/usr/include/unistd.h:518: syntax error, unexpected identifier in 'int ttyname_r(int, char *, size_t) __asm("_" "ttyname_r" );' at 'size_t'
/usr/include/unistd.h:525: syntax error, unexpected identifier in 'ssize_t write(int, const void *, size_t) __asm("_" "write" );' at 'size_t'
/usr/include/unistd.h:603: syntax error, unexpected identifier in 'ssize_t pread(int, void *, size_t, off_t) __asm("_" "pread" );' at 'size_t'
/usr/include/unistd.h:605: syntax error, unexpected identifier in 'ssize_t pwrite(int, const void *, size_t, off_t) __asm("_" "pwrite" );' at 'size_t'
/usr/include/unistd.h:635: syntax error, unexpected identifier in 'int getlogin_r(char *, size_t);' at 'size_t'
/usr/include/unistd.h:649: syntax error, unexpected identifier in 'int gethostname(char *, size_t);' at 'size_t'
/usr/include/unistd.h:650: syntax error, unexpected identifier in 'ssize_t readlink(const char * restrict, char * restrict, size_t);' at 'size_t'
/usr/include/unistd.h:681: syntax error, unexpected identifier in 'int accessx_np(const struct accessx_descriptor *, size_t, int *, uid_t);' at 'size_t'
/usr/include/unistd.h:683: syntax error, unexpected identifier in 'int add_profil(char *, size_t, unsigned long, unsigned int);' at 'size_t'
/usr/include/unistd.h:706: syntax error, unexpected identifier in 'int profil(char *, size_t, unsigned long, unsigned int);' at 'size_t'
/usr/include/unistd.h:746: syntax error, unexpected identifier in 'int fgetattrlist(int,void*,void*,size_t,unsigned int) __attribute__((availability(macosx,introduced=10.6)));' at 'size_t'
/usr/include/unistd.h:747: syntax error, unexpected identifier in 'int fsetattrlist(int,void*,void*,size_t,unsigned int) __attribute__((availability(macosx,introduced=10.6)));' at 'size_t'
/usr/include/unistd.h:748: syntax error, unexpected identifier in 'int getattrlist(const char*,void*,void*,size_t,unsigned int) __asm("_" "getattrlist" );' at 'size_t'
/usr/include/unistd.h:749: syntax error, unexpected identifier in 'int setattrlist(const char*,void*,void*,size_t,unsigned int) __asm("_" "setattrlist" );' at 'size_t'
/usr/include/unistd.h:751: syntax error, unexpected identifier in 'int getdirentriesattr(int,void*,void*,size_t,unsigned int*,unsigned int*,unsigned int*,unsigned int);' at 'size_t'
/usr/include/unistd.h:751: syntax error, unexpected ',', expecting identifier or '(' in 'int getdirentriesattr(int,void*,void*,size_t,unsigned int*,unsigned int*,unsigned int*,unsigned int);' at ','
/usr/include/unistd.h:751: syntax error, unexpected ',', expecting identifier or '(' in 'int getdirentriesattr(int,void*,void*,size_t,unsigned int*,unsigned int*,unsigned int*,unsigned int);' at ','
/usr/include/unistd.h:751: syntax error, unexpected ',', expecting identifier or '(' in 'int getdirentriesattr(int,void*,void*,size_t,unsigned int*,unsigned int*,unsigned int*,unsigned int);' at ','
skeltrack-skeleton.c:182: Warning: Skeltrack: missing ':' at column 43:
   * SkeltrackSkeleton:dimension-reduction
                                          ^
skeltrack-skeleton.c:199: Warning: Skeltrack: missing ':' at column 48:
   * SkeltrackSkeleton:graph-distance-threshold
                                               ^
skeltrack-skeleton.c:218: Warning: Skeltrack: missing ':' at column 50:
   * SkeltrackSkeleton:graph-minimum-number-nodes
                                                 ^
skeltrack-skeleton.c:236: Warning: Skeltrack: missing ':' at column 46:
   * SkeltrackSkeleton:hands-minimum-distance
                                             ^
skeltrack-skeleton.c:256: Warning: Skeltrack: missing ':' at column 54:
   * SkeltrackSkeleton:shoulders-circumference-radius
                                                     ^
skeltrack-skeleton.c:275: Warning: Skeltrack: missing ':' at column 49:
   * SkeltrackSkeleton:shoulders-arc-start-point
                                                ^
skeltrack-skeleton.c:298: Warning: Skeltrack: missing ':' at column 44:
   * SkeltrackSkeleton:shoulders-arc-length
                                           ^
skeltrack-skeleton.c:320: Warning: Skeltrack: missing ':' at column 45:
   * SkeltrackSkeleton:shoulders-search-step
                                            ^
skeltrack-skeleton.c:339: Warning: Skeltrack: missing ':' at column 40:
   * SkeltrackSkeleton:smoothing-factor
                                       ^
skeltrack-skeleton.c:359: Warning: Skeltrack: missing ':' at column 42:
   * SkeltrackSkeleton:joints-persistency
                                         ^
skeltrack-skeleton.c:381: Warning: Skeltrack: missing ':' at column 40:
   * SkeltrackSkeleton:enable-smoothing
                                       ^
skeltrack-skeleton.c:397: Warning: Skeltrack: missing ':' at column 51:
    * SkeltrackSkeleton:torso-minimum-number-nodes
                                                  ^
skeltrack-skeleton.c:416: Warning: Skeltrack: missing ':' at column 45:
   * SkeltrackSkeleton:extrema-sphere-radius
                                            ^
skeltrack-skeleton.c:1829: Warning: Skeltrack: multiple comment blocks documenting 'skeltrack_skeleton_set_focus_point:' identifier.
ERROR: can't resolve libraries to shared libraries: m
make[2]: *** [Skeltrack-0.1.gir] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2
joaquimrocha commented 11 years ago

Seems like it cannot find the libraries needed but for some reason ./configure didn't complain... weird...

golgobot commented 11 years ago

Which libs is it missing?

golgobot commented 11 years ago

Btw, here is the output from autogen.sh

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-apple-darwin12.2.0
checking host system type... x86_64-apple-darwin12.2.0
checking how to print strings... printf
checking for style of include used by make... GNU
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld
checking if the linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /opt/local/bin/nm
checking the name lister (/opt/local/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-apple-darwin12.2.0 file names to x86_64-apple-darwin12.2.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin12.2.0 file names to toolchain format... func_convert_file_noop
checking for /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /opt/local/bin/nm output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin12.2.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking dependency style of gcc... (cached) gcc3
checking whether gcc and cc understand -c and -o together... yes
checking for pkg-config... /opt/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for GLIB... yes
checking for EXAMPLES_DEPS... no
checking for gobject-introspection... yes
checking for gtkdoc-check... /opt/local/bin/gtkdoc-check
checking for gtkdoc-rebase... /opt/local/bin/gtkdoc-rebase
checking for gtkdoc-mkpdf... /opt/local/bin/gtkdoc-mkpdf
checking whether to build gtk-doc documentation... no
checking whether make supports nested variables... (cached) yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating skeltrack/Makefile
config.status: creating skeltrack/skeltrack-0.1.pc
config.status: creating doc/Makefile
config.status: creating doc/reference/Makefile
config.status: creating examples/Makefile
config.status: creating tests/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands

   Skeltrack 0.1.10
   =====================

              Install prefix:   /usr/local
    Build introspection data:   yes
     Build API documentation:   no
           Enable debug mode:   no
      Enable automated tests:   yes
              Build examples:   no
joaquimrocha commented 11 years ago

Right. Again it seems to me that some basic libs are not found or not the same version... However, I am sorry but I can't really figure out how to fix that without a Mac (I don't own one).

iaguis commented 11 years ago

Because of

checking for EXAMPLES_DEPS... no

you're at least missing one of these libraries:

gfreeect version >= 0.1.4
clutter-1.0 version >= 1.8.4
cairo version >= 1.10.2
golgobot commented 11 years ago

Well, I installed those libraries that were missing, and the autogen now says build examples: yes, but I still get the same compilation error.

/usr/lib/clang/4.2/include/stddef.h:31: syntax error, unexpected...

What's weird is that the errors are in clang, pthread etc. I have the latest version of everything, so I'm not sure what to do at this point.

wonkim commented 11 years ago

I encountered similar issue when I built Wireshark from Mac OS X. Please use /usr/include as default include path such as "export C_INCLUDE_PATH=/usr/include". And, need to undef BLOCKS such as "-UBLOCKS" to do not use Objective-C blocks from header files.