[Debichem-devel] Bug#1016227: openbabel: FTBFS: obutil.h:65:14: error: ‘clock’ was not declared in this scope

Lucas Nussbaum lucas at debian.org
Fri Jul 29 17:22:41 BST 2022


Source: openbabel
Version: 3.1.1+dfsg-6
Severity: serious
Justification: FTBFS
Tags: bookworm sid ftbfs
User: lucas at debian.org
Usertags: ftbfs-20220728 ftbfs-bookworm

Hi,

During a rebuild of all packages in sid, your package failed to build
on amd64.


Relevant part (hopefully):
> cd /<<PKGBUILDDIR>>/builddir/src/formats && /usr/bin/c++ -DBUILD_LINK_AS_DLL -DHAVE_EIGEN -DHAVE_EIGEN3 -DHAVE_LIBZ -DHAVE_RADPIJSON -DHAVE_SHARED_POINTER -DHAVE_WXWIDGETS -DUSING_DYNAMIC_LIBS -DWXUSINGDLL -D_FILE_OFFSET_BITS=64 -D__WXGTK__ -Dasciiformat_EXPORTS -I/<<PKGBUILDDIR>>/builddir/include -I/<<PKGBUILDDIR>>/data -I/<<PKGBUILDDIR>>/include -I/usr/include/eigen3 -I/usr/include/cairo -I/usr/include/libxml2 -isystem /usr/lib/x86_64-linux-gnu/wx/include/gtk3-unicode-3.0 -isystem /usr/include/wx-3.0 -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -std=gnu++98 -Wdate-time -D_FORTIFY_SOURCE=2 -Wdate-time -D_FORTIFY_SOURCE=2 -pthread -fopenmp -fPIC -std=gnu++11 -MD -MT src/formats/CMakeFiles/asciiformat.dir/__/depict/asciipainter.cpp.o -MF CMakeFiles/asciiformat.dir/__/depict/asciipainter.cpp.o.d -o CMakeFiles/asciiformat.dir/__/depict/asciipainter.cpp.o -c /<<PKGBUILDDIR>>/src/depict/asciipainter.cpp
> In file included from /<<PKGBUILDDIR>>/src/depict/asciipainter.cpp:18:
> /<<PKGBUILDDIR>>/include/openbabel/obutil.h: In member function ‘void OpenBabel::OBStopwatch::Start()’:
> /<<PKGBUILDDIR>>/include/openbabel/obutil.h:65:14: error: ‘clock’ was not declared in this scope
>    65 |       start= clock();
>       |              ^~~~~
> /<<PKGBUILDDIR>>/include/openbabel/obutil.h:40:1: note: ‘clock’ is defined in header ‘<ctime>’; did you forget to ‘#include <ctime>’?
>    39 | #include <math.h>
>   +++ |+#include <ctime>
>    40 | 
> /<<PKGBUILDDIR>>/include/openbabel/obutil.h: In member function ‘double OpenBabel::OBStopwatch::Lap()’:
> /<<PKGBUILDDIR>>/include/openbabel/obutil.h:70:13: error: ‘clock’ was not declared in this scope
>    70 |       stop= clock();
>       |             ^~~~~
> /<<PKGBUILDDIR>>/include/openbabel/obutil.h:70:13: note: ‘clock’ is defined in header ‘<ctime>’; did you forget to ‘#include <ctime>’?
> /<<PKGBUILDDIR>>/include/openbabel/obutil.h:71:40: error: ‘CLOCKS_PER_SEC’ was not declared in this scope
>    71 |       return((stop - start) / (double) CLOCKS_PER_SEC);
>       |                                        ^~~~~~~~~~~~~~
> /<<PKGBUILDDIR>>/include/openbabel/obutil.h:71:40: note: the macro ‘CLOCKS_PER_SEC’ had not yet been defined
> In file included from /usr/include/time.h:33,
>                  from /usr/include/pthread.h:23,
>                  from /usr/include/x86_64-linux-gnu/c++/12/bits/gthr-default.h:35,
>                  from /usr/include/x86_64-linux-gnu/c++/12/bits/gthr.h:148,
>                  from /usr/include/c++/12/ext/atomicity.h:35,
>                  from /usr/include/c++/12/bits/ios_base.h:39,
>                  from /usr/include/c++/12/ios:42,
>                  from /usr/include/c++/12/istream:38,
>                  from /usr/include/c++/12/sstream:38,
>                  from /<<PKGBUILDDIR>>/include/openbabel/depict/painter.h:25,
>                  from /<<PKGBUILDDIR>>/include/openbabel/depict/asciipainter.h:21,
>                  from /<<PKGBUILDDIR>>/src/depict/asciipainter.cpp:19:
> /usr/include/x86_64-linux-gnu/bits/time.h:34: note: it was later defined here
>    34 | #define CLOCKS_PER_SEC  ((__clock_t) 1000000)
>       | 
> In file included from /<<PKGBUILDDIR>>/include/openbabel/op.h:25,
>                  from /<<PKGBUILDDIR>>/src/ops/gen2D.cpp:22:
> /<<PKGBUILDDIR>>/include/openbabel/plugin.h:41:42: warning: ‘template<class _Arg1, class _Arg2, class _Result> struct std::binary_function’ is deprecated [-Wdeprecated-declarations]
>    41 | struct OBERROR CharPtrLess : public std::binary_function<const char*,const char*, bool>
>       |                                          ^~~~~~~~~~~~~~~
> In file included from /usr/include/c++/12/string:48,
>                  from /usr/include/c++/12/bits/locale_classes.h:40,
>                  from /usr/include/c++/12/bits/ios_base.h:41,
>                  from /usr/include/c++/12/ios:42,
>                  from /usr/include/c++/12/ostream:38,
>                  from /usr/include/c++/12/iostream:39,
>                  from /<<PKGBUILDDIR>>/src/ops/gen2D.cpp:21:
> /usr/include/c++/12/bits/stl_function.h:131:12: note: declared here
>   131 |     struct binary_function
>       |            ^~~~~~~~~~~~~~~
> In file included from /<<PKGBUILDDIR>>/include/openbabel/format.h:22,
>                  from /<<PKGBUILDDIR>>/include/openbabel/obconversion.h:37,
>                  from /<<PKGBUILDDIR>>/include/openbabel/obmolecformat.h:36,
>                  from /<<PKGBUILDDIR>>/src/formats/MNAformat.cpp:31:
> /<<PKGBUILDDIR>>/include/openbabel/plugin.h:41:42: warning: ‘template<class _Arg1, class _Arg2, class _Result> struct std::binary_function’ is deprecated [-Wdeprecated-declarations]
>    41 | struct OBERROR CharPtrLess : public std::binary_function<const char*,const char*, bool>
>       |                                          ^~~~~~~~~~~~~~~
> In file included from /usr/include/c++/12/string:48,
>                  from /usr/include/c++/12/bits/locale_classes.h:40,
>                  from /usr/include/c++/12/bits/ios_base.h:41,
>                  from /usr/include/c++/12/ios:42,
>                  from /usr/include/c++/12/ostream:38,
>                  from /usr/include/c++/12/iostream:39,
>                  from /<<PKGBUILDDIR>>/include/openbabel/obconversion.h:24:
> /usr/include/c++/12/bits/stl_function.h:131:12: note: declared here
>   131 |     struct binary_function
>       |            ^~~~~~~~~~~~~~~
> make[4]: *** [src/formats/CMakeFiles/asciiformat.dir/build.make:93: src/formats/CMakeFiles/asciiformat.dir/__/depict/asciipainter.cpp.o] Error 1


The full build log is available from:
http://qa-logs.debian.net/2022/07/28/openbabel_3.1.1+dfsg-6_unstable.log

All bugs filed during this archive rebuild are listed at:
https://bugs.debian.org/cgi-bin/pkgreport.cgi?tag=ftbfs-20220728;users=lucas@debian.org
or:
https://udd.debian.org/bugs/?release=na&merged=ign&fnewerval=7&flastmodval=7&fusertag=only&fusertagtag=ftbfs-20220728&fusertaguser=lucas@debian.org&allbugs=1&cseverity=1&ctags=1&caffected=1#results

A list of current common problems and possible solutions is available at
http://wiki.debian.org/qa.debian.org/FTBFS . You're welcome to contribute!

If you reassign this bug to another package, please marking it as 'affects'-ing
this package. See https://www.debian.org/Bugs/server-control#affects

If you fail to reproduce this, please provide a build log and diff it with mine
so that we can identify if something relevant changed in the meantime.



More information about the Debichem-devel mailing list