ThomasMertes / seed7

Source code of Seed7
GNU General Public License v2.0
207 stars 11 forks source link

Linking s7 interpreter fails with postgresql 13.3 #7

Closed SiliconWizard closed 2 years ago

SiliconWizard commented 2 years ago

make depend make

At the link step, link fails with an undefined reference to "pg_snprintf" (which should be in libpq?)

postgresql 13.3 (and associated library) installed. There was no problem with earlier versions AFAIR.

Link command line shown is:

gcc -Wl,--gc-sections s7.o ../bin/s7_comp.a ../bin/s7_data.a ../bin/s7_draw.a ../bin/s7_con.a ../bin/s7_db.a ../bin/seed7_05.a -lX11 -lXrender -lncurses -lmysqlclient -lsqlite3 -lpq -lfbclient -lm -ldl -o ../bin/s7

ThomasMertes commented 2 years ago

I need more information to address this problem. Please provide the file src/version.h and the actual linker error message. Without that I can only guess what is going on.

AFAIK Postgresql defines its own versions of printf() functions. This includes snprintf(). The postgresql include file port.h defines: #define snprintf pg_snprintf

There is only one place within src/sql_post.c where snprintf() is used. You can try to replace the function setDbErrorMsg() in src/sql_post.c with:

static void setDbErrorMsg (const char *funcName, const char *dbFuncName,
    PGconn *connection)

  {
    char *message;
    memSizeType length;

  /* setDbErrorMsg */
    dbError.funcName = funcName;
    dbError.dbFuncName = dbFuncName;
    dbError.errorCode = 0;
    message = PQerrorMessage(connection);
    length = strlen(message);
    if (length >= DB_ERR_MESSAGE_SIZE) {
      length = DB_ERR_MESSAGE_SIZE - 1;
    } /* if */
    memcpy(dbError.message, message, length);
    dbError.message[length] = '\0';
  } /* setDbErrorMsg */

This code does not use snprintf(). Please tell me if that worked (and send also src/version.h).

SiliconWizard commented 2 years ago

version.h:

#define PATH_DELIMITER '/'
#define OBJECT_FILE_EXTENSION ".o"
#define C_COMPILER "gcc"
#define CC_OPT_VERSION_INFO "--version"
#define CC_FLAGS "-ffunction-sections -fdata-sections"
#define CC_ERROR_FILEDES 2
#define CC_VERSION_INFO_FILEDES 1
#define LINKER_OPT_OUTPUT_FILE "-o "
#define ARCHIVER "ar"
#define ARCHIVER_OPT_REPLACE "r "
#define SYSTEM_LIBS "-lm -ldl"
#define MAKE_UTILITY_NAME "make"
#define MAKEFILE_NAME "makefile"
#define SEARCH_PATH_DELIMITER ':'
#define AWAIT_WITH_SELECT
#define SIGNAL_HANDLER_CAN_DO_IO
#define CONSOLE_UTF8
#define OS_STRI_UTF8
#define ESCAPE_SHELL_COMMANDS
#define LIBRARY_FILE_EXTENSION ".a"
#define CPLUSPLUS_COMPILER "g++"
#define CC_SOURCE_UTF8
#define CC_OPT_DEBUG_INFO "-g"
#define CC_OPT_NO_WARNINGS "-w"
#define LINKER_OPT_NO_DEBUG_INFO "-Wl,--strip-debug"
#define LINKER_FLAGS "-Wl,--gc-sections"
#define SEED7_LIB "seed7_05.a"
#define DRAW_LIB "s7_draw.a"
#define CONSOLE_LIB "s7_con.a"
#define DATABASE_LIB "s7_db.a"
#define COMP_DATA_LIB "s7_data.a"
#define COMPILER_LIB "s7_comp.a"
#define C_COMPILER_VERSION "gcc (GCC) 11.1.0"
#define CC_OPT_LINK_TIME_OPTIMIZATION "-flto"
#define LINKER_OPT_LTO_MANDATORY 0
#define CHAR_SIZE 8
#define SHORT_SIZE 16
#define INT_SIZE 32
#define LONG_SIZE 64
#define LONG_LONG_SIZE 64
#define POINTER_SIZE 64
#define FLOAT_SIZE 32
#define DOUBLE_SIZE 64
#define WCHAR_T_SIZE 32
#define TIME_T_SIZE 64
#define TIME_T_SIGNED 1
#define SIZE_T_SIGNED 0
#define CHAR_SIGNED 1
#define BOOLTYPE _Bool
#define BOOLTYPE_STRI "_Bool"
#define INT8TYPE signed char
#define INT8TYPE_STRI "signed char"
#define UINT8TYPE unsigned char
#define UINT8TYPE_STRI "unsigned char"
#define INT16TYPE short int
#define INT16TYPE_STRI "short int"
#define UINT16TYPE unsigned short int
#define UINT16TYPE_STRI "unsigned short int"
#define INT32TYPE int
#define INT32TYPE_STRI "int"
#define UINT32TYPE unsigned int
#define UINT32TYPE_STRI "unsigned int"
#define INT32_SUFFIX(num) num
#define UINT32_SUFFIX(num) num ## U
#define INT32TYPE_LITERAL_SUFFIX ""
#define INT32TYPE_FORMAT_LENGTH_MODIFIER ""
#define INT64TYPE long
#define INT64TYPE_STRI "long"
#define UINT64TYPE unsigned long
#define UINT64TYPE_STRI "unsigned long"
#define INT64_SUFFIX(num) num ## L
#define UINT64_SUFFIX(num) num ## UL
#define INT64TYPE_LITERAL_SUFFIX "L"
#define INT64TYPE_FORMAT_LENGTH_MODIFIER "l"
#define INT128TYPE __int128
#define INT128TYPE_STRI "__int128"
#define UINT128TYPE unsigned __int128
#define UINT128TYPE_STRI "unsigned __int128"
#define HAS_LLABS 1
#define HAS_ABS64 0
#define INTPTR_T_DEFINED 1
#define NULL_DEVICE "/dev/null"
#define HAS_CDECL 0
#define HAS_STDCALL 0
#define LINE_DIRECTIVE_ACCEPTS_UTF8 1
#define UNISTD_H_PRESENT 1
#define STDINT_H_PRESENT 1
#define ACLAPI_H_PRESENT 0
#define WINDOWSX_H_PRESENT 0
#define HAS_SIGNAL 1
#define HAS_SIGACTION 1
#define SIGNAL_RESETS_HANDLER 0
#define likely(x)   __builtin_expect((x),1)
#define unlikely(x) __builtin_expect((x),0)
#define NORETURN __attribute__ ((noreturn))
#define MACRO_DEFS "#define likely(x)   __builtin_expect((x),1)\n#define unlikely(x) __builtin_expect((x),0)\n#define NORETURN __attribute__ ((noreturn))\n"
#define FILENO_WORKS_FOR_NULL 0
#define UNIX_SOCKETS 1
#define SOCKET_LIB UNIX_SOCKETS
#define HAS_GETADDRINFO 1
#define DIRENT_DIRECTORY 1
#define DIR_LIB DIRENT_DIRECTORY
#define OS_OFF_T_SIZE 64
#define os_off_t off_t
#define os_fseek fseeko
#define os_ftell ftello
#define OS_FSEEK_RESETS_EOF_FLAG 1
#define os_lseek lseek
#define os_ftruncate ftruncate
#define FTRUNCATE_SIZE OS_OFF_T_SIZE
#define os_environ environ
#define DECLARE_OS_ENVIRON 1
#define USE_GET_ENVIRONMENT 0
#define INITIALIZE_OS_ENVIRON 0
#define os_getenv getenv
#define GETENV_IS_CASE_SENSITIVE 1
#define os_setenv setenv
#define SETENV_ALLOWS_KEY_WITH_EQUALS_SIGN 0
#define GETENV_ALLOWS_KEY_WITH_EQUALS_SIGN 0
#define os_unsetenv unsetenv
#define FOPEN_SUPPORTS_CLOEXEC_MODE 1
#define HAS_FCNTL_SETFD_CLOEXEC 1
#define HAS_PIPE2 1
#define HAS_SNPRINTF 1
#define HAS_VSNPRINTF 1
#define HAS_POPEN 1
#define POPEN_SUPPORTS_BINARY_MODE 0
#define POPEN_SUPPORTS_TEXT_MODE 0
#define POPEN_SUPPORTS_CLOEXEC_MODE 1
#define FTELL_SUCCEEDS_FOR_PIPE 0
#define STDOUT_IS_IN_TEXT_MODE 0
#define SYSTEM_RESULT_FOR_RETURN_0 0
#define FSEEK_SUCCEEDS_FOR_STDIN 0
#define FOPEN_OPENS_DIRECTORIES 1
#define FWRITE_WRONG_FOR_READ_ONLY_FILES 0
#define FREAD_WRONG_FOR_WRITE_ONLY_FILES 0
#define REMOVE_FAILS_FOR_EMPTY_DIRS 0
#define OS_PATH_HAS_DRIVE_LETTERS 0
#define HOME_DIR_ENV_VAR {'H', 'O', 'M', 'E', 0}
#define RSHIFT_DOES_SIGN_EXTEND 1
#define TWOS_COMPLEMENT_INTTYPE 1
#define ONES_COMPLEMENT_INTTYPE 0
#define LITTLE_ENDIAN_INTTYPE 1
#define BIG_ENDIAN_INTTYPE 0
#define DO_SIGFPE_WITH_DIV_BY_ZERO 1
#define CHECK_INT_DIV_BY_ZERO 0
#define CHECK_INT_DIV_ZERO_BY_ZERO 1
#define CHECK_INT_REM_BY_ZERO 0
#define CHECK_INT_REM_ZERO_BY_ZERO 1
#define OVERFLOW_SIGNAL 0
#define OVERFLOW_SIGNAL_STR ""
#define HAS_BUILTIN_OVERFLOW_OPERATIONS 1
#define ROUND_HALF_TO_EVEN 1
#define PRINTF_ROUNDING ROUND_HALF_TO_EVEN
#define PRINTF_SUPPORTS_VARIABLE_FORMATS 1
#define DOUBLE_MIN_EXP10 -308
#define DOUBLE_MAX_EXP10 308
#define MIN_PRINTED_EXPONENT_DIGITS 2
#define MAX_PRINTED_EXPONENT_DIGITS 3
#define FMT_E_FLT "%1.5e"
#define FLOAT_STR_LARGE_NUMBER 1.0e6
#define FMT_E_DBL "%1.14e"
#define DOUBLE_STR_LARGE_NUMBER 1.0e15
#define FLOAT_ZERO_DIV_ERROR 0
#define CAST_INT_TO_FLOAT_OKAY 1
#define HAS_LOG2 1
#define HAS_CBRT 1
#define CHECK_FLOAT_DIV_BY_ZERO 0
#define USE_NEGATIVE_ZERO_BITPATTERN 0
#define os_isnan isnan
#define OS_ISNAN_DEFINITION "#define os_isnan isnan\n"
#define FLOAT_NAN_COMPARISON_OKAY 1
#define FLOAT_ZERO_COMPARISON_OKAY 1
#define HAS_EXP 1
#define HAS_EXP2 1
#define HAS_EXP10 1
#define SQRT_OF_NAN_OKAY 1
#define SQRT_OF_NEGATIVE_OKAY 1
#define EXP_OF_NAN_OKAY 1
#define LDEXP_OF_NAN_OKAY 1
#define FREXP_INFINITY_NAN_OKAY 1
#define FREXP_SUBNORMAL_OKAY 1
#define FMOD_DIVIDEND_NAN_OKAY 1
#define FMOD_DIVISOR_NAN_OKAY 1
#define FMOD_DIVIDEND_INFINITY_OKAY 1
#define FMOD_DIVISOR_INFINITY_OKAY 1
#define FMOD_DIVISOR_ZERO_OKAY 1
#define FLOAT_ZERO_TIMES_INFINITE_OKAY 1
#define NAN_MULTIPLICATION_OKAY 1
#define NAN_DIVISION_OKAY 1
#define MAX_ODD_FLOAT 16777215.0
#define MAX_ODD_DOUBLE 9007199254740991.0
#define POW_OF_NAN_OKAY 1
#define POW_OF_ZERO_OKAY 0
#define POW_OF_NEGATIVE_OKAY 1
#define POW_OF_ONE_OKAY 1
#define POW_EXP_NAN_OKAY 1
#define POW_EXP_MINUS_INFINITY_OKAY 1
#define POW_UNDERFLOW_WITH_SIGN 1
#define LOG_OF_NAN_OKAY 1
#define LOG_OF_ZERO_OKAY 1
#define LOG_OF_NEGATIVE_OKAY 1
#define LOG10_OF_NAN_OKAY 1
#define LOG10_OF_ZERO_OKAY 1
#define LOG10_OF_NEGATIVE_OKAY 1
#define LOG2_OF_NAN_OKAY 1
#define LOG2_OF_ZERO_OKAY 1
#define LOG2_OF_NEGATIVE_OKAY 1
#define PRINTS_NEGATIVE_ZERO 1
#define os_isinf isinf
#define FLOAT_TO_INT_OVERFLOW_SATURATES
#define INT_RANGE_IN_FLOAT_MAX 16777216
#define FLOAT_MANTISSA_FACTOR 16777216.0
#define FLOAT_MANTISSA_SHIFT 24
#define FLOAT_EXPONENT_OFFSET 127
#define INT_RANGE_IN_DOUBLE_MAX 9007199254740992
#define DOUBLE_MANTISSA_FACTOR 9007199254740992.0
#define DOUBLE_MANTISSA_SHIFT 53
#define DOUBLE_EXPONENT_OFFSET 1023
#define MINIMUM_TRUNC_ARGUMENT -9223372036854775808
#define MAXIMUM_TRUNC_ARGUMENT 9223372036854774784
#define STRTOD_ACCEPTS_HEX_NUMBERS 1
#define ATOF_ACCEPTS_HEX_NUMBERS 1
#define STRTOD_ACCEPTS_DENORMAL_NUMBERS 1
#define ATOF_ACCEPTS_DENORMAL_NUMBERS 1
#define MALLOC_ALIGNMENT 4
#define MALLOC_OF_0_RETURNS_NULL 0
#define UNALIGNED_MEMORY_ACCESS_OKAY 1
#define CASTING_GETS_A_UNION_ELEMENT 1
#define EOF_IS_MINUS_ONE 1
#define EMPTY_STRUCTS_ALLOWED 1
#define INITIALIZING_WITH_ADDRESS_ALLOWED 1
#define LIMITED_CSTRI_LITERAL_LEN 0
#define LIMITED_ARRAY_LITERAL_LEN 0
#define SWITCH_WORKS_FOR_INT64TYPE 1
#define STACK_GROWS_UPWARD 0
#define STMT_BLOCK_IN_PARENTHESES_OK 1
#define TRIGRAPH_SEQUENCES_ARE_REPLACED 0
#define DIGRAPH_SEQUENCES_ARE_REPLACED 1
#define STRINGIFY_WORKS 1
#define DIRECTIVES_IN_MACRO_ARGUMENTS_OK 1
#define STACK_SIZE 0x1000000
#define USE_LOCALTIME_R
#define LOCALTIME_WORKS_SIGNED 1
#define HAS_GMTIME_R
#define HAS_GETRLIMIT 1
#define SOFT_STACK_LIMIT 8388608
#define HARD_STACK_LIMIT 0
#define MEMCMP_RETURNS_SIGNUM 0
#define HAS_WMEMCMP 1
#define WMEMCMP_RETURNS_SIGNUM 1
#define MEMSET_OF_ZERO_BYTES_DOES_NOTHING 1
#define HAS_WMEMSET 1
#define HAS_WMEMCHR 1
#define HAS_WCSNLEN 1
#define HAS_STRNCASECMP 1
#define HAS_GETGRGID_R 1
#define HAS_GETGRGID 1
#define HAS_GETGRNAM_R 1
#define HAS_GETGRNAM 1
#define HAS_GETPWUID_R 1
#define HAS_GETPWUID 1
#define HAS_GETPWNAM_R 1
#define HAS_GETPWNAM 1
#define HAS_SETJMP 1
#define HAS_SIGSETJMP 1
#define HAS_SYMBOLIC_LINKS 1
#define HAS_READLINK 1
#define HAS_FIFO_FILES 1
#define HAS_SELECT 1
#define HAS_POLL 1
#define HAS_MMAP 1
#define XID_SIZE 64
#define ATOM_SIZE 64
#define HAS_XRENDER_EXTENSION
#define SYSTEM_DRAW_LIBS "-lX11 -lXrender"
#define PIXEL_RED_MASK "ff0000"
#define PIXEL_GREEN_MASK "ff00"
#define PIXEL_BLUE_MASK "ff"
#define RGB_TO_PIXEL_FLAG_NAME "useRgbToPixel"
#define rgbToPixel(red, green, blue) (((((unsigned long) (red)) << 8) & 0xff0000) | (((unsigned long) (green)) & 0xff00) | ((((unsigned long) (blue)) >> 8) & 0xff))
#define FORWARD_X11_CALLS 0
#define HAS_TERMIOS_H
#define USE_TERMINFO
#define USE_KBD_POLL
#define SYSTEM_CONSOLE_LIBS "-lncurses"
#define FORWARD_TERM_CALLS 0
#define MYSQL_INCLUDE "mysql/mysql.h"
#define SQLITE_INCLUDE "sqlite3.h"
#define POSTGRESQL_INCLUDE "libpq-fe.h"
#define POSTGRESQL_POSTGRES_H "server/postgres.h"
#define POSTGRESQL_PG_TYPE_H "server/catalog/pg_type.h"
#define WINDOWS_ODBC 0
#define ODBC_INCLUDE "db_odbc.h"
#define ODBC_INCLUDE_SQLEXT_H 0
#define ODBC_DLL "libodbc.so",
#define OCI_INCLUDE "db_oci.h"
#define OCI_DLL "libclntsh.so",
#define FIRE_INCLUDE "ibase.h"
#define DB2_INCLUDE "db_odbc.h"
#define DB2_INCLUDE_OPTION ""
#define DB2_DLL "libdb2.so",
#define WINDOWS_SQL_SERVER 0
#define SQL_SERVER_INCLUDE "db_odbc.h"
#define SQL_SERVER_INCLUDE_SQLEXT_H 0
#define SQL_SERVER_INCLUDE_OPTION ""
#define FREETDS_SQL_SERVER_CONNECTION 1
#define SPECIFY_SQL_SERVER_PORT_EXPLICIT 1
#define SQL_SERVER_DLL "libtdsodbc.so",
#define TDS_INCLUDE "db_tds.h"
#define TDS_INCLUDE_SYBFRONT_H 0
#define TDS_DLL "libsybdb.so",
#define BIG_RTL_LIBRARY 1
#define BIGINT_LIB BIG_RTL_LIBRARY
#define INCLUDE_OPTIONS "-I/usr/include/postgresql\n-I/usr/include/postgresql/server"
#define SYSTEM_DATABASE_LIBS "-lmysqlclient\n-lsqlite3\n-lpq\n-lfbclient"
#define ADDITIONAL_SYSTEM_LIBS ""
#define read_buffer_empty(fp) ((fp)->_IO_read_ptr >= (fp)->_IO_read_end)
#define REMOVE_REATTEMPTS 0
#define S7_LIB_DIR "/home/akasa/Projets/seed7/bin"
#define SEED7_LIBRARY "/home/akasa/Projets/seed7/lib"

Linker output (sorry, in french, but not hard to figure out):

/usr/bin/ld ?: /usr/bin/ld: Erreur DWARF: ré?f DIE d'instance abstraite invalide
/tmp/ccNRzyqN.ltrans10.ltrans.o ?: dans la fonction «? ?sql_open_post ?»? ?:
<artificial>:(.text+0x12b3) ?: ré?fé?rence indé?finie vers «? ?pg_snprintf ?»?
/usr/bin/ld ?: <artificial>:(.text+0x13bd) ?: ré?fé?rence indé?finie vers «? ?pg_sprintf ?»?
/usr/bin/ld ?: /usr/bin/ld: Erreur DWARF: ré?f DIE d'instance abstraite invalide
/tmp/ccNRzyqN.ltrans15.ltrans.o ?: dans la fonction «? ?doExecSql ?»? ?:
<artificial>:(.text+0xed) ?: ré?fé?rence indé?finie vers «? ?pg_snprintf ?»?
/usr/bin/ld ?: /tmp/ccNRzyqN.ltrans15.ltrans.o ?: dans la fonction «? ?sqlBindInt.lto_priv.6 ?»? ?:
<artificial>:(.text+0x1457) ?: ré?fé?rence indé?finie vers «? ?pg_sprintf ?»?
/usr/bin/ld ?: /tmp/ccNRzyqN.ltrans15.ltrans.o ?: dans la fonction «? ?sqlExecute.lto_priv.6 ?»? ?:
<artificial>:(.text+0x40de) ?: ré?fé?rence indé?finie vers «? ?pg_snprintf ?»?
/usr/bin/ld ?: /tmp/ccNRzyqN.ltrans15.ltrans.o ?: dans la fonction «? ?sqlPrepare.lto_priv.6 ?»? ?:
<artificial>:(.text+0x4425) ?: ré?fé?rence indé?finie vers «? ?pg_sprintf ?»?
/usr/bin/ld ?: <artificial>:(.text+0x44a7) ?: ré?fé?rence indé?finie vers «? ?pg_snprintf ?»?
/usr/bin/ld ?: <artificial>:(.text+0x49db) ?: ré?fé?rence indé?finie vers «? ?pg_snprintf ?»?
collect2: erreur: ld a retourné? le statut de sortie 1
make: *** [makefile:110 : ../bin/s7] Erreur 1
SiliconWizard commented 2 years ago

