[ 
https://issues.apache.org/jira/browse/THRIFT-3871?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Xiaoshuang LU updated THRIFT-3871:
----------------------------------
    Description: 
{code}
# https://github.com/apache/thrift/archive/0.9.3.tar.gz
$ sh bootstrap.sh
$ ./configure --prefix=/data/thrift-0.9.3 --with-boost=/data/boost-1.61.0 
--with-libevent=/data/libevent-2.0.22-stable 
--with-openssl=/data/openssl-1.0.2h --with-zlib=/data/zlib-1.2.8 
--enable-shared=no --enable-static=yes --with-cpp --without-qt4 --without-qt5 
--without-c_glib --without-csharp --without-java --without-erlang 
--without-nodejs --without-lua --without-python --without-perl --without-php 
--without-php_extension --without-ruby --without-haskell --without-go 
--without-haxe --without-d --disable-tests --disable-tutorial CFLAGS="-m64 
-fPIC -g0 -O3" CXXFLAGS="-m64 -fPIC -g0 -O3"
{code}

{code}
./configure: line 17096: syntax error near unexpected token `QT,'
./configure: line 17096: `    PKG_CHECK_MODULES(QT, QtCore >= 4.3, QtNetwork >= 
4.3, have_qt=yes, have_qt=no)'
{code}

Workarounds
{code}
diff --git a/configure.ac b/configure.ac
index 18e3233..bd03b30 100755
--- a/configure.ac
+++ b/configure.ac
@@ -155,7 +155,8 @@ if test "$with_cpp" = "yes";  then
   AX_THRIFT_LIB(qt4, [Qt], yes)
   have_qt=no
   if test "$with_qt4" = "yes";  then
-    PKG_CHECK_MODULES([QT], [QtCore >= 4.3, QtNetwork >= 4.3], have_qt=yes, 
have_qt=no)
+    cd .
+#    PKG_CHECK_MODULES([QT], [QtCore >= 4.3, QtNetwork >= 4.3], have_qt=yes, 
have_qt=no)
   fi
   if test "$have_qt" = "yes"; then
     AC_PATH_PROGS([QT_MOC], [moc-qt4 moc], "fail")
@@ -168,9 +169,10 @@ if test "$with_cpp" = "yes";  then
   have_qt5=no
   qt_reduce_reloc=""
   if test "$with_qt5" = "yes";  then
