fix compile of caching.c in cygwin
rinrin- opened this issue · 3 comments
rinrin- commented
Hi:
Please check this old patch :)
radhermit commented
Can you also paste the error message from the failed compile here? I've never tried to use snakeoil in cygwin.
rinrin- commented
Sure.
building 'snakeoil._posix' extension
creating build/temp.cygwin-2.6.0-i686-2.7
creating build/temp.cygwin-2.6.0-i686-2.7/src
gcc -fno-strict-aliasing -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python/python-2.7.10-1.i686/build=/usr/src/debug/python-2.7.10-1 -fdebug-prefix-map=/usr/src/ports/python/python-2.7.10-1.i686/src/Python-2.7.10=/usr/src/debug/python-2.7.10-1 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DHAVE_DIRENT_D_TYPE=1 -UTIME_T_LONGER_THAN_LONG -DHAVE_STAT_TV_NSEC=1 -Iinclude -I/usr/include/python2.7 -I/usr/include/python2.7 -c src/posix.c -o build/temp.cygwin-2.6.0-i686-2.7/src/posix.o
src/posix.c: In function ‘snakeoil_closerange’:
src/posix.c:785:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
while (entry = readdir(dir_handle)) {
^
gcc -shared -Wl,--enable-auto-image-base -L. build/temp.cygwin-2.6.0-i686-2.7/src/posix.o -L/usr/lib/python2.7/config -L/usr/lib -lpython2.7 -o build/lib.cygwin-2.6.0-i686-2.7/snakeoil/_posix.dll
building 'snakeoil._klass' extension
gcc -fno-strict-aliasing -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python/python-2.7.10-1.i686/build=/usr/src/debug/python-2.7.10-1 -fdebug-prefix-map=/usr/src/ports/python/python-2.7.10-1.i686/src/Python-2.7.10=/usr/src/debug/python-2.7.10-1 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DHAVE_DIRENT_D_TYPE=1 -UTIME_T_LONGER_THAN_LONG -DHAVE_STAT_TV_NSEC=1 -Iinclude -I/usr/include/python2.7 -I/usr/include/python2.7 -c src/klass.c -o build/temp.cygwin-2.6.0-i686-2.7/src/klass.o
src/klass.c: In function ‘snakeoil_mapping_slot_update’:
src/klass.c:1141:2: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
while (item = PyIter_Next(iterator)) {
^
gcc -shared -Wl,--enable-auto-image-base -L. build/temp.cygwin-2.6.0-i686-2.7/src/klass.o -L/usr/lib/python2.7/config -L/usr/lib -lpython2.7 -o build/lib.cygwin-2.6.0-i686-2.7/snakeoil/_klass.dll
building 'snakeoil._caching' extension
gcc -fno-strict-aliasing -ggdb -O2 -pipe -Wimplicit-function-declaration -fdebug-prefix-map=/usr/src/ports/python/python-2.7.10-1.i686/build=/usr/src/debug/python-2.7.10-1 -fdebug-prefix-map=/usr/src/ports/python/python-2.7.10-1.i686/src/Python-2.7.10=/usr/src/debug/python-2.7.10-1 -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -DHAVE_DIRENT_D_TYPE=1 -UTIME_T_LONGER_THAN_LONG -DHAVE_STAT_TV_NSEC=1 -Iinclude -I/usr/include/python2.7 -I/usr/include/python2.7 -c src/caching.c -o build/temp.cygwin-2.6.0-i686-2.7/src/caching.o
src/caching.c:644:2: error: initializer element is not constant
&PyType_Type, /* tp_base */
^
src/caching.c:644:2: note: (near initialization for ‘snakeoil_WeakInstMetaType.tp_base’)
error: command 'gcc' failed with exit status 1
radhermit commented
Closing since the related extensions have been removed.