|
From: CK <tun...@ya...> - 2021-05-13 13:20:40
|
There is no m1 Mac arm64 version > Luigi Ballabio <lui...@gm...>於2021年5月13日 下午3:13寫道: > > > That would be the `configure` in the C++ library. > > This said: are you building the wheel because you want to change the code? If not, don't build it, use `pip install QuantLib` instead. > > Luigi > > >> On Thu, May 13, 2021 at 5:29 AM Ching Kai TUNG <tun...@ya...> wrote: >> Hi >> I try to build the wheel >> run `configure` with `--disable-shared` >> >> But it said unrecognized option? >> >>> Luigi Ballabio <lui...@gm...>於2021年5月12日 下午3:20寫道: >>> >>> >>> No, I haven't seen the slowness. I have built 64-bit wheels on a Windows virtual machine and they took some minutes, not hours. The same goes for running Docker on a 64bit Mac. >>> >>>> On Tue, May 11, 2021 at 2:01 PM Alix Lassauzet <ali...@gm...> wrote: >>>> Thanks Luigi for your help. This is exactly what I needed. Running `configure` with `--disable-shared` works fine, but I had to add the flag '-fPIC' in the same time. Otherwise, the swig compilation fails. I will also give a look to manylinux, which looks a better practice, thanks again. >>>> >>>> I have originally tried to build your dockerfiles on a 64bit Windows machine, and I noticed the swig compilation took hours -while the compilation directly on the host machine would take ~1h. Have you ever faced this sort of slowness? I remember having facing similar issues when trying to compile QuantLib Excel in 64bits, while it was fine in 32bits. >>>> >>>> I also noticed the PyQL project tackle this "issue" by relying on Cython, so that they can use parallelization (but I never tried). I don't know if there exists any workaround with swig (maybe except adding additional flag to the compiler to remove extra optimisation). >>>> >>>> Alix >>>> >>>>> Le lun. 10 mai 2021 à 09:14, Luigi Ballabio <lui...@gm...> a écrit : >>>>> Hello Alix, >>>>> I'm not sure that `auditwheel repair` works outside the manylinux images. Personally I'm using the `quay.io/pypa/manylinux2010_x86_64` image to build the QuantLib wheels on PyPI (used to be `quay.io/pypa/manylinux1_x86_64`, but since the latest release we need a C++11 compiler so I upgraded). If you want to distribute to users on a given Ubuntu version, I'd probably distribute both the wheel (unrepaired) and the shared library. If you want a self-contained wheel, another possibility (which I have done on Mac OS, but not on Linux so I can't guarantee it works) might be to run `configure` with `--disable-shared`, so it only creates the static library. This way, the library code would be linked in the wrappers instead of being a dependency. >>>>> >>>>> Hope this helps, >>>>> Luigi >>>>> >>>>> >>>>> >>>>> >>>>> >>>>>> On Sat, May 8, 2021 at 4:21 PM Alix Lassauzet <ali...@gm...> wrote: >>>>>> Hello Luigi and QL community, >>>>>> >>>>>> I am actually stuck in the process of building properly a wheel in QuantLib-Python from docker. In short, I am starting from Luigi's repository (https://github.com/lballabio/dockerfiles), then building the images boost, base, default and python3. At this point, one can use QuantLib-Python. >>>>>> >>>>>> Then, I tried to run "python3 setup.py bdist_wheel" to generate a wheel. And "repair" the wheel using auditwheel, I am facing this error: >>>>>> >>>>>> auditwheel: error: cannot repair "QuantLib******.whl" to "manylinux1_x86_64" ABI because of the presence of too-recent versioned symbols. You'll need to compile the wheel on an older toolchain. >>>>>> >>>>>> I have seen a discussion where Luigi mentioned to use manylinux for building a wheel. Does it mean we cannot generate a wheel from an Ubunbu distribution? If my understanding is correct, manylinux will provide wheels for any linux distribution, and looks the best practice to industrialise the release process. But what about if we don't care about the Linux distrib, and just want to build a wheel for this Ubuntu version, assuming users are required to use the same environment? The concern here seems to link the external shared library "libQuantLib.so.0". >>>>>> >>>>>> Many thanks to all, >>>>>> Alix >>>>>> >>>>>> Attaching the 2 earlier discussions that look related to this topic for reference: >>>>>> https://sourceforge.net/p/quantlib/mailman/message/36713117/ >>>>>> https://github.com/lballabio/QuantLib-SWIG/issues/103 >>>>>> >>>>>> >>>>>> _______________________________________________ >>>>>> QuantLib-users mailing list >>>>>> Qua...@li... >>>>>> https://lists.sourceforge.net/lists/listinfo/quantlib-users >>>>>> >>> _______________________________________________ >>> QuantLib-users mailing list >>> Qua...@li... >>> https://lists.sourceforge.net/lists/listinfo/quantlib-users |