-    PKG_CHECK_MODULES([QT5], [Qt5Core >= 5.0, Qt5Network >= 5.0],
-                      [have_qt5=yes;qt_reduce_reloc=`$PKG_CONFIG 
--variable=qt_config Qt5Core | grep "reduce_relocations"`],
-                      [have_qt5=no])
+    cd .
+#    PKG_CHECK_MODULES([QT5], [Qt5Core >= 5.0, Qt5Network >= 5.0],
+#                      [have_qt5=yes;qt_reduce_reloc=`$PKG_CONFIG 
--variable=qt_config Qt5Core | grep "reduce_relocations"`],
+#                      [have_qt5=no])
   fi
   if test "$have_qt5" = "yes"; then
     AC_PATH_PROGS([QT5_MOC], [moc-qt5 moc], "fail")
@@ -188,8 +190,8 @@ AM_CONDITIONAL([QT5_REDUCE_RELOCATIONS], [test 
"x$qt_reduce_reloc" != "x"])
 
 AX_THRIFT_LIB(c_glib, [C (GLib)], yes)
 if test "$with_c_glib" = "yes"; then
-  PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.0], have_glib2=yes, have_glib2=no)
-  PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.0], have_gobject2=yes, 
have_gobject2=no)
+#  PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.0], have_glib2=yes, have_glib2=no)
+#  PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.0], have_gobject2=yes, 
have_gobject2=no)
   if test "$have_glib2" = "yes" -a "$have_gobject2" = "yes" ; then
     have_c_glib="yes"
   fi
@@ -198,15 +200,15 @@ AM_CONDITIONAL(WITH_C_GLIB, [test "$have_glib2" = "yes" 
-a "$have_gobject2" = "y
 
 AX_THRIFT_LIB(csharp, [C#], yes)
 if test "$with_csharp" = "yes";  then
-  PKG_CHECK_MODULES(MONO, mono >= 2.11.0, mono_2_11=yes, mono_2_11=no)
+#  PKG_CHECK_MODULES(MONO, mono >= 2.11.0, mono_2_11=yes, mono_2_11=no)
   if test "$mono_2_11" == "yes"; then
     AC_PATH_PROG([MCS], [mcs])
     if test "x$MCS" != "x"; then
       mono_mcs="yes"
     fi
   fi
-  PKG_CHECK_MODULES(MONO, mono >= 2.0.0, net_3_5=yes, net_3_5=no)
-  PKG_CHECK_MODULES(MONO, mono >= 1.2.4, have_mono=yes, have_mono=no)
+#  PKG_CHECK_MODULES(MONO, mono >= 2.0.0, net_3_5=yes, net_3_5=no)
+#  PKG_CHECK_MODULES(MONO, mono >= 1.2.4, have_mono=yes, have_mono=no)
   if test "$have_mono" = "yes" ; then
     have_csharp="yes"
   fi
{code}

  was:
$ wget -c https://github.com/apache/thrift/archive/0.9.3.tar.gz
$ sh bootstrap.sh
$ ./configure --prefix=/data/thrift-0.9.3 --with-boost=/data/boost-1.61.0 
--with-libevent=/data/libevent-2.0.22-stable 
--with-openssl=/data/openssl-1.0.2h --with-zlib=/data/zlib-1.2.8 
--enable-shared=no --enable-static=yes --with-cpp --without-qt4 --without-qt5 
--without-c_glib --without-csharp --without-java --without-erlang 
--without-nodejs --without-lua --without-python --without-perl --without-php 
--without-php_extension --without-ruby --without-haskell --without-go 
--without-haxe --without-d --disable-tests --disable-tutorial CFLAGS="-m64 
-fPIC -g0 -O3" CXXFLAGS="-m64 -fPIC -g0 -O3"

I have encountered
{code}
./configure: line 17096: syntax error near unexpected token `QT,'
./configure: line 17096: `    PKG_CHECK_MODULES(QT, QtCore >= 4.3, QtNetwork >= 
4.3, have_qt=yes, have_qt=no)'
{code}


> configure failed on CentOS
> --------------------------
>
>                 Key: THRIFT-3871
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3871
>             Project: Thrift
>          Issue Type: Bug
>          Components: Build Process
>    Affects Versions: 0.9.3
>            Reporter: Xiaoshuang LU
>
> {code}
> # https://github.com/apache/thrift/archive/0.9.3.tar.gz
> $ sh bootstrap.sh
> $ ./configure --prefix=/data/thrift-0.9.3 --with-boost=/data/boost-1.61.0 
> --with-libevent=/data/libevent-2.0.22-stable 
> --with-openssl=/data/openssl-1.0.2h --with-zlib=/data/zlib-1.2.8 
> --enable-shared=no --enable-static=yes --with-cpp --without-qt4 --without-qt5 
> --without-c_glib --without-csharp --without-java --without-erlang 
> --without-nodejs --without-lua --without-python --without-perl --without-php 
> --without-php_extension --without-ruby --without-haskell --without-go 
> --without-haxe --without-d --disable-tests --disable-tutorial CFLAGS="-m64 
> -fPIC -g0 -O3" CXXFLAGS="-m64 -fPIC -g0 -O3"
> {code}
> {code}
> ./configure: line 17096: syntax error near unexpected token `QT,'
> ./configure: line 17096: `    PKG_CHECK_MODULES(QT, QtCore >= 4.3, QtNetwork 
> >= 4.3, have_qt=yes, have_qt=no)'
> {code}
> Workarounds
> {code}
> diff --git a/configure.ac b/configure.ac
> index 18e3233..bd03b30 100755
> --- a/configure.ac
> +++ b/configure.ac
> @@ -155,7 +155,8 @@ if test "$with_cpp" = "yes";  then
>    AX_THRIFT_LIB(qt4, [Qt], yes)
>    have_qt=no
>    if test "$with_qt4" = "yes";  then
> -    PKG_CHECK_MODULES([QT], [QtCore >= 4.3, QtNetwork >= 4.3], have_qt=yes, 
> have_qt=no)
> +    cd .
> +#    PKG_CHECK_MODULES([QT], [QtCore >= 4.3, QtNetwork >= 4.3], have_qt=yes, 
> have_qt=no)
>    fi
>    if test "$have_qt" = "yes"; then
>      AC_PATH_PROGS([QT_MOC], [moc-qt4 moc], "fail")
> @@ -168,9 +169,10 @@ if test "$with_cpp" = "yes";  then
>    have_qt5=no
>    qt_reduce_reloc=""
>    if test "$with_qt5" = "yes";  then
> -    PKG_CHECK_MODULES([QT5], [Qt5Core >= 5.0, Qt5Network >= 5.0],
> -                      [have_qt5=yes;qt_reduce_reloc=`$PKG_CONFIG 
> --variable=qt_config Qt5Core | grep "reduce_relocations"`],
> -                      [have_qt5=no])
> +    cd .
> +#    PKG_CHECK_MODULES([QT5], [Qt5Core >= 5.0, Qt5Network >= 5.0],
> +#                      [have_qt5=yes;qt_reduce_reloc=`$PKG_CONFIG 
> --variable=qt_config Qt5Core | grep "reduce_relocations"`],
> +#                      [have_qt5=no])
>    fi
>    if test "$have_qt5" = "yes"; then
>      AC_PATH_PROGS([QT5_MOC], [moc-qt5 moc], "fail")
> @@ -188,8 +190,8 @@ AM_CONDITIONAL([QT5_REDUCE_RELOCATIONS], [test 
> "x$qt_reduce_reloc" != "x"])
>  
>  AX_THRIFT_LIB(c_glib, [C (GLib)], yes)
>  if test "$with_c_glib" = "yes"; then
> -  PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.0], have_glib2=yes, have_glib2=no)
> -  PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.0], have_gobject2=yes, 
> have_gobject2=no)
> +#  PKG_CHECK_MODULES([GLIB], [glib-2.0 >= 2.0], have_glib2=yes, 
> have_glib2=no)
> +#  PKG_CHECK_MODULES([GOBJECT], [gobject-2.0 >= 2.0], have_gobject2=yes, 
> have_gobject2=no)
>    if test "$have_glib2" = "yes" -a "$have_gobject2" = "yes" ; then
>      have_c_glib="yes"
>    fi
> @@ -198,15 +200,15 @@ AM_CONDITIONAL(WITH_C_GLIB, [test "$have_glib2" = "yes" 
> -a "$have_gobject2" = "y
>  
>  AX_THRIFT_LIB(csharp, [C#], yes)
>  if test "$with_csharp" = "yes";  then
> -  PKG_CHECK_MODULES(MONO, mono >= 2.11.0, mono_2_11=yes, mono_2_11=no)
> +#  PKG_CHECK_MODULES(MONO, mono >= 2.11.0, mono_2_11=yes, mono_2_11=no)
>    if test "$mono_2_11" == "yes"; then
>      AC_PATH_PROG([MCS], [mcs])
>      if test "x$MCS" != "x"; then
>        mono_mcs="yes"
>      fi
>    fi
> -  PKG_CHECK_MODULES(MONO, mono >= 2.0.0, net_3_5=yes, net_3_5=no)
> -  PKG_CHECK_MODULES(MONO, mono >= 1.2.4, have_mono=yes, have_mono=no)
> +#  PKG_CHECK_MODULES(MONO, mono >= 2.0.0, net_3_5=yes, net_3_5=no)
> +#  PKG_CHECK_MODULES(MONO, mono >= 1.2.4, have_mono=yes, have_mono=no)
>    if test "$have_mono" = "yes" ; then
>      have_csharp="yes"
>    fi
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to