I followed the instructions to build bitcoin from source from here https://github.com/bitcoin/bitcoin/blob/master/doc/build-unix.md. I was able to install the prerequisites like libboost, berkley db and other. Now when i build bitcoin with these steps
./autogen.sh(Works fine without errors)./configure(works without errors)make(this gives an error)
libbitcoin_server.a(libbitcoin_server_a-init.o): In function `boost::filesystem::path::path<boost::filesystem::directory_entry>(boost::filesystem::directory_entry const&, boost::enable_if<boost::filesystem::path_traits::is_pathable<boost::decay<boost::filesystem::directory_entry>::type>, void>::type*)':
/usr/include/boost/filesystem/path.hpp:139: undefined reference to `boost::filesystem::path_traits::dispatch(boost::filesystem::directory_entry const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::codecvt<wchar_t, char, __mbstate_t> const&)'
libbitcoin_util.a(libbitcoin_util_a-util.o): In function `boost::program_options::detail::basic_config_file_iterator<char>::getline(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
/usr/include/boost/program_options/detail/config_file.hpp:161: undefined reference to `boost::program_options::to_internal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
libbitcoin_util.a(libbitcoin_util_a-util.o): In function `boost::program_options::detail::basic_config_file_iterator<char>::basic_config_file_iterator(std::istream&, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool)':
/usr/include/boost/program_options/detail/config_file.hpp:145: undefined reference to `boost::program_options::detail::common_config_file_iterator::common_config_file_iterator(std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool)'
collect2: error: ld returned 1 exit status
Makefile:2593: recipe for target 'bitcoind' failed
make[2]: *** [bitcoind] Error 1
Then some googling led me to this #6603. So i did make clean and then ./configure --with-boost-libdir=/usr/lib/x86_64-linux-gnu (my libboost files are in /usr/lib/x86_64-linux-gnu) and then make. Again i got the error
libbitcoin_server.a(libbitcoin_server_a-init.o): In function `boost::filesystem::path::path<boost::filesystem::directory_entry>(boost::filesystem::directory_entry const&, boost::enable_if<boost::filesystem::path_traits::is_pathable<boost::decay<boost::filesystem::directory_entry>::type>, void>::type*)':
/usr/include/boost/filesystem/path.hpp:139: undefined reference to `boost::filesystem::path_traits::dispatch(boost::filesystem::directory_entry const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::codecvt<wchar_t, char, __mbstate_t> const&)'
libbitcoin_util.a(libbitcoin_util_a-util.o): In function `boost::program_options::detail::basic_config_file_iterator<char>::getline(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
/usr/include/boost/program_options/detail/config_file.hpp:161: undefined reference to `boost::program_options::to_internal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
libbitcoin_util.a(libbitcoin_util_a-util.o): In function `boost::program_options::detail::basic_config_file_iterator<char>::basic_config_file_iterator(std::istream&, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool)':
/usr/include/boost/program_options/detail/config_file.hpp:145: undefined reference to `boost::program_options::detail::common_config_file_iterator::common_config_file_iterator(std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool)'
collect2: error: ld returned 1 exit status
Makefile:2593: recipe for target 'bitcoind' failed
make[2]: *** [bitcoind] Error 1
After reading this mailing list thread https://lists.linuxfoundation.org/pipermail/bitcoin-dev/2015-September/010944.html i tried make clean and then ./configure CPPFLAGS="-I/usr/include/x86_64-linux-gnu/" LDFLAGS="-L/usr/lib/x86_64-linux-gnu/" and then make I still get an error
libbitcoin_server.a(libbitcoin_server_a-init.o): In function `boost::filesystem::path::path<boost::filesystem::directory_entry>(boost::filesystem::directory_entry const&, boost::enable_if<boost::filesystem::path_traits::is_pathable<boost::decay<boost::filesystem::directory_entry>::type>, void>::type*)':
/usr/include/boost/filesystem/path.hpp:139: undefined reference to `boost::filesystem::path_traits::dispatch(boost::filesystem::directory_entry const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&, std::codecvt<wchar_t, char, __mbstate_t> const&)'
libbitcoin_util.a(libbitcoin_util_a-util.o): In function `boost::program_options::detail::basic_config_file_iterator<char>::getline(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&)':
/usr/include/boost/program_options/detail/config_file.hpp:161: undefined reference to `boost::program_options::to_internal(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
libbitcoin_util.a(libbitcoin_util_a-util.o): In function `boost::program_options::detail::basic_config_file_iterator<char>::basic_config_file_iterator(std::istream&, std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool)':
/usr/include/boost/program_options/detail/config_file.hpp:145: undefined reference to `boost::program_options::detail::common_config_file_iterator::common_config_file_iterator(std::set<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::less<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, bool)'
collect2: error: ld returned 1 exit status
Makefile:2593: recipe for target 'bitcoind' failed
make[2]: *** [bitcoind] Error 1
Whats going wrong?