./configure fails on osx due to empty else statements #3471

issue ccjon opened this issue on December 29, 2013
  1. ccjon commented at 5:38 AM on December 29, 2013: none

    Works fine after deleting 'else' lines in 3(?) places where else block was empty... otherwise fails with 'unexpected "fi"' error

    trunk 6e7792003b5c520fcc81d223f07471d690594081

  2. luke-jr commented at 1:25 PM on December 29, 2013: member

    You'll need to provide more of the code around the "else" lines. Official releases don't have any empty else blocks.

  3. ccjon commented at 12:53 AM on January 3, 2014: none

    $git reset --hard HEAD is now at 6e77920 Merge pull request #3453 $ ./autogen.sh -bash: ./autogen.sh: /bin/sh^M: bad interpreter: No such file or directory $ dos2unix ./autogen.sh dos2unix: converting file ./autogen.sh to Unix format ... $ ./autogen.sh configure.ac:757: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '__CPPFLAGS') configure.ac:757: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '__CPPFLAGS') configure.ac:757: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '__CPPFLAGS') configure.ac:757: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '__CPPFLAGS') configure.ac:757: warning: 'INCLUDES' is the old name for 'AM_CPPFLAGS' (or '*_CPPFLAGS') $ ./configure checking build system type... x86_64-apple-darwin13.0.0 checking host system type... x86_64-apple-darwin13.0.0 checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... src/build-aux/install-sh -c -d checking for gawk... no checking for mawk... no checking for nawk... no checking for awk... awk checking whether make sets $(MAKE)... yes checking whether make supports nested variables... yes checking whether to enable maintainer-specific portions of Makefiles... yes checking whether make supports nested variables... (cached) yes checking for g++... g++ checking whether the C++ compiler works... yes checking for C++ compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... no checking for suffix of object files... o checking whether we are using the GNU C++ compiler... yes checking whether g++ accepts -g... yes checking for style of include used by make... GNU checking dependency style of g++... gcc3 checking for gcc... gcc checking whether we are using the GNU C compiler... yes checking whether gcc accepts -g... yes checking for gcc option to accept ISO C89... none needed checking whether gcc understands -c and -o together... yes checking dependency style of gcc... gcc3 checking how to run the C preprocessor... gcc -E checking how to run the C++ preprocessor... g++ -E checking for gcc... gcc checking whether we are using the GNU Objective C compiler... yes checking whether gcc accepts -g... yes checking dependency style of gcc... gcc3 checking for g++... g++ checking whether we are using the GNU Objective C++ compiler... yes checking whether g++ accepts -g... yes checking dependency style of g++... gcc3 checking for a sed that does not truncate output... /usr/bin/sed checking for ar... /usr/bin/ar checking for ranlib... /usr/bin/ranlib checking for strip... /usr/bin/strip checking for gcov... /usr/bin/gcov checking for lcov... no checking for java... /usr/bin/java checking for genhtml... no checking for git... /usr/bin/git checking for moc-qt4... no checking for moc4... no checking for moc... no configure: WARNING: MOC not found; bitcoin-qt frontend will not be built checking for ccache... no checking for lupdate-qt4... no checking for lupdate4... no checking for lupdate... no checking for xgettext... /opt/local/bin/xgettext checking for hexdump... /usr/bin/hexdump checking for pkg-config... /opt/local/bin/pkg-config checking pkg-config is at least version 0.9.0... yes checking for port... port checking for brew... no checking for grep that handles long lines and -e... /usr/bin/grep checking for egrep... /usr/bin/grep -E checking for ANSI C header files... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking whether byte ordering is bigendian... no checking if compiler needs -Werror to reject unknown flags... yes checking whether pthreads work with -pthread... yes checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE checking if more special flags are required for pthreads... -D_THREAD_SAFE checking for PTHREAD_PRIO_INHERIT... yes checking for special C compiler options needed for large files... no checking for _FILE_OFFSET_BITS value needed for large files... no checking whether the linker accepts -Wl,--large-address-aware... no checking whether C++ compiler accepts -Wstack-protector... yes checking whether C++ compiler accepts -fPIE... yes checking whether C++ preprocessor accepts -D_FORTIFY_SOURCE=2... yes checking whether the linker accepts -Wl,--dynamicbase... no checking whether the linker accepts -Wl,--nxcompat... no checking whether the linker accepts -Wl,-z,relro... no checking whether the linker accepts -Wl,-z,now... no checking whether C++ compiler accepts -fno-stack-protector... yes checking whether C++ compiler accepts -fstack-protector-all... yes checking whether the linker accepts -pie... yes checking whether the linker accepts -Wl,-dead_strip... yes checking stdio.h usability... yes checking stdio.h presence... yes checking for stdio.h... yes checking for stdlib.h... (cached) yes checking for unistd.h... (cached) yes checking for strings.h... (cached) yes checking for sys/types.h... (cached) yes checking for sys/stat.h... (cached) yes checking for MSG_NOSIGNAL... no checking for Berkeley DB C++ headers... /opt/local/include/db48/ checking for main in -ldb_cxx-4.8... yes checking miniupnpc/miniwget.h usability... yes checking miniupnpc/miniwget.h presence... yes checking for miniupnpc/miniwget.h... yes checking for main in -lminiupnpc... yes checking miniupnpc/miniupnpc.h usability... yes checking miniupnpc/miniupnpc.h presence... yes checking for miniupnpc/miniupnpc.h... yes checking for main in -lminiupnpc... (cached) yes checking miniupnpc/upnpcommands.h usability... yes checking miniupnpc/upnpcommands.h presence... yes checking for miniupnpc/upnpcommands.h... yes checking for main in -lminiupnpc... (cached) yes checking miniupnpc/upnperrors.h usability... yes checking miniupnpc/upnperrors.h presence... yes checking for miniupnpc/upnperrors.h... yes checking for main in -lminiupnpc... (cached) yes ./configure: line 10485: syntax error near unexpected token fi' ./configure: line 10485:fi' $

  4. laanwj added the label Build system on Feb 23, 2014
  5. ScripterRon commented at 3:20 PM on February 23, 2014: none

    I'm encountering this problem using MinGW running on Windows 7. Here are the statements in configure.ac that I think are causing the problem:

    #if BOOST_VERSION >= 105000 && (!defined(BOOST_HAS_NANOSLEEP) || BOOST_VERSION >= 105200) boost::this_thread::sleep_for(boost::chrono::milliseconds(0)); #else choke me #endif

    #if BOOST_VERSION <= 105600 boost::this_thread::sleep(boost::posix_time::milliseconds(0)); #else choke me #endif

    Command: BOOST_ROOT=~/boost_1_55_0 CPPFLAGS="-D_WIN32_WINNT=0x0602 -DWINVER=0x0602" sh configure --enable-wallet=no --enable-tests=no

    Error: configure: line 9740: syntax error near unexpected token fi' configure: line 9740:fi'

    Lines causing error in configure: _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then :

        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    

    $as_echo "yes" >&6; } succeeded=yes found_system=yes

    else

    fi

    _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then :

            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    

    $as_echo "yes" >&6; } succeeded=yes found_system=yes

    else

    fi

  6. ScripterRon commented at 3:50 PM on February 23, 2014: none

    Commenting out the two 'else' statements results in the following when running the script:

    checking for boostlib >= 1.20.0... configure: We will use a staged boost library from /home/rwh/boos t_1_55_0 yes checking whether the Boost::System library is available... yes checking for exit in -lboost_system-mgw48-sd-1_55... yes checking whether the Boost::Filesystem library is available... yes checking for exit in -lboost_filesystem-mgw48-sd-1_55... yes checking whether the Boost::Program_Options library is available... yes checking for exit in -lboost_program_options-mgw48-1_55... yes checking whether the Boost::Thread library is available... yes checking for exit in -lboost_thread-mgw48-mt-sd-1_55... yes checking whether the Boost::Chrono library is available... yes checking for exit in -lboost_chrono-mgw48-1_55... yes

    Running 'make' is successful and both bitcoind and bitcoin-cli work correctly.

  7. laanwj commented at 7:06 AM on February 24, 2014: member

    The configure script that is generated here does not contain the empty else clause at all:

    if ac_fn_cxx_try_compile "$LINENO"; then :
    
            { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
    $as_echo "yes" >&6; }
        succeeded=yes
        found_system=yes
    
    fi
    

    May be an autoconf/automake version issue

    $ autoconf --version
    autoconf (GNU Autoconf) 2.68
    $ automake --version
    automake (GNU automake) 1.11.3
    
  8. ScripterRon commented at 2:06 PM on February 24, 2014: none
    Ronald Hoffman@Hoffman-Gaming ~
    $ autoconf --version
    autoconf (GNU Autoconf) 2.68
    Ronald Hoffman@Hoffman-Gaming ~
    $ automake --version
    automake (GNU automake) 1.11.1
    
  9. laanwj commented at 2:14 PM on February 24, 2014: member

    so virtually the same ... weird. configure is generated from configure.ac and I don't see any strange empty clauses there..

  10. laanwj commented at 8:07 PM on February 26, 2014: member

    #3752 should solve this, can anyone help testing please?

  11. ScripterRon commented at 9:24 PM on February 26, 2014: none

    Problem fixed by #3752

  12. ccjon commented at 12:24 AM on February 27, 2014: none

    confirmed: wilbown's commit 5d5b0d284a787fc9a3c53c59232ebc2c09dffaeb fixed the problem for me. Thank you.

    Any chance you can undelete MtGox, too?

  13. wilbown commented at 7:42 AM on February 27, 2014: contributor

    Welcome, I feel special. Working on the Gox issue now :-P

  14. laanwj closed this on Mar 29, 2014

  15. DrahtBot locked this on Sep 8, 2021

github-metadata-mirror

This is a metadata mirror of the GitHub repository bitcoin/bitcoin. This site is not affiliated with GitHub. Content is generated from a GitHub metadata backup.
generated: 2026-05-01 15:15 UTC

This site is hosted by @0xB10C
More mirrored repositories can be found on mirror.b10c.me