Re: Many packages unnecessarily link to libpython

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Jun 01, 2020 at 02:59:32PM +0800, Honggang LI wrote:
> 
> I think I know how to avoid link pyverbs without libpython3.9. I will
> fix this for rdma-core (fc33).

I confirmed this patch fix this issue. However, upstream wants all shared
ELFs have fully described linking. That means all python modules had
been linked to specific libpython intentionally.

Upstream maintainer's reply: 
<snip>
It is a bit dangerous as any shared library that uses symbol versions
like glibc, rdma-core bits, etc MUST be provided at link time, so you
loose the safety of no-undefined.

Frankly I think python it is solving their problem the wrong way, you
should never encourage linking like this.
<end of snip>

As upstream unlikely apply this patch, I don't want to apply dangling patch
in Fedora. So, is it possible to ignore this for rdma-core? If no, what
is the next step?

Thanks

=============================
diff --git a/buildlib/pyverbs_functions.cmake b/buildlib/pyverbs_functions.cmake
index ca41fbb4..9743e5cd 100644
--- a/buildlib/pyverbs_functions.cmake
+++ b/buildlib/pyverbs_functions.cmake
@@ -21,12 +21,12 @@ function(rdma_cython_module PY_MODULE LINKER_FLAGS)
       )

     string(REGEX REPLACE "\\.so$" "" SONAME "${FILENAME}${CMAKE_PYTHON_SO_SUFFIX}")
-    add_library(${SONAME} SHARED ${CFILE})
+    add_library(${SONAME} MODULE ${CFILE})
     set_target_properties(${SONAME} PROPERTIES
       COMPILE_FLAGS "${CMAKE_C_FLAGS} -fPIC -fno-strict-aliasing -Wno-unused-function -Wno-redundant-decls -Wno-shadow -Wno-cast-functi
on-type -Wno-implicit-fallthrough -Wno-unknown-warning -Wno-unknown-warning-option ${NO_VAR_TRACKING_FLAGS}"
       LIBRARY_OUTPUT_DIRECTORY "${BUILD_PYTHON}/${PY_MODULE}"
       PREFIX "")
-    target_link_libraries(${SONAME} LINK_PRIVATE ${PYTHON_LIBRARIES} ibverbs rdmacm ${LINKER_FLAGS})
+    target_link_libraries(${SONAME} LINK_PRIVATE ibverbs rdmacm ${LINKER_FLAGS})
     install(TARGETS ${SONAME}
       DESTINATION ${CMAKE_INSTALL_PYTHON_ARCH_LIB}/${PY_MODULE})
   endforeach()
=============================

> 
> Thanks
_______________________________________________
devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx
Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Users]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]

  Powered by Linux