[Debian-med-packaging] Bug#797526: [Help] Re: Bug#797526: mapsembler2: FTBFS with GCC-5 - undefined reference to `prefix_trashable[abi:cxx11]'

Gianfranco Costamagna costamagnagianfranco at yahoo.it
Tue Sep 1 08:34:33 UTC 2015


Hi Andreas


/tmp/mapsembler2-2.2.3+dfsg $ grep prefix_trashable . -R |grep -v debian
./kissreads_graph/commons.cpp:char * prefix_trashable=(char *)"trashmeplease";
./mapsembler2_extend/mapsembler_extend.cpp:extern string prefix_trashable;
./mapsembler2_extend/mapsembler_extend.cpp:    command = string("rm -f ")+prefix_trashable.c_str()+string("*"); system((char *)command.c_str());
./mapsembler2_extend/commons.cpp:char * prefix_trashable=(char *)"trashmeplease";
./mapsembler2_extend/Fragment.cpp:extern char * prefix_trashable;
./mapsembler2_extend/Fragment.cpp:        string linear_seq_name = prefix_trashable+(*it);
./mapsembler2_extend/Fragment.cpp:        string linear_seq_name = prefix_trashable+(*it);
./mapsembler2_extend/Fragment.cpp:        graph.load_nodes_extremities((char *)(prefix_trashable+left_extrem_kmers[i]).c_str());
./mapsembler2_extend/Fragment.cpp:        id_els first_id_els=graph.construct_graph(prefix_trashable+left_extrem_kmers[i], "LEFT");
./mapsembler2_extend/Fragment.cpp:        graph.load_nodes_extremities((char *)(prefix_trashable+right_extrem_kmers[i]).c_str());
./mapsembler2_extend/Fragment.cpp:        id_els first_id_els=graph.construct_graph(prefix_trashable+right_extrem_kmers[i], "RIGHT");
./mapsembler2_extend/Fragment.cpp:        Bank * Left = new Bank((char*)(prefix_trashable+left_kmer).c_str());
./mapsembler2_extend/Fragment.cpp:        Bank * Right = new Bank((char*)(prefix_trashable+right_kmer).c_str());



specially lines:
./kissreads_graph/commons.cpp:char * prefix_trashable=(char *)"trashmeplease";
./mapsembler2_extend/mapsembler_extend.cpp:extern string prefix_trashable;

./mapsembler2_extend/commons.cpp:char * prefix_trashable=(char *)"trashmeplease";
./mapsembler2_extend/Fragment.cpp:extern char * prefix_trashable;


you define it as extern string, and you define it as char * in the real definition.




NOTE: I'm *not* a c++ savvy person, and I didn't test the patch below.
But you asked for an hint, so here it is:


file: mapsembler2_extend/mapsembler_extend.cpp

-extern string prefix_trashable;
+extern char* prefix_trashable;


-    command = string("rm -f ")+prefix_trashable.c_str()+string("*"); system((char *)command.c_str());
+    command = string("rm -f ")+prefix_trashable+string("*"); system((char *)command.c_str());

or maybe even better
-    command = string("rm -f ")+prefix_trashable.c_str()+string("*"); system((char *)command.c_str());
+    command = string("rm -f ")+string(prefix_trashable)+string("*"); system((char *)command.c_str());


(note, since this is called in an rm -f function, I don't want to give an untested patch).

Please check if that "command" is correct during run, by commenting out the system call, and 

printing a "cout << command" or similar somewhere.

If you are comfortable that the prefix_trashable is good, and the rm is not deleting files somewhere else,
I guess your patch is good :)

cheers,

G.



Il Martedì 1 Settembre 2015 9:56, Andreas Tille <tille at debian.org> ha scritto:
Hi,

any idea what librarie might need a transition to enable mapsembler2
building?

Thanks for any hint

       Andreas.

On Mon, Aug 31, 2015 at 12:54:43PM +0200, Gilles Filippini wrote:
> Source: mapsembler2
> Version: 2.2.3+dfsg-2
> Severity: serious
> Justification: FTBFS
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA256
> 
> Hi,
> 
> During a rebuild against GCC-5 mapsembler2 FTBFS with:
> 
> /tmp/ccXWIZkS.o: In function `main':
> /«BUILDDIR»/mapsembler2-2.2.3+dfsg/mapsembler2_extend/mapsembler_extend.cpp:320: undefined reference to `prefix_trashable[abi:cxx11]'
> collect2: error: ld returned 1 exit status
> make[2]: *** [mapsembler_extend] Error 1
> makefile:113: recipe for target 'mapsembler_extend' failed
> make[2]: Leaving directory '/«BUILDDIR»/mapsembler2-2.2.3+dfsg/mapsembler2_extend'
> make[1]: *** [override_dh_auto_build] Error 2
> debian/rules:27: recipe for target 'override_dh_auto_build' failed
> make[1]: Leaving directory '/«BUILDDIR»/mapsembler2-2.2.3+dfsg'
> make: *** [build] Error 2
> debian/rules:21: recipe for target 'build' failed
> dpkg-buildpackage: error: debian/rules build gave error exit status 2
> 
> Full build log on request.
> 
> Thanks,
> 
> _g.
> 
> - -- System Information:
> Debian Release: stretch/sid
>   APT prefers testing-updates
>   APT policy: (500, 'testing-updates'), (500, 'testing')
> Architecture: amd64 (x86_64)
> Foreign Architectures: i386
> 
> Kernel: Linux 4.1.0-1-amd64 (SMP w/2 CPU cores)
> Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash
> Init: systemd (via /run/systemd/system)
> 
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1
> 
> iQEcBAEBCAAGBQJV5DJpAAoJEO/obGx//s+DCHUIAIDi4dIxSFsK96zlMbDjXjvQ
> vSUOz/wkMt6PS/+NFZ6lAsjUQnuviZVl/le9fgnGP99CHYT+UAxshE2af46w5MZq
> R+SMfdGCbGLMO2NhXtiaSMk5ooWKpn+Rk2WKLZQ2rT5B++G0MiXlc3u/i0YcKBsJ
> fmNgUELLQKInZt2OvKTO/qO5CrQOhBaZvAWD94sxv5w988MEhrk0DVHbERrdfZ1C
> K1nHkl9APNM4P+EXCfHxgfR1HKbCwIUhDntnzQduPOD3b/vBNPFUzUcFyH9C+ghh
> ZCs8nQETxEr9Yt9wr2z/90Lgvtubbi8CxowAQ2dbJALzll8QFp1OB63r2vwqM4U=
> =1W/8
> -----END PGP SIGNATURE-----
> 
> _______________________________________________
> Debian-med-packaging mailing list
> Debian-med-packaging at lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-packaging

-- 
http://fam-tille.de



More information about the Debian-med-packaging mailing list