Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to build with GCC 14 #35

Open
dweber2022 opened this issue Jun 26, 2024 · 0 comments
Open

Unable to build with GCC 14 #35

dweber2022 opened this issue Jun 26, 2024 · 0 comments

Comments

@dweber2022
Copy link
Collaborator

I suspect this issue is related to #33 given the older version of Open Babel (2.4.X) used within this project. As a temporary workaround, compiling with GCC 10.5.0 works.

Build Output

mofid/openbabel/include/openbabel/obutil.h: In member function 'void OpenBabel::OBStopwatch::Start()':
mofid/openbabel/include/openbabel/obutil.h:68:14: error: 'clock' was not declared in this scope
   68 |       start= clock();
      |              ^~~~~
mofid/openbabel/include/openbabel/obutil.h:47:1: note: 'clock' is defined in header '<ctime>'; this is probably fixable by adding '#include <ctime>'
   46 | #include <openbabel/rand.h>
  +++ |+#include <ctime>
   47 |
mofid/openbabel/include/openbabel/obutil.h: In member function 'double OpenBabel::OBStopwatch::Lap()':
mofid/openbabel/include/openbabel/obutil.h:73:13: error: 'clock' was not declared in this scope
   73 |       stop= clock();
      |             ^~~~~
mofid/openbabel/include/openbabel/obutil.h:73:13: note: 'clock' is defined in header '<ctime>'; this is probably fixable by adding '#include <ctime>'
mofid/openbabel/include/openbabel/obutil.h:74:40: error: 'CLOCKS_PER_SEC' was not declared in this scope
   74 |       return((stop - start) / (double) CLOCKS_PER_SEC);
      |                                        ^~~~~~~~~~~~~~
mofid/openbabel/include/openbabel/obutil.h:74: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/c++/14.1.1/x86_64-pc-linux-gnu/bits/gthr-default.h:35,
                 from /usr/include/c++/14.1.1/x86_64-pc-linux-gnu/bits/gthr.h:157,
                 from /usr/include/c++/14.1.1/ext/atomicity.h:35,
                 from /usr/include/c++/14.1.1/bits/ios_base.h:39,
                 from /usr/include/c++/14.1.1/ios:44,
                 from /usr/include/c++/14.1.1/istream:40,
                 from /usr/include/c++/14.1.1/sstream:40,
                 from mofid/openbabel/include/openbabel/depict/painter.h:25,
                 from mofid/openbabel/include/openbabel/depict/asciipainter.h:21,
                 from mofid/openbabel/src/depict/asciipainter.cpp:19:
/usr/include/bits/time.h:34:9: note: it was later defined here
   34 | #define CLOCKS_PER_SEC  ((__clock_t) 1000000)
      |         ^~~~~~~~~~~~~~```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant