Bug#984243: Help: mothur: ftbfs with GCC-11

2021-11-08 Thread Hamid Nassiby
Hi all,

The problem can be fixed following these steps:

1. Revert the commit ff8928540e0d720b8a08ee4227c1bbadc2c1e733 (now,
that is the last commit).
2. Apply this patch:

>--- a/Makefile
>+++ b/Makefile
>@@ -118,8 +118,8 @@ endif
>#
>   OBJECTS=$(patsubst %.cpp,%.o,$(wildcard $(addsuffix *.cpp,$(subdirs
>   OBJECTS+=$(patsubst %.c,%.o,$(wildcard $(addsuffix *.c,$(subdirs
>-OBJECTS+=$(patsubst %.cpp,%.o,$(wildcard *.cpp))
>-OBJECTS+=$(patsubst %.c,%.o,$(wildcard *.c))
>+OBJECTS+=$(patsubst %.cpp,%.o,$(wildcard source/*.cpp))
>+OBJECTS+=$(patsubst %.c,%.o,$(wildcard source/*.c))
>
> mothur : $(OBJECTS) uchime
>   $(CXX) $(LDFLAGS) $(TARGET_ARCH) -o $@ $(OBJECTS) $(LIBS)

In fact, the ff8928540e0d720b8a08ee4227c1bbadc2c1e733 was applied
toward a wrong Makefile, not the top one.

Regards,
Hamid


On Mon, Nov 8, 2021 at 4:25 PM Andreas Tille  wrote:
>
> Am Mon, Oct 25, 2021 at 09:16:30PM -0400 schrieb Aaron M. Ucko:
> > Andreas Tille  writes:
> >
> > > I'm wondering why the makefile stopped working just because a new compiler
> > > version is used. :-(
> >
> > Along the way, you pulled in a new upstream version, whose makefile
> > evidently wasn't quite right.
>
> I think I've found the reason for the failure:  It is the overlong line:
>
>
> g++ -Wl,-z,relro -Wl,-z,now -std=c++11 -pthread  -Lsource/calculators/  
> -Lsource/chimera/  -Lsource/classifier/  -Lsource/clearcut/  
> -Lsource/commands/  -Lsource/communitytype/  -Lsource/datastructures/  
> -Lsource/engines/  -Lsource/metastats/  -Lsource/read/  -Lsource/svm/  -o 
> mothur source/calculators/accuracy.o source/calculators/ace.o 
> source/calculators/bergerparker.o source/calculators/boneh.o 
> source/calculators/bootstrap.o source/calculators/bstick.o 
> source/calculators/calculator.o source/calculators/canberra.o 
> source/calculators/chao1.o source/calculators/coverage.o 
> source/calculators/diversityutils.o source/calculators/eachgapdist.o 
> source/calculators/eachgapignore.o source/calculators/efron.o 
> source/calculators/erarefaction.o source/calculators/f1score.o 
> source/calculators/fdr.o source/calculators/fn.o source/calculators/fp.o 
> source/calculators/fpfn.o source/calculators/geom.o 
> source/calculators/goodscoverage.o source/calculators/gower.o 
> source/calculators/hamming.o source/calculators/heip.o 
> source/calculators/hellinger.o source/calculators/igabundance.o 
> source/calculators/ignoregaps.o source/calculators/igrarefaction.o 
> source/calculators/invsimpson.o source/calculators/jackknife.o 
> source/calculators/kimura.o source/calculators/kmerdist.o 
> source/calculators/lnabundance.o source/calculators/lnrarefaction.o 
> source/calculators/lnshift.o source/calculators/logsd.o 
> source/calculators/lsabundance.o source/calculators/lsrarefaction.o 
> source/calculators/manhattan.o source/calculators/mcc.o 
> source/calculators/memchi2.o source/calculators/memchord.o 
> source/calculators/memeuclidean.o source/calculators/mempearson.o 
> source/calculators/metroig.o source/calculators/metrolognormal.o 
> source/calculators/metrologstudent.o source/calculators/metrosichel.o 
> source/calculators/npshannon.o source/calculators/npv.o 
> source/calculators/odum.o source/calculators/onegapdist.o 
> source/calculators/onegapignore.o source/calculators/parsimony.o 
> source/calculators/ppv.o source/calculators/prng.o source/calculators/qstat.o 
> source/calculators/sensitivity.o source/calculators/shannon.o 
> source/calculators/shannoneven.o source/calculators/shannonrange.o 
> source/calculators/sharedace.o source/calculators/sharedanderbergs.o 
> source/calculators/sharedbraycurtis.o source/calculators/sharedchao1.o 
> source/calculators/sharedjabund.o source/calculators/sharedjackknife.o 
> source/calculators/sharedjclass.o source/calculators/sharedjest.o 
> source/calculators/sharedjsd.o source/calculators/sharedkstest.o 
> source/calculators/sharedkulczynski.o 
> source/calculators/sharedkulczynskicody.o source/calculators/sharedlennon.o 
> source/calculators/sharedmarczewski.o source/calculators/sharedmorisitahorn.o 
> source/calculators/sharedochiai.o source/calculators/sharedrjsd.o 
> source/calculators/sharedsobs.o source/calculators/sharedsobscollectsummary.o 
> source/calculators/sharedsorabund.o source/calculators/sharedsorclass.o 
> source/calculators/sharedsorest.o source/calculators/sharedthetan.o 
> source/calculators/sharedthetayc.o source/calculators/shen.o 
> source/calculators/siabundance.o source/calculators/simpson.o sg++ 
> -Wl,-z,relro -Wl,-z,now -std=c++11 -pthread  -Lsource/calculators/  
> -Lsource/chimera/  -Lsource/classifier/  -Lsource/clearcut/  
> -Lsource/commands/  -Lsource/communitytype/  -Lsource/datastructures/  
> -Lsource/engines/  -Lsource/metastats/  -Lsource/read/  -Lsource/svm/  -o 
> mothur source/calculators/accuracy.o source/calculators/ace.o 
> source/calculators/bergerparker.o source/calculators/boneh.o 
> source/calculators/bootstrap.o 

Bug#984243: Help: mothur: ftbfs with GCC-11

2021-11-08 Thread Aaron M. Ucko
Andreas Tille  writes:

>  which has an incomplete number of arguments that is interrupted
>  by '/usr/bin/ld')

That looks like it might simply be an artifact of different buffering
policies for standard output and standard error; I expect you'll find
the remainder of the command line later on.

> Any idea how to specify the number of object files more sensibly
> to not explode the command line arguments too much?

You (or upstream) could consider using internal static libraries.

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/?a...@monk.mit.edu



Bug#984243: Help: mothur: ftbfs with GCC-11

2021-11-08 Thread Andreas Tille
Am Mon, Oct 25, 2021 at 09:16:30PM -0400 schrieb Aaron M. Ucko:
> Andreas Tille  writes:
> 
> > I'm wondering why the makefile stopped working just because a new compiler
> > version is used. :-(
> 
> Along the way, you pulled in a new upstream version, whose makefile
> evidently wasn't quite right.

I think I've found the reason for the failure:  It is the overlong line:


g++ -Wl,-z,relro -Wl,-z,now -std=c++11 -pthread  -Lsource/calculators/  
-Lsource/chimera/  -Lsource/classifier/  -Lsource/clearcut/  -Lsource/commands/ 
 -Lsource/communitytype/  -Lsource/datastructures/  -Lsource/engines/  
-Lsource/metastats/  -Lsource/read/  -Lsource/svm/  -o mothur 
source/calculators/accuracy.o source/calculators/ace.o 
source/calculators/bergerparker.o source/calculators/boneh.o 
source/calculators/bootstrap.o source/calculators/bstick.o 
source/calculators/calculator.o source/calculators/canberra.o 
source/calculators/chao1.o source/calculators/coverage.o 
source/calculators/diversityutils.o source/calculators/eachgapdist.o 
source/calculators/eachgapignore.o source/calculators/efron.o 
source/calculators/erarefaction.o source/calculators/f1score.o 
source/calculators/fdr.o source/calculators/fn.o source/calculators/fp.o 
source/calculators/fpfn.o source/calculators/geom.o 
source/calculators/goodscoverage.o source/calculators/gower.o 
source/calculators/hamming.o source/calculators/heip.o 
source/calculators/hellinger.o source/calculators/igabundance.o 
source/calculators/ignoregaps.o source/calculators/igrarefaction.o 
source/calculators/invsimpson.o source/calculators/jackknife.o 
source/calculators/kimura.o source/calculators/kmerdist.o 
source/calculators/lnabundance.o source/calculators/lnrarefaction.o 
source/calculators/lnshift.o source/calculators/logsd.o 
source/calculators/lsabundance.o source/calculators/lsrarefaction.o 
source/calculators/manhattan.o source/calculators/mcc.o 
source/calculators/memchi2.o source/calculators/memchord.o 
source/calculators/memeuclidean.o source/calculators/mempearson.o 
source/calculators/metroig.o source/calculators/metrolognormal.o 
source/calculators/metrologstudent.o source/calculators/metrosichel.o 
source/calculators/npshannon.o source/calculators/npv.o 
source/calculators/odum.o source/calculators/onegapdist.o 
source/calculators/onegapignore.o source/calculators/parsimony.o 
source/calculators/ppv.o source/calculators/prng.o source/calculators/qstat.o 
source/calculators/sensitivity.o source/calculators/shannon.o 
source/calculators/shannoneven.o source/calculators/shannonrange.o 
source/calculators/sharedace.o source/calculators/sharedanderbergs.o 
source/calculators/sharedbraycurtis.o source/calculators/sharedchao1.o 
source/calculators/sharedjabund.o source/calculators/sharedjackknife.o 
source/calculators/sharedjclass.o source/calculators/sharedjest.o 
source/calculators/sharedjsd.o source/calculators/sharedkstest.o 
source/calculators/sharedkulczynski.o source/calculators/sharedkulczynskicody.o 
source/calculators/sharedlennon.o source/calculators/sharedmarczewski.o 
source/calculators/sharedmorisitahorn.o source/calculators/sharedochiai.o 
source/calculators/sharedrjsd.o source/calculators/sharedsobs.o 
source/calculators/sharedsobscollectsummary.o 
source/calculators/sharedsorabund.o source/calculators/sharedsorclass.o 
source/calculators/sharedsorest.o source/calculators/sharedthetan.o 
source/calculators/sharedthetayc.o source/calculators/shen.o 
source/calculators/siabundance.o source/calculators/simpson.o sg++ -Wl,-z,relro 
-Wl,-z,now -std=c++11 -pthread  -Lsource/calculators/  -Lsource/chimera/  
-Lsource/classifier/  -Lsource/clearcut/  -Lsource/commands/  
-Lsource/communitytype/  -Lsource/datastructures/  -Lsource/engines/  
-Lsource/metastats/  -Lsource/read/  -Lsource/svm/  -o mothur 
source/calculators/accuracy.o source/calculators/ace.o 
source/calculators/bergerparker.o source/calculators/boneh.o 
source/calculators/bootstrap.o source/calculators/bstick.o 
source/calculators/calculator.o source/calculators/canberra.o 
source/calculators/chao1.o source/calculators/coverage.o 
source/calculators/diversityutils.o source/calculators/eachgapdist.o 
source/calculators/eachgapignore.o source/calculators/efron.o 
source/calculators/erarefaction.o source/calculators/f1score.o 
source/calculators/fdr.o source/calculators/fn.o source/calculators/fp.o 
source/calculators/fpfn.o source/calculators/geom.o 
source/calculators/goodscoverage.o source/calculators/gower.o 
source/calculators/hamming.o source/calculators/heip.o 
source/calculators/hellinger.o source/calculators/igabundance.o 
source/calculators/ignoregaps.o source/calculators/igrarefaction.o 
source/calculators/invsimpson.o source/calculators/jackknife.o 
source/calculators/kimura.o source/calculators/kmerdist.o 
source/calculators/lnabundance.o source/calculators/lnrarefaction.o 
source/calculators/lnshift.o source/calculators/logsd.o 
source/calculators/lsabundance.o 

Bug#984243: Help: mothur: ftbfs with GCC-11

2021-10-25 Thread Aaron M. Ucko
Andreas Tille  writes:

> I'm wondering why the makefile stopped working just because a new compiler
> version is used. :-(

Along the way, you pulled in a new upstream version, whose makefile
evidently wasn't quite right.

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/?a...@monk.mit.edu



Bug#984243: Help: mothur: ftbfs with GCC-11

2021-10-25 Thread Andreas Tille
Am Fri, Oct 22, 2021 at 07:46:35AM -0400 schrieb Aaron M. Ucko:
> > # Get the list of all .cpp files, rename to .o files
> > #
> > OBJECTS=$(patsubst %.cpp,%.o,$(wildcard $(addsuffix *.cpp,$(subdirs
> > OBJECTS+=$(patsubst %.c,%.o,$(wildcard $(addsuffix *.c,$(subdirs
> > OBJECTS+=$(patsubst %.cpp,%.o,$(wildcard *.cpp))
> > OBJECTS+=$(patsubst %.c,%.o,$(wildcard *.c))
> >
> > the right way to get the path correctly?  Or what do you mean?
> 
> Please try changing the last two lines to
> 
> OBJECTS+=$(patsubst %.cpp,%.o,$(wildcard source/*.cpp))
> OBJECTS+=$(patsubst %.c,%.o,$(wildcard source/*.c))
> 
> to match the relevant sources' actual location; sorry if that was unclear.
> (The existing setup only covers subdirectories of source, missing that
> directory's immediate contents.)

OK, did so but left me with 


cd source/uchime_src && export CXX=g++ && make clean && make && mv uchime 
../../ && cd ..
make[3]: Entering directory '/build/mothur-1.46.1/source/uchime_src'
make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make 
rule.
make[3]: Leaving directory '/build/mothur-1.46.1/source/uchime_src'
make[3]: Entering directory '/build/mothur-1.46.1/source/uchime_src'
make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make 
rule.
g++ -g  -o uchime 
g++: fatal error: no input files
compilation terminated.


I'm wondering why the makefile stopped working just because a new compiler
version is used. :-(

Kind regards

   Andreas. 

-- 
http://fam-tille.de



Bug#984243: Help: mothur: ftbfs with GCC-11

2021-10-22 Thread Aaron M. Ucko
Andreas Tille  writes:

> OK, I've implemented this in my last commit.

Great, thanks!

> Isn't
>
> # Get the list of all .cpp files, rename to .o files
> #
> OBJECTS=$(patsubst %.cpp,%.o,$(wildcard $(addsuffix *.cpp,$(subdirs
> OBJECTS+=$(patsubst %.c,%.o,$(wildcard $(addsuffix *.c,$(subdirs
> OBJECTS+=$(patsubst %.cpp,%.o,$(wildcard *.cpp))
> OBJECTS+=$(patsubst %.c,%.o,$(wildcard *.c))
>
> the right way to get the path correctly?  Or what do you mean?

Please try changing the last two lines to

OBJECTS+=$(patsubst %.cpp,%.o,$(wildcard source/*.cpp))
OBJECTS+=$(patsubst %.c,%.o,$(wildcard source/*.c))

to match the relevant sources' actual location; sorry if that was unclear.
(The existing setup only covers subdirectories of source, missing that
directory's immediate contents.)

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/?a...@monk.mit.edu



Bug#984243: Help: mothur: ftbfs with GCC-11

2021-10-22 Thread Andreas Tille
Hi Aaron,

Am Thu, Oct 21, 2021 at 04:21:26PM -0400 schrieb Aaron M. Ucko:
> 
> No, because std::byte supports far too few operations [1].  Instead, I'd
> suggest encouraging upstream to rename their type, and meanwhile locally
> patching source/uchime_src/makefile to add -std=c++14 to CXXFLAGS,
> thereby suppressing std::byte for now.

OK, I've implemented this in my last commit.
 
> I also found massive link errors, resolvable by correcting the top-level
> Makefile to pick up source/*.cpp and source/*.c rather than the
> nonexistent *.cpp and *.c.

I confirm these linking errors but I fail to interpret your hint here.
Isn't

# Get the list of all .cpp files, rename to .o files
#
OBJECTS=$(patsubst %.cpp,%.o,$(wildcard $(addsuffix *.cpp,$(subdirs
OBJECTS+=$(patsubst %.c,%.o,$(wildcard $(addsuffix *.c,$(subdirs
OBJECTS+=$(patsubst %.cpp,%.o,$(wildcard *.cpp))
OBJECTS+=$(patsubst %.c,%.o,$(wildcard *.c))

the right way to get the path correctly?  Or what do you mean?

Kind regards

  Andreas.
 
> [1] https://en.cppreference.com/w/cpp/types/byte

-- 
http://fam-tille.de



Bug#984243: Help: mothur: ftbfs with GCC-11

2021-10-21 Thread Étienne Mollier
Hi Andreas,

Andreas Tille, on 2021-10-21:
> In file included from addtargets2.cpp:3:
> myutils.h:176:1: error: reference to 'byte' is ambiguous

Since C++ 2017, the std::byte type is defined:

>   176 | byte *ReadAllStdioFile(FILE *f, off_t );
>   | ^~~~
> In file included from /usr/include/c++/11/bits/stl_algobase.h:61,
>  from /usr/include/c++/11/bits/char_traits.h:39,
>  from /usr/include/c++/11/string:40,
>  from myutils.h:8,
>  from addtargets2.cpp:3:
> /usr/include/c++/11/bits/cpp_type_traits.h:404:30: note: candidates are: 
> 'enum class std::byte'

The redefinition below thus gives indeterminations, as the code
is running in namespace "std":

> In file included from addtargets2.cpp:3:
> myutils.h:42:23: note: 'typedef unsigned char byte'
>42 | typedef unsigned char byte;
>   |   ^~~~
> myutils.h:177:1: error: reference to 'byte' is ambiguous

The option which seems the most viable would be to replace all
occurrences of the "byte" type by something that does not clash
with the new standard library, maybe "byte8" to be somewhat
consistent with upstream naming conventions.


In hope this helps,

Have a nice evening,  :)
-- 
Étienne Mollier 
Fingerprint:  8f91 b227 c7d6 f2b1 948c  8236 793c f67e 8f0d 11da
Sent from /dev/tty1, please excuse my verbosity.


signature.asc
Description: PGP signature


Bug#984243: Help: mothur: ftbfs with GCC-11

2021-10-21 Thread Aaron M. Ucko
Steffen Möller  writes:

> My C++ skills are a bit rosty but would removing the typedef for byte
> solve the problem?

No, because std::byte supports far too few operations [1].  Instead, I'd
suggest encouraging upstream to rename their type, and meanwhile locally
patching source/uchime_src/makefile to add -std=c++14 to CXXFLAGS,
thereby suppressing std::byte for now.

I also found massive link errors, resolvable by correcting the top-level
Makefile to pick up source/*.cpp and source/*.c rather than the
nonexistent *.cpp and *.c.

[1] https://en.cppreference.com/w/cpp/types/byte

-- 
Aaron M. Ucko, KB1CJC (amu at alum.mit.edu, ucko at debian.org)
http://www.mit.edu/~amu/ | http://stuff.mit.edu/cgi/finger/?a...@monk.mit.edu



Bug#984243: Help: mothur: ftbfs with GCC-11

2021-10-21 Thread Steffen Möller



On 21.10.21 20:21, Étienne Mollier wrote:

Hi Andreas,

Andreas Tille, on 2021-10-21:

In file included from addtargets2.cpp:3:
myutils.h:176:1: error: reference to 'byte' is ambiguous

Since C++ 2017, the std::byte type is defined:


   176 | byte *ReadAllStdioFile(FILE *f, off_t );
   | ^~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:61,
  from /usr/include/c++/11/bits/char_traits.h:39,
  from /usr/include/c++/11/string:40,
  from myutils.h:8,
  from addtargets2.cpp:3:
/usr/include/c++/11/bits/cpp_type_traits.h:404:30: note: candidates are: 'enum 
class std::byte'

The redefinition below thus gives indeterminations, as the code
is running in namespace "std":


In file included from addtargets2.cpp:3:
myutils.h:42:23: note: 'typedef unsigned char byte'
42 | typedef unsigned char byte;
   |   ^~~~
myutils.h:177:1: error: reference to 'byte' is ambiguous

The option which seems the most viable would be to replace all
occurrences of the "byte" type by something that does not clash
with the new standard library, maybe "byte8" to be somewhat
consistent with upstream naming conventions.


In hope this helps,

Have a nice evening,  :)


My C++ skills are a bit rosty but would removing the typedef for byte
solve the problem?

Best,
Steffen



Bug#984243: Help: mothur: ftbfs with GCC-11

2021-10-21 Thread Andreas Tille
Control: tags -1 help

Hi,

I've solved one gcc-11 issue that was mentioned in this bug report but
now there are other gcc-11 issues that go beyond my C++ knowledge:

...
g++ -g -O2 -ffile-prefix-map=/build/mothur-1.46.1=. -fstack-protector-strong 
-Wformat -Werror=format-security -O3 -std=c++11 -pthread -DVERSION="\"1.46.1\"" 
-DRELEASE_DATE="\"9/01/  21\"" -DUSE_READLINE -Isource  -I 
source/calculators/  -I source/chimera/  -I source/classifier/  -I 
source/clearcut/  -I source/commands/  -I source/communitytype/  -I source/ 
 datastructures/  -I source/engines/  -I source/metastats/  -I source/read/ 
 -I source/svm/ -Wdate-time -D_FORTIFY_SOURCE=2  -c -o source/svm/svm.o 
source/svm/svm.cpp
cd source/uchime_src && export CXX=g++ && make clean && make && mv uchime 
../../ && cd ..
make[3]: Entering directory '/build/mothur-1.46.1/source/uchime_src'
make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make 
rule.
make[3]: Leaving directory '/build/mothur-1.46.1/source/uchime_src'
make[3]: Entering directory '/build/mothur-1.46.1/source/uchime_src'
make[3]: warning: jobserver unavailable: using -j1.  Add '+' to parent make 
rule.
g++ -O3 -D_FILE_OFFSET_BITS=64 -DNDEBUG=1 -DUCHIMES=1 -Wdate-time 
-D_FORTIFY_SOURCE=2  -c -o addtargets2.o addtargets2.cpp
In file included from addtargets2.cpp:3:
myutils.h:176:1: error: reference to 'byte' is ambiguous
  176 | byte *ReadAllStdioFile(FILE *f, off_t );
  | ^~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:61,
 from /usr/include/c++/11/bits/char_traits.h:39,
 from /usr/include/c++/11/string:40,
 from myutils.h:8,
 from addtargets2.cpp:3:
/usr/include/c++/11/bits/cpp_type_traits.h:404:30: note: candidates are: 'enum 
class std::byte'
  404 |   enum class byte : unsigned char;
  |  ^~~~
In file included from addtargets2.cpp:3:
myutils.h:42:23: note: 'typedef unsigned char byte'
   42 | typedef unsigned char byte;
  |   ^~~~
myutils.h:177:1: error: reference to 'byte' is ambiguous
  177 | byte *ReadAllStdioFile(const string , off_t );
  | ^~~~
In file included from /usr/include/c++/11/bits/stl_algobase.h:61,
 from /usr/include/c++/11/bits/char_traits.h:39,
 from /usr/include/c++/11/string:40,
 from myutils.h:8,
 from addtargets2.cpp:3:
/usr/include/c++/11/bits/cpp_type_traits.h:404:30: note: candidates are: 'enum 
class std::byte'
  404 |   enum class byte : unsigned char;
  |  ^~~~
In file included from addtargets2.cpp:3:
myutils.h:42:23: note: 'typedef unsigned char byte'
   42 | typedef unsigned char byte;
  |   ^~~~


Any help is welcome

   Andreas.


-- 
http://fam-tille.de