Installation

53 views
Skip to first unread message

C

unread,
May 26, 2011, 3:34:24 PM5/26/11
to Fast Asynchronous Python Web Server
Hi,

Trying to install fapws in snow leopard, I got the following error:

_______________________________________________________
fapws/extra.c:152: error: dereferencing pointer to incomplete type
fapws/extra.c:153: error: dereferencing pointer to incomplete type
lipo: can't open input file: /var/folders/iw/iwzGnY4kF84Q5GAKEYAZ1U++
+TQ/-Tmp-//ccMueBkS.out (No such file or directory)
_______________________________________________________

Would really appreciate some help. Any idea where that error could
come from ?

C.


c-bs-MacBook-Air:source cb$ cd william-os4y-fapws3-f53d710/
c-bs-MacBook-Air:william-os4y-fapws3-f53d710 cb$ python setup.py build
Find python 2.4 or higher
----------Find ev.h in /usr/include/sys
----------Find Python.h in /System/Library/Frameworks/
Python.framework/Versions/2.6/include/python2.6
----------Find libev.a in /opt/local/lib
running build
running build_py
running egg_info
writing fapws3.egg-info/PKG-INFO
writing top-level names to fapws3.egg-info/top_level.txt
writing dependency_links to fapws3.egg-info/dependency_links.txt
writing entry points to fapws3.egg-info/entry_points.txt
reading manifest file 'fapws3.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'fapws3.egg-info/SOURCES.txt'
running build_ext
building 'fapws._evwsgi' extension
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -
Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -
arch x86_64 -pipe -I/usr/include/sys -I/System/Library/Frameworks/
Python.framework/Versions/2.6/include/python2.6 -I/System/Library/
Frameworks/Python.framework/Versions/2.6/include/python2.6 -c fapws/
extra.c -o build/temp.macosx-10.6-universal-2.6/fapws/extra.o
fapws/extra.c: In function ‘cur_time’:
fapws/extra.c:124: warning: implicit declaration of function ‘time’
fapws/extra.c:125: warning: implicit declaration of function ‘gmtime’
fapws/extra.c:125: warning: assignment makes pointer from integer
without a cast
fapws/extra.c:131: warning: implicit declaration of function
‘strftime’
fapws/extra.c:131: warning: incompatible implicit declaration of built-
in function ‘strftime’
fapws/extra.c: In function ‘time_rfc1123’:
fapws/extra.c:150: warning: assignment makes pointer from integer
without a cast
fapws/extra.c:151: warning: incompatible implicit declaration of built-
in function ‘strftime’
fapws/extra.c:152: error: dereferencing pointer to incomplete type
fapws/extra.c:153: error: dereferencing pointer to incomplete type
fapws/extra.c: In function ‘cur_time’:
fapws/extra.c:124: warning: implicit declaration of function ‘time’
fapws/extra.c:125: warning: implicit declaration of function ‘gmtime’
fapws/extra.c:125: warning: assignment makes pointer from integer
without a cast
fapws/extra.c:131: warning: implicit declaration of function
‘strftime’
fapws/extra.c:131: warning: incompatible implicit declaration of built-
in function ‘strftime’
fapws/extra.c: In function ‘time_rfc1123’:
fapws/extra.c:150: warning: assignment makes pointer from integer
without a cast
fapws/extra.c:151: warning: incompatible implicit declaration of built-
in function ‘strftime’
fapws/extra.c:152: error: dereferencing pointer to incomplete type
fapws/extra.c:153: error: dereferencing pointer to incomplete type
fapws/extra.c: In function ‘cur_time’:
fapws/extra.c:124: warning: implicit declaration of function ‘time’
fapws/extra.c:125: warning: implicit declaration of function ‘gmtime’
fapws/extra.c:125: warning: assignment makes pointer from integer
without a cast
fapws/extra.c:131: warning: implicit declaration of function
‘strftime’
fapws/extra.c:131: warning: incompatible implicit declaration of built-
in function ‘strftime’
fapws/extra.c: In function ‘time_rfc1123’:
fapws/extra.c:150: warning: assignment makes pointer from integer
without a cast
fapws/extra.c:151: warning: incompatible implicit declaration of built-
in function ‘strftime’
fapws/extra.c:152: error: dereferencing pointer to incomplete type
fapws/extra.c:153: error: dereferencing pointer to incomplete type
lipo: can't open input file: /var/folders/iw/iwzGnY4kF84Q5GAKEYAZ1U++
+TQ/-Tmp-//ccMueBkS.out (No such file or directory)
error: command 'gcc-4.2' failed with exit status 1
c-bs-MacBook-Air:william-os4y-fapws3-f53d710 cb$ gcc
i686-apple-darwin10-gcc-4.2.1: no input files
c-bs-MacBook-Air:william-os4y-fapws3-f53d710 cb$ python
Python 2.6.1 (r261:67515, Jun 24 2010, 21:47:49)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

C

unread,
May 26, 2011, 5:29:52 PM5/26/11
to Fast Asynchronous Python Web Server
Moving forward: the "----------Find ev.h in /usr/include/sys " is
not the right one. Should be /opt/local/include
I uninstall libev "port uninstall libev" and reinstall it using the
source and "./configure --prefix=/usr"

But now, I have got another issue: (looks like ld -r is not a
supported option on osx)

python setup.py build
Find python 2.4 or higher
----------Find ev.h in /usr/include
----------Find Python.h in /System/Library/Frameworks/
Python.framework/Versions/2.6/include/python2.6
----------Find libev.a in /usr/lib
running build
running build_py
creating build
creating build/lib.macosx-10.6-universal-2.6
creating build/lib.macosx-10.6-universal-2.6/fapws
copying fapws/__init__.py -> build/lib.macosx-10.6-universal-2.6/fapws
copying fapws/base.py -> build/lib.macosx-10.6-universal-2.6/fapws
copying fapws/config.py -> build/lib.macosx-10.6-universal-2.6/fapws
creating build/lib.macosx-10.6-universal-2.6/fapws/contrib
copying fapws/contrib/__init__.py -> build/lib.macosx-10.6-
universal-2.6/fapws/contrib
copying fapws/contrib/cgiapp.py -> build/lib.macosx-10.6-universal-2.6/
fapws/contrib
copying fapws/contrib/django_handler.py -> build/lib.macosx-10.6-
universal-2.6/fapws/contrib
copying fapws/contrib/headers.py -> build/lib.macosx-10.6-
universal-2.6/fapws/contrib
copying fapws/contrib/log.py -> build/lib.macosx-10.6-universal-2.6/
fapws/contrib
copying fapws/contrib/multipart.py -> build/lib.macosx-10.6-
universal-2.6/fapws/contrib
copying fapws/contrib/sessions.py -> build/lib.macosx-10.6-
universal-2.6/fapws/contrib
copying fapws/contrib/views.py -> build/lib.macosx-10.6-universal-2.6/
fapws/contrib
copying fapws/contrib/zip.py -> build/lib.macosx-10.6-universal-2.6/
fapws/contrib
creating build/lib.macosx-10.6-universal-2.6/fapws/contrib/siforms
copying fapws/contrib/siforms/__init__.py -> build/lib.macosx-10.6-
universal-2.6/fapws/contrib/siforms
copying fapws/contrib/siforms/forms.py -> build/lib.macosx-10.6-
universal-2.6/fapws/contrib/siforms
copying fapws/contrib/siforms/widgets.py -> build/lib.macosx-10.6-
universal-2.6/fapws/contrib/siforms
running egg_info
creating fapws3.egg-info
writing fapws3.egg-info/PKG-INFO
writing top-level names to fapws3.egg-info/top_level.txt
writing dependency_links to fapws3.egg-info/dependency_links.txt
writing entry points to fapws3.egg-info/entry_points.txt
writing manifest file 'fapws3.egg-info/SOURCES.txt'
reading manifest file 'fapws3.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'fapws3.egg-info/SOURCES.txt'
copying fapws/_evwsgi.c -> build/lib.macosx-10.6-universal-2.6/fapws
copying fapws/common.h -> build/lib.macosx-10.6-universal-2.6/fapws
copying fapws/extra.c -> build/lib.macosx-10.6-universal-2.6/fapws
copying fapws/extra.h -> build/lib.macosx-10.6-universal-2.6/fapws
copying fapws/mainloop.c -> build/lib.macosx-10.6-universal-2.6/fapws
copying fapws/mainloop.h -> build/lib.macosx-10.6-universal-2.6/fapws
copying fapws/wsgi.c -> build/lib.macosx-10.6-universal-2.6/fapws
copying fapws/wsgi.h -> build/lib.macosx-10.6-universal-2.6/fapws
running build_ext
building 'fapws._evwsgi' extension
creating build/temp.macosx-10.6-universal-2.6
creating build/temp.macosx-10.6-universal-2.6/fapws
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -
Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -
arch x86_64 -pipe -I/usr/include -I/System/Library/Frameworks/
Python.framework/Versions/2.6/include/python2.6 -I/System/Library/
Frameworks/Python.framework/Versions/2.6/include/python2.6 -c fapws/
extra.c -o build/temp.macosx-10.6-universal-2.6/fapws/extra.o
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -
Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -
arch x86_64 -pipe -I/usr/include -I/System/Library/Frameworks/
Python.framework/Versions/2.6/include/python2.6 -I/System/Library/
Frameworks/Python.framework/Versions/2.6/include/python2.6 -c fapws/
wsgi.c -o build/temp.macosx-10.6-universal-2.6/fapws/wsgi.o
fapws/wsgi.c: In function ‘header_to_dict’:
fapws/wsgi.c:222: warning: enumeration value ‘s_stop’ not handled in
switch
fapws/wsgi.c: In function ‘header_to_dict’:
fapws/wsgi.c:222: warning: enumeration value ‘s_stop’ not handled in
switch
fapws/wsgi.c: In function ‘header_to_dict’:
fapws/wsgi.c:222: warning: enumeration value ‘s_stop’ not handled in
switch
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -
Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -
arch x86_64 -pipe -I/usr/include -I/System/Library/Frameworks/
Python.framework/Versions/2.6/include/python2.6 -I/System/Library/
Frameworks/Python.framework/Versions/2.6/include/python2.6 -c fapws/
mainloop.c -o build/temp.macosx-10.6-universal-2.6/fapws/mainloop.o
gcc-4.2 -fno-strict-aliasing -fno-common -dynamic -DNDEBUG -g -fwrapv -
Os -Wall -Wstrict-prototypes -DENABLE_DTRACE -arch i386 -arch ppc -
arch x86_64 -pipe -I/usr/include -I/System/Library/Frameworks/
Python.framework/Versions/2.6/include/python2.6 -I/System/Library/
Frameworks/Python.framework/Versions/2.6/include/python2.6 -c fapws/
_evwsgi.c -o build/temp.macosx-10.6-universal-2.6/fapws/_evwsgi.o
gcc-4.2 -Wl,-F. -bundle -undefined dynamic_lookup -arch i386 -arch ppc
-arch x86_64 build/temp.macosx-10.6-universal-2.6/fapws/extra.o build/
temp.macosx-10.6-universal-2.6/fapws/wsgi.o build/temp.macosx-10.6-
universal-2.6/fapws/mainloop.o build/temp.macosx-10.6-universal-2.6/
fapws/_evwsgi.o -L/usr/lib -lev -o build/lib.macosx-10.6-universal-2.6/
fapws/_evwsgi.so -Wl,-R/usr/lib
ld: unknown option: -R/usr/lib
collect2: ld returned 1 exit status
ld: unknown option: -R/usr/lib
collect2: ld returned 1 exit status
ld: unknown option: -R/usr/lib
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/iw/iwzGnY4kF84Q5GAKEYAZ1U++
+TQ/-Tmp-//cciYmBnr.out (No such file or directory)
error: command 'gcc-4.2' failed with exit status 1


Any idea ?

william opensource4you

unread,
May 28, 2011, 3:02:09 AM5/28/11
to fa...@googlegroups.com
The fact that you have " -arch i386 -arch ppc -arch x86_64" sounds
strange to me, but I don't think this the root cause of the problem.

You can adapt this by editing the following file:
/Library/Frameworks/Python.framework/Versions/Current/lib/Python2.6/Makefile
But you have to stay consistent with python, libev and fapws !!!! Do
not mix i386 or X86_64.

You can also use the LDFLAGS, ... parameters.

Apparently the problem comes from this "ld: unknown option: -R/usr/lib".
Why this is there ?

Man pages (http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man1/ld.1.html)

As far as I know this should be a -o option to create a shared object.

I don't have macosx machine ... I'm very sorry to not be able to help
you further. I've saw several person complaining about macosx, but I
never received patches. Did they finally solve it ? how ? or they give
away ?

W.

C

unread,
May 28, 2011, 6:15:09 AM5/28/11
to Fast Asynchronous Python Web Server
In setup.py, I replaced the line 95 with:
extra_link_args=['']

Thus getting rid of the parameter that is not supported by ld in mac
(ld on mac does not have the same options then on other platforms)

Now, here is what is get:


ld: duplicate symbol _debug in build/temp.macosx-10.6-universal-2.6/
fapws/mainloop.o and build/temp.macosx-10.6-universal-2.6/fapws/wsgi.o
for architecture x86_64
collect2: ld returned 1 exit status
_________________________________________________________

