Can't build on Heroku despite libicu-dev
Created by: miracle2k
I want to use PyICU on Heroku.
I installed libicu-dev via heroku-buildpack-apt.
During build, I see this:
building '_icu' extension
creating build/temp.linux-x86_64-2.7
gcc -pthread -fno-strict-aliasing -g -O2 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -fPIC -I/app/.heroku/python/include/python2.7 -c iterators.cpp -o build/temp.linux-x86_64-2.7/iterators.o -DPYICU_VER="1.9.3"
cc1plus: warning: command line option ‘-Wstrict-prototypes’ is valid for C/ObjC but not for C++ [enabled by default]
In file included from /usr/include/c++/4.8/clocale:42:0,
from /usr/include/x86_64-linux-gnu/c++/4.8/bits/c++locale.h:41,
from /usr/include/c++/4.8/bits/localefwd.h:40,
from /usr/include/c++/4.8/string:43,
from /app/.apt/usr/include/x86_64-linux-gnu/unicode/std_string.h:30,
from /app/.apt/usr/include/x86_64-linux-gnu/unicode/unistr.h:31,
from common.h:91,
from iterators.cpp:24:
./locale.h:29:23: error: ‘Locale’ was not declared in this scope
PyObject *wrap_Locale(Locale *locale, int flags);
^
./locale.h:29:31: error: ‘locale’ was not declared in this scope
PyObject *wrap_Locale(Locale *locale, int flags);
^
./locale.h:29:39: error: expected primary-expression before ‘int’
PyObject *wrap_Locale(Locale *locale, int flags);
^
./locale.h:29:48: error: expression list treated as compound expression in initializer [-fpermissive]
PyObject *wrap_Locale(Locale *locale, int flags);
^
./locale.h:30:29: error: ‘Locale’ does not name a type
PyObject *wrap_Locale(const Locale &locale);
^
./locale.h:30:43: error: ‘PyObject* wrap_Locale(const int&)’ redeclared as different kind of symbol
PyObject *wrap_Locale(const Locale &locale);
^
./locale.h:29:11: error: previous declaration of ‘PyObject* wrap_Locale’
PyObject *wrap_Locale(Locale *locale, int flags);
^
In file included from /usr/include/x86_64-linux-gnu/c++/4.8/bits/c++locale.h:41:0,
from /usr/include/c++/4.8/bits/localefwd.h:40,
from /usr/include/c++/4.8/string:43,
from /app/.apt/usr/include/x86_64-linux-gnu/unicode/std_string.h:30,
from /app/.apt/usr/include/x86_64-linux-gnu/unicode/unistr.h:31,
from common.h:91,
from iterators.cpp:24:
/usr/include/c++/4.8/clocale:53:11: error: ‘::lconv’ has not been declared
using ::lconv;
^
/usr/include/c++/4.8/clocale:54:11: error: ‘::setlocale’ has not been declared
using ::setlocale;
^
/usr/include/c++/4.8/clocale:55:11: error: ‘::localeconv’ has not been declared
using ::localeconv;
^
In file included from /usr/include/c++/4.8/bits/localefwd.h:40:0,
from /usr/include/c++/4.8/string:43,
from /app/.apt/usr/include/x86_64-linux-gnu/unicode/std_string.h:30,
from /app/.apt/usr/include/x86_64-linux-gnu/unicode/unistr.h:31,
from common.h:91,
from iterators.cpp:24:
/usr/include/x86_64-linux-gnu/c++/4.8/bits/c++locale.h:52:23: error: ‘uselocale’ was not declared in this scope
extern "C" __typeof(uselocale) __uselocale;
^
/usr/include/x86_64-linux-gnu/c++/4.8/bits/c++locale.h:52:45: error: invalid type in declaration before ‘;’ token
extern "C" __typeof(uselocale) __uselocale;
^
/usr/include/x86_64-linux-gnu/c++/4.8/bits/c++locale.h: In function ‘int std::__convert_from_v(__locale_struct* const&, char*, int, const char*, ...)’:
/usr/include/x86_64-linux-gnu/c++/4.8/bits/c++locale.h:75:53: error: ‘__gnu_cxx::__uselocale’ cannot be used as a function
__c_locale __old = __gnu_cxx::__uselocale(__cloc);
^
/usr/include/x86_64-linux-gnu/c++/4.8/bits/c++locale.h:100:33: error: ‘__gnu_cxx::__uselocale’ cannot be used as a function
__gnu_cxx::__uselocale(__old);
^
iterators.cpp: In function ‘PyObject* t_breakiterator_getLocale(t_breakiterator*, PyObject*)’:
iterators.cpp:802:34: error: ‘wrap_Locale’ cannot be used as a function
return wrap_Locale(locale);
^
iterators.cpp:807:38: error: ‘wrap_Locale’ cannot be used as a function
return wrap_Locale(locale);
^
iterators.cpp: In function ‘PyObject* t_breakiterator_getAvailableLocales(PyTypeObject*)’:
iterators.cpp:936:46: error: ‘wrap_Locale’ cannot be used as a function
PyObject *obj = wrap_Locale(locale, 0);
^
error: command 'gcc' failed with exit status 1
Environment:
~ $ echo $LD_LIBRARY_PATH
/app/.heroku/vendor/lib:/app/.heroku/python/lib:/app/.apt/usr/lib/x86_64-linux-gnu:/app/.apt/usr/lib/i386-linux-gnu:/app/.apt/usr/lib: