[quagga-dev 3104] Re: Crosscompiling Quagga

Andrew J. Schorr aschorr at telemetry-investments.com
Sun Apr 3 23:50:39 BST 2005


On Sun, Apr 03, 2005 at 04:10:59PM +0300, Hasso Tepper wrote:
> Thanks for info. Patch gave me hint how this one AC_TRY_RUN case should be 
> solved. Fix is commited to the HEAD. Andrew, can you test just in case 
> whether this test still catches broken CMSG_FIRSTHDR macro?

No, I'm afraid it does not work.  Here is the diff in config.h before
and after the patch:

   < #define HAVE_BROKEN_CMSG_FIRSTHDR 
   ---
   > /* #undef HAVE_BROKEN_CMSG_FIRSTHDR */

And config.log looks like this in that section:

configure:12436: checking zebra between kernel interface method
configure:12471: result: Route socket
configure:12539: checking for broken CMSG_FIRSTHDR
configure:12569: gcc -o conftest -Os -g  -Wall -Wsign-compare -Wpointer-arith -Wbad-function-cast -Wwrite-strings   conftest.c -lnsl -lsocket  >&5
conftest.c:11: warning: return-type defaults to `int'
conftest.c: In function `main':
conftest.c:15: structure has no member named `msg_control'
conftest.c:15: `buf' undeclared (first use in this function)
conftest.c:15: (Each undeclared identifier is reported only once
conftest.c:15: for each function it appears in.)
conftest.c:16: structure has no member named `msg_controllen'
conftest.c:18: warning: implicit declaration of function `CMSG_FIRSTHDR'
conftest.c:13: warning: unused variable `buf4'
configure:12572: $? = 1
configure: program exited with status 1
configure: failed program was:
| 
| #ifdef SUNOS_5
| #define _XPG4_2
| #define __EXTENSIONS__
| #endif
| #include <stdlib.h>
| #include <sys/types.h>
| #include <sys/socket.h>
| 
| main()
| {
|   struct msghdr msg;
|   char buf4;
| 
|   msg.msg_control = buf;
|   msg.msg_controllen = 0;
| 
|   if (CMSG_FIRSTHDR(&msg) != NULL)
|     exit(0);
|   exit (1);
| }
configure:12591: result: no
configure:12597: checking route read method check
configure:12625: result: getmsg

And here is the diff between new and old configure scripts:

--- /home/users/schorr/src/quagga/.snapshot/nightly.0/sol8s/configure	Sat Apr  2 18:10:22 2005
+++ configure	Sun Apr  3 18:42:07 2005
@@ -12545,18 +12545,10 @@
 echo "$as_me:$LINENO: checking for broken CMSG_FIRSTHDR" >&5
 echo $ECHO_N "checking for broken CMSG_FIRSTHDR... $ECHO_C" >&6
 if test "$cross_compiling" = yes; then
-  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&5
-echo "$as_me: error: cannot run test program while cross compiling
-See \`config.log' for more details." >&2;}
-   { (exit 1); exit 1; }; }
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
 else
   cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h.  */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h.  */
 
 #ifdef SUNOS_5
 #define _XPG4_2
@@ -12569,7 +12561,7 @@
 main()
 {
   struct msghdr msg;
-  char buf[4];
+  char buf4;
 
   msg.msg_control = buf;
   msg.msg_controllen = 0;



I'm not sure what the problem is...

Regards,
Andy



More information about the Quagga-dev mailing list