Coder Social home page Coder Social logo

Comments (3)

aPere3 avatar aPere3 commented on August 16, 2024

Okay, so here is what I managed to understand from the problem.

What we do in concrete-fftw-sys, is that we build fftw in static mod, which has the effect of generating .a files in the output dir. Then this is statically included in the libconcrete_fftw_sys.rlib file, which the kind of files used by rust to perform its compilation (in practice, it is a .a file plus some metadata).

I can see that the fftw code is indeed included in this rlib file by performing:

objdump -d libconcrete_fftw_sys.rlib | rustfilt

We can see the fftw code in that.

What is kind of weird with the compilation error on the concrete-core side is that it comes from ld not finding the fftw package. But it is not expected to look for it, since it is embedded in the libconcrete_fftw_sys.rlib file....

I wonder if it is not due to concrete-core having a cdylib target as examplified by the presence of that in the error:

 "-o" "/home/runner/work/concrete/concrete/target/release/deps/libconcrete_core-f55034b3778ea813.so"

from concrete.

aPere3 avatar aPere3 commented on August 16, 2024

Ok, I think I am getting closer. In the build.rs file of concrete-fftw-sys, we have this line:

    println!("cargo:rustc-link-search={}", out_dir.join("lib").display());

Which allows cargo to find the the .a files from fftw when compiling libconcrete_fftw_sys.rlib. The reference says that those paths are appended by cargo to LD_LIBRARY_PATH, which is probably then used to locate the .so files needed to build the cdylib target of concrete-core.

from concrete.

aPere3 avatar aPere3 commented on August 16, 2024

In the end, there was no bug :)

What happened is that currently, the concrete package still depends on concrete-core=0.1.9, which itself depends on fftw with the system flag which explicitly uses the system version of fftw. We were just too eager to remove the system dependency on libfftw :)

What helped me in debugging that was using the following build command:

cargo +nightly build --build-plan -Z unstable-options

And then reading the output with the firefox json viewer. It actually shows the steps that will be executed in order to compile the target. This allowed me to see that fftw-sys was still compiled :)

from concrete.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.