Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I tried to build bfilter from source, but get the following error:

make  all-recursive
make[1]: Entering directory `/home/myuser/Downloads/bfilter-1.1.4'
Making all in binreloc
make[2]: Entering directory `/home/myuser/Downloads/bfilter-1.1.4/binreloc'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/myuser/Downloads/bfilter-1.1.4/binreloc'
Making all in foundation
make[2]: Entering directory `/home/myuser/Downloads/bfilter-1.1.4/foundation'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory `/home/myuser/Downloads/bfilter-1.1.4/foundation'
Making all in boost
make[2]: Entering directory `/home/myuser/Downloads/bfilter-1.1.4/boost'
Making all in libs
make[3]: Entering directory `/home/myuser/Downloads/bfilter-1.1.4/boost/libs'
Making all in regex
make[4]: Entering directory `/home/myuser/Downloads/bfilter-1.1.4/boost/libs/regex'
make[4]: Nothing to be done for `all'.
make[4]: Leaving directory `/home/myuser/Downloads/bfilter-1.1.4/boost/libs/regex'
Making all in program_options
make[4]: Entering directory `/home/myuser/Downloads/bfilter-1.1.4/boost/libs/program_options'
/bin/bash ../../../libtool --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I. -I../../..  -I../../.. -I../../../boost -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DNDEBUG  -Os -Wall -Wno-unused -pthread -MT config_file.lo -MD -MP -MF .deps/config_file.Tpo -c -o config_file.lo `test -f 'src/config_file.cpp' || echo './'`src/config_file.cpp
 g++ -DHAVE_CONFIG_H -I. -I../../.. -I../../.. -I../../../boost -DBOOST_MULTI_INDEX_DISABLE_SERIALIZATION -DNDEBUG -Os -Wall -Wno-unused -pthread -MT config_file.lo -MD -MP -MF .deps/config_file.Tpo -c src/config_file.cpp -o config_file.o
In file included from ../../../boost/boost/mpl/apply.hpp:23:0,
                 from ../../../boost/boost/iterator/iterator_facade.hpp:34,
                 from ../../../boost/boost/program_options/eof_iterator.hpp:9,
                 from ../../../boost/boost/program_options/detail/config_file.hpp:17,
                 from src/config_file.cpp:10:
../../../boost/boost/mpl/apply_wrap.hpp:81:31: error: missing binary operator before token "("
../../../boost/boost/mpl/apply_wrap.hpp:173:31: error: missing binary operator before token "("
In file included from ../../../boost/boost/mpl/bind.hpp:27:0,
                 from ../../../boost/boost/mpl/lambda.hpp:18,
                 from ../../../boost/boost/mpl/apply.hpp:25,
                 from ../../../boost/boost/iterator/iterator_facade.hpp:34,
                 from ../../../boost/boost/program_options/eof_iterator.hpp:9,
                 from ../../../boost/boost/program_options/detail/config_file.hpp:17,
                 from src/config_file.cpp:10:
../../../boost/boost/mpl/apply_wrap.hpp:81:31: error: missing binary operator before token "("
../../../boost/boost/mpl/apply_wrap.hpp:173:31: error: missing binary operator before token "("
In file included from ../../../boost/boost/mpl/lambda.hpp:18:0,
                 from ../../../boost/boost/mpl/apply.hpp:25,
                 from ../../../boost/boost/iterator/iterator_facade.hpp:34,
                 from ../../../boost/boost/program_options/eof_iterator.hpp:9,
                 from ../../../boost/boost/program_options/detail/config_file.hpp:17,
                 from src/config_file.cpp:10:
../../../boost/boost/mpl/bind.hpp:364:31: error: missing binary operator before token "("
../../../boost/boost/mpl/bind.hpp:531:31: error: missing binary operator before token "("
In file included from ../../../boost/boost/mpl/lambda.hpp:22:0,
                 from ../../../boost/boost/mpl/apply.hpp:25,
                 from ../../../boost/boost/iterator/iterator_facade.hpp:34,
                 from ../../../boost/boost/program_options/eof_iterator.hpp:9,
                 from ../../../boost/boost/program_options/detail/config_file.hpp:17,
                 from src/config_file.cpp:10:
../../../boost/boost/mpl/aux_/full_lambda.hpp:230:31: error: missing binary operator before token "("
In file included from ../../../boost/boost/iterator/iterator_facade.hpp:34:0,
                 from ../../../boost/boost/program_options/eof_iterator.hpp:9,
                 from ../../../boost/boost/program_options/detail/config_file.hpp:17,
                 from src/config_file.cpp:10:
../../../boost/boost/mpl/apply.hpp:138:31: error: missing binary operator before token "("
make[4]: *** [config_file.lo] Error 1
make[4]: Leaving directory `/home/myuser/Downloads/bfilter-1.1.4/boost/libs/program_options'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/myuser/Downloads/bfilter-1.1.4/boost/libs'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/myuser/Downloads/bfilter-1.1.4/boost'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/myuser/Downloads/bfilter-1.1.4'
make: *** [all] Error 2

Any idea how to fix this?

share|improve this question
    
What versions of G++, Boost and ACE do you have? –  Gilles Jun 16 '12 at 23:43
    
g++: 4:4.5.2-1ubuntu3, libace: 5.7.7-4ubuntu1, libboost-1.42-dev: 1.42.0-4ubuntu2 –  student Jun 17 '12 at 8:20

1 Answer 1

There is problem in gcc, which cannot have MACRO() in the #elif condition in header structure.

See this link with possible workaround and discussion about this problem.

share|improve this answer
    
Thanks. Please could you provide more details what to do in my situation? Would it be possible to just replace gcc or boost locally for making bfilter somehow? (I am using ubuntu 12.04). –  student Aug 20 '12 at 8:42
    
You can change #elif to #else #if, as you can see in the first link I provided... It is hard to recognize, but please, check differences between original file and corrected file in the post, which is started by 'Modifying file.h to be the following fixes the problem for me'. –  Jan Marek Aug 20 '12 at 10:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.