-
Notifications
You must be signed in to change notification settings - Fork 124
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
Several issues when building PyImath #101
Comments
Thanks, we'll investigate.
…On Sun, Feb 21, 2021 at 12:59 PM Bernd ***@***.***> wrote:
I've encountered a few issues, when building Imath with Python support
enabled.
- The imathnumpy.so module has no executable bit set, although in the
build directory the bit is set:
$ ls -l /var/tmp/portage/dev-libs/imath-9999/work/imath-9999_build/python3_8/
total 5836
-rwxr-xr-x 1 waebbl waebbl 5916200 Feb 21 21:15 imath.so
-rwxr-xr-x 1 waebbl waebbl 56872 Feb 21 21:15 imathnumpy.so
vs.
$ ls -l /var/tmp/portage/dev-libs/imath-9999/image/usr/lib/python3.8/site-packages/
total 4092
-rwxr-xr-x 1 waebbl waebbl 4148352 Feb 21 21:23 imath.so
-rw-r--r-- 1 waebbl waebbl 39920 Feb 21 21:23 imathnumpy.so
- The RPATH for imathnumpy.so isn't cleared during install stage (see
the QA notice at the end of build log).
- The PyImath library has no proper API version string attached, it is
named libPyImath_Python3_8-3.0.so.VERSION for Python 3.8 (see install
stage in build log)
- The PyImath.pc pkg-config file seems not correct. First, the
${{,exec_}prefix} is missing on several variables. See the difference
in the functions at
https://github.com/AcademySoftwareFoundation/Imath/blob/master/config/CMakeLists.txt#L45
and
https://github.com/AcademySoftwareFoundation/Imath/blob/master/src/python/config/CMakeLists.txt#L16.
See also AcademySoftwareFoundation/openexr#922
<AcademySoftwareFoundation/openexr#922> for
an identical issue in OpenEXR-2.5.5 and compare the installed Imath.pc
and PyImath.pc files. Second, in the Libs: section, the PyImath
library is missing a Python suffix. It only has the ${libsuffix}
appended, while the acutal library has an
_Python${PYTHON_MAJOR}_${PYTHON_MINOR}${libsuffix} suffix scheme. The
file I got looks like:
##
## SPDX-License-Identifier: BSD-3-Clause
## Copyright Contributors to the OpenEXR Project.
##
prefix=/usr
exec_prefix=bin
libdir=lib64
includedir=include
libsuffix=
Name: PyImath
Description: Python bindings for the Imath libraries
Version: 3.0.0
Libs: -L${libdir} -lImath${libsuffix} -lPyImath${libsuffix}
Cflags: -I${includedir} -I${includedir}/Imath
For details, please see the attached build log. System is Gentoo Linux,
gcc-10.2.0, Python-3.8.8, boost-1.75.0, numpy-1.19.5. If you need any more
information, don't hesitate to ping me.
build.log
<https://github.com/AcademySoftwareFoundation/Imath/files/6018457/build.log>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#101>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AFC3DGNB54HEQJAVEJP3CFLTAFX3HANCNFSM4X7LPV2Q>
.
--
Cary Phillips | R&D Supervisor | ILM | San Francisco
|
I'm sorry, I was probably wrong with the first bullet above. Removal of the executable bit is more likely to be done by the package manager routine I use to install the package from the build stage to the (sandboxed) final install location. |
We set VERSION here, to PYIMATH_LIB_VERSION, but I haven't spotted where we set PYIMATH_LIB_VERSION. I wonder if that's the root cause of the problem.
|
That's the only appearance of PYIMATH_LIB_VERSION in the code. Shouldn't the soversion of Imath and PyImath match anyway? Maybe this PYIMATH_LIB_VERSION could be replaced by IMATH_LIB_VERSION from https://github.com/AcademySoftwareFoundation/Imath/blob/master/config/version.cmake#L13? |
We set VERSION here, to PYIMATH_LIB_VERSION, where do we set PYIMATH_LIB_VERSION?
We specify the following for pymathnumpy: set_target_properties(imathnumpy_python3 PROPERTIES
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/python${Python3_VERSION_MAJOR}_${Python3_VERSION_MINOR}/"
LIBRARY_OUTPUT_NAME "imathnumpy"
DEBUG_POSTFIX ""
) did the library appear in an unexpected place, or not at all? |
Not at all
Searching for
|
Grepping the code, I found no other appearance of the symbol. It's also not in the CMakeCache.txt file, so maybe it's not set at all? |
Separate version variables for Imath and PyImath is a relic of the earlier organization where IlmBase and PyIlmBase were packaged independently, we should consolidate that into a single variable. |
Cary, is this work: AcademySoftwareFoundation/openexr#929 the corresponding work on the OpenEXR side to consolidating the variables? |
There's also some redundancy in the PyImath related cmake files. Settings for c++ standard, installation of pkg-config files, LIB_SUFFIX, OUTPUT_SUBDIR, rpath settings, build and configuration types and OPENEXR_USE_CLANG_TIDY are repeated in |
There's no reason they can't share a common setup. |
@meshula, yes, #929 also cleans up some remnants of the previous organization. I'll also look into cleaning up the *Setup.cmake files, these can be simplified. |
If you like, I can look into some of the cmake related topics. |
Bug: AcademySoftwareFoundation#101 Signed-off-by: Bernd Waibel <[email protected]>
Bug: AcademySoftwareFoundation#101 Signed-off-by: Bernd Waibel <[email protected]>
Bug: AcademySoftwareFoundation#101 Signed-off-by: Bernd Waibel <[email protected]>
Bug: AcademySoftwareFoundation#101 Signed-off-by: Bernd Waibel <[email protected]>
* clean up c++ standard Signed-off-by: Bernd Waibel <[email protected]> * clean-up pkg-config variables for PyImath Signed-off-by: Bernd Waibel <[email protected]> * clean-up output dir for PyImath Signed-off-by: Bernd Waibel <[email protected]> * clean redundant CMAKE_INCLUDE_CURRENT_DIR Signed-off-by: Bernd Waibel <[email protected]> * clean-up redundant rpath settings in PyImath Signed-off-by: Bernd Waibel <[email protected]> * clean-up redundant cmake build type setting Signed-off-by: Bernd Waibel <[email protected]> * clean-up redundant search for clang-tidy Signed-off-by: Bernd Waibel <[email protected]> * clean-up version and soversion for PyImath Signed-off-by: Bernd Waibel <[email protected]> * fix pkg-config file for PyImath Bug: #101 Signed-off-by: Bernd Waibel <[email protected]> * install imathnumpy.so module Signed-off-by: Bernd Waibel <[email protected]>
@meshula As far as I can see it still needs to be fixed. I just pulled the latest commits, since PR #102 has been merged. They don't contain any changes to the python selection. To solve this issue, the separation to build for only one python version has to be done, which seems not the case so far. I was thinking about trying to do this, after the PR got approved, but was distracted by other projects since then. |
Ok, thanks for the notes. |
@waebbl The separation has now been committed ~ if you are still thinking of trying to do the libsuffix bit, I think there's nothing blocking it. |
Great, thanks for the confirmation. |
I've encountered a few issues, when building Imath with Python support enabled.
imathnumpy.so
module has no executable bit set, although in the build directory the bit is set:vs.
imathnumpy.so
isn't cleared during install stage (see the QA notice at the end of build log).libPyImath_Python3_8-3.0.so.VERSION
for Python 3.8 (see install stage in build log)PyImath.pc
pkg-config file seems not correct. First, the${{,exec_}prefix}
is missing on several variables. See the difference in the functions at https://github.com/AcademySoftwareFoundation/Imath/blob/master/config/CMakeLists.txt#L45 and https://github.com/AcademySoftwareFoundation/Imath/blob/master/src/python/config/CMakeLists.txt#L16. See also Wrong paths in PyIlmBase pkg-config for 2.5.5 openexr#922 for an identical issue in OpenEXR-2.5.5 and compare the installedImath.pc
andPyImath.pc
files. Second, in theLibs:
section, the PyImath library is missing a Python suffix. It only has the${libsuffix}
appended, while the acutal library has an_Python${PYTHON_MAJOR}_${PYTHON_MINOR}${libsuffix}
suffix scheme. The file I got looks like:For details, please see the attached build log. System is Gentoo Linux, gcc-10.2.0, Python-3.8.8, boost-1.75.0, numpy-1.19.5. If you need any more information, don't hesitate to ping me.
build.log
The text was updated successfully, but these errors were encountered: