Problem with re-definition of `_DEBUG` in `wrap_python.hpp`

Offen
#408 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
38/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
cpp, python
Bereich
build-system

Rechercherichtung

Start with include/boost/python/detail/wrap_python.hpp around line 45 and its end, then compare the _DEBUG handling with include/tbb/tbb_config.h and Blender's referenced patch. Determine how the original _DEBUG value can be preserved without breaking Boost.Python's behavior. Done means debug Blender 3.5 can build with an official Boost library without the macro-value discrepancy.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

python/include/boost/python/detail/wrap_python.hpp undefines _DEBUG, and then redefines it as an empty macro at the end of the file.

However, this macro is not necessarily empty originally.

This discrepancy of values breaks building debug Blender 3.5 (aka current master) with any official boost library, as TBB (2020 U3) has some complex logic to handle various cases of values for _DEBUG (see include/tbb/tbb_config.h).

One could argue that the TBB 2020 code is also weak (it seems that they changed it in the more recent oneTBB), but it does rely on the value of _DEBUG to stay the same, which imho is a reasonable expectation?.

Not sure how keeping the same value for this debug could be ensured though... Maybe through BOOST_PP_ASSIGN_SLOT?


PS: For now, Blender is patching its own boost to redefine _DEBUG as 1, but this is obviously not a proper solution in general.

Vorherrschende Sprache
C++
Sterne
537
Forks
223
Ø Merge
11 Std. 22 Min.
Gemergte PRs (30 T.)
2

Beitragsleitfaden

Für dieses Repository ist kein Beitragsleitfaden indexiert

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus boostorg/python

Alle Issues in boostorg/python

Ähnliche Issues

Weitere Issues zu C++

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.