bug-gnubatch
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-gnubatch] Configure script does not correctly detect pid_t


From: Smith, Ron D - Exelis
Subject: [bug-gnubatch] Configure script does not correctly detect pid_t
Date: Mon, 4 May 2015 23:01:08 +0000

In my environment, for whatever reason, pid_t is not defined.

 

When I run the configure script, it does not correctly detect this. I enabled –x in the configure shell script and get the following:

 

# Try to compile conftest.$ac_ext, and return whether this succeeded.

ac_fn_c_try_compile ()

{

  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack

  rm -f conftest.$ac_objext

  if { { ac_try="$ac_compile"

case "(($ac_try" in

  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;

  *) ac_try_echo=$ac_try;;

esac

eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""

$as_echo "$ac_try_echo"; } >&5

  (eval "$ac_compile") 2>conftest.err

  ac_status=$?

  if test -s conftest.err; then

    grep -v '^ *+' conftest.err >conftest.er1

    cat conftest.er1 >&5

    mv -f conftest.er1 conftest.err

  fi

  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5

  test $ac_status = 0; } && {

     test -z "$ac_c_werror_flag" ||

     test ! -s conftest.err

       } && test -s conftest.$ac_objext; then :

  ac_retval=0

else

  $as_echo "$as_me: failed program was:" >&5

sed 's/^/| /' conftest.$ac_ext >&5

 

     ac_retval=1

fi

  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno

  as_fn_set_status $ac_retval

 

} # ac_fn_c_try_compile

 

When I run the script I get the following output:

 

+ ac_fn_c_check_type 5917 pid_t ac_cv_type_pid_t '#include <stdio.h>

#ifdef HAVE_SYS_TYPES_H

# include <sys/types.h>

#endif

#ifdef HAVE_SYS_STAT_H

# include <sys/stat.h>

#endif

#ifdef STDC_HEADERS

# include <stdlib.h>

# include <stddef.h>

#else

# ifdef HAVE_STDLIB_H

#  include <stdlib.h>

# endif

#endif

#ifdef HAVE_STRING_H

# if !defined STDC_HEADERS && defined HAVE_MEMORY_H

#  include <memory.h>

# endif

# include <string.h>

#endif

#ifdef HAVE_STRINGS_H

# include <strings.h>

#endif

#ifdef HAVE_INTTYPES_H

# include <inttypes.h>

#endif

#ifdef HAVE_STDINT_H

# include <stdint.h>

#endif

#ifdef HAVE_UNISTD_H

# include <unistd.h>

#endif'

+ as_lineno=5917

+ as_lineno_stack=as_lineno_stack=

+ printf '%s\n' 'configure:5917: checking for pid_t'

+ printf %s 'checking for pid_t... '

checking for pid_t... + eval '${ac_cv_type_pid_t+:}' false

++ false

+ eval ac_cv_type_pid_t=no

++ ac_cv_type_pid_t=no

+ cat confdefs.h -

+ ac_fn_c_try_compile 2011

+ as_lineno=5917

+ as_lineno_stack=as_lineno_stack=as_lineno_stack=

+ rm -f conftest.o

+ ac_try='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'

+ case "(($ac_try" in

+ ac_try_echo='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'

+ eval 'ac_try_echo="$as_me:5917: $CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5"'

++ ac_try_echo='configure:5917: gcc -c -g -O2  conftest.c >&5'

+ printf '%s\n' 'configure:5917: gcc -c -g -O2  conftest.c >&5'

+ ac_status=0

+ test -s conftest.err

+ grep -v '^ *+' conftest.err

+ cat conftest.er1

+ mv -f conftest.er1 conftest.err

+ printf '%s\n' 'configure:5917: $? = 0'

+ test 0 = 0

+ test -z ''

+ test -s conftest.o

+ :

+ ac_retval=0

 

When I run the example compile “by hand”, I get an error:

 

>gcc -c -g -O2 conftest.c

conftest.c: In function 'main':

conftest.c:89: error: expected _expression_ before ')' token

 

However, as you can see, the ac_status is not picking up the correct status from the compile (assuming it is even being executed). I am familiar with shell programming but I have tried many different combinations of modifications to the configure script to get the status set correctly but to no avail. It seems as if the following line is just not being executed:

 

  (eval "$ac_link") 2>conftest.err

 

I have placed a “cat conftest.err” right after the “ac_status=$?” and the file is empty. (I do not get a file not found error, so it is being created.)

 

I finally made a modification that showed something, but it seems as if the lines get executed out-of-order somehow…

 

  (

   set -x;

   eval "$ac_compile"

  ) 2>conftest.err;ac_status=$?

cat conftest.err

 

produces

 

+ ac_fn_c_try_compile 2014

+ as_lineno=5920

+ as_lineno_stack=as_lineno_stack=as_lineno_stack=

+ rm -f conftest.o

+ ac_try='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'

+ case "(($ac_try" in

+ ac_try_echo='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'

+ eval 'ac_try_echo="$as_me:5920: $CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5"'

++ ac_try_echo='configure:5920: gcc -c -g -O2  conftest.c >&5'

+ printf '%s\n' 'configure:5920: gcc -c -g -O2  conftest.c >&5'

+ ac_status=0

+ cat conftest.err

+ set -x

+ eval '$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'

++ gcc -c -g -O2 conftest.c

+ test -s conftest.err

+ grep -v '^ *+' conftest.err

+ cat conftest.er1

+ mv -f conftest.er1 conftest.err

+ printf '%s\n' 'configure:5920: $? = 0'

+ test 0 = 0

+ test -z ''

+ test -s conftest.o

+ :

+ ac_retval=0

 

I’m struggling here on how to fix the GTK issue. It does not appear to be an issue with GTK per se, it is an issue with the configure script not correctly detecting the case it is testing for.

 

Ron Smith
Sr. Principal Micro/Semiconductor Engineer
Electronic Systems/Specialty Applications

Exelis

7850 S. Hardy Dr., Suite #120
Tempe, AZ 85284
(480) 598-6835 Office
(260) 451-3534 Fax
address@hidden

 




This e-mail and any files transmitted with it may be proprietary and are intended solely for the use of the individual or entity to whom they are addressed. If you have received this e-mail in error please notify the sender. Please note that any views or opinions presented in this e-mail are solely those of the author and do not necessarily represent those of Exelis Inc. The recipient should check this e-mail and any attachments for the presence of viruses. Exelis Inc. accepts no liability for any damage caused by any virus transmitted by this e-mail.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]