Some investigations about bug (956136) nanopolish: FTBFS (undefined references)
Hi all,
I could find the cause. It is the `-flto` in the compile and link
flags of the libminimap2-dev package. LTO is introduced recently in
the following commit on the [1]:
53883a7ff8c066c14c0ea4e42299ae9958feda6a
Removing `-flto` from CFLAGS and LDFLAGS, then building
libminimap2-dev with pdebuild (sid), then building the nanopolish with
pbuilder (sid), will succeed.
I attached the patch which resolves the problem. It should be applied
against [1].
The conclusion:
The `-flto` behaves differently from the past maybe with the recent
changes in the build tool-chain (maybe in GCC) and causes the problem.
[1]:https://salsa.debian.org/med-team/minimap2.git
Bests,
Hamid Nassiby
From 5aa0491a6159895cdb0925617858cbca68c9e834 Mon Sep 17 00:00:00 2001
From: Hamid Nassiby <h.nassiby@gmail.com>
Date: Thu, 9 Apr 2020 23:01:48 +0430
Subject: [PATCH] Remove -flto flag
---
debian/patches/addLTO.patch | 30 ------------------------------
debian/patches/series | 1 -
2 files changed, 31 deletions(-)
delete mode 100644 debian/patches/addLTO.patch
diff --git a/debian/patches/addLTO.patch b/debian/patches/addLTO.patch
deleted file mode 100644
index 8dc0215..0000000
--- a/debian/patches/addLTO.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-Author: Steffen Moeller
-Last-Update: 2020-03-14 23:04:54 +0100
-Description: Add -flto flag
-
-Index: minimap2/Makefile
-===================================================================
---- minimap2.orig/Makefile
-+++ minimap2/Makefile
-@@ -1,10 +1,11 @@
--CFLAGS+= -g -Wall -O2 -Wc++-compat #-Wextra
-+CFLAGS+= -g -Wall -O2 -Wc++-compat -flto #-Wextra
- CPPFLAGS+= -DHAVE_KALLOC
- INCLUDES=
- OBJS= kthread.o kalloc.o misc.o bseq.o sketch.o sdust.o options.o index.o chain.o align.o hit.o map.o format.o pe.o esterr.o splitidx.o ksw2_ll_sse.o
- PROG= minimap2
- PROG_EXTRA= sdust minimap2-lite
- LIBS= -lm -lz -lpthread
-+LDFLAGS+= -flto
-
- OBJS+=ksw2_extz2_sse.o ksw2_extd2_sse.o ksw2_exts2_sse.o
-
-@@ -29,7 +30,7 @@ all:$(PROG)
- extra:all $(PROG_EXTRA)
-
- minimap2:main.o libminimap2.a
-- $(CC) $(CFLAGS) main.o -o $@ -L. -lminimap2 $(LIBS) $(LDFLAGS)
-+ $(CC) main.o -o $@ -L. -lminimap2 $(LIBS) $(LDFLAGS)
-
- minimap2-lite:example.o libminimap2.a
- $(CC) $(CFLAGS) $< -o $@ -L. -lminimap2 $(LIBS) $(LDFLAGS)
diff --git a/debian/patches/series b/debian/patches/series
index 57c6966..65c2533 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,4 @@
hardening.patch
do_not_use_natbib.bst.patch
simde
-addLTO.patch
ar.patch
--
2.25.0
Reply to: