Skip to content
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

Compilation of the library under Anaconda (CI) #4

Open
Chris00 opened this issue Apr 17, 2024 · 17 comments
Open

Compilation of the library under Anaconda (CI) #4

Chris00 opened this issue Apr 17, 2024 · 17 comments

Comments

@Chris00
Copy link
Owner

Chris00 commented Apr 17, 2024

The continuous integration test for Anconda is failing. @LCrossman If you have time (and since you use Anaconda — I don't),

  • is it the same on your machine?
  • any idea of the cause of the problem (and possibly a fix)?
@LCrossman
Copy link
Contributor

I think it's a mac osx arm64 error call because in Test (macos) step, 5th step, the call is to run rustup target add x86_64-apple-darwin
Then in failing step, the call is not specified arm64 or x86_64 through rosetta, could it be calling arm64 Mac version but with x86_64 expected?

@Chris00
Copy link
Owner Author

Chris00 commented Apr 18, 2024

When installing Anaconda, the reported platform is oxs-64 and the Rust toolchain is stable-x86_64-apple-darwin unchanged. If there is a mismatch, it's origin is not clear to me. Also, so bad the missing symbol is not printed out...

@LCrossman
Copy link
Contributor

LCrossman commented Apr 18, 2024

I have it as working on arm64 rustc 1.76 as long as the
export DYLD_LIBRARY_PATH=$CONDA_PREFIX/lib
is called.
Under x86_64 I have rustc 1.71 it works with the simple example but I am getting this polars arrow error with the flower example:
Polars arrow error

@Chris00
Copy link
Owner Author

Chris00 commented Apr 18, 2024

I added

        export DYLD_PRINT_LIBRARIES=1
        export DYLD_PRINT_APIS=1
        export DYLD_PRINT_WARNINGS=1

to print additional information but I still don't understand the cause of the problem.

Glad that it works for you.

For the Polars problem, you may want to add your voice.

@Chris00
Copy link
Owner Author

Chris00 commented Apr 18, 2024

If I specify arm-86, I get the error error: command failed: 'cargo': Bad CPU type in executable (os error 86).

@Chris00
Copy link
Owner Author

Chris00 commented Apr 18, 2024

This type of error is referred to in the Pyo3 doc! But it does not seem to be related to our problem...

@Chris00
Copy link
Owner Author

Chris00 commented Apr 19, 2024

I've added a MacOS aarch64 worker to the CI and it works fine.

@Chris00
Copy link
Owner Author

Chris00 commented Apr 19, 2024

I also added anaconda on arm64... and it fails the same way as for amd64. For now, I allowed it to fail. 😢

@LCrossman
Copy link
Contributor

Not sure of the issue...could try miniconda instead which is lighter and I am using.
Miniconda

@Chris00
Copy link
Owner Author

Chris00 commented Apr 19, 2024

Thanks for your reply. That's what I am using for MacOS arm64 because the worker (provided by FlyCI) does not come with Anaconda installed. Unfortunately, the end result is the same. It's a really frustrating error as it used to work and it is not clear what changed...

@LCrossman
Copy link
Contributor

LCrossman commented Apr 22, 2024

Yes I am not clear on the issue, I think we will need to post on conda website, because it works locally.
Or use brew instead?
One other thing which I guess is probably unrelated is that it has worked locally and save the file but it does also open and close a plotting window too quickly to look at the plot.

@Chris00
Copy link
Owner Author

Chris00 commented May 2, 2024

Now I have an error that resembles to one of curl-sys but I can't find its cause... :(

@Chris00
Copy link
Owner Author

Chris00 commented May 2, 2024

See also rust-lang/cargo#12670

@Chris00
Copy link
Owner Author

Chris00 commented May 3, 2024

The problem was the DYLD_LIBRARY_PATH itself. Indeed this directory contains many other libraries which where chosen instead of the default ones. Some of these where not linked with MacOSX system libraries whence the exception.

@LCrossman
Copy link
Contributor

DYLD_LIBRARY_PATH specification was indeed all that was needed to fix locally

@Chris00
Copy link
Owner Author

Chris00 commented May 4, 2024

Unfortunately, that is also was was causing the problem for the CI. Let's hope it is fixed at the PyO3 level — or at the anaconda level. This issue is already 4.5 years old...

@Chris00
Copy link
Owner Author

Chris00 commented Dec 24, 2024

Well, all tests (including using anaconda) now pass but they depend on a "link trick":

mkdir -p target/debug/deps
ln -s $CONDA_PREFIX/lib/libpython* target/debug/deps

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants