wxWidgets / Phoenix

wxPython's Project Phoenix. A new implementation of wxPython, better, stronger, faster than he was before.
http://wxpython.org/
2.34k stars 516 forks source link

failed to build 4.2.2 release #2611

Closed chenrui333 closed 2 months ago

chenrui333 commented 2 months ago

Operating system: macos/linux wxPython version & source: 4.2.2, source build Python version & source: python 3.12

Description of the problem: seeing the following build failure while doing the source build

  Unable to find xml file for ITEM: wxDateSpan
  Tried: /private/tmp/wxpython-20240916-17683-h172f/wxPython-4.2.2/ext/wxWidgets/docs/doxygen/out/xml/classwx_date_span.xml
         /private/tmp/wxpython-20240916-17683-h172f/wxPython-4.2.2/ext/wxWidgets/docs/doxygen/out/xml/structwx_date_span.xml
         /private/tmp/wxpython-20240916-17683-h172f/wxPython-4.2.2/ext/wxWidgets/docs/doxygen/out/xml/wxDateSpan
  Traceback (most recent call last):
    File "/private/tmp/wxpython-20240916-17683-h172f/wxPython-4.2.2/etg/wxdatetime.py", line 427, in <module>
      run()
    File "/private/tmp/wxpython-20240916-17683-h172f/wxPython-4.2.2/etg/wxdatetime.py", line 32, in run
      etgtools.parseDoxyXML(module, ITEMS)
    File "/private/tmp/wxpython-20240916-17683-h172f/wxPython-4.2.2/etgtools/__init__.py", line 82, in parseDoxyXML
      raise DoxyXMLError(msg)
  etgtools.DoxyXMLError: Unable to find xml file for ITEM: wxDateSpan
  Command '"/opt/homebrew/opt/python@3.12/bin/python3.12" etg/wxdatetime.py --sip --nodoc' failed with exit code 1.
  Finished command: etg (0m4.770s)

full build log, https://github.com/Homebrew/homebrew-core/actions/runs/10885520355/job/30204795991 relates to https://github.com/Homebrew/homebrew-core/pull/189377

swt2c commented 2 months ago

Yes, this is due to a change in doxygen. You can either build with older doxygen, or this tiny change fixes it: https://github.com/wxWidgets/wxWidgets/pull/24814

MeggyCal commented 2 months ago

Hi, I have also run into this problem. The mentioned PR (or rather the closing commit) didn't fix this issue for me.

So I tried to grep all files which have this problem (aka unmatched ticks) and found some other "real" occurences, for instance here:

wx/lib/plot/plotcanvas.py:           Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.fontSizeLegend'

Does it matter?

swt2c commented 2 months ago

Hi, I have also run into this problem. The mentioned PR (or rather the closing commit) didn't fix this issue for me.

So I tried to grep all files which have this problem (aka unmatched ticks) and found some other "real" occurences, for instance here:

wx/lib/plot/plotcanvas.py:           Use the :attr:`~wx.lib.plot.plotcanvas.PlotCanvas.fontSizeLegend'

Does it matter?

Probably doesn't matter. The issue fixed upstream was related to doxygen parsing the wxWidgets header files, not the pure-Python code in wxPython. What is the exact error you are seeing @MeggyCal?

MeggyCal commented 2 months ago

Hi, I am still seeing (hope that helps):

[   26s] + python3.12 build.py etg --nodoc --use_syswx --gtk3 -v
[   26s] /home/abuild/rpmbuild/BUILD/wxPython-4.2.2/build.py:42: DeprecationWarning: dep_util is Deprecated. Use functions from setuptools instead.
[   26s]   from distutils.dep_util import newer, newer_group
[   31s] Unable to find xml file for ITEM: wxDateSpan
[   31s] Tried: /tmp/wxxml/docs/doxygen/out/xml/classwx_date_span.xml
[   31s]        /tmp/wxxml/docs/doxygen/out/xml/structwx_date_span.xml
[   31s]        /tmp/wxxml/docs/doxygen/out/xml/wxDateSpan
[   31s] Traceback (most recent call last):
[   31s]   File "/home/abuild/rpmbuild/BUILD/wxPython-4.2.2/etg/wxdatetime.py", line 423, in <module>
[   31s]     run()
[   31s]   File "/home/abuild/rpmbuild/BUILD/wxPython-4.2.2/etg/wxdatetime.py", line 32, in run
[   31s]     etgtools.parseDoxyXML(module, ITEMS)
[   31s]   File "/home/abuild/rpmbuild/BUILD/wxPython-4.2.2/etgtools/__init__.py", line 82, in parseDoxyXML
[   31s]     raise DoxyXMLError(msg)
[   31s] etgtools.DoxyXMLError: Unable to find xml file for ITEM: wxDateSpan
[   32s] Will build using: "/usr/bin/python3.12"
[   32s] 3.12.5 (main, Aug 07 2024, 18:22:58) [GCC]
[   32s] Python's architecture is 64bit
[   32s] cfg.VERSION: 4.2.2
[   32s] 
[   32s] Running command: etg
[   32s] "/usr/bin/python3.12" etg/_core.py --sip --nodoc
[   32s] "/usr/bin/python3.12" etg/_adv.py --sip --nodoc
[   32s] "/usr/bin/python3.12" etg/_aui.py --sip --nodoc
[   32s] "/usr/bin/python3.12" etg/_dataview.py --sip --nodoc
[   32s] "/usr/bin/python3.12" etg/_glcanvas.py --sip --nodoc
[   32s] "/usr/bin/python3.12" etg/_grid.py --sip --nodoc
[   32s] "/usr/bin/python3.12" etg/_html.py --sip --nodoc
[   32s] "/usr/bin/python3.12" etg/_html2.py --sip --nodoc
[   32s] "/usr/bin/python3.12" etg/_media.py --sip --nodoc
[   32s] "/usr/bin/python3.12" etg/_msw.py --sip --nodoc
[   32s] "/usr/bin/python3.12" etg/_propgrid.py --sip --nodoc
[   32s] "/usr/bin/python3.12" etg/_ribbon.py --sip --nodoc
[   32s] "/usr/bin/python3.12" etg/_richtext.py --sip --nodoc
[   32s] "/usr/bin/python3.12" etg/_stc.py --sip --nodoc
[   32s] "/usr/bin/python3.12" etg/_xml.py --sip --nodoc
[   32s] "/usr/bin/python3.12" etg/_xrc.py --sip --nodoc
[   32s] "/usr/bin/python3.12" etg/defs.py --sip --nodoc
[   32s] "/usr/bin/python3.12" etg/debug.py --sip --nodoc
[   32s] "/usr/bin/python3.12" etg/object.py --sip --nodoc
[   32s] "/usr/bin/python3.12" etg/clntdatactnr.py --sip --nodoc
[   32s] "/usr/bin/python3.12" etg/wxdatetime.py --sip --nodoc
[   32s] Command '"/usr/bin/python3.12" etg/wxdatetime.py --sip --nodoc' failed with exit code 1.
[   32s] Finished command: etg (0m5.179s)
[   32s] error: Bad exit status from /var/tmp/rpm-tmp.RQd5sy (%build)
chenrui333 commented 2 months ago

the patch actually works for me, gonna close it for now.

MeggyCal commented 2 months ago

well, it still doesn't for me :disappointed:

swt2c commented 2 months ago

well, it still doesn't for me 😞

@MeggyCal are you sure that you applied the patch and recompiled wxPython/wxWidgets correctly?

MeggyCal commented 1 month ago

Oh! I haven't noticed that the patch was for wxWidgets, I previously applied it to the ext/ directory of wxPython. Now it should work, thank you :)

glaubitz commented 1 month ago

Funny, I just also tried to update wxPython in openSUSE and I applied the suggested patch as follows:

diff -Nru wxPython-4.2.2.orig/ext/wxWidgets/include/wx/datetime.h wxPython-4.2.2/ext/wxWidgets/include/wx/datetime.h
--- wxPython-4.2.2.orig/ext/wxWidgets/include/wx/datetime.h     2024-09-03 11:43:24.000000000 +0000
+++ wxPython-4.2.2/ext/wxWidgets/include/wx/datetime.h  2024-10-01 11:58:26.059508051 +0000
@@ -148,7 +148,7 @@
         Local,

         // zones from GMT (= Greenwich Mean Time): they're guaranteed to be
-        // consequent numbers, so writing something like `GMT0 + offset' is
+        // consequent numbers, so writing something like `GMT0 + offset` is
         // safe if abs(offset) <= 12

         // underscore stands for minus
diff -Nru wxPython-4.2.2.orig/ext/wxWidgets/interface/wx/datetime.h wxPython-4.2.2/ext/wxWidgets/interface/wx/datetime.h
--- wxPython-4.2.2.orig/ext/wxWidgets/interface/wx/datetime.h   2024-09-03 11:43:24.000000000 +0000
+++ wxPython-4.2.2/ext/wxWidgets/interface/wx/datetime.h        2024-10-01 11:43:40.600424159 +0000
@@ -96,7 +96,7 @@

         ///@{
         /// zones from GMT (= Greenwich Mean Time): they're guaranteed to be
-        /// consequent numbers, so writing something like `GMT0 + offset' is
+        /// consequent numbers, so writing something like `GMT0 + offset` is
         /// safe if abs(offset) <= 12

         // underscore stands for minus

However, the build failure still persists:

[   23s] + python3.11 build.py etg --nodoc --use_syswx --gtk3 -v
[   23s] /home/abuild/rpmbuild/BUILD/wxPython-4.2.2/build.py:42: DeprecationWarning: dep_util is Deprecated. Use functions from setuptools instead.
[   23s]   from distutils.dep_util import newer, newer_group
[   27s] Unable to find xml file for ITEM: wxDateSpan
[   27s] Tried: /tmp/wxxml/docs/doxygen/out/xml/classwx_date_span.xml
[   27s]        /tmp/wxxml/docs/doxygen/out/xml/structwx_date_span.xml
[   27s]        /tmp/wxxml/docs/doxygen/out/xml/wxDateSpan
[   27s] Traceback (most recent call last):
[   27s]   File "/home/abuild/rpmbuild/BUILD/wxPython-4.2.2/etg/wxdatetime.py", line 423, in <module>
[   27s]     run()
[   27s]   File "/home/abuild/rpmbuild/BUILD/wxPython-4.2.2/etg/wxdatetime.py", line 32, in run
[   27s]     etgtools.parseDoxyXML(module, ITEMS)
[   27s]   File "/home/abuild/rpmbuild/BUILD/wxPython-4.2.2/etgtools/__init__.py", line 82, in parseDoxyXML
[   27s]     raise DoxyXMLError(msg)
[   27s] etgtools.DoxyXMLError: Unable to find xml file for ITEM: wxDateSpan
[   27s] Will build using: "/usr/bin/python3.11"
[   27s] 3.11.10 (main, Sep 09 2024, 17:03:08) [GCC]
[   27s] Python's architecture is 64bit
[   27s] cfg.VERSION: 4.2.2
MeggyCal commented 1 month ago

Funny, I just also tried to update wxPython in openSUSE and I applied the suggested patch as follows:

Because the patch has to be applied to wxWidgets, not Phoenix. Maybe my answer was not clear on that I was doing it wrong all the time.

glaubitz commented 1 month ago

Funny, I just also tried to update wxPython in openSUSE and I applied the suggested patch as follows:

Because the patch has to be applied to wxWidgets, not Phoenix. Maybe my answer was not clear on that I was doing it wrong all the time.

Right. Has it been merged upstream yet?

swt2c commented 1 month ago

On October 1, 2024 8:37:43 AM EDT, John Paul Adrian Glaubitz @.***> wrote:

Funny, I just also tried to update wxPython in openSUSE and I applied the suggested patch as follows:

Because the patch has to be applied to wxWidgets, not Phoenix. Maybe my answer was not clear on that I was doing it wrong all the time.

Right. Has it been merged upstream yet?

It has been merged in upstream wxWidgets, but I haven't updated Phoenix's submodule reference yet.