I tried modifying the setDbErrorMsg() function. It removed a warning but still have a few, for instance with sql_open_post().

There also are those DWARF errors. Not sure what they mean - don't think I've ever run into those before. Could it be that the latest postgresql libraries on my distribution have issues? I'm using Arch Linux here. I usually don't use postgresql so...

SiliconWizard commented 2 years ago

Note: I tried compiling libpq examples (from here: https://www.postgresql.org/docs/9.1/libpq-example.html ) on the same machine, and it worked without a problem. So libpq seems fine on this machine. Must come from something else. Used the following for compiling the examples: gcc -Wall testlibpq.c -o testlibpq -lpq

ThomasMertes commented 2 years ago

You compiled testlibpq.c without the option -I. The compilation of sql_post.c is done with the options -I/usr/include/postgresql -I/usr/include/postgresql/server This means that include files are also searched in these directories. The file sql_post.c includes:

include "server/postgres.h"

include "libpq-fe.h"

include "server/catalog/pg_type.h"

This means that the file /usr/include/libpq-fe.h exists. Maybe gcc finds the other files at a different place (e.g. in /usr/include/postgresql/server). There could be files from an old version of Postgresql and mixing them does not work.

If you change testlibpg.c to also include these 3 files form sql_post.c you might be able to trigger the same problem (as with sql_post.c). In order to compile testlibpq.c you need to use the same include options also: gcc -Wall -I/usr/include/postgresql -I/usr/include/postgresql/server testlibpq.c -o testlibpq -lp

SiliconWizard commented 2 years ago

The original test programs from the above link just include this:

include

which is all that's needed for them... but it is in /usr/include/ indeed. Same header file as with your approach.

If I change this to the 3 includes you mentioned in the same order, I get undefined symbols indeed ('pg_printf' and 'pg_fprintf' here, but for the same reason.)

I don't think I have several versions of libpq installed. I checked the dates of the include files too. What triggers the issue is when including the 'server/postgres.h' file (which is not needed for the examples I tried), which is where (well, from other files included in it) a lot of things get redefined. Frankly, libpq looks a bit like a mess to me.

As it looks, yes, the standard xxxprintf() functions are all redefined when including 'server/postgres.h', but the own versions they map to (like pg_sprintf) don't seem to be exported in libpq anymore, so link fails. Sorry for bothering you here, with your info, now it really looks like a bug either in libpq, or at least the libpq binaries that are installed by Arch Linux. Could be nice if you could confirm you can link this from your side, with postgresql (and libpq) 13.3. And if so, what systems are you using for developing?

ThomasMertes commented 2 years ago

You could try to remove the line #define POSTGRESQL_POSTGRES_H "server/postgres.h" from version.h and compile Seed7 with make afterwards. This should trigger that server/postgres.h is not included. On my computer it seemed that server/postgres.h is not needed now (IMHO is was neeeded in the past). Unfortunately server/catalog/pg_type.h does not exist on my computer, so I cannot try that solution.

In pg_type.h there are definitions for INT2OID, FLOAT8OID, VARCHAROID, etc. These OID definitions are used by sql_post.c. Unfortunately the place, the name and the existence of pg_type.h has changed several times. There is even code in chkccomp.c to construct a file with OID definitions from another file. Later this other file vanished. They are changing their include files very often... The OID definitions never changed (e.g. INT2OID is always 21) so sql_post.c has no issue with OIDs (besides finding an include file that defines them).

ThomasMertes commented 2 years ago

I just commited a change of src/chkccomp.c, that avoids including postgres.h in sql_post.c. The fix of the function setDbErrorMsg in sql_post.c is not necessary (you can revert it). You can do

git pull
cd src
make clean
make depend
make

for a fresh compile

SiliconWizard commented 2 years ago

Thanks. Your change fixes the issue. I can build s7 and s7c successfully and run tests.