Find python 2.4 or higher
/usr/include/ev.h
----------Find ev.h in /usr/include
/System/Library/Frameworks/Python.framework/Versions/2.6/include/
python2.6/Python.h
----------Find Python.h in /System/Library/Frameworks/
Python.framework/Versions/2.6/include/python2.6
/usr/lib/libev.a
----------Find libev.a in /usr/lib
running build
running build_py
running egg_info
writing fapws3.egg-info/PKG-INFO
writing top-level names to fapws3.egg-info/top_level.txt
writing dependency_links to fapws3.egg-info/dependency_links.txt
writing entry points to fapws3.egg-info/entry_points.txt
reading manifest file 'fapws3.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'fapws3.egg-info/SOURCES.txt'
running build_ext
building 'fapws._evwsgi' extension
gcc-4.2 -Wl,-F. -bundle -undefined dynamic_lookup -arch i386 -arch ppc
-arch x86_64 build/temp.macosx-10.6-universal-2.6/fapws/extra.o build/
temp.macosx-10.6-universal-2.6/fapws/wsgi.o build/temp.macosx-10.6-
universal-2.6/fapws/mainloop.o build/temp.macosx-10.6-universal-2.6/
fapws/_evwsgi.o -L/usr/lib -lev -o build/lib.macosx-10.6-universal-2.6/
fapws/_evwsgi.so
ld: warning: ignoring file /usr/lib/libev.dylib, file was built for
unsupported file format which is not the architecture being linked
(i386)
ld: duplicate symbol _debug in build/temp.macosx-10.6-universal-2.6/
fapws/mainloop.o and build/temp.macosx-10.6-universal-2.6/fapws/wsgi.o
for architecture i386
collect2: ld returned 1 exit status
powerpc-apple-darwin10-gcc-4.2.1: : No such file or directory
ld: duplicate symbol _debug in build/temp.macosx-10.6-universal-2.6/
fapws/mainloop.o and build/temp.macosx-10.6-universal-2.6/fapws/wsgi.o
for architecture x86_64
collect2: ld returned 1 exit status
lipo: can't open input file: /var/folders/iw/iwzGnY4kF84Q5GAKEYAZ1U++
+TQ/-Tmp-//ccQS5XIg.out (No such file or directory)
error: command 'gcc-4.2' failed with exit status 1
_________________________________________________________

Reply all
Reply to author
Forward
0 new messages