Dear Daniel,

I forward you a patch from Ubuntu, that reorders parameters passed to ld, in
order to build velvet with the --as-needed option of ld.  Would you consider
it for your next release ?

You can also download the patch from the URL below for more convenience.

  
http://bugs.debian.org/cgi-bin/bugreport.cgi?msg=5;filename=as-needed.patch;att=1;bug=647415

Have a nice day,

-- Charles

Le Wed, Nov 02, 2011 at 05:27:10PM +0300, Ilya Barygin a écrit :
> Package: velvet
> Version: 1.1.06~nozlibcopy-1
> Severity: normal
> Tags: upstream patch
> User: debian-...@lists.debian.org
> Usertags: ld-as-needed
> 
> velvet fails to build when --as-needed linker option is enabled,
> because of incorrect order of parameters passed to ld. Here's a log of
> failed build in Ubuntu:
> https://launchpadlibrarian.net/83108674/buildlog_ubuntu-precise-i386.velvet_1.1.06%7Enozlibcopy-1_FAILEDTOBUILD.txt.gz
> 
> See also
> http://wiki.debian.org/ToolChain/DSOLinking#Only_link_with_needed_libraries
> 
> The attached patch was used in Ubuntu to fix the problem.
> https://launchpad.net/ubuntu/+source/velvet/1.1.06~nozlibcopy-1ubuntu1
> 
> -- System Information:
> Debian Release: wheezy/sid
>   APT prefers oneiric-updates
>   APT policy: (500, 'oneiric-updates'), (500, 'oneiric-security'), (500, 
> 'oneiric-proposed'), (500, 'oneiric'), (100, 'oneiric-backports')
> Architecture: i386 (i686)
> 
> Kernel: Linux 3.0.0-13-generic (SMP w/2 CPU cores)
> Locale: LANG=ru_RU.UTF-8, LC_CTYPE=ru_RU.UTF-8 (charmap=UTF-8)
> Shell: /bin/sh linked to /bin/dash

> Description: fix FTBFS with --as-needed linker option
> Author: Ilya Barygin <randomact...@ubuntu.com>
> 
> --- velvet-1.1.06~nozlibcopy.orig/Makefile
> +++ velvet-1.1.06~nozlibcopy/Makefile
> @@ -1,7 +1,7 @@
>  CC = gcc
>  CFLAGS = -Wall
>  DEBUG = -g
> -LDFLAGS = -lm
> +LIBS = -lm
>  OPT = -O3
>  MAXKMERLENGTH=31
>  CATEGORIES=2
> @@ -67,26 +67,26 @@ clean-zlib :
>  endif
>  
>  velveth : obj 
> -     $(CC) $(CFLAGS) $(OPT) $(LDFLAGS) -o velveth obj/tightString.o 
> obj/run.o obj/recycleBin.o obj/splay.o obj/splayTable.o obj/readSet.o 
> obj/utility.o obj/kmer.o obj/kmerOccurenceTable.o $(Z_LIB_FILES)
> +     $(CC) $(CFLAGS) $(OPT) $(LDFLAGS) -o velveth obj/tightString.o 
> obj/run.o obj/recycleBin.o obj/splay.o obj/splayTable.o obj/readSet.o 
> obj/utility.o obj/kmer.o obj/kmerOccurenceTable.o $(Z_LIB_FILES) $(LIBS)
>  
>  
>  velvetg : obj
> -     $(CC) $(CFLAGS) $(OPT) $(LDFLAGS) -o velvetg obj/tightString.o 
> obj/graph.o obj/run2.o obj/fibHeap.o obj/fib.o obj/concatenatedGraph.o 
> obj/passageMarker.o obj/graphStats.o obj/correctedGraph.o obj/dfib.o 
> obj/dfibHeap.o obj/recycleBin.o obj/readSet.o obj/shortReadPairs.o 
> obj/scaffold.o obj/locallyCorrectedGraph.o obj/graphReConstruction.o 
> obj/roadMap.o obj/preGraph.o obj/preGraphConstruction.o 
> obj/concatenatedPreGraph.o obj/readCoherentGraph.o obj/utility.o obj/kmer.o 
> obj/kmerOccurenceTable.o obj/allocArray.o $(Z_LIB_FILES)
> +     $(CC) $(CFLAGS) $(OPT) $(LDFLAGS) -o velvetg obj/tightString.o 
> obj/graph.o obj/run2.o obj/fibHeap.o obj/fib.o obj/concatenatedGraph.o 
> obj/passageMarker.o obj/graphStats.o obj/correctedGraph.o obj/dfib.o 
> obj/dfibHeap.o obj/recycleBin.o obj/readSet.o obj/shortReadPairs.o 
> obj/scaffold.o obj/locallyCorrectedGraph.o obj/graphReConstruction.o 
> obj/roadMap.o obj/preGraph.o obj/preGraphConstruction.o 
> obj/concatenatedPreGraph.o obj/readCoherentGraph.o obj/utility.o obj/kmer.o 
> obj/kmerOccurenceTable.o obj/allocArray.o $(Z_LIB_FILES) $(LIBS)
>  
>  debug : override DEF := $(DEF) -D DEBUG 
>  debug : cleanobj obj/dbg
> -     $(CC) $(CFLAGS) $(LDFLAGS) $(DEBUG) -o velveth obj/dbg/tightString.o 
> obj/dbg/run.o obj/dbg/recycleBin.o obj/dbg/splay.o obj/dbg/splayTable.o 
> obj/dbg/readSet.o obj/dbg/utility.o obj/dbg/kmer.o 
> obj/dbg/kmerOccurenceTable.o obj/dbg/allocArray.o $(Z_LIB_FILES)
> -     $(CC) $(CFLAGS) $(LDFLAGS) $(DEBUG) -o velvetg obj/dbg/tightString.o 
> obj/dbg/graph.o obj/dbg/run2.o obj/dbg/fibHeap.o obj/dbg/fib.o 
> obj/dbg/concatenatedGraph.o obj/dbg/passageMarker.o obj/dbg/graphStats.o 
> obj/dbg/correctedGraph.o obj/dbg/dfib.o obj/dbg/dfibHeap.o 
> obj/dbg/recycleBin.o obj/dbg/readSet.o obj/dbg/shortReadPairs.o 
> obj/dbg/scaffold.o obj/dbg/locallyCorrectedGraph.o 
> obj/dbg/graphReConstruction.o obj/dbg/roadMap.o obj/dbg/preGraph.o 
> obj/dbg/preGraphConstruction.o obj/dbg/concatenatedPreGraph.o 
> obj/dbg/readCoherentGraph.o obj/dbg/utility.o obj/dbg/kmer.o 
> obj/dbg/kmerOccurenceTable.o obj/dbg/allocArray.o $(Z_LIB_FILES)
> +     $(CC) $(CFLAGS) $(LDFLAGS) $(DEBUG) -o velveth obj/dbg/tightString.o 
> obj/dbg/run.o obj/dbg/recycleBin.o obj/dbg/splay.o obj/dbg/splayTable.o 
> obj/dbg/readSet.o obj/dbg/utility.o obj/dbg/kmer.o 
> obj/dbg/kmerOccurenceTable.o obj/dbg/allocArray.o $(Z_LIB_FILES) $(LIBS)
> +     $(CC) $(CFLAGS) $(LDFLAGS) $(DEBUG) -o velvetg obj/dbg/tightString.o 
> obj/dbg/graph.o obj/dbg/run2.o obj/dbg/fibHeap.o obj/dbg/fib.o 
> obj/dbg/concatenatedGraph.o obj/dbg/passageMarker.o obj/dbg/graphStats.o 
> obj/dbg/correctedGraph.o obj/dbg/dfib.o obj/dbg/dfibHeap.o 
> obj/dbg/recycleBin.o obj/dbg/readSet.o obj/dbg/shortReadPairs.o 
> obj/dbg/scaffold.o obj/dbg/locallyCorrectedGraph.o 
> obj/dbg/graphReConstruction.o obj/dbg/roadMap.o obj/dbg/preGraph.o 
> obj/dbg/preGraphConstruction.o obj/dbg/concatenatedPreGraph.o 
> obj/dbg/readCoherentGraph.o obj/dbg/utility.o obj/dbg/kmer.o 
> obj/dbg/kmerOccurenceTable.o obj/dbg/allocArray.o $(Z_LIB_FILES) $(LIBS)
>  
>  color : override DEF := $(DEF) -D COLOR
>  color : cleanobj obj_de
> -     $(CC) $(CFLAGS) $(OPT) $(LDFLAGS) -o velveth_de obj/tightString.o 
> obj/run.o obj/recycleBin.o obj/splay.o obj/splayTable.o obj/readSet.o 
> obj/utility.o obj/kmer.o obj/kmerOccurenceTable.o obj/allocArray.o 
> $(Z_LIB_FILES)
> -     $(CC) $(CFLAGS) $(OPT) $(LDFLAGS) -o velvetg_de obj/tightString.o 
> obj/graph.o obj/run2.o obj/fibHeap.o obj/fib.o obj/concatenatedGraph.o 
> obj/passageMarker.o obj/graphStats.o obj/correctedGraph.o obj/dfib.o 
> obj/dfibHeap.o obj/recycleBin.o obj/readSet.o obj/shortReadPairs.o 
> obj/scaffold.o obj/locallyCorrectedGraph.o obj/graphReConstruction.o 
> obj/roadMap.o obj/preGraph.o obj/preGraphConstruction.o 
> obj/concatenatedPreGraph.o obj/readCoherentGraph.o obj/utility.o obj/kmer.o 
> obj/kmerOccurenceTable.o obj/allocArray.o $(Z_LIB_FILES)
> +     $(CC) $(CFLAGS) $(OPT) $(LDFLAGS) -o velveth_de obj/tightString.o 
> obj/run.o obj/recycleBin.o obj/splay.o obj/splayTable.o obj/readSet.o 
> obj/utility.o obj/kmer.o obj/kmerOccurenceTable.o obj/allocArray.o 
> $(Z_LIB_FILES) $(LIBS)
> +     $(CC) $(CFLAGS) $(OPT) $(LDFLAGS) -o velvetg_de obj/tightString.o 
> obj/graph.o obj/run2.o obj/fibHeap.o obj/fib.o obj/concatenatedGraph.o 
> obj/passageMarker.o obj/graphStats.o obj/correctedGraph.o obj/dfib.o 
> obj/dfibHeap.o obj/recycleBin.o obj/readSet.o obj/shortReadPairs.o 
> obj/scaffold.o obj/locallyCorrectedGraph.o obj/graphReConstruction.o 
> obj/roadMap.o obj/preGraph.o obj/preGraphConstruction.o 
> obj/concatenatedPreGraph.o obj/readCoherentGraph.o obj/utility.o obj/kmer.o 
> obj/kmerOccurenceTable.o obj/allocArray.o $(Z_LIB_FILES) $(LIBS)
>  
>  colordebug : override DEF := $(DEF) -D COLOR -D DEBUG
>  colordebug : cleanobj obj/dbg_de
> -     $(CC) $(CFLAGS) $(LDFLAGS) $(DEBUG) -o velveth_de obj/dbg/tightString.o 
> obj/dbg/run.o obj/dbg/recycleBin.o obj/dbg/splay.o obj/dbg/splayTable.o 
> obj/dbg/readSet.o obj/dbg/utility.o obj/dbg/kmer.o 
> obj/dbg/kmerOccurenceTable.o obj/dbg/allocArray.o $(Z_LIB_FILES)
> -     $(CC) $(CFLAGS) $(LDFLAGS) $(DEBUG) -o velvetg_de obj/dbg/tightString.o 
> obj/dbg/graph.o obj/dbg/run2.o obj/dbg/fibHeap.o obj/dbg/fib.o 
> obj/dbg/concatenatedGraph.o obj/dbg/passageMarker.o obj/dbg/graphStats.o 
> obj/dbg/correctedGraph.o obj/dbg/dfib.o obj/dbg/dfibHeap.o 
> obj/dbg/recycleBin.o obj/dbg/readSet.o obj/dbg/shortReadPairs.o 
> obj/dbg/scaffold.o obj/dbg/locallyCorrectedGraph.o 
> obj/dbg/graphReConstruction.o obj/dbg/roadMap.o obj/dbg/preGraph.o 
> obj/dbg/preGraphConstruction.o obj/dbg/concatenatedPreGraph.o 
> obj/dbg/readCoherentGraph.o obj/dbg/utility.o obj/dbg/kmer.o 
> obj/dbg/kmerOccurenceTable.o obj/dbg/allocArray.o $(Z_LIB_FILES)
> +     $(CC) $(CFLAGS) $(LDFLAGS) $(DEBUG) -o velveth_de obj/dbg/tightString.o 
> obj/dbg/run.o obj/dbg/recycleBin.o obj/dbg/splay.o obj/dbg/splayTable.o 
> obj/dbg/readSet.o obj/dbg/utility.o obj/dbg/kmer.o 
> obj/dbg/kmerOccurenceTable.o obj/dbg/allocArray.o $(Z_LIB_FILES) $(LIBS)
> +     $(CC) $(CFLAGS) $(LDFLAGS) $(DEBUG) -o velvetg_de obj/dbg/tightString.o 
> obj/dbg/graph.o obj/dbg/run2.o obj/dbg/fibHeap.o obj/dbg/fib.o 
> obj/dbg/concatenatedGraph.o obj/dbg/passageMarker.o obj/dbg/graphStats.o 
> obj/dbg/correctedGraph.o obj/dbg/dfib.o obj/dbg/dfibHeap.o 
> obj/dbg/recycleBin.o obj/dbg/readSet.o obj/dbg/shortReadPairs.o 
> obj/dbg/scaffold.o obj/dbg/locallyCorrectedGraph.o 
> obj/dbg/graphReConstruction.o obj/dbg/roadMap.o obj/dbg/preGraph.o 
> obj/dbg/preGraphConstruction.o obj/dbg/concatenatedPreGraph.o 
> obj/dbg/readCoherentGraph.o obj/dbg/utility.o obj/dbg/kmer.o 
> obj/dbg/kmerOccurenceTable.o obj/dbg/allocArray.o $(Z_LIB_FILES) $(LIBS)
>  
>  objdir:
>       mkdir -p obj

> _______________________________________________
> Debian-med-packaging mailing list
> debian-med-packag...@lists.alioth.debian.org
> http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-packaging


-- 
Charles Plessy
Debian Med packaging team,
http://www.debian.org/devel/debian-med
Tsurumi, Kanagawa, Japan



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to