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

Add missing include of <ctime> to fix build with glibc 2.36 #2533

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

schnitzeltony
Copy link

| include/openbabel/obutil.h:65:14: error: 'clock' was not declared in this scope
| 65 | start= clock();
| | ^~~~~
| include/openbabel/obutil.h:40:1: note: 'clock' is defined in header ''; did you forget to '#include '?
| 39 | #include <math.h>
| +++ |+#include
| 40 |
| include/openbabel/obutil.h: In member function 'double OpenBabel::OBStopwatch::Lap()':
| include/openbabel/obutil.h:70:13: error: 'clock' was not declared in this scope
| 70 | stop= clock();
| | ^~~~~
| include/openbabel/obutil.h:70:13: note: 'clock' is defined in header ''; did you forget to '#include '?
| include/openbabel/obutil.h:71:40: error: 'CLOCKS_PER_SEC' was not declared in this scope
| 71 | return((stop - start) / (double) CLOCKS_PER_SEC);
| | ^~~~~~~~~~~~~~
| include/openbabel/obutil.h:71:40: note: the macro 'CLOCKS_PER_SEC' had not yet been defined

Signed-off-by: Andreas Müller schnitzeltony@gmail.com

| include/openbabel/obutil.h:65:14: error: 'clock' was not declared in this scope
|    65 |       start= clock();
|       |              ^~~~~
| 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 |
| include/openbabel/obutil.h: In member function 'double OpenBabel::OBStopwatch::Lap()':
| include/openbabel/obutil.h:70:13: error: 'clock' was not declared in this scope
|    70 |       stop= clock();
|       |             ^~~~~
| include/openbabel/obutil.h:70:13: note: 'clock' is defined in header '<ctime>'; did you forget to '#include <ctime>'?
| include/openbabel/obutil.h:71:40: error: 'CLOCKS_PER_SEC' was not declared in this scope
|    71 |       return((stop - start) / (double) CLOCKS_PER_SEC);
|       |                                        ^~~~~~~~~~~~~~
| include/openbabel/obutil.h:71:40: note: the macro 'CLOCKS_PER_SEC' had not yet been defined

Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
@welcome
Copy link

welcome bot commented Sep 6, 2022

Thanks for opening this pull request! Please check out our contributing guidelines and please examine any build issues.

@fredrikw
Copy link
Contributor

fredrikw commented Sep 7, 2022

Probably fixed by #2493? According to the comments in #2529

@cryos
Copy link
Member

cryos commented Apr 2, 2023

I was just looking into this as we are using the 3.1.1 release in the Avogadro superbuild. The fix already applied resolves this issue for me. I could use a new release to pin our build to, but I have patched locally and see everything works. I would recommend closing this pull request.

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

Successfully merging this pull request may close these issues.

None yet

3 participants