Fedora Account System
Red Hat Associate
Red Hat Customer
Jasper worked fine with 0:1.900.1-16.el6_6.3 but no longer works after update to 0:1.900.1-21.el6_9 -- Simple reproducer #include <iostream> #include <jasper/jasper.h> using namespace std; int main () { cout << "Hello World!"; return 0; } # g++ test.cpp In file included from /usr/include/jasper/jasper.h:77, from test.cpp:2: /usr/include/jasper/jas_math.h: In function ‘bool jas_safe_size_mul(size_t, size_t, size_t*)’: /usr/include/jasper/jas_math.h:143: error: ‘SIZE_MAX’ was not declared in this scope /usr/include/jasper/jas_math.h: In function ‘bool jas_safe_size_add(size_t, size_t, size_t*)’: /usr/include/jasper/jas_math.h:170: error: ‘SIZE_MAX’ was not declared in this scope --- Additional comment from Josef Ridky on 2017-05-25 02:46:10 EDT --- Problem is in stdint.h header file due this statement: /* The ISO C99 standard specifies that in C++ implementations these macros should only be defined if explicitly requested. */ #if !defined __cplusplus || defined __STDC_LIMIT_MACROS Compiling with g++ -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS foo.cpp will fix this issue. --- Additional comment from Tomas Hoger on 2017-05-25 06:13:14 EDT --- Would we fix this by: #ifndef SIZE_MAX #define SIZE_MAX ((size_t) - 1) #endif added to jas_math.h after: #include <stdint.h> possibly inside of: #ifdef __cplusplus ?
This issue is not presented in Fedora distribution.
It seems the above workaround should not be needed when using glibc 2.18 and later: https://sourceware.org/bugzilla/show_bug.cgi?id=15366 https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=1ef74943ce2f114c78b215af57c2ccc72ccdb0b7