Skip to content

pyqtconfig is deprecated (and unavailable on some distributions) #13

Closed

Description

@bchretien

sip_configure.py currently relies on pyqtconfig which is deprecated since pyqt4 4.10 (cf. the official documentation), and is likely to be removed (unless pyqt4 was packaged with the legacy script, more information here).

This was detected while trying to compile rviz on Arch Linux with pyqt4 4.11 (cf. ros-visualization/rviz#785), since pyqtconfig is no longer available (cf. this bug report).

This update could go to an indigo branch, based on the pyqt4 versions of targeted Ubuntu distributions.

Activity

  1. dirk-thomas commented on Jul 7, 2014

    @dirk-thomas
    Contributor

    Please consider providing a pull request to migrate the code to non-deprecated API. I might not find time for this in the near future.

  2. dirk-thomas commented on Apr 23, 2015

    @dirk-thomas
    Contributor

    It looks like that Ubuntu ships with 4.11 in Vivid but it does not have that problem. It is likely still build with configure.py instead of the new configure-ng.py.

    I took a closer look to the PR and am a bit worried about all the hard coded values, especially https://github.com/ros-visualization/python_qt_binding/pull/15/files#diff-eba1f022829502c99827bbf06f688d22R25. Therefore I have create a minimal patch which makes it work for me on Vivid (forcing the pyqtconfig module not to be available).

    The new branch pyqtconfig contains a single commit with the proposed changes: e82f4b7 @bchretien Could you please check if that patch also works for you on Arch and comment here about the results?

  3. bchretien commented on Apr 23, 2015

    @bchretien
    Author

    @dirk-thomas Thanks for looking into this. Here is what I get when I build rviz with this patch applied:

    [ 71%] Generating view_controllers/moc_fps_view_controller.cxx
    Scanning dependencies of target default_plugin
    Traceback (most recent call last):
      File "/opt/ros/indigo/share/python_qt_binding/cmake/sip_configure.py", line 115, in <module>
        makefile.generate()
      File "/usr/lib/python2.7/site-packages/sipconfig.py", line 1234, in generate
        self.ready()
      File "/usr/lib/python2.7/site-packages/sipconfig.py", line 1229, in ready
        self.finalise()
      File "/usr/lib/python2.7/site-packages/sipconfig.py", line 1922, in finalise
        ModuleMakefile.finalise(self)
      File "/usr/lib/python2.7/site-packages/sipconfig.py", line 1677, in finalise
        Makefile.finalise(self)
      File "/usr/lib/python2.7/site-packages/sipconfig.py", line 532, in finalise
        libs.extend(self._dependent_libs(l))
      File "/usr/lib/python2.7/site-packages/sipconfig.py", line 1080, in _dependent_libs
        prl_name = os.path.join(self.config.qt_lib_dir, "lib" + clib + ".prl")
      File "/usr/lib/python2.7/site-packages/sipconfig.py", line 191, in __getattr__
        raise AttributeError("\"%s\" is not a valid configuration value or user option" % name)
    AttributeError: "qt_lib_dir" is not a valid configuration value or user option
    src/python_bindings/sip/CMakeFiles/librviz_sip.dir/build.make:88: recipe for target 'devel/bin/sip/rviz_sip/Makefile' failed
    make[2]: *** [devel/bin/sip/rviz_sip/Makefile] Error 1
    CMakeFiles/Makefile2:1989: recipe for target 'src/python_bindings/sip/CMakeFiles/librviz_sip.dir/all' failed
    make[1]: *** [src/python_bindings/sip/CMakeFiles/librviz_sip.dir/all] Error 2
    make[1]: *** Waiting for unfinished jobs....

    I guess this extra entry in the dictionary would solve this. Was there any particular reason for only keeping the qt_dir entry when loading data from the qtconfig dictionary?

  4. dirk-thomas commented on Apr 23, 2015

    @dirk-thomas
    Contributor

    Thanks for testing so quick. I only tried to build rqt on-top. I will add the entry you mentioned and try again with rviz.

  5. dirk-thomas commented on Apr 23, 2015

    @dirk-thomas
    Contributor

    I added the extra entry (as well asthe other qtconfig directories). A local rviz build of Jade passed. Therefore I have created a new PR with the patch: #21.

    I will already go ahead and merge and release it to move fast for Jade. Please give it another try on Arch to ensure its working for you as well. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions