-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Symbol not found: _floatify in pandas/lib.so on Mac 10.8 with numpy master #2188
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
We had a little snafu in the cc @yarikoptic oops didn't mean to close issue |
With 5c945e1 I still see the same issue: |
What Cython version are you on? seems to be some kind of name mangling problem with clang going on. floatify is declared in pandas/src/util.pxd and the C function itself is in pandas/src/numpy_helper.h. I have no ability to debug this myself |
Can you post the output of The reason I ask is because using the system Python can conflict with a Python from |
My Python and Cython are the latest Macports versions, my numpy is from git master:
Can you reproduce the issue with Cython 0.17.1? |
Have you tried reinstalling Cython in /Users/deil/Library/Python/2.7 instead of the MacPorts dir? It seems risky to be grabbing libraries from two site-packages directories. |
@dnmiller Isn't having two site-packages normal? There's packages that are hard to build with all their dependencies (like e.g. PyTables) which I install with a package manager (Macports on my Mac), and there's packages where I want the development version and in some cases even do development with, so these I install in my home folder. I don't see how I could work with only one site-packages, because if I sudo install stuff myself in the site-packages of my package manager all hell breaks loose and I don't have the time to install / update all the packages I need myself. I don't think it matters here where Cython is installed, rather I think it's a problem with the (Compiler, Python, Cython, numpy) combination I have. |
Well, you should definitely check out the virtual environments package. It solves a lot of the problems you just described. But I agree that's not really the root cause. While I can't say this is the same problem you're having, I've had problems with MacPorts linking to it's own versions of libc, libc++, liblapack, etc., which are incompatible with other programs compiled outside of MacPorts, which will link to non-MacPorts versions of the same libraries. I've seen a very similar error that was due to a non-MacPorts Python talking to a MacPorts version of NumPy. My hunch is that the MacPorts Cython behaves differently than a version you would install in your home dir. You might consider trying to build pandas and its dependencies (and Cython) entirely in /Users/deil/Library/Python/2.7. |
Have you tried manually importing another *.so file (just write a simple function in cython and try to import it)? If that doesn't work, it might hint at the problem being the clang linker flags, for which it seems there is a paucity of documentation, but I suspect that the fact that FYI: When I do Also since you have the |
@fonnesbeck : sir, king of bleeding edge OS X technology, can you confirm that you can build and import pandas git master with your OS 10.8 rig? |
I just tested in a new virtualenv on OS X 10.8.2 with latest xcode installed. I used 'pip install cython' to get cython. Everything else except wsgiref was installed by the pandas install.
I used "Symbol not found: _floatify" using |
Got a machine over here where I can reproduce this. Will try to figure out what's up |
I'm super curious to know what the heck the issue is!
|
Well, it basically clang has stricter semantics about inline functions: http://clang.llvm.org/compatibility.html#inline Making floatify and its dependent functions not inline gets rid of the linker errors. Still a bit of a mystery because there are numerous other equivalently-declared inline functions that don't have this problem. It evidently has something to do with optimization passes and floatify not actually being inlined by the compiler git master should build now. pls let us know if not |
Works for me. Thanks! |
@changhiskhan , I have a feeling cc099d6 broke #2029, since I started |
@y-p The problem is that I believe |
grrr. I'm a continent away, but you yet may hear my shrieks of pain... |
* commit 'v0.9.0-169-g5c945e1': BUG: fill_value not being applied for mixed type frame pandas-dev#2191 BUG: bug in setup.py with cython and sdist command class pandas-dev#2188 BLD: c scope decl wrong
can't build on master 35dd6ac
|
I broke master again. Can someone find out how to detect clang at compile time so I can conditionally take out the inline markers? |
Adding a "clang" option to the top of numpy_helper.h should work. Though according to the clang docs, this is official C99 behavior anyway, so maybe the behavior of "STDC_VERSION" in the definition of PANDAS_INLINE isn't correct? |
It should be working now, I'll need someone to verify because I don't have anything to test on right now |
_floatify is fixed but
for the time being i just remove the PANDAS_INLINE from xstrod in parse_helper.h, end_line in tokenizer |
I have the same problem as locojay.
|
I added a forward declaration for end_line and removed P_INLINE from the forward declaration of xstrtod in tokenizer.c and now I can build and import pandas in python 2.7.3 in OS X 10.8.2. |
ditto |
can someone let me know if git master builds right now? I made some changes per above. |
It compiles for me but when I try to import pandas I get:
|
Could you try again? I made xstrtod not inline |
On Nov 25, 2012, at 3:18 PM, Wes McKinney [email protected] wrote:
Version 0.9.2.dev-1d78502 builds and imports fine for me with python 2.7.3 under OS X 10.8.2, and all nosetests pass. |
Thanks. I'll go ahead and close this for now |
After updating pandas I can't import it any more because the symbol _floatify is undefined in pandas/lib.so:
The pandas build log doesn't show any problem with
lib.so
orfloatify
:https://gist.github.com/4030153
My numpy install seems OK:
https://gist.github.com/4030177
The text was updated successfully, but these errors were encountered: