Skip to content

Fixed undefined symbols PRIu64/PRIu32 and reference to clock_gettime#736

Merged
davidlunarg merged 1 commit into
LunarG:masterfrom
francoisbertelatschrodinger:build_error
Mar 7, 2019
Merged

Fixed undefined symbols PRIu64/PRIu32 and reference to clock_gettime#736
davidlunarg merged 1 commit into
LunarG:masterfrom
francoisbertelatschrodinger:build_error

Conversation

@francoisbertelatschrodinger
Copy link
Copy Markdown
Contributor

@francoisbertelatschrodinger francoisbertelatschrodinger commented Feb 25, 2019

On CentOS6.8 with a local build of g++ 6.4.0 (the default g++ version on CentOS6.8 is 4.4.7), the build fails with undefined symbol PRIu64 and PRIu32 at compile time and undefined reference to 'clock_gettime' at link time.

Fixed undefined symbols PRIu64/PRIu32 by including <cinttypes> instead of
<inttypes.h>. (a less elegant solution would be to add #define __STDC_FORMAT_MACROS prior to include <inttypes.h>). layersvt/device_simulation.cpp is a C++ file and as such should include C header files that way anyway (note that this file includes other C header files the wrong way: <stdarg.h>, <stdio.h>, <stdlib.h> and <string.h> instead of <cstdarg>, <cstdio>, <cstdlib> and <cstring> respectively. I have not fixed these inclusions in the current patch as I want to keep it minimal to address the actual build issue)

Fixed undefined reference to clock_gettime by linking rt library
This fix is similar to KhronosGroup/SPIRV-Tools#2409

Fixed undefined symbols PRIu64/PRIu32 by including <cinttypes> instead of
<inttypes.h>

Fixed undefined reference to clock_gettime by linking rt library
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Feb 25, 2019

CLA assistant check
All committers have signed the CLA.

@francoisbertelatschrodinger
Copy link
Copy Markdown
Contributor Author

In case you have not been notified automatically, I signed the CLA on Feb 28 2019.

@davidlunarg davidlunarg merged commit 14ca990 into LunarG:master Mar 7, 2019
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.

3 participants