Thank you for the generous and extensive help, Peter. I checked the files and usr/include/machine/_structs.h was corrupt. After removing it and creating a new using the info you posted about the 2nd usr/include/machine/_structs.h:
> 28 #if defined (__ppc__) || defined (__ppc64__) > 29 #include "ppc/_structs.h" > 30 #elif defined (__i386__) || defined (__x86_64__) > 31 #include "i386/_structs.h" > 32 #elif defined (__arm__) > 33 #include "arm/_structs.h" > 34 #else > 35 #error architecture not supported > 36 #endif the whole installation ran perfectly :-) Thanks again, Addie On Dec 30, 2014, at 12:13 PM, Peter Dyballa wrote: > > Am 30.12.2014 um 07:37 schrieb Adlai Burman: > >> /usr/include/sys/_structs.h:57:30: error: /usr/include/machine/_structs.h: >> Input/output error > > This is the first error. On my Snow Leopard system I have: > > 56 #if defined(__need_struct_mcontext) || defined(__need_struct_mcontext64) > 57 #include <machine/_structs.h> > 58 #endif /* __need_struct_mcontext || __need_struct_mcontext64 */ > >> In file included from /usr/include/sys/signal.h:154, >> from /usr/include/sys/wait.h:116, >> from /usr/include/stdlib.h:65, >> from conftest.c:62: >> /usr/include/sys/_structs.h:135: error: expected specifier-qualifier-list >> before '_STRUCT_MCONTEXT' > > The second error presumingly is caused by the first one, not finding the C > header file <machine/_structs.h>, which stands for > /usr/include/machine/_structs.h. There I have: > > 120 #ifdef __need_struct_ucontext > 121 #undef __need_struct_ucontext > 122 #ifndef _STRUCT_UCONTEXT > 123 #if __DARWIN_UNIX03 > 124 #define _STRUCT_UCONTEXT struct __darwin_ucontext > 125 #else /* !__DARWIN_UNIX03 */ > 126 #define _STRUCT_UCONTEXT struct ucontext > 127 #endif /* __DARWIN_UNIX03 */ > 128 _STRUCT_UCONTEXT > 129 { > 130 int uc_onstack; > 131 __darwin_sigset_t uc_sigmask; /* signal mask used by > this context */ > 132 _STRUCT_SIGALTSTACK uc_stack; /* stack used by this > context */ > 133 _STRUCT_UCONTEXT *uc_link; /* pointer to resuming > context */ > 134 __darwin_size_t uc_mcsize; /* size of the machine > context passed in */ > 135 _STRUCT_MCONTEXT *uc_mcontext; /* pointer to machine > specific context */ > 136 #ifdef _XOPEN_SOURCE > 137 _STRUCT_MCONTEXT __mcontext_data; > 138 #endif /* _XOPEN_SOURCE */ > 139 }; > 140 #endif /* _STRUCT_UCONTEXT */ > 141 #endif /* __need_struct_ucontext */ > > In my /usr/include/machine/_structs.h I have simply > > 28 #if defined (__ppc__) || defined (__ppc64__) > 29 #include "ppc/_structs.h" > 30 #elif defined (__i386__) || defined (__x86_64__) > 31 #include "i386/_structs.h" > 32 #elif defined (__arm__) > 33 #include "arm/_structs.h" > 34 #else > 35 #error architecture not supported > 36 #endif > > So it just helps the C compiler to choose the proper C header file, > "ppc/_structs.h" for G4 and G5 machines or "i386/_structs.h" for other Mac > hardware ("arm/_structs.h" for Apple phones and TV sets). The C header file > "i386/_structs.h" is /usr/include/i386/_structs.h. It has: > > 29 #include <sys/appleapiopts.h> > > 37 #if defined(__need_struct_mcontext) > 38 #include <mach/i386/_structs.h> > 39 #endif /* __need_struct_mcontext */ > > /usr/include/sys/appleapiopts.h does not contain anything of matter, but > /usr/include/i386/_structs.h has: > > 122 #ifdef __need_mcontext_t > 123 #undef __need_mcontext_t > 124 #ifndef _MCONTEXT_T > 125 #define _MCONTEXT_T > 126 #if defined(__LP64__) > 127 typedef _STRUCT_MCONTEXT64 *mcontext_t; > 128 #define _STRUCT_MCONTEXT _STRUCT_MCONTEXT64 > 129 #else > 130 typedef _STRUCT_MCONTEXT32 *mcontext_t; > 131 #define _STRUCT_MCONTEXT _STRUCT_MCONTEXT32 > 132 #endif > 133 #endif /* _MCONTEXT_T */ > 134 #endif /* __need_mcontext_t */ > > This file defines a value for the macro _STRUCT_MCONTEXT so that the > definition of the struct _STRUCT_UCONTEXT in /usr/include/machine/_structs.h > becomes valid. Maybe you are missing one of these files? > > ls -l /usr/include/sys/_structs.h /usr/include/machine/_structs.h > /usr/include/i386/_structs.h /usr/include/sys/appleapiopts.h > /usr/include/mach/i386/_structs.h /usr/include/mach/ppc/_structs.h > -r--r--r-- 1 root wheel 4021 8 Jun 2011 /usr/include/i386/_structs.h > -r--r--r-- 1 root wheel 25259 8 Jun 2011 > /usr/include/mach/i386/_structs.h > -r--r--r-- 1 root wheel 11671 8 Jun 2011 /usr/include/mach/ppc/_structs.h > -r--r--r-- 1 root wheel 1573 8 Jun 2011 /usr/include/machine/_structs.h > -r--r--r-- 1 root wheel 7910 8 Jun 2011 /usr/include/sys/_structs.h > -r--r--r-- 1 root wheel 2070 8 Jun 2011 /usr/include/sys/appleapiopts.h > > > Another option would be to save the failed test programme conftest.c from the > configure run as, for example, failed_conftest.c and compile it manually with > some additional tests and switches. Originally configure invoked: > > gcc -o conftest -I/sw/bootstrap/include -I/sw/bootstrap/include > -L/sw/bootstrap/lib conftest.c > > By using > > gcc -H -o conftest -I/sw/bootstrap/include -I/sw/bootstrap/include > -L/sw/bootstrap/lib failed_conftest.c > > you'll see which C header files actually get used for compilation. Maybe you > see reported that one is missing. Finally you can run > > gcc -E -dD -o failed_conftest.cpp -I/sw/bootstrap/include > -I/sw/bootstrap/include -L/sw/bootstrap/lib failed_conftest.c > > to get a pre-compiled version of your C source file. In this file, > failed_conftest.cpp, all macros are substituted by their values and you would > see whether _STRUCT_MCONTEXT was substituted with some value and from where, > which C header file, this value comes. > > In configure.log you would see something like: > > configure:5892: $? = 1 > configure: failed program was: > | /* confdefs.h */ > | #define PACKAGE_NAME "gettext-tools" > | #define PACKAGE_TARNAME "gettext-tools" > | #define PACKAGE_VERSION "0.19.4" > | #define PACKAGE_STRING "gettext-tools 0.19.4" > | #define PACKAGE_BUGREPORT "bug-gnu-gett...@gnu.org" > | #define PACKAGE_URL "" > | #define PACKAGE "gettext-tools" > | #define VERSION "0.19.4" > | /* end confdefs.h. */ > | #include <ac_nonexistent.h> > > The C test programme source conftest.c here is "commented" by "| ". By > copying the lines starting with "| ", pasting them into failed_conftest.c and > removing the "| " text from the lines' beginning you'll get the C source to > work with. If you can't perform these tests and edits, then just send the > lines the followed the line > >> | /* confdefs.h. */ > > in your posting. Hopefully the files in /sw/bootstrap/include and > /sw/bootstrap/lib won't play a role here so that I could check whether the > test runs for me… > > > BTW, where (and how) did you fetch the archive for the files in > /sw/bootstrap/include and /sw/bootstrap/lib? > > > BTW, I have Xcode 4.2, from the Apple Developer Connection, installed… (but > 3.2.6 as well, since it provides SDKs for Leopard and Tiger) > > -- > Greetings > > Pete > > "What do you think of Western Civilisation?" > "I think it would be a good idea!" > – Mohandas Karamchand Gandhi > ------------------------------------------------------------------------------ Dive into the World of Parallel Programming! The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net _______________________________________________ Fink-users mailing list Fink-users@lists.sourceforge.net List archive: http://news.gmane.org/gmane.os.macosx.fink.user Subscription management: https://lists.sourceforge.net/lists/listinfo/fink-users