php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #10818 configure error
Submitted: 2001-05-11 17:13 UTC Modified: 2001-05-14 18:00 UTC
From: hazmat at hellrot dot org Assigned:
Status: Closed Package: Compile Failure
PHP Version: 4.0.5 OS: OpenBSD 2.7
Private report: No CVE-ID: None
 [2001-05-11 17:13 UTC] hazmat at hellrot dot org
I was told at phpbuilder.com to submit this as a bug.  Due to the Mac line break problem in 4.0.5, I got via CVS the latest build as of 5/10.  I ran buildconf successfully and then during configure, I got this message and it stopped: 

Configuring SAPI modules
./configure[2590]: syntax error: `./scripts/config-stubs' unexpected


Thanks.


-Ken

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2001-05-11 20:42 UTC] sniper@php.net
Get a new checkout. And remember to checkout Zend and TSRM
modules from cvs.zend.com too!

Instructions can be found here:

http://www.php.net/anoncvs.php

And this always: './cvsclean ; ./buildconf' 

--Jani


 [2001-05-11 21:53 UTC] hazmat at hellrot dot org
Thanks, Jani, but I did get a new build today with the same error.  I followed the instructions at http://www.php.net/anoncvs.php exactly, since I am not terribly familiar with CVS.  The 4.0.5 distribution configures fine.

Thanks again.


-Ken
 [2001-05-11 22:00 UTC] sniper@php.net
What is the full error message?
What does it say in config.log ?
What was the configure line you used?

--Jani

 [2001-05-11 22:23 UTC] hazmat at hellrot dot org
The full error message was what you saw.  Configure went fine up until the SAPI part.  My configure line was either the full blown one I use with every option I want to simply './configure'.  Same error.  But note that 4.0.5 configures and builds with no problem.

Here's the config.log:

configure:1202: checking for a BSD compatible install
configure:1255: checking whether build environment is sane
configure:1312: checking whether make sets ${MAKE}
configure:1351: checking for working aclocal
configure:1364: checking for working autoconf
configure:1377: checking for working automake
configure:1390: checking for working autoheader
configure:1403: checking for working makeinfo
configure:1433: checking whether to enable maintainer-specific portions of Makefiles
configure:1462: checking host system type
configure:1490: checking for mawk
configure:1490: checking for gawk
configure:1490: checking for nawk
configure:1524: checking for bison
configure:1558: checking bison version
configure:1571: checking for gcc
configure:1684: checking whether the C compiler (gcc  ) works
configure:1700: gcc -o conftest    conftest.c  1>&5
configure:1726: checking whether the C compiler (gcc  ) is a cross-compiler
configure:1731: checking whether we are using GNU C
configure:1740: gcc -E conftest.c
configure:1759: checking whether gcc accepts -g
configure:1791: checking how to run the C preprocessor
configure:1812: gcc -E  conftest.c >/dev/null 2>conftest.out
configure:1871: checking for AIX
configure:1919: checking for gcc option to accept ANSI C
configure:1972: gcc  -c -g -O2  conftest.c 1>&5
configure:1999: checking for ranlib
configure:2028: checking whether gcc and cc understand -c and -o together
configure:2043: gcc -c conftest.c -o conftest.o 1>&5
configure:2044: gcc -c conftest.c -o conftest.o 1>&5
configure:2049: cc -c conftest.c 1>&5
configure:2051: cc -c conftest.c -o conftest.o 1>&5
configure:2052: cc -c conftest.c -o conftest.o 1>&5
configure:2079: checking whether ln -s works
configure:2103: checking for flex
configure:2137: checking for yywrap in -lfl
configure:2156: gcc -o conftest -g -O2   conftest.c -lfl   1>&5
configure:2180: checking lex output file root
configure:2201: checking whether yytext is a pointer
configure:2220: gcc -o conftest -g -O2   conftest.c  -lfl 1>&5
configure:2244: checking for working const
configure:2298: gcc -c -g -O2  conftest.c 1>&5
configure:2415: gcc -o conftest -g -O2   conftest.c  1>&5
configure:2410: Undefined symbol `_pthread_mutexattr_init' referenced from text segment
configure:2411: Undefined symbol `_pthread_create' referenced from text segment
collect2: ld returned 1 exit status
configure: failed program was:
#line 2397 "configure"
#include "confdefs.h"

#include <pthread.h>
#include <stddef.h>

void *thread_routine(void *data) {
    return data;
}

int main() {
    pthread_t thd;
    pthread_mutexattr_t mattr;
    int data = 1;
    pthread_mutexattr_init(&mattr);
    return pthread_create(&thd, NULL, thread_routine, &data);
} 
configure:2435: checking for pthreads_cflags
configure:2468: gcc -o conftest -g -O2 -kthread   conftest.c  1>&5
gcc: unrecognized option `-kthread'
configure:2463: Undefined symbol `_pthread_mutexattr_init' referenced from text segment
configure:2464: Undefined symbol `_pthread_create' referenced from text segment
collect2: ld returned 1 exit status
configure: failed program was:
#line 2450 "configure"
#include "confdefs.h"

