[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Some investigations about bug (956136) nanopolish: FTBFS (undefined references)



Control: tags -1 help

Hi all,

The undefined reference to those functions, means that there is a
problem in linking with libminimap2 which implements them. Those
functions are implemented in map.c of that library.
I am able to reproduce the bug with pbuilder (sid) on the buster. I made
some investigations:
The size of the latest snapshot of libminimap2-dev package is far
smaller than its predecessors which could be found in [1]. The latest
snapshot (dfsg-7) is around 23 KB, but its direct predecessor (dfsg-6)
is 1.4 MB. I
extracted 2 latest snapshots and examined the contents of
libminimap2.a and specially map.o which should define those functions.
I run the `nm --demangle  map.o` and the result is:
On the latest snapshot (dfsg-7):
    nm: map.o: no symbols
On its predecessor (dfsg-6):
         U __assert_fail
         U cputime
         U fclose
         U kfree
         U kmalloc
         U km_destroy
         U km_init
         U km_stat
00000000 T ks_heapdown_heap
00000000 T ks_heapmake_heap
00000000 T ks_ksmall_heap
         U kt_for
         U kt_pipeline
         U mm_align_skeleton
         U mm_bseq_close
         U mm_bseq_open
         U mm_bseq_read3
         U mm_bseq_read_frag2
         U mm_chain_dp
         U mm_dbg_flag
         U mm_err_fread
         U mm_err_fwrite
         U mm_err_puts
         U mm_est_err
         U mm_gen_regs
         U mm_hit_sort
         U mm_idx_destroy
         U mm_idx_get
         U mm_join_long
00000000 T mm_map
00000000 T mm_map_file
00000000 T mm_map_file_frag
00000000 T mm_map_frag
         U mm_pair
         U mm_realtime0
         U mm_seg_free
         U mm_seg_gen
         U mm_select_sub
         U mm_select_sub_multi
         U mm_set_mapq
         U mm_set_parent
         U mm_set_sam_pri
         U mm_sketch
         U mm_split_init
00000000 T mm_split_merge
         U mm_split_merge_prep
         U mm_split_rm_tmp
00000000 T mm_tbuf_destroy
00000000 T mm_tbuf_get_km
00000000 T mm_tbuf_init
         U mm_verbose
         U mm_write_paf3
         U mm_write_sam3
         U radix_sort_128x
         U realtime
         U sdust_buf_destroy
         U sdust_buf_init
         U sdust_core
         U seq_comp_table
         U stderr

We see that dfsg-6 exports required functions, but dfsg-7 not! Thus I
concluded that there is a problem with the dfsg-7 build. So I
downloaded the dfsg-7 source code and built it with pbuilder (sid) and
the built package was the same 23 KB size and the problem was the same
(no function is exported).
Then I downloaded dfsg-6 source and built it with pbuilder (sid) and
WOW! The size became 23 KB, while the snapshot size is 1.4MB on [1]!
And now the functions are not exported while were exported on the
snapshot on [1].
Then I built both sources (dfsg-6 and dfsg-7) on buster with debuild
successfully and both have the size 1.4MB and both contents are OK and
export required function symbols.

The conclusion:
IMHO the problem is with the build tool-chain which results in such a
difference in the size of the built package, in comparison with
previous snapshots from the same source, which does not provide
required functions in the built minimap2 library. But I may have
missed something. So I would like to ask kindly for any suggestion
which may provide a better resolution to the bug.
Please  CC me in any response since I am not subscribed to the list.
[1]: https://snapshot.debian.org/package/minimap2/

Best Regards,
Hamid Nassiby


Reply to: