Closed
Description
Attempting to install libsass-python on Cygwin fails to run; it instead displays errors:
In file included from /usr/include/python3.4m/Python.h:8:0,
from pysass.cpp:2:
/usr/include/python3.4m/pyconfig.h:1440:0: warning: "__BSD_VISIBLE" redefined
#define __BSD_VISIBLE 1
^
In file included from /usr/include/sys/config.h:5:0,
from /usr/include/_ansi.h:16,
from /usr/include/string.h:10,
from pysass.cpp:1:
/usr/include/sys/features.h:250:0: note: this is the location of the previous definition
#define __BSD_VISIBLE 0
^
In file included from /usr/include/python3.4m/pyport.h:335:0,
from /usr/include/python3.4m/Python.h:50,
from pysass.cpp:2:
/usr/include/sys/time.h:104:34: error: ‘u_int’ has not been declared
bintime_mul(struct bintime *_bt, u_int _x)
^
pysass.cpp: In function ‘Sass_Import** _call_py_importer_f(const char*, Sass_Importer_Entry, Sass_Compiler*)’:
pysass.cpp:464:55: error: ‘strdup’ was not declared in this scope
if (source_str) source_str = strdup(source_str);
^
pysass.cpp:465:64: error: ‘strdup’ was not declared in this scope
if (sourcemap_str) sourcemap_str = strdup(sourcemap_str);
^
pysass.cpp: In function ‘PyObject* PySass_compile_string(PyObject*, PyObject*)’:
pysass.cpp:530:51: error: ‘strdup’ was not declared in this scope
context = sass_make_data_context(strdup(string));
^
error: command 'gcc' failed with exit status 1
It appears that Cygwin's gcc doesn't define strdup from strings.h when in -std=c++0x mode. Using -std=gnu++0x this all compiles fine. Using the same version of gcc (5.4.0) on Ubunutu works fine.