#include <pthread.h>
#include <stddef.h>

void *thread_routine(void *data) {
    return data;
}

int main() {
    pthread_t thd;
    pthread_mutexattr_t mattr;
    int data = 1;
    pthread_mutexattr_init(&mattr);
    return pthread_create(&thd, NULL, thread_routine, &data);
} 

configure:2468: gcc -o conftest -g -O2 -pthread   conftest.c  1>&5
configure:2497: checking for pthreads_lib

 [2001-05-14 08:35 UTC] derick@php.net
Hello,

there is some trouble with the HEAD branch regarding the new libtool,
so can you possibly checkout the PHP_4_0_6 branch from cvs:

cvs -d :pserver:cvsread@cvs.php.net:/repository co -r PHP_4_0_6 php4
cd php4
cvs -d :pserver:cvsread@cvs.zend.com:/repository co -r PHP_4_0_6 co TSRM ZEND
cd ..
./buildconf

This works fine for me on OpenBSD 2.8 with libtool 1.3.3

regards,
Derick
 [2001-05-14 15:54 UTC] hazmat at hellrot dot org
Unfortunately, I am getting the same error, even with simply './configure'.

Configuring SAPI modules
./configure[2365]: syntax error: `./scripts/config-stubs' unexpected
 [2001-05-14 16:19 UTC] derick@php.net
Hello,

can you show us the following things:
libtool --version
automake --version
autoconf --version

And the lines 2500-2700 of configure

regards,
Derick
 [2001-05-14 17:06 UTC] hazmat at hellrot dot org
buildconf: autoconf version 2.13 (ok)
buildconf: automake version 1.4 (ok)
buildconf: libtool version 1.3.3 (ok)

I had the same results with libtool 1.3.3, 1.3.5, and 1.4.

Here are lines 2500-2700 of configure:


--------------------------


    :
  
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
    cat >> confdefs.h <<\EOF
#define MISSING_CTIME_R_DECL 1
EOF

  
fi
rm -f conftest*
  cat > conftest.$ac_ext <<EOF
#line 2516 "configure"
#include "confdefs.h"
#include <string.h>
int main() {
char *(*func)() = strtok_r
; return 0; }
EOF
if { (eval echo configure:2523: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
  rm -rf conftest*
  
    :
  
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  
    cat >> confdefs.h <<\EOF
#define MISSING_STRTOK_R_DECL 1
EOF

  
fi
rm -f conftest*
  echo "$ac_t""done" 1>&6


echo $ac_n "checking whether compiler supports -R""... $ac_c" 1>&6
echo "configure:2544: checking whether compiler supports -R" >&5
if eval "test \"`echo '$''{'php_cv_cc_dashr'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
	SAVE_LIBS="${LIBS}"
	LIBS="-R /usr/lib ${LIBS}"
	cat > conftest.$ac_ext <<EOF
#line 2552 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:2559: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  php_cv_cc_dashr=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  php_cv_cc_dashr=no
fi
rm -f conftest*
	LIBS="${SAVE_LIBS}"
fi

echo "$ac_t""$php_cv_cc_dashr" 1>&6
if test $php_cv_cc_dashr = "yes"; then
	ld_runpath_switch="-R"
else
	echo $ac_n "checking whether compiler supports -Wl,-rpath,""... $ac_c" 1>&6
echo "configure:2577: checking whether compiler supports -Wl,-rpath," >&5
	if eval "test \"`echo '$''{'php_cv_cc_rpath'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
		SAVE_LIBS="${LIBS}"
		LIBS="-Wl,-rpath,/usr/lib ${LIBS}"
		cat > conftest.$ac_ext <<EOF
#line 2585 "configure"
#include "confdefs.h"

int main() {

; return 0; }
EOF
if { (eval echo configure:2592: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
  rm -rf conftest*
  php_cv_cc_rpath=yes
else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -rf conftest*
  php_cv_cc_rpath=no
fi
rm -f conftest*
		LIBS="${SAVE_LIBS}"
fi

	echo "$ac_t""$php_cv_cc_rpath" 1>&6
	if test $php_cv_cc_rpath = "yes"; then
		ld_runpath_switch="-Wl,-rpath,"
	else
				ld_runpath_switch="-L"
	fi
fi


# Extract the first word of "sendmail", so it can be a program name with args.
set dummy sendmail; ac_word=$2
echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
echo "configure:2617: checking for $ac_word" >&5
if eval "test \"`echo '$''{'ac_cv_path_PROG_SENDMAIL'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  case "$PROG_SENDMAIL" in
  /*)
  ac_cv_path_PROG_SENDMAIL="$PROG_SENDMAIL" # Let the user override the test with a path.
  ;;
  ?:/*)			 
  ac_cv_path_PROG_SENDMAIL="$PROG_SENDMAIL" # Let the user override the test with a dos path.
  ;;
  *)
  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS=":"
  ac_dummy="$PATH:/usr/bin:/usr/sbin:/usr/etc:/etc:/usr/ucblib:/usr/lib"
  for ac_dir in $ac_dummy; do 
    test -z "$ac_dir" && ac_dir=.
    if test -f $ac_dir/$ac_word; then
      ac_cv_path_PROG_SENDMAIL="$ac_dir/$ac_word"
      break
    fi
  done
  IFS="$ac_save_ifs"
  ;;
esac
fi
PROG_SENDMAIL="$ac_cv_path_PROG_SENDMAIL"
if test -n "$PROG_SENDMAIL"; then
  echo "$ac_t""$PROG_SENDMAIL" 1>&6
else
  echo "$ac_t""no" 1>&6
fi

if test -n "$PROG_SENDMAIL"; then
  cat >> confdefs.h <<\EOF
#define HAVE_SENDMAIL 1
EOF

fi



  echo $ac_n "checking whether system uses EBCDIC""... $ac_c" 1>&6
echo "configure:2659: checking whether system uses EBCDIC" >&5
if eval "test \"`echo '$''{'ac_cv_ebcdic'+set}'`\" = set"; then
  echo $ac_n "(cached) $ac_c" 1>&6
else
  
  if test "$cross_compiling" = yes; then
  
  ac_cv_ebcdic="no"

else
  cat > conftest.$ac_ext <<EOF
#line 2670 "configure"
#include "confdefs.h"

int main(void) { 
  return (unsigned char)'A' != (unsigned char)0xC1; 
} 

EOF
if { (eval echo configure:2678: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext} && (./conftest; exit) 2>/dev/null
then
  
  ac_cv_ebcdic="yes"

else
  echo "configure: failed program was:" >&5
  cat conftest.$ac_ext >&5
  rm -fr conftest*
  
  ac_cv_ebcdic="no"

fi
rm -fr conftest*
fi

fi

echo "$ac_t""$ac_cv_ebcdic" 1>&6
  if test "$ac_cv_ebcdic" = "yes"; then
    cat >> confdefs.h <<\EOF
#define CHARSET_EBCDIC 1
EOF


 [2001-05-14 17:11 UTC] derick@php.net
Sorry... I meant 2350-2370

Derick
 [2001-05-14 17:21 UTC] hazmat at hellrot dot org
 
SAPI_PROGRAM=php
SAPI_SHARED=libs/libphp4.$SHLIB_SUFFIX_NAME
SAPI_STATIC=libs/libphp4.a
SAPI_LIBTOOL=libphp4.la
 
 
  echo "$ac_t""" 1>&6
  echo "$ac_t""${T_MD}Configuring SAPI modules${T_ME}" 1>&6
 
 
esyscmd(./scripts/config-stubs sapi)
 
echo $ac_n "checking for chosen SAPI module""... $ac_c" 1>&6
echo "configure:2365: checking for chosen SAPI module" >&5
echo "$ac_t""$PHP_SAPI" 1>&6
 
if test "$enable_experimental_zts" = "yes"; then
  
if test -n "$ac_cv_pthreads_lib"; then
  LIBS="$LIBS -l$ac_cv_pthreads_lib"
 [2001-05-14 17:32 UTC] derick@php.net
Hello,

I had this problem too, the m4 that comes with OpenBSD 2.7 does not support esyscmd
The solution was for me to upgrade it to the one found in OpenBSD 2.8.

This is not a bug in PHP, so closing this one.

Derick
 [2001-05-14 18:00 UTC] hazmat at hellrot dot org
Thanks so much, Derick.  I installed GNU M4 and all is well.

I'm sorry to have wasted everyone's time.  Kep up the good work...


-Ken
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 25 15:01:30 2024 UTC