Search code examples
postgresqlpycparser

PostgreSQL doesn't contain some required header files


I have installed pycparser that parses C code.

Using pycparser I want to parse an open source project, namely PostgreSQL . However, during compilation it cannot found some header files, namely pg_config_ext.h and pg_config_os.h.

While looking at the directory structure of PostgreSQL, I find that it does not have these header files. How to fix this issue?


Solution

  • These header files are generated from the respective .in files when configure is run.

    This will allow conditional compilation depending on the operating system and its configuration.

    To compile PostgreSQL, you need what is called a configured source tree in PostgreSQL jargon.

    Also note that the build process is somewhat different on Windows, see the documentation for details.