Skip to content

Install from source fails on ubuntu (libboost issue) as configured #67

@MatthewRalston

Description

@MatthewRalston

make fails as configured with C++11/libboost on Ubuntu

>./configure 
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... 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 the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking whether make supports the include directive... yes (GNU style)
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking for gawk... (cached) mawk
checking whether the compiler supports GNU C++... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking for g++ option to enable C++11 features... (cached) none needed
checking dependency style of g++... (cached) gcc3
checking for gcc... (cached) gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to enable C11 features... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... ranlib
checking for a Python interpreter with version >= 2.4... python
checking for python... /home/matt/.pyenv/shims/python
checking for python version... 3.12
checking for python platform... linux
checking for GNU default python prefix... ${prefix}
checking for GNU default python exec_prefix... ${exec_prefix}
checking for python script directory (pythondir)... ${PYTHON_PREFIX}/lib/python3.12/site-packages
checking for python extension module directory (pyexecdir)... ${PYTHON_EXEC_PREFIX}/lib/python3.12/site-packages
checking for boostlib >= 1.38.0... configure: error: We could not detect the boost libraries (version 1.38 or higher). If you have a staged boost library (still not installed) please specify $BOOST_ROOT in your environment and do not give a PATH to --with-boost option.  If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.

>sudo apt install libboost-all-dev
>>./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... 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 the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking whether make supports the include directive... yes (GNU style)
checking dependency style of g++... gcc3
checking for gcc... gcc
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for ar... ar
checking the archiver (ar) interface... ar
checking for gawk... (cached) mawk
checking whether the compiler supports GNU C++... (cached) yes
checking whether g++ accepts -g... (cached) yes
checking for g++ option to enable C++11 features... (cached) none needed
checking dependency style of g++... (cached) gcc3
checking for gcc... (cached) gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to enable C11 features... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking whether make sets $(MAKE)... (cached) yes
checking for ranlib... ranlib
checking for a Python interpreter with version >= 2.4... python
checking for python... /home/matt/.pyenv/shims/python
checking for python version... 3.12
checking for python platform... linux
checking for GNU default python prefix... ${prefix}
checking for GNU default python exec_prefix... ${exec_prefix}
checking for python script directory (pythondir)... ${PYTHON_PREFIX}/lib/python3.12/site-packages
checking for python extension module directory (pyexecdir)... ${PYTHON_EXEC_PREFIX}/lib/python3.12/site-packages
checking for boostlib >= 1.38.0... yes
checking whether the compiler implements namespaces... yes
checking whether the Boost::Thread library is available... yes
checking for main in -lboost_thread... yes
checking whether Boost::Thread needs Boost::System library... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for unistd.h... (cached) yes
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for _Bool... no
checking for stdbool.h that conforms to C99... yes
checking for inline... inline
checking for pid_t... yes
checking for size_t... yes
checking for ptrdiff_t... yes
checking for an ANSI C-conforming const... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for gzread in -lz... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for GNU libc compatible malloc... yes
checking for memset... yes
checking for strdup... yes
checking for strrchr... yes
checking for strtol... yes
checking for strsep... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: executing depfiles commands

-- tophat 2.1.2 Configuration Results --
  C++ compiler:        g++ -Wall -Wno-strict-aliasing -g -gdwarf-2 -Wuninitialized  -O3  -DNDEBUG -I./samtools-0.1.18 -pthread -I/usr/include -I./SeqAn-1.4.2
  Linker flags:        -L./samtools-0.1.18 -L/usr/lib 
  BOOST libraries:     -lboost_thread
  GCC version:         gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
  Host System type:    x86_64-pc-linux-gnu
  Install prefix:      /usr/local
  Install eprefix:     ${prefix}

  See config.h for further configuration information.
  Email bug reports to <tophat.cufflinks@gmail.com>.



>make

...



segment_juncs.cpp: In member function ‘void SegmentSearchWorker::operator()()’:
segment_juncs.cpp:4625:27: warning: variable ‘last_read_id’ set but not used [-Wunused-but-set-variable]
 4625 |     uint64_t read_id = 0, last_read_id = 0;
      |                           ^~~~~~~~~~~~
In file included from /usr/include/c++/11/map:60,
                 from /usr/include/boost/system/detail/std_interoperability.hpp:11,
                 from /usr/include/boost/system/error_code.hpp:963,
                 from /usr/include/boost/system/system_error.hpp:11,
                 from /usr/include/boost/thread/exceptions.hpp:22,
                 from /usr/include/boost/thread/pthread/thread_data.hpp:10,
                 from /usr/include/boost/thread/thread_only.hpp:17,
                 from /usr/include/boost/thread/thread.hpp:12,
                 from /usr/include/boost/thread.hpp:13,
                 from segment_juncs.cpp:16:
/usr/include/c++/11/bits/stl_tree.h: In instantiation of ‘static const _Key& std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_S_key(std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_Link_type) [with _Key = Junction; _Val = Junction; _KeyOfValue = std::_Identity<Junction>; _Compare = skip_count_lt; _Alloc = std::allocator<Junction>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_Const_Link_type = const std::_Rb_tree_node<Junction>*]’:
/usr/include/c++/11/bits/stl_tree.h:2071:47:   required from ‘std::pair<std::_Rb_tree_node_base*, std::_Rb_tree_node_base*> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_get_insert_unique_pos(const key_type&) [with _Key = Junction; _Val = Junction; _KeyOfValue = std::_Identity<Junction>; _Compare = skip_count_lt; _Alloc = std::allocator<Junction>; std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::key_type = Junction]’
/usr/include/c++/11/bits/stl_tree.h:2124:4:   required from ‘std::pair<std::_Rb_tree_iterator<_Val>, bool> std::_Rb_tree<_Key, _Val, _KeyOfValue, _Compare, _Alloc>::_M_insert_unique(_Arg&&) [with _Arg = Junction; _Key = Junction; _Val = Junction; _KeyOfValue = std::_Identity<Junction>; _Compare = skip_count_lt; _Alloc = std::allocator<Junction>]’
/usr/include/c++/11/bits/stl_set.h:521:25:   required from ‘std::pair<typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator, bool> std::set<_Key, _Compare, _Alloc>::insert(std::set<_Key, _Compare, _Alloc>::value_type&&) [with _Key = Junction; _Compare = skip_count_lt; _Alloc = std::allocator<Junction>; typename std::_Rb_tree<_Key, _Key, std::_Identity<_Tp>, _Compare, typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other>::const_iterator = std::_Rb_tree<Junction, Junction, std::_Identity<Junction>, skip_count_lt, std::allocator<Junction> >::const_iterator; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key>::other = std::allocator<Junction>; typename __gnu_cxx::__alloc_traits<_Alloc>::rebind<_Key> = __gnu_cxx::__alloc_traits<std::allocator<Junction>, Junction>::rebind<Junction>; typename _Alloc::value_type = Junction; std::set<_Key, _Compare, _Alloc>::value_type = Junction]’
segment_juncs.cpp:1615:15:   required from here
/usr/include/c++/11/bits/stl_tree.h:770:15: error: static assertion failed: comparison object must be invocable as const
  770 |               is_invocable_v<const _Compare&, const _Key&, const _Key&>,
      |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Last line is highlighted in red from /usr/include/c++/11/bits/stl_tree.h and appears to be the issue. Seems to be an issue with boost library. Can you advise?

libboost-all-dev installed from Ubuntu ppa.

libboost-all-dev/jammy,now 1.74.0.3ubuntu7 amd64 [installed]
libboost-all-dev/jammy 1.74.0.3ubuntu7 i386

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions