Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to make on ubuntu 22.04 #192

Open
jhcuarta opened this issue Nov 19, 2022 · 1 comment
Open

Failed to make on ubuntu 22.04 #192

jhcuarta opened this issue Nov 19, 2022 · 1 comment

Comments

@jhcuarta
Copy link

jhcuarta commented Nov 19, 2022

Hi
I encounter the following error while compiling

jason@jason:/home/jason/Documents/mummer-4.0.0rc1$ make
YAGGO src/umd/nucmer_cmdline.hpp
YAGGO tests/generate_sequences_cmdline.hpp
YAGGO tests/ufasta_src/dsort_cmdline.hpp
YAGGO tests/ufasta_src/sort_cmdline.hpp
YAGGO tests/check_cigar_cmdline.hpp
YAGGO tests/check_LCP_cmdline.hpp
make all-am
make[1]: Entering directory '/home/jason/Documents/mummer-4.0.0rc1'
CXX src/essaMEM/fasta.o
CXX src/essaMEM/mummer.o
CXX src/essaMEM/sparseSA.lo
CXX src/essaMEM/sssort_compact.lo
CXX src/tigr/mgaps.lo
CXX src/tigr/postnuc.lo
CXX src/tigr/sw_align.lo
CXX src/tigr/tigrinc.lo
CXX src/umd/nucmer.lo
CXXLD libumdmummer.la
CXXLD mummer
CXX src/tigr/show-coords.o
CXX src/tigr/delta.o
CXXLD show-coords
CXX src/tigr/show-aligns.o
CXX src/tigr/translate.o
CXXLD show-aligns
CXX src/tigr/show-snps.o
CXXLD show-snps
CXX src/tigr/show-tiling.o
CXXLD show-tiling
CXX src/tigr/show-diff.o
CXXLD show-diff
CXX src/tigr/repeat-match.o
CXXLD repeat-match
CXX src/tigr/annotate.o
CXXLD annotate
CXX src/tigr/combineMUMs.o
CXXLD combineMUMs
CXX src/tigr/delta-filter.o
CXXLD delta-filter
CXX src/umd/nucmer_main.o
CXXLD nucmer
CXX src/tigr/mgaps_main.o
CXXLD mgaps
CXX src/tigr/postnuc_main.o
CXXLD postnuc
CXX src/tigr/prepro.o
CXXLD prepro
CXX src/tigr/postpro.o
In copy constructor ‘Alignment::Alignment(const Alignment&)’,
inlined from ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = Alignment; _Args = {const Alignment&}; _Tp = Alignment]’ at /usr/include/c++/11/ext/new_allocator.h:162:4,
inlined from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = Alignment; _Args = {const Alignment&}; _Tp = Alignment]’ at /usr/include/c++/11/bits/alloc_traits.h:516:17,
inlined from ‘void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = Alignment; _Alloc = std::allocator]’ at /usr/include/c++/11/bits/stl_vector.h:1192:30,
inlined from ‘void addNewAlignment(std::vector&, std::vector::iterator, std::vector::iterator)’ at src/tigr/postpro.cc:559:24:
src/tigr/postpro.cc:112:8: error: ‘Align.Alignment::Errors’ may be used uninitialized [-Werror=maybe-uninitialized]
112 | struct Alignment
| ^~~~~~~~~
src/tigr/postpro.cc: In function ‘void addNewAlignment(std::vector&, std::vector::iterator, std::vector::iterator)’:
src/tigr/postpro.cc:546:13: note: ‘Align’ declared here
546 | Alignment Align;
| ^~~~~
In copy constructor ‘Alignment::Alignment(const Alignment&)’,
inlined from ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = Alignment; _Args = {const Alignment&}; _Tp = Alignment]’ at /usr/include/c++/11/ext/new_allocator.h:162:4,
inlined from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = Alignment; _Args = {const Alignment&}; _Tp = Alignment]’ at /usr/include/c++/11/bits/alloc_traits.h:516:17,
inlined from ‘void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = Alignment; _Alloc = std::allocator]’ at /usr/include/c++/11/bits/stl_vector.h:1192:30,
inlined from ‘void addNewAlignment(std::vector&, std::vector::iterator, std::vector::iterator)’ at src/tigr/postpro.cc:559:24:
src/tigr/postpro.cc:112:8: error: ‘Align.Alignment::SimErrors’ may be used uninitialized [-Werror=maybe-uninitialized]
112 | struct Alignment
| ^~~~~~~~~
src/tigr/postpro.cc: In function ‘void addNewAlignment(std::vector&, std::vector::iterator, std::vector::iterator)’:
src/tigr/postpro.cc:546:13: note: ‘Align’ declared here
546 | Alignment Align;
| ^~~~~
In copy constructor ‘Alignment::Alignment(const Alignment&)’,
inlined from ‘void __gnu_cxx::new_allocator<_Tp>::construct(_Up*, _Args&& ...) [with _Up = Alignment; _Args = {const Alignment&}; _Tp = Alignment]’ at /usr/include/c++/11/ext/new_allocator.h:162:4,
inlined from ‘static void std::allocator_traits<std::allocator<_CharT> >::construct(std::allocator_traits<std::allocator<_CharT> >::allocator_type&, _Up*, _Args&& ...) [with _Up = Alignment; _Args = {const Alignment&}; _Tp = Alignment]’ at /usr/include/c++/11/bits/alloc_traits.h:516:17,
inlined from ‘void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = Alignment; _Alloc = std::allocator]’ at /usr/include/c++/11/bits/stl_vector.h:1192:30,
inlined from ‘void addNewAlignment(std::vector&, std::vector::iterator, std::vector::iterator)’ at src/tigr/postpro.cc:559:24:
src/tigr/postpro.cc:112:8: error: ‘Align.Alignment::NonAlphas’ may be used uninitialized [-Werror=maybe-uninitialized]
112 | struct Alignment
| ^~~~~~~~~
src/tigr/postpro.cc: In function ‘void addNewAlignment(std::vector&, std::vector::iterator, std::vector::iterator)’:
src/tigr/postpro.cc:546:13: note: ‘Align’ declared here
546 | Alignment Align;
| ^~~~~
cc1plus: all warnings being treated as errors
make[1]: *** [Makefile:1890: src/tigr/postpro.o] Error 1
make[1]: Leaving directory '/home/jason/Documents/mummer-4.0.0rc1'
make: *** [Makefile:1113: all] Error 2

@lufuhao
Copy link

lufuhao commented May 8, 2023

I met this error earlier this afternoon, and guess that this error happens using new gcc to compile old tigr codes.

at line 860 of Makefile
AM_CPPFLAGS = -Wall -I$(srcdir)/include

the '-Wall' will activate '-Werror=maybe-uninitialized', which make 'make' failed.

Method1: remove '-Wall'
Method2: replace '-Wall' with '-Werror=main'
Both works, but I am sure whether it's safe to do so, as I am not professional on C++.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants