Closed magicshui closed 12 years ago
I get the same inreplace error, but this installs for me on Snow Leopard using GCC.
@adamv Sorry,I am new to Mac and programming.My OS is Lion.Does it mean that there is no way to install uwsgi with brew?thanks
It means that the clang compiler in Xcode 4.3 cannot be used to build this software without additional work by either Homebrew or the upstream project.
Related upstream ticket: http://projects.unbit.it/uwsgi/ticket/103
pip install uwsgi
, the same error. With homebrew privated python 2.7.2
I have successful build uWSGI with pip
first, unlink the brew provided python
brew unlink python
then, /usr/bin/easy_install (or pip install) uWSGI
Updated to 1.1.2 in a0e75ee85fe2278fe67515ae35716fd4715141ab - installed against my non-Framework brewed Python 2.7.3.
The real problem here seems to be pcre doesn't have the i386 architecture available for uwsgi to be linked against it. to fix it, simply build pcre
as a universal binary:
1) Remove current pcre: brew uninstall pcre
2) Install universal build of pcre: brew install pcre --universal
3) Install uwsgi: brew install uwsgi
@Kronuz I had followed your steps, but It doesn't work for me, Output: ==> Downloading http://projects.unbit.it/downloads/uwsgi-1.2.6.tar.gz ######################################################################## 100.0% ==> python uwsgiconfig.py --build [cc] plugins/zergpool/zergpool.o [cc] plugins/redislog/redislog_plugin.o * uWSGI linking * cc -o uwsgi -arch i386 -arch x86_64 utils.o protocol.o socket.o logging.o master.o master_utils.o emperor.o notify.o mule.o subscription.o plugins.o lock.o cache.o queue.o event.o signal.o cluster.o rpc.o gateway.o loop.o lib/rbtree.o lib/amqp.o rb_timers.o main.o proto/base.o proto/uwsgi.o proto/http.o proto/fastcgi.o regexp.o routing.o async.o ini.o yaml.o ldap.o proto/zeromq.o snmp.o sendfile.o xmlconf.o sqlite3.o spooler.o plugins/python/python_plugin.o plugins/python/pyutils.o plugins/python/pyloader.o plugins/python/wsgi_handlers.o plugins/python/wsgi_headers.o plugins/python/wsgi_subhandler.o plugins/python/web3_subhandler.o plugins/python/pump_subhandler.o plugins/python/gil.o plugins/python/uwsgi_pymodule.o plugins/python/profiler.o plugins/python/symimporter.o plugins/ping/ping_plugin.o plugins/cache/cache.o plugins/nagios/nagios.o plugins/rrdtool/rrdtool.o plugins/carbon/carbon.o plugins/rpc/rpc_plugin.o plugins/fastrouter/fr_sctp.o plugins/fastrouter/fr_map.o plugins/fastrouter/fastrouter.o plugins/fastrouter/fr_events.o plugins/http/http.o plugins/ugreen/ugreen.o plugins/signal/signal_plugin.o plugins/syslog/syslog_plugin.o plugins/rsyslog/rsyslog_plugin.o plugins/logsocket/logsocket_plugin.o plugins/router_uwsgi/router_uwsgi.o plugins/router_redirect/router_redirect.o plugins/router_basicauth/router_basicauth.o plugins/zergpool/zergpool.o plugins/redislog/redislog_plugin.o -lpthread -lm -rdynamic -L/usr/local/Cellar/pcre/8.31/lib -lpcre -lldap -lzmq -lxml2 -lsqlite3 -ldl -framework CoreFoundation -L/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -lpython2.7 * error linking uWSGI *
READ THIS: https://github.com/mxcl/homebrew/wiki/troubleshooting
@hustcer Install python first using "brew install python" I had the same issue, but it was caused by using the non-brew one
Thank you very much!
在 2012-12-21,下午06:47,Kei Kim notifications@github.com 写道:
@hustcer Install python first using "brew install python" I had the same issue, but it was caused by using the non-brew one
— Reply to this email directly or view it on GitHub.
bogon:~ Arthur$ brew install uwsgi ==> Downloading http://projects.unbit.it/downloads/uwsgi-1.0.4.tar.gz File already downloaded in /Library/Caches/Homebrew Warning: inreplace in 'uwsgiconfig.py' failed Expected replacement of 'PYLIB_PATH = ''' with 'PYLIB_PATH = '/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config'' ==> python uwsgiconfig.py --build clang: warning: argument unused during compilation: '-rdynamic' ld: warning: ignoring file /usr/local/Cellar/pcre/8.21/lib/libpcre.dylib, file was built for unsupported file format which is not the architecture being linked (i386) Undefined symbols for architecture i386: "_pcre_free", referenced from: _uwsgi_remove_subscribe_node in subscription.o _uwsgi_regexp_build in regexp.o _uwsgi_remove_subscribe_node in subscription.o _uwsgi_regexp_build in regexp.o "_pcre_compile", referenced from: _uwsgi_regexp_build in regexp.o "_pcre_study", referenced from: _uwsgi_regexp_build in regexp.o "_pcre_exec", referenced from: _uwsgi_regexp_match in regexp.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) using profile: buildconf/default.ini detected include path: ['/usr/llvm-gcc-4.2/bin/../lib/gcc/i686-apple-darwin11/4.2.1/include', '/usr/local/include', '/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2/lib/gcc/i686-apple-darwin11/4.2.1/include', '/usr/include', '/System/Library/Frameworks', '/Library/Frameworks'] configured CFLAGS: -O2 -Wall -Werror -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -Os -w -pipe -march=native -Qunused-arguments -arch i386 -arch x86_64 -fno-strict-aliasing -Wextra -Wno-unused-parameter -Wno-missing-field-initializers -DUWSGI_BUILD_DATE="\"13 March 2012 10:41:40\"" -DUWSGI_HAS_IFADDRS -mmacosx-version-min=10.5 -DUWSGI_LOCK_USE_OSX_SPINLOCK -DUWSGI_EVENT_USE_KQUEUE -DUWSGI_EVENT_TIMER_USE_KQUEUE -DUWSGI_EVENT_FILEMONITOR_USE_KQUEUE -DUWSGI_EMBEDDED -DUWSGI_UDP -I/usr/local/Cellar/pcre/8.21/include -DUWSGI_PCRE -DUWSGI_UUID -DUWSGI_VERSION="\"1.0.4\"" -DUWSGI_VERSION_BASE="1" -DUWSGI_VERSION_MAJOR="0" -DUWSGI_VERSION_MINOR="4" -DUWSGI_VERSION_REVISION="0" -DUWSGI_VERSION_CUSTOM="\"\"" -DUWSGI_ASYNC -DUWSGI_MULTICAST -DUWSGI_MINTERPRETERS -DUWSGI_INI -DUWSGI_YAML -DUWSGI_LDAP -DUWSGI_SNMP -DUWSGI_THREADING -DUWSGI_SENDFILE -I/usr/include/libxml2 -DUWSGI_XML -DUWSGI_XML_LIBXML2 -DUWSGI_SQLITE3 -DUWSGI_PLUGIN_DIR=\".\" -DUWSGI_SPOOLER -DUWSGI_DECLARE_EMBEDDED_PLUGINS="UDEP(python);UDEP(ping);UDEP(cache);UDEP(nagios);UDEP(rrdtool);UDEP(carbon);UDEP(rpc);UDEP(fastrouter);UDEP(http);UDEP(ugreen);UDEP(signal);UDEP(syslog);UDEP(rsyslog);UDEP(logsocket);" -DUWSGI_LOAD_EMBEDDED_PLUGINS="ULEP(python);ULEP(ping);ULEP(cache);ULEP(nagios);ULEP(rrdtool);ULEP(carbon);ULEP(rpc);ULEP(fastrouter);ULEP(http);ULEP(ugreen);ULEP(signal);ULEP(syslog);ULEP(rsyslog);ULEP(logsocket);" * uWSGI compiling server core * [/usr/bin/clang] utils.o [/usr/bin/clang] protocol.o [/usr/bin/clang] socket.o [/usr/bin/clang] logging.o [/usr/bin/clang] master.o [/usr/bin/clang] master_utils.o [/usr/bin/clang] emperor.o [/usr/bin/clang] notify.o [/usr/bin/clang] mule.o [/usr/bin/clang] subscription.o [/usr/bin/clang] plugins.o [/usr/bin/clang] lock.o [/usr/bin/clang] cache.o [/usr/bin/clang] queue.o [/usr/bin/clang] event.o [/usr/bin/clang] signal.o [/usr/bin/clang] cluster.o [/usr/bin/clang] rpc.o [/usr/bin/clang] gateway.o [/usr/bin/clang] loop.o [/usr/bin/clang] lib/rbtree.o [/usr/bin/clang] lib/amqp.o [/usr/bin/clang] rb_timers.o [/usr/bin/clang] main.o [/usr/bin/clang] proto/base.o [/usr/bin/clang] proto/uwsgi.o [/usr/bin/clang] proto/http.o [/usr/bin/clang] proto/fastcgi.o [/usr/bin/clang] regexp.o [/usr/bin/clang] async.o [/usr/bin/clang] ini.o [/usr/bin/clang] yaml.o [/usr/bin/clang] ldap.o [/usr/bin/clang] snmp.o [/usr/bin/clang] sendfile.o [/usr/bin/clang] xmlconf.o [/usr/bin/clang] sqlite3.o [/usr/bin/clang] spooler.o * uWSGI compiling embedded plugins * [/usr/bin/clang] plugins/python/python_plugin.o [/usr/bin/clang] plugins/python/pyutils.o [/usr/bin/clang] plugins/python/pyloader.o [/usr/bin/clang] plugins/python/wsgi_handlers.o [/usr/bin/clang] plugins/python/wsgi_headers.o [/usr/bin/clang] plugins/python/wsgi_subhandler.o [/usr/bin/clang] plugins/python/web3_subhandler.o [/usr/bin/clang] plugins/python/pump_subhandler.o [/usr/bin/clang] plugins/python/gil.o [/usr/bin/clang] plugins/python/uwsgi_pymodule.o [/usr/bin/clang] plugins/python/profiler.o [/usr/bin/clang] plugins/python/symimporter.o [/usr/bin/clang] plugins/ping/ping_plugin.o [/usr/bin/clang] plugins/cache/cache.o [/usr/bin/clang] plugins/nagios/nagios.o [/usr/bin/clang] plugins/rrdtool/rrdtool.o [/usr/bin/clang] plugins/carbon/carbon.o [/usr/bin/clang] plugins/rpc/rpc_plugin.o [/usr/bin/clang] plugins/fastrouter/fastrouter.o [/usr/bin/clang] plugins/http/http.o [/usr/bin/clang] plugins/ugreen/ugreen.o [/usr/bin/clang] plugins/signal/signal_plugin.o [/usr/bin/clang] plugins/syslog/syslog_plugin.o [/usr/bin/clang] plugins/rsyslog/rsyslog_plugin.o [/usr/bin/clang] plugins/logsocket/logsocket_plugin.o * uWSGI linking * /usr/bin/clang -o uwsgi -arch i386 -arch x86_64 utils.o protocol.o socket.o logging.o master.o master_utils.o emperor.o notify.o mule.o subscription.o plugins.o lock.o cache.o queue.o event.o signal.o cluster.o rpc.o gateway.o loop.o lib/rbtree.o lib/amqp.o rb_timers.o main.o proto/base.o proto/uwsgi.o proto/http.o proto/fastcgi.o regexp.o async.o ini.o yaml.o ldap.o snmp.o sendfile.o xmlconf.o sqlite3.o spooler.o plugins/python/python_plugin.o plugins/python/pyutils.o plugins/python/pyloader.o plugins/python/wsgi_handlers.o plugins/python/wsgi_headers.o plugins/python/wsgi_subhandler.o plugins/python/web3_subhandler.o plugins/python/pump_subhandler.o plugins/python/gil.o plugins/python/uwsgi_pymodule.o plugins/python/profiler.o plugins/python/symimporter.o plugins/ping/ping_plugin.o plugins/cache/cache.o plugins/nagios/nagios.o plugins/rrdtool/rrdtool.o plugins/carbon/carbon.o plugins/rpc/rpc_plugin.o plugins/fastrouter/fastrouter.o plugins/http/http.o plugins/ugreen/ugreen.o plugins/signal/signal_plugin.o plugins/syslog/syslog_plugin.o plugins/rsyslog/rsyslog_plugin.o plugins/logsocket/logsocket_plugin.o -lpthread -lm -rdynamic -L/usr/local/Cellar/pcre/8.21/lib -lpcre -lldap -lxml2 -lz -lpthread -licucore -lm -lsqlite3 -ldl -framework CoreFoundation -L/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/config -lpython2.7 * error linking uWSGI * ==> Exit Status: 1 http://github.com/mxcl/homebrew/blob/master/Library/Formula/uwsgi.rb#L20 ==> Environment HOMEBREW_VERSION: 0.8.1 HEAD: 8b4d85f6095d97135b6d61e3ba2d7ebc6f7cd10a HOMEBREW_PREFIX: /usr/local HOMEBREW_CELLAR: /usr/local/Cellar Hardware: quad-core 64-bit sandybridge OS X: 10.7.3 Kernel Architecture: x86_64 Xcode: 4.3 GCC-4.0: N/A GCC-4.2: N/A LLVM: build 2336 Clang: 3.1 build 318 MacPorts or Fink? false X11: /usr/X11 System Ruby: 1.8.7-249 /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby Which Perl: /usr/bin/perl Which Python: /Library/Frameworks/Python.framework/Versions/2.7/bin/python => /Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 Which Ruby: /usr/bin/ruby => /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby ==> Build Flags CC: /usr/bin/clang CXX: /usr/bin/clang++ => /usr/bin/clang LD: /usr/bin/clang CFLAGS: -Os -w -pipe -march=native -Qunused-arguments -arch i386 -arch x86_64 CXXFLAGS: -Os -w -pipe -march=native -Qunused-arguments LDFLAGS: -arch i386 -arch x86_64 MAKEFLAGS: -j4
Error: Failed executing: python uwsgiconfig.py --build These existing issues may help you: https://github.com/mxcl/homebrew/issues/10109 Otherwise, please report the bug: https://github.com/mxcl/homebrew/wiki/checklist-before-filing-a-new-issue