[Debian-med-packaging] Bug#1050557: abyss: FTBFS: error: possibly dangling reference to a temporary [-Werror=dangling-reference]

Aurelien Jarno aurel32 at debian.org
Sat Aug 26 10:42:57 BST 2023


Source: abyss
Version: 2.3.7-1
Severity: serious
Tags: ftbfs
Justification: fails to build from source (but built successfully in the past)

Dear maintainer,

abyss fails to build from source. From my build log on amd64:

| Making all in Graph
| make[4]: Entering directory '/<<PKGBUILDDIR>>/Graph'
| g++ -std=c++11 -DHAVE_CONFIG_H -I. -I..  -I.. -I../Common -I/<<PKGBUILDDIR>>  -isystem/usr/lib/x86_64-linux-gnu/openmpi/include    -Wdate-time -D_FORTIFY_SOURCE=2 -isystem/<<PKGBUILDDIR>>/boost_1_56_0 -Wall -Wextra -Werror -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -DGTEST_USE_OWN_TR1_TUPLE=0 -c -o abyss_gc-gc.o `test -f 'gc.cc' || echo './'`gc.cc
| g++ -std=c++11 -Wall -Wextra -Werror -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -DGTEST_USE_OWN_TR1_TUPLE=0  -L/usr/lib/x86_64-linux-gnu/openmpi/lib    -Wl,-z,relro -Wl,-z,now -o abyss-gc abyss_gc-gc.o ../Common/libcommon.a -ldl -lm 
| g++ -std=c++11 -DHAVE_CONFIG_H -I. -I..  -I.. -I../Common -I/<<PKGBUILDDIR>>  -isystem/usr/lib/x86_64-linux-gnu/openmpi/include    -Wdate-time -D_FORTIFY_SOURCE=2 -isystem/<<PKGBUILDDIR>>/boost_1_56_0 -Wall -Wextra -Werror -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -DGTEST_USE_OWN_TR1_TUPLE=0 -c -o abyss_todot-todot.o `test -f 'todot.cc' || echo './'`todot.cc
| In file included from GraphIO.h:10,
|                  from todot.cc:9:
| GfaIO.h: In instantiation of ‘std::ostream& write_gfa2_edges(std::ostream&, const Graph&, const DistanceEst*) [with Graph = ContigGraph<DirectedGraph<ContigProperties, DistanceEst> >; std::ostream = std::basic_ostream<char>]’:
| GfaIO.h:216:25:   required from ‘std::ostream& write_gfa2(std::ostream&, Graph&) [with Graph = const ContigGraph<DirectedGraph<ContigProperties, DistanceEst> >; std::ostream = std::basic_ostream<char>]’
| GraphIO.h:37:20:   required from ‘std::ostream& write_graph(std::ostream&, const Graph&, const std::string&, const std::string&) [with Graph = ContigGraph<DirectedGraph<ContigProperties, DistanceEst> >; std::ostream = std::basic_ostream<char>; std::string = std::__cxx11::basic_string<char>]’
| todot.cc:186:14:   required from here
| GfaIO.h:182:27: error: possibly dangling reference to a temporary [-Werror=dangling-reference]
|   182 |                 const EP& ep = get(edge_bundle, g, eit);
|       |                           ^~
| GfaIO.h:182:35: note: the temporary was destroyed at the end of the full expression ‘get<ContigProperties, DistanceEst>(boost::edge_bundle, g.ContigGraph<DirectedGraph<ContigProperties, DistanceEst> >::<anonymous>, DirectedGraph<ContigProperties, DistanceEst>::edge_iterator(eit))’
|   182 |                 const EP& ep = get(edge_bundle, g, eit);
|       |                                ~~~^~~~~~~~~~~~~~~~~~~~~
| In file included from GraphIO.h:8:
| DotIO.h: In instantiation of ‘void write_edges(std::ostream&, const Graph&, typename boost::graph_traits<Graph>::vertex_descriptor, const EdgeProp*) [with Graph = ContigGraph<DirectedGraph<ContigProperties, DistanceEst> >; EdgeProp = DistanceEst; std::ostream = std::basic_ostream<char>; typename boost::graph_traits<Graph>::vertex_descriptor = ContigNode]’:
| DotIO.h:110:14:   required from ‘std::ostream& write_dot(std::ostream&, const Graph&, const std::string&) [with Graph = ContigGraph<DirectedGraph<ContigProperties, DistanceEst> >; std::ostream = std::basic_ostream<char>; std::string = std::__cxx11::basic_string<char>]’
| DotIO.h:77:18:   required from ‘std::ostream& write_dot(std::ostream&, const Graph&) [with Graph = ContigGraph<DirectedGraph<ContigProperties, DistanceEst> >; std::ostream = std::basic_ostream<char>]’
| DotIO.h:125:26:   required from ‘std::ostream& operator<<(std::ostream&, const DotWriter<ContigGraph<DirectedGraph<ContigProperties, DistanceEst> > >&)’
| GraphIO.h:33:14:   required from ‘std::ostream& write_graph(std::ostream&, const Graph&, const std::string&, const std::string&) [with Graph = ContigGraph<DirectedGraph<ContigProperties, DistanceEst> >; std::ostream = std::basic_ostream<char>; std::string = std::__cxx11::basic_string<char>]’
| todot.cc:186:14:   required from here
| DotIO.h:44:43: error: possibly dangling reference to a temporary [-Werror=dangling-reference]
|    44 |                 const edge_property_type& ep = get(edge_bundle, g, e);
|       |                                           ^~
| DotIO.h:44:51: note: the temporary was destroyed at the end of the full expression ‘get<DirectedGraph<ContigProperties, DistanceEst> >(boost::edge_bundle, (* & g), DirectedGraph<ContigProperties, DistanceEst>::out_edge_iterator(e))’
|    44 |                 const edge_property_type& ep = get(edge_bundle, g, e);
|       |                                                ~~~^~~~~~~~~~~~~~~~~~~
| DotIO.h: In instantiation of ‘void write_edges(std::ostream&, const Graph&, typename boost::graph_traits<Graph>::vertex_descriptor, const EdgeProp*) [with Graph = ContigGraph<DirectedGraph<ContigProperties, Distance> >; EdgeProp = Distance; std::ostream = std::basic_ostream<char>; typename boost::graph_traits<Graph>::vertex_descriptor = ContigNode]’:
| DotIO.h:110:14:   required from ‘std::ostream& write_dot(std::ostream&, const Graph&, const std::string&) [with Graph = ContigGraph<DirectedGraph<ContigProperties, Distance> >; std::ostream = std::basic_ostream<char>; std::string = std::__cxx11::basic_string<char>]’
| DotIO.h:77:18:   required from ‘std::ostream& write_dot(std::ostream&, const Graph&) [with Graph = ContigGraph<DirectedGraph<ContigProperties, Distance> >; std::ostream = std::basic_ostream<char>]’
| DotIO.h:125:26:   required from ‘std::ostream& operator<<(std::ostream&, const DotWriter<ContigGraph<DirectedGraph<ContigProperties, Distance> > >&)’
| GraphIO.h:33:14:   required from ‘std::ostream& write_graph(std::ostream&, const Graph&, const std::string&, const std::string&) [with Graph = ContigGraph<DirectedGraph<ContigProperties, Distance> >; std::ostream = std::basic_ostream<char>; std::string = std::__cxx11::basic_string<char>]’
| todot.cc:191:14:   required from here
| DotIO.h:44:43: error: possibly dangling reference to a temporary [-Werror=dangling-reference]
|    44 |                 const edge_property_type& ep = get(edge_bundle, g, e);
|       |                                           ^~
| DotIO.h:44:51: note: the temporary was destroyed at the end of the full expression ‘get<DirectedGraph<ContigProperties, Distance> >(boost::edge_bundle, (* & g), DirectedGraph<ContigProperties, Distance>::out_edge_iterator(e))’
|    44 |                 const edge_property_type& ep = get(edge_bundle, g, e);
|       |                                                ~~~^~~~~~~~~~~~~~~~~~~
| cc1plus: all warnings being treated as errors
| make[4]: *** [Makefile:465: abyss_todot-todot.o] Error 1
| make[4]: Leaving directory '/<<PKGBUILDDIR>>/Graph'
| make[3]: *** [Makefile:488: all-recursive] Error 1
| make[3]: Leaving directory '/<<PKGBUILDDIR>>'
| make[2]: *** [Makefile:408: all] Error 2
| make[2]: Leaving directory '/<<PKGBUILDDIR>>'
| dh_auto_build: error: make -j1 returned exit code 2
| make[1]: *** [debian/rules:17: override_dh_auto_build] Error 25
| make[1]: Leaving directory '/<<PKGBUILDDIR>>'
| make: *** [debian/rules:10: binary-arch] Error 2
| dpkg-buildpackage: error: debian/rules binary-arch subprocess returned exit status 2

A full build log on riscv64 is also available:
https://buildd.debian.org/status/fetch.php?pkg=abyss&arch=riscv64&ver=2.3.7-1&stamp=1693038499&raw=0

Regards
Aurelien


More information about the Debian-med-packaging mailing list