Ericsson / codechecker

CodeChecker is an analyzer tooling, defect database and viewer extension for the Clang Static Analyzer and Clang Tidy
https://codechecker.readthedocs.io
Apache License 2.0
2.15k stars 357 forks source link

venv_dev is not created on Ubuntu 23 #4258

Open stt08 opened 3 weeks ago

stt08 commented 3 weeks ago

Describe the bug When i try to build venv_dev it runs to an error (code 2).

CodeChecker version bc7bf7c2d23ea4bf39b131cafe74ec1e2c2bf004

To Reproduce Steps to reproduce the behaviour: make venv_dev

Received error


  Using cached psycopg2-binary-2.8.6.tar.gz (384 kB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      running egg_info
      writing psycopg2_binary.egg-info/PKG-INFO
      writing dependency_links to psycopg2_binary.egg-info/dependency_links.txt
      writing top-level names to psycopg2_binary.egg-info/top_level.txt

      Error: pg_config executable not found.

      pg_config is required to build psycopg2 from source.  Please add the directory
      containing pg_config to the $PATH or specify the full executable path with the
      option:

          python setup.py build_ext --pg-config /path/to/pg_config build ...

      or with the pg_config option in 'setup.cfg'.

      If you prefer to avoid building psycopg2 from source, please install the PyPI
      'psycopg2-binary' package instead.

      For further information please check the 'doc/src/install.rst' file (also at
      <https://www.psycopg.org/docs/install.html>).

      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.
make[1]: *** [Makefile:51: pip_dev_deps] Error 1
make[1]: Leaving directory '/home/t/codechecker/web'
make: *** [Makefile:139: venv_dev] Error 2```
dkrupp commented 3 weeks ago

Check this PR https://github.com/Ericsson/codechecker/pull/3363/files maybe this is the solution.

stt08 commented 3 weeks ago

Modification of Makefile has resulted slightly different output, but still with an error:


  Using cached psycopg2-binary-2.8.6.tar.gz (384 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [37 lines of output]
      /home/t/codechecker/venv_dev/lib/python3.11/site-packages/setuptools/config/setupcfg.py:293: _DeprecatedConfig: Deprecated config in `setup.cfg`
      !!

              ********************************************************************************
              The license_file parameter is deprecated, use license_files instead.

              This deprecation is overdue, please update your project and remove deprecated
              calls to avoid build errors in the future.

              See https://setuptools.pypa.io/en/latest/userguide/declarative_config.html for details.
              ********************************************************************************

      !!
        parsed = self.parsers.get(option_name, lambda x: x)(value)
      running egg_info
      creating /tmp/pip-pip-egg-info-pbts_dm4/psycopg2_binary.egg-info
      writing /tmp/pip-pip-egg-info-pbts_dm4/psycopg2_binary.egg-info/PKG-INFO
      writing dependency_links to /tmp/pip-pip-egg-info-pbts_dm4/psycopg2_binary.egg-info/dependency_links.txt
      writing top-level names to /tmp/pip-pip-egg-info-pbts_dm4/psycopg2_binary.egg-info/top_level.txt
      writing manifest file '/tmp/pip-pip-egg-info-pbts_dm4/psycopg2_binary.egg-info/SOURCES.txt'

      Error: pg_config executable not found.

      pg_config is required to build psycopg2 from source.  Please add the directory
      containing pg_config to the $PATH or specify the full executable path with the
      option:

          python setup.py build_ext --pg-config /path/to/pg_config build ...

      or with the pg_config option in 'setup.cfg'.

      If you prefer to avoid building psycopg2 from source, please install the PyPI
      'psycopg2-binary' package instead.

      For further information please check the 'doc/src/install.rst' file (also at
      <https://www.psycopg.org/docs/install.html>).

      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.
make[1]: *** [Makefile:51: pip_dev_deps] Error 1
make[1]: Leaving directory '/home/t/codechecker/web'
make: *** [Makefile:139: venv_dev] Error 2```
dkrupp commented 3 weeks ago

when you are retrying with teh new make file please remove first the entire venv_dev dir and then retry. Is the result the same like this?

stt08 commented 3 weeks ago

Yes, i tried removing both using the 'rm -rf' and via make 'clean_venv_dev'

dkrupp commented 3 weeks ago

I see this error Error: pg_config executable not found.

do you have postgresql (maybe postgresql dev) installed on your machine?