- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am trying to use Intel Python to build a package which requires linking to libpython. The package queries the Python libraries through `python -m sysconfig`. Specifically, the LDLIBRARY entry.
But for Intel Python it's configured incorrectly. Intel Python sets "LDLIBRARY = "libpython3.9.a" despite there not being a `libpython3.9.a` in `/opt/intel/oneapi/intelpython/python3.9/lib`
```
$ ls /opt/intel/oneapi/intelpython/python3.9/lib/libpython*
/opt/intel/oneapi/intelpython/python3.9/lib/libpython3.9.so /opt/intel/oneapi/intelpython/python3.9/lib/libpython3.9.so.1.0 /opt/intel/oneapi/intelpython/python3.9/lib/libpython3.so
```
Similarly, in CONFIGURE_ARGS there's `--disable-shared`.
So, my question is why is Intel Python configured this way? It's build with `--disable-shared` according to the log, but there are no static libraries and only shared libraries.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thankyou for posting in Intel Communities.
Could you please share the following details:
1) The package you are trying to install?
2) OS you are using?
Thanks.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The application I'm building doesn't matter, it's just how I came to see the bug.
This was on Ubuntu 20.04.
On macOS the library is correct: LDLIBRARY = "libpython3.7m.dylib"
On a supercomputer I have access to (which I think is CentOS 7), it's also correct: `LDLIBRARY = "libpython3.7m.so"`
But on Ubuntu and a different super computer (also with CentOS 7 as the base OS) it's: LDLIBRARY = "libpython3.9.a" (which doesn't exist)
On Ubuntu I installed it with `sudo apt install intel-oneapi-python`
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have some more to add. This change seems to be related to the upgrade to Python 3.8 (and 3.9) starting in Intel 2021.3. The values are correct in previous versions of Intelpython when using Python 3.7.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I downloaded the offline installer, extracted the contents, and looked at the Python executable. It's built with --disable-shared, but the lib directory only contains .so libraries. If Python was built with --disable-shared then it seems to me that the lib directory should contain a `libpython3.a` for consistency.
I found this script which is used to configure/build Python.
l_BaseKit_p_2022.1.2.146_offline/packages/intel.oneapi.lin.python3,v=2022.0.2-155/cupPayload/_installdir/conda_channel/linux-64/python-3.9.7-h718aa4a_4/info/recipe/build.sh
In that script there it builds Python twice, first with shared libraries, and then statically. Then, at the end of that script the static library is deleted.
rm ${PREFIX}/lib/libpython${VER}.a
So, what I gather is that the static interpreter is used (for performance reasons?) but only the shared libraries are installed, but then this leads to an inconsistent `python3 -m sysconfig`.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for sharing the detailed information. We will check on this internally and get back to you soon with an update.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for reporting this issue, we will fix it in next release!
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page