Git Product home page Git Product logo

Comments (15)

eli-schwartz avatar eli-schwartz commented on May 30, 2024 2

I would recommend making another release since build issues that prevent people from successfully installing the software tend to be a pretty thorny problem for affected users.

Two months is a bit on the long side, for that.

from bcc.

yonghong-song avatar yonghong-song commented on May 30, 2024

Sorry. the tag is incorrect, it should be v0.29.0. could you sync with latest bcc repo and try again?

from bcc.

hhoffstaette avatar hhoffstaette commented on May 30, 2024

I have exactly the same problem on Gentoo using v0.29.0; python stuff is installed into /lib/python3.x/ (where it does not belong) and is not found by any tools.

from bcc.

yonghong-song avatar yonghong-song commented on May 30, 2024

Could you help bisect which commit caused this issue?

from bcc.

hhoffstaette avatar hhoffstaette commented on May 30, 2024

The problem is caused by #6813fbce ("Allow for installing python as a non-system package").
Building 0.29.0-final with only that commit reverted installs python stuff where it should go, just like with 0.28.

from bcc.

kloczek avatar kloczek commented on May 30, 2024

Could you help bisect which commit caused this issue?

OK. One sec ..

from bcc.

yonghong-song avatar yonghong-song commented on May 30, 2024

@hhoffstaette @kloczek Could you help investigate how we could fix the issue at the same time preserving the functionality as in 6813fbc If needed we can add a cmake option for that. thanks!

from bcc.

kloczek avatar kloczek commented on May 30, 2024

Issue is that 0.29.0 tag is without dist tar ball asset so I cannot plug that tag into my existing build procedure which I can request to execute on my build infra.

from bcc.

yonghong-song avatar yonghong-song commented on May 30, 2024

@kloczek https://github.com/iovisor/bcc/releases/tag/v0.29.0 there is a tarball with submodules included.

from bcc.

eli-schwartz avatar eli-schwartz commented on May 30, 2024

@hhoffstaette @kloczek Could you help investigate how we could fix the issue at the same time preserving the functionality as in 6813fbc If needed we can add a cmake option for that. thanks!

I think that ideally you would stop calling one build system from another build system, but instead use one build system that knows how to handle both C/C++ and python.

Using setuptools isn't even a long-term solution either way, because ${PY_CMD} setup.py install ... is going to stop working when setuptools finally does what it's been warning it will do for a while now, and removes the ability to execute setup.py as a script. I'm not aware of a specific timeframe for this but it is something that they want to do at some point.

EDIT: for context, you can install a whole bunch more packages as well and then use those to install a setuptools-based wheel. However, this is a great deal of effort and additional dependencies for, ultimately, at the end of the day -- nothing other than "install the bcc/ directory to the correct site-packages".

Even the setuptools-produced .egg-info / .dist-info metadata is effectively useless, since it's not the same as PyPI.

from bcc.

hhoffstaette avatar hhoffstaette commented on May 30, 2024

@hhoffstaette @kloczek Could you help investigate how we could fix the issue at the same time preserving the functionality as in 6813fbc If needed we can add a cmake option for that. thanks!

The puzzling thing is that the existing construct if(NOT PYTHON_PREFIX) should work, but somehow does not. So I took a closer look at the conditional assignment and saw the comma between the variables, which looked fishy to me. I removed it (see below) and now it seems to work as expected. 🎉
Can someone more versed in CMake confirm that this won't break anything else?
Maybe @leeavital can chime in. If this is indeed correct I'll make a PR.

diff --git a/src/python/CMakeLists.txt b/src/python/CMakeLists.txt
index a897aa98..7f5b103e 100644
--- a/src/python/CMakeLists.txt
+++ b/src/python/CMakeLists.txt
@@ -38,7 +38,7 @@ foreach(PY_CMD ${PYTHON_CMD})
   add_custom_target(bcc_py_${PY_CMD_ESCAPED} ALL DEPENDS ${PIP_INSTALLABLE})
 
   if(NOT PYTHON_PREFIX)
-     set(PYTHON_PREFIX, ${CMAKE_INSTALL_PREFIX} )
+     set(PYTHON_PREFIX ${CMAKE_INSTALL_PREFIX})
   endif()
 
   install(

from bcc.

eli-schwartz avatar eli-schwartz commented on May 30, 2024

Can someone more versed in CMake confirm that this won't break anything else?

Using commas is incorrect CMake syntax. The Meson build system would require it, on the other hand. :P

Interestingly, you can see what cmake is actually doing here if you set it as a CACHE variable. The variable name is PYTHON_DIR,, but you cannot actually access such a variable after setting it, at least... not with ${} lookup syntax. It still works via some other methods not used here.

Unfortunately, cmake as a stringly-typed programming language has no innate protection against this kind of issue.

from bcc.

yonghong-song avatar yonghong-song commented on May 30, 2024

@hhoffstaette @eli-schwartz @kloczek @rtomayko Thanks for all of you trying to fix the problem! Just merged to the master branch. Do you think we need another release (e.g., v0.29.1) containing the fix? Or we can wait for another say two months for the next release (e.g., v0.30.0)?

from bcc.

yonghong-song avatar yonghong-song commented on May 30, 2024

Sounds good. Will cut another minor release tomorrow.

from bcc.

hhoffstaette avatar hhoffstaette commented on May 30, 2024

Sounds good. Will cut another minor release tomorrow.

Appreciate it, but please also add the python-3.12 fix in #4832 - thanks :)

from bcc.

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.