poco
poco copied to clipboard
aix system NumberFormatter.cpp build error
problem
src/NumberFormatter.cpp:482:29: error: expected ')' before 'PRIXPTR'
poco info
poco : 1.12.2-all
system info
# uname -a
AIX ZEUS 1 6 00F6B0674C00
# gcc --version
gcc (GCC) 5.5.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# g++ --version
g++ (GCC) 5.5.0
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
# cmake --version
cmake version 3.5.1
CMake suite maintained and supported by Kitware (kitware.com/cmake).
#make --version
GNU Make 4.1
Built for powerpc-ibm-aix6.1.0.0
Copyright (C) 1988-2014 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
error log
src/NumberFormatter.cpp: In static member function 'static void Poco::NumberFormatter::append(std::__cxx11::string&, const void*)':
src/NumberFormatter.cpp:482:29: error: expected ')' before 'PRIXPTR'
std::sprintf(buffer, "%08" PRIXPTR, (UIntPtr) ptr);
^
src/NumberFormatter.cpp:482:51: warning: conversion lacks type at end of format [-Wformat=]
std::sprintf(buffer, "%08" PRIXPTR, (UIntPtr) ptr);
^
src/NumberFormatter.cpp:482:51: warning: too many arguments for format [-Wformat-extra-args]
/home/test/workspace/Prebuild/src/poco-1.12.2-all/build/rules/compile:59: recipe for target '/home/test/workspace/Prebuild/src/poco-1.12.2-all/Foundation/obj/AIX/00F6B0674C00/debug_shared/NumberFormatter.o' failed
make[1]: *** [/home/test/workspace/Prebuild/src/poco-1.12.2-all/Foundation/obj/AIX/00F6B0674C00/debug_shared/NumberFormatter.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: Leaving directory '/home/test/workspace/Prebuild/src/poco-1.12.2-all/Foundation'
Makefile:131: recipe for target 'Foundation-libexec' failed
make: *** [Foundation-libexec] Error 2
@OneTop4458 that's quite an old g++ version on a not-so-common platform; I'm afraid you'll have to find the magic incantation yourself and send a fix PR
All right. I'll fix it if I can
Try defining __STDC_LIMIT_MACROS
before this include:
https://github.com/pocoproject/poco/blob/49f6def959f33a46a5bc87ccd80129fdad0b74eb/Foundation/src/NumberFormatter.cpp#L27
I worked it out the way I told you Thank you.