How to install aggdraw after this error?

I am trying to install the python aggdraw library to create high quality graphics, but I keep getting this error:

agg22/include/agg_array.h: In member function `agg::int8u*

What is the workaround for this? How to install it?

+3
source share
2 answers

You should follow the instructions from http://www.pocketuniverse.ca/archive/2008/december/11/pil-and-aggdraw/ to fix the AGG, and not just the compiler to allow compilation of 64-bit incompatible code.

Here is one way to do this in a shell:

cd /tmp
svn co http://svn.effbot.org/public/tags/aggdraw-1.2a3-20060212
cd aggdraw-1.2a3-20060212
patch -p0 <<EOF
Index: agg2/include/agg_array.h
===================================================================
--- agg2/include/agg_array.h    (revision 532)
+++ agg2/include/agg_array.h    (working copy)
@@ -520,7 +520,7 @@
                 int8u* ptr = m_buf_ptr;
                 if(alignment > 1)
                 {
-                    unsigned align = (alignment - unsigned(ptr) % alignment) % alignment;
+                    unsigned align = (alignment - (unsigned long)(ptr) % alignment) % alignment;
                     size += align;
                     ptr += align;
                     if(size <= m_rest)
EOF

python setup.py build_ext -i
python selftest.py
sudo python setup.py install
+10
source

(Yes, I answer my question)

After searching the internet many times, I found that doing

export CFLAGS="-fpermissive"   

python setup.py build_ext -i, , .

+3

Source: https://habr.com/ru/post/1759720/


All Articles