Results of the study on #20872:
I finally solved the problem, with Slush Customer Support's help.
edit setup.py
find "-march=native", change the value to "armv6j"
retry(focus on what below "building 'midstate' extension"):
pi@raspberrypi ~/stratum-mining-proxy $ sudo python setup.py develop
running develop
Checking .pth file support in /usr/local/lib/python2.7/dist-packages/
/usr/bin/python -E -c pass
TEST PASSED: /usr/local/lib/python2.7/dist-packages/ appears to support .pth files
running egg_info
writing requirements to stratum_mining_proxy.egg-info/requires.txt
writing stratum_mining_proxy.egg-info/PKG-INFO
writing top-level names to stratum_mining_proxy.egg-info/top_level.txt
writing dependency_links to stratum_mining_proxy.egg-info/dependency_links.txt
reading manifest file 'stratum_mining_proxy.egg-info/SOURCES.txt'
writing manifest file 'stratum_mining_proxy.egg-info/SOURCES.txt'
running build_ext
building 'midstate' extension
gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -I/usr/include/python2.7 -c midstatec/midstatemodule.c -o build/temp.linux-armv6l-2.7/midstatec/midstatemodule.o -march=armv6j -Wall -funroll-all-loops -O3 -fstrict-aliasing -Wall -std=c99 -fPIC -shared
creating build/lib.linux-armv6l-2.7
gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro build/temp.linux-armv6l-2.7/midstatec/midstatemodule.o -lpython2.7 -o build/lib.linux-armv6l-2.7/midstate.so -Wl,-O1 -Wl,--as-needed
copying build/lib.linux-armv6l-2.7/midstate.so ->
Creating /usr/local/lib/python2.7/dist-packages/stratum-mining-proxy.egg-link (link to .)
Adding stratum-mining-proxy 1.5.7 to easy-install.pth file
Installing mining_proxy.py script to /usr/local/bin
Installed /home/pi/stratum-mining-proxy
Processing dependencies for stratum-mining-proxy==1.5.7
Searching for stratum>=0.2.15
Reading http://pypi.python.org/simple/stratum/
Best match: stratum 0.2.15
Downloading https://pypi.python.org/packages/source/s/stratum/stratum-0.2.15.tar.gz#md5=29d2027bdbbc23fe74235a4f4e7368cd
Processing stratum-0.2.15.tar.gz
Writing /tmp/easy_install-L27eYY/stratum-0.2.15/setup.cfg
Running stratum-0.2.15/setup.py -q bdist_egg --dist-dir /tmp/easy_install-L27eYY/stratum-0.2.15/egg-dist-tmp-RVpUmR
Adding stratum 0.2.15 to easy-install.pth file
Installed /usr/local/lib/python2.7/dist-packages/stratum-0.2.15-py2.7.egg
Searching for twisted>=12.2.0
Reading http://pypi.python.org/simple/twisted/
Best match: Twisted 15.1.0
Downloading https://pypi.python.org/packages/source/T/Twisted/Twisted-15.1.0.tar.bz2#md5=df65e3da0bee81140e7637156802a518
Processing Twisted-15.1.0.tar.bz2
Writing /tmp/easy_install-lf0Hoj/Twisted-15.1.0/setup.cfg
Running Twisted-15.1.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-lf0Hoj/Twisted-15.1.0/egg-dist-tmp-EURlzM
Adding Twisted 15.1.0 to easy-install.pth file
Installing conch script to /usr/local/bin
Installing lore script to /usr/local/bin
Installing twistd script to /usr/local/bin
Installing pyhtmlizer script to /usr/local/bin
Installing ckeygen script to /usr/local/bin
Installing trial script to /usr/local/bin
Installing tap2rpm script to /usr/local/bin
Installing tkconch script to /usr/local/bin
Installing tap2deb script to /usr/local/bin
Installing tapconvert script to /usr/local/bin
Installing mailmail script to /usr/local/bin
Installing manhole script to /usr/local/bin
Installing cftp script to /usr/local/bin
Installed /usr/local/lib/python2.7/dist-packages/Twisted-15.1.0-py2.7-linux-armv6l.egg
Searching for autobahn
Reading http://pypi.python.org/simple/autobahn/
Best match: autobahn 0.10.4
Downloading https://pypi.python.org/packages/source/a/autobahn/autobahn-0.10.4.tar.gz#md5=4ae22413ee9ba8f6692e80e171b68777
Processing autobahn-0.10.4.tar.gz
Writing /tmp/easy_install-I_Api3/autobahn-0.10.4/setup.cfg
Running autobahn-0.10.4/setup.py -q bdist_egg --dist-dir /tmp/easy_install-I_Api3/autobahn-0.10.4/egg-dist-tmp-SPJM9W
package init file 'twisted/plugins/__init__.py' not found (or not a regular file)
Adding autobahn 0.10.4 to easy-install.pth file
Installed /usr/local/lib/python2.7/dist-packages/autobahn-0.10.4-py2.7.egg
Searching for ecdsa
Reading http://pypi.python.org/simple/ecdsa/
Best match: ecdsa 0.13
Downloading https://pypi.python.org/packages/source/e/ecdsa/ecdsa-0.13.tar.gz#md5=1f60eda9cb5c46722856db41a3ae6670
Processing ecdsa-0.13.tar.gz
Writing /tmp/easy_install-nTHEUJ/ecdsa-0.13/setup.cfg
Running ecdsa-0.13/setup.py -q bdist_egg --dist-dir /tmp/easy_install-nTHEUJ/ecdsa-0.13/egg-dist-tmp-b8K68L
zip_safe flag not set; analyzing archive contents...
Adding ecdsa 0.13 to easy-install.pth file
Installed /usr/local/lib/python2.7/dist-packages/ecdsa-0.13-py2.7.egg
Searching for zope.interface>=3.6.0
Reading http://pypi.python.org/simple/zope.interface/
Best match: zope.interface 4.1.2
Downloading https://pypi.python.org/packages/source/z/zope.interface/zope.interface-4.1.2.tar.gz#md5=04298faeaa70b4f3b23fa2ae8987262c
Processing zope.interface-4.1.2.tar.gz
Writing /tmp/easy_install-wEMb0k/zope.interface-4.1.2/setup.cfg
Running zope.interface-4.1.2/setup.py -q bdist_egg --dist-dir /tmp/easy_install-wEMb0k/zope.interface-4.1.2/egg-dist-tmp-FphjOi
warning: no previously-included files matching '*.dll' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.pyo' found anywhere in distribution
warning: no previously-included files matching '*.so' found anywhere in distribution
Adding zope.interface 4.1.2 to easy-install.pth file
Installed /usr/local/lib/python2.7/dist-packages/zope.interface-4.1.2-py2.7-linux-armv6l.egg
Searching for txaio>=1.0.0
Reading http://pypi.python.org/simple/txaio/
Best match: txaio 1.0.0
Downloading https://pypi.python.org/packages/source/t/txaio/txaio-1.0.0.zip#md5=762755ba1ded4b7caf07247ab33efc5f
Processing txaio-1.0.0.zip
Writing /tmp/easy_install-hnU9YF/txaio-1.0.0/setup.cfg
Running txaio-1.0.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-hnU9YF/txaio-1.0.0/egg-dist-tmp-DxeX4k
Adding txaio 1.0.0 to easy-install.pth file
Installed /usr/local/lib/python2.7/dist-packages/txaio-1.0.0-py2.7.egg
Searching for six>=1.6.1
Reading http://pypi.python.org/simple/six/
Best match: six 1.9.0
Downloading https://pypi.python.org/packages/source/s/six/six-1.9.0.tar.gz#md5=476881ef4012262dfc8adc645ee786c4
Processing six-1.9.0.tar.gz
Writing /tmp/easy_install-H2abYV/six-1.9.0/setup.cfg
Running six-1.9.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-H2abYV/six-1.9.0/egg-dist-tmp-4InOAi
no previously-included directories found matching 'documentation/_build'
zip_safe flag not set; analyzing archive contents...
six: module references __path__
Adding six 1.9.0 to easy-install.pth file
Installed /usr/local/lib/python2.7/dist-packages/six-1.9.0-py2.7.egg
Searching for argparse==1.2.1
Best match: argparse 1.2.1
Adding argparse 1.2.1 to easy-install.pth file
Using /usr/lib/python2.7
Searching for distribute==0.6.28
Best match: distribute 0.6.28
Processing distribute-0.6.28-py2.7.egg
distribute 0.6.28 is already the active version in easy-install.pth
Installing easy_install script to /usr/local/bin
Installing easy_install-2.7 script to /usr/local/bin
Using /usr/local/lib/python2.7/dist-packages/distribute-0.6.28-py2.7.egg
Finished processing dependencies for stratum-mining-proxy==1.5.7
finished and run:
pi@raspberrypi ~/stratum-mining-proxy $ mining_proxy.py -o stratum.bitcoin.cz
2015-05-19 08:21:19,845 INFO proxy jobs. # C extension for midstate not available. Using default implementation instead.
2015-05-19 08:21:20,065 WARNING proxy mining_proxy.main # Stratum proxy version: 1.5.7
2015-05-19 08:21:20,211 WARNING proxy mining_proxy.test_update # Checking for updates...
2015-05-19 08:21:23,294 WARNING proxy mining_proxy.main # Trying to connect to Stratum pool at stratum.bitcoin.cz:3333
2015-05-19 08:21:23,615 INFO stats stats.print_stats # 1 peers connected, state changed 1 times
2015-05-19 08:21:23,619 INFO proxy mining_proxy.on_connect # Connected to Stratum pool at stratum.bitcoin.cz:3333
2015-05-19 08:21:23,621 INFO proxy mining_proxy.on_connect # Subscribing for mining jobs
2015-05-19 08:21:23,767 WARNING proxy mining_proxy.main # -----------------------------------------------------------------------
2015-05-19 08:21:23,784 WARNING proxy mining_proxy.main # PROXY IS LISTENING ON ALL IPs ON PORT 3333 (stratum) AND 8332 (getwork)
2015-05-19 08:21:23,786 WARNING proxy mining_proxy.main # -----------------------------------------------------------------------
2015-05-19 08:21:23,795 INFO proxy client_service.handle_event # Setting new difficulty: 256
2015-05-19 08:21:23,801 INFO proxy client_service.handle_event # New job 178c7 for prevhash 38f5473b, clean_jobs=True
2015-05-19 08:21:30,850 INFO proxy client_service.handle_event # New job 178c8 for prevhash 38f5473b, clean_jobs=False
^C2015-05-19 08:21:55,296 INFO proxy mining_proxy.on_shutdown # Shutting down proxy...
2015-05-19 08:21:55,310 INFO proxy mining_proxy.on_disconnect # Disconnected from Stratum pool at stratum.bitcoin.cz:3333
2015-05-19 08:21:55,314 INFO stats stats.print_stats # 0 peers connected, state changed 1 times
OK!