libev.so can't be found on OSX?

469 views
Skip to first unread message

Jonas Rundberg

unread,
Apr 17, 2011, 4:00:43 PM4/17/11
to Fast Asynchronous Python Web Server
Hi,

I'm trying to install fapws3 on my mac book, but fails on libev.so.
Any ideas?

OSX 10.6.7
~$ python --version
Python 2.6.1

thanks
/ jonas


~$ sudo port install libev
---> Fetching libev
---> Attempting to fetch libev-3.9.tar.gz from
http://lil.fr.distfiles.macports.org/libev
---> Verifying checksum(s) for libev
---> Extracting libev
---> Configuring libev
---> Building libev
---> Staging libev into destroot
---> Installing libev @3.9_0
---> Activating libev @3.9_0
---> Cleaning libev

~$ sudo easy_install fapws3
Searching for fapws3
Reading http://pypi.python.org/simple/fapws3/
Reading http://william-os4y.livejournal.com/
Reading http://www.fapws.org
Best match: fapws3 0.9.dev
Downloading http://pypi.python.org/packages/source/f/fapws3/fapws3-0.9.dev.tar.gz#md5=318c471687f9c9e3556abfbe0046dbdb
Processing fapws3-0.9.dev.tar.gz
Running fapws3-0.9.dev/setup.py -q bdist_egg --dist-dir
/tmp/easy_install-nFschI/fapws3-0.9.dev/egg-dist-tmp-Z3ZlGW
Find python 2.6 or higher
----------Find ev.h in /usr/include
----------Find Python.h in
/System/Library/Frameworks/Python.framework/Versions/2.6/include/
python2.6
We don't find 'libev.so' which is a mandatory file to run Fapws
Please install libev, or provide the path by setting the shell
environmental variable LD_LIBRARY_PATH
error: Setup script exited with 1

/usr$ sudo find . -name "*ev.so*" -print
/usr$

william opensource4you

unread,
Apr 18, 2011, 3:48:17 AM4/18/11
to fa...@googlegroups.com
Hi Jonas,

Can you share the result od the build process when you set the
environment variable like this:
LD_LIBRARY_PATH=<path where you libev objects are>

As you can see on line 60 of the setup.py script, we are looking for
the libev shared object. By setting the LD_LIBRARY_PATH you add a
folder to this search list.

After looking at osx documentations (because I don't have an OSX
around me), I've saw that shared object are called .dylib.
I would be interested to know if osx keeps the .a file in the same dir
as the .dylib.
In such case, replacing "libev.so" by "libev.a" in line 84 of setup.py
should solve the problem.


Regards,


William

Jonas Rundberg

unread,
Apr 18, 2011, 6:54:39 PM4/18/11
to Fast Asynchronous Python Web Server
Hi William,

Thanks for the tips.

I've replaced line 84 in setup.py to 'libev.a'.
The build still fails but I haven't investigated why yet. I'll check
later.
This is the build output:


~/Downloads/fapws3-0.9.dev$ LD_LIBRARY_PATH=/usr/lib/

~/Downloads/fapws3-0.9.dev$ python setup.py install
Find python 2.6 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 install
running bdist_egg
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'
installing library code to build/bdist.macosx-10.6-universal/egg
running install_lib
running build_py
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: in /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
ld: warning: in /usr/lib/libev.dylib, file was built for unsupported
file format which is not the architecture being linked (ppc)
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 ppc
collect2: ld returned 1 exit status
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/D1/D1KQL-O+ExuwdelRCDjWTE++
+TI/-Tmp-//ccFccjA1.out (No such file or directory)
error: command 'gcc-4.2' failed with exit status 1


cheers
/ jonas



On Apr 18, 9:48 am, william opensource4you <william.o...@gmail.com>
wrote:
> > Readinghttp://www.fapws.org
> > Best match: fapws3 0.9.dev
> > Downloadinghttp://pypi.python.org/packages/source/f/fapws3/fapws3-0.9.dev.tar.gz...

Jonas H.

unread,
Apr 19, 2011, 2:18:47 AM4/19/11
to fa...@googlegroups.com
On 04/19/2011 12:54 AM, Jonas Rundberg wrote:
> I've replaced line 84 in setup.py to 'libev.a'.
> The build still fails but I haven't investigated why yet. I'll check
> later.

That won't work because .a files are archive files and .so are shared
objects -- the archive files being for static linking and the shared
objects for dynamic linking.

I'd forget about port -- seems to be broken in many ways -- and try
homebrew.

Hope that helps :-)

Jonas

William

unread,
Apr 19, 2011, 5:12:21 AM4/19/11
to fa...@googlegroups.com
To avoid missunderstanding...

Setup.py is looking for libev.a directory.
By hoping that the shared object reside in the same folder (.so
or .dylib)
Setup is not linking with libev.a.

By looking at the last build's output it sounds that we are facing a
mix of 64 and 32 bits programs.

Can you check this jonas R ?

W.

Reply all
Reply to author
Forward
0 new messages