codechecker icon indicating copy to clipboard operation
codechecker copied to clipboard

venv_dev is not created on Ubuntu 23

Open stt08 opened this issue 1 year ago • 6 comments

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```

stt08 avatar Jun 06 '24 08:06 stt08

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

dkrupp avatar Jun 06 '24 08:06 dkrupp

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```

stt08 avatar Jun 06 '24 08:06 stt08

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?

dkrupp avatar Jun 06 '24 12:06 dkrupp

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

stt08 avatar Jun 06 '24 14:06 stt08

I see this error Error: pg_config executable not found.

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

dkrupp avatar Jun 06 '24 15:06 dkrupp

sudo apt install libpq-dev python3-dev should effectively fix the issue

feyruzb avatar Aug 01 '24 14:08 feyruzb