lichray / nvi2

A multibyte fork of the nvi editor for BSD
Other
144 stars 34 forks source link

trouble building on Centos 8 #132

Open job opened 4 months ago

job commented 4 months ago

I don't get this one, recno_t seems ok, right?

$ fgrep -r recno_t /usr/include/
/usr/include/libdb/db_185.h:typedef u_int32_t   recno_t;
/usr/include/libdb/db.h:typedef u_int32_t       db_recno_t;     /* Record number type. */
/usr/include/libdb/db.h:        int (*db_append_recno) __P((DB *, DBT *, db_recno_t));
/usr/include/libdb/db.h:        int  (*get_append_recno) __P((DB *, int (**)(DB *, DBT *, db_recno_t)));
/usr/include/libdb/db.h:        int  (*set_append_recno) __P((DB *, int (*)(DB *, DBT *, db_recno_t)));
/usr/include/libdb/db.h:        int (*count) __P((DBC *, db_recno_t *, u_int32_t));
/usr/include/libdb/db.h:        int (*c_count) __P((DBC *, db_recno_t *, u_int32_t));

Reproduction steps on Centos 8, install required libraries:

$ sudo yum config-manager --set-enabled powertools
$ sudo yum install cmake ninja-build ncurses-devel libbsd libbsd-devel libdb-devel
$ git clone https://github.com/lichray/nvi2
$ cd nvi2
$ cmake -G "Ninja Multi-Config" -B build
-- The C compiler identification is GNU 8.5.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Performing Test USE_FCOLOR_DIAGNOSTICS
-- Performing Test USE_FCOLOR_DIAGNOSTICS - Failed
-- Looking for openpty
-- Looking for openpty - not found
-- Looking for __b64_ntop
-- Looking for __b64_ntop - not found
-- Looking for asprintf
-- Looking for asprintf - not found
-- Looking for iconv
-- Looking for iconv - found
-- Performing Test ICONV_TRADITIONAL
-- Performing Test ICONV_TRADITIONAL - Success
-- Looking for getprogname
-- Looking for getprogname - not found
-- Looking for strlcpy
-- Looking for strlcpy - not found
-- Found PkgConfig: /usr/bin/pkg-config (found version "1.4.2")
-- Checking for module 'libbsd-overlay'
--   Found libbsd-overlay, version 0.12.2
-- Looking for dbopen
-- Looking for dbopen - not found
-- Looking for include file libutil.h
-- Looking for include file libutil.h - not found
-- Looking for include file ncurses.h
-- Looking for include file ncurses.h - found
-- Looking for include file ncursesw/ncurses.h
-- Looking for include file ncursesw/ncurses.h - found
-- Looking for include file pty.h
-- Looking for include file pty.h - found
-- Looking for include file term.h
-- Looking for include file term.h - found
-- Performing Test HAVE_DIRENT_D_NAMLEN
-- Performing Test HAVE_DIRENT_D_NAMLEN - Failed
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC - Failed
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM - Success
-- Configuring done (0.9s)
-- Generating done (0.0s)
-- Build files have been written to: /home/job/nvi2/build

Then building emits lots of errors:

$ ninja -C build -f build-Release.ninja
ninja: Entering directory `build'
[1/123] Building C object CMakeFiles/regex.dir/Release/regex/regfree.c.o
[2/123] Building C object CMakeFiles/regex.dir/Release/regex/regerror.c.o
[3/123] Building C object CMakeFiles/regex.dir/Release/regex/regexec.c.o
[4/123] Building C object CMakeFiles/regex.dir/Release/regex/regcomp.c.o
[5/123] Linking C static library Release/libregex.a
[6/123] Generating cl/extern.h
[7/123] Generating ex/version.h
[8/123] Generating ex/ex_def.h
[9/123] Generating common/options_def.h
[10/123] Generating common/extern.h
[11/123] Generating ex/extern.h
[12/123] Generating vi/extern.h
[13/123] Building C object CMakeFiles/nvi.dir/Release/ex/ex_cmd.c.o
FAILED: CMakeFiles/nvi.dir/Release/ex/ex_cmd.c.o 
/usr/bin/cc -DLIBBSD_OVERLAY -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -D__REGEX_PRIVATE -DCMAKE_INTDIR=\"Release\" -I/home/job/nvi2/build -I/home/job/nvi2/regex -O3 -DNDEBUG   -isystem /usr/include/bsd -Wuninitialized -Wno-dangling-else -Wstack-protector -fstack-protector -Wstrict-aliasing -fstrict-aliasing -MD -MT CMakeFiles/nvi.dir/Release/ex/ex_cmd.c.o -MF CMakeFiles/nvi.dir/Release/ex/ex_cmd.c.o.d -o CMakeFiles/nvi.dir/Release/ex/ex_cmd.c.o -c /home/job/nvi2/ex/ex_cmd.c
In file included from /home/job/nvi2/ex/../common/common.h:83,
                 from /home/job/nvi2/ex/ex_cmd.c:20:
/home/job/nvi2/ex/../common/cut.h:33:2: error: unknown type name ‘recno_t’
  recno_t  lno;   /* 1-N: file line. */
  ^~~~~~~
In file included from /home/job/nvi2/ex/../common/common.h:86,
                 from /home/job/nvi2/ex/ex_cmd.c:20:
/home/job/nvi2/ex/../common/mark.h:24:2: error: unknown type name ‘recno_t’
  recno_t  lno;   /* Line number. */
  ^~~~~~~
/home/job/nvi2/ex/../common/mark.h:30:2: error: unknown type name ‘recno_t’
  recno_t  lno;   /* Line number. */
  ^~~~~~~
In file included from /home/job/nvi2/ex/../common/common.h:88,
                 from /home/job/nvi2/ex/ex_cmd.c:20:
/home/job/nvi2/ex/../common/../ex/ex.h:69:2: error: unknown type name ‘recno_t’
  recno_t start, stop;  /* Start/stop of the range. */
  ^~~~~~~
/home/job/nvi2/ex/../common/../ex/ex.h:77:2: error: unknown type name ‘recno_t’
  recno_t   if_lno;  /* Associated line number. */
  ^~~~~~~
/home/job/nvi2/ex/../common/../ex/ex.h:94:2: error: unknown type name ‘recno_t’
  recno_t   range_lno;  /* @/global range: set line number. */
  ^~~~~~~
/home/job/nvi2/ex/../common/../ex/ex.h:113:2: error: unknown type name ‘recno_t’
  recno_t   lineno;  /* Command: line number. */
  ^~~~~~~
In file included from /home/job/nvi2/ex/../common/../ex/ex.h:231,
                 from /home/job/nvi2/ex/../common/common.h:88,
                 from /home/job/nvi2/ex/ex_cmd.c:20:
/home/job/nvi2/ex/../common/../ex/extern.h:44:32: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 int ex_g_insdel(SCR *, lnop_t, recno_t);
                                ^~~~~~~
                                regex_t
/home/job/nvi2/ex/../common/../ex/extern.h:72:46: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 int ex_readfp(SCR *, char *, FILE *, MARK *, recno_t *, int);
                                              ^~~~~~~
                                              regex_t
/home/job/nvi2/ex/../common/../ex/extern.h:78:22: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 int sscr_exec(SCR *, recno_t);
                      ^~~~~~~
                      regex_t
/home/job/nvi2/ex/../common/../ex/extern.h:116:41: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 void ex_cinit(SCR *, EXCMD *, int, int, recno_t, recno_t, int);
                                         ^~~~~~~
                                         regex_t
/home/job/nvi2/ex/../common/../ex/extern.h:116:50: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 void ex_cinit(SCR *, EXCMD *, int, int, recno_t, recno_t, int);
                                                  ^~~~~~~
                                                  regex_t
In file included from /home/job/nvi2/ex/../common/common.h:89,
                 from /home/job/nvi2/ex/ex_cmd.c:20:
/home/job/nvi2/ex/../common/gs.h:26:2: error: unknown type name ‘recno_t’
  recno_t  lno;   /* 1-N: file cursor line. */
  ^~~~~~~
/home/job/nvi2/ex/../common/gs.h:90:2: error: unknown type name ‘recno_t’
  recno_t   if_lno;  /* Current associated line number. */
  ^~~~~~~
In file included from /home/job/nvi2/ex/../common/common.h:90,
                 from /home/job/nvi2/ex/ex_cmd.c:20:
/home/job/nvi2/ex/../common/screen.h:60:2: error: unknown type name ‘recno_t’
  recno_t  lno;   /* 1-N: file line. */
  ^~~~~~~
/home/job/nvi2/ex/../common/screen.h:72:2: error: unknown type name ‘recno_t’
  recno_t  rptlchange;  /* Ex/vi: last L_CHANGED lno. */
  ^~~~~~~
/home/job/nvi2/ex/../common/screen.h:73:2: error: unknown type name ‘recno_t’
  recno_t  rptlines[L_YANKED + 1];/* Ex/vi: lines changed by last op. */
  ^~~~~~~
/home/job/nvi2/ex/../common/screen.h:79:2: error: unknown type name ‘recno_t’
  recno_t  defscroll;  /* Vi: ^D, ^U scroll information. */
  ^~~~~~~
In file included from /home/job/nvi2/ex/../common/common.h:91,
                 from /home/job/nvi2/ex/ex_cmd.c:20:
/home/job/nvi2/ex/../common/exf.h:22:2: error: unknown type name ‘recno_t’
  recno_t  c_lno;   /* Cached line number. */
  ^~~~~~~
/home/job/nvi2/ex/../common/exf.h:23:2: error: unknown type name ‘recno_t’
  recno_t  c_nlines;  /* Cached lines in the file. */
  ^~~~~~~
/home/job/nvi2/ex/../common/exf.h:28:2: error: unknown type name ‘recno_t’
  recno_t  l_high;  /* Log last + 1 record number. */
  ^~~~~~~
/home/job/nvi2/ex/../common/exf.h:29:2: error: unknown type name ‘recno_t’
  recno_t  l_cur;   /* Log current record number. */
  ^~~~~~~
In file included from /home/job/nvi2/ex/../common/common.h:95,
                 from /home/job/nvi2/ex/ex_cmd.c:20:
/home/job/nvi2/ex/../common/extern.h:6:21: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 int cut_line(SCR *, recno_t, size_t, size_t, CB *);
                     ^~~~~~~
                     regex_t
/home/job/nvi2/ex/../common/extern.h:35:20: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 int db_eget(SCR *, recno_t, CHAR_T **, size_t *, int *);
                    ^~~~~~~
                    regex_t
/home/job/nvi2/ex/../common/extern.h:36:19: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 int db_get(SCR *, recno_t, u_int32_t, CHAR_T **, size_t *);
                   ^~~~~~~
                   regex_t
/home/job/nvi2/ex/../common/extern.h:37:22: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 int db_delete(SCR *, recno_t);
                      ^~~~~~~
                      regex_t
/home/job/nvi2/ex/../common/extern.h:38:27: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 int db_append(SCR *, int, recno_t, CHAR_T *, size_t);
                           ^~~~~~~
                           regex_t
/home/job/nvi2/ex/../common/extern.h:39:22: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 int db_insert(SCR *, recno_t, CHAR_T *, size_t);
                      ^~~~~~~
                      regex_t
/home/job/nvi2/ex/../common/extern.h:40:19: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 int db_set(SCR *, recno_t, CHAR_T *, size_t);
                   ^~~~~~~
                   regex_t
/home/job/nvi2/ex/../common/extern.h:41:21: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 int db_exist(SCR *, recno_t);
                     ^~~~~~~
                     regex_t
/home/job/nvi2/ex/../common/extern.h:42:20: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 int db_last(SCR *, recno_t *);
                    ^~~~~~~
                    regex_t
/home/job/nvi2/ex/../common/extern.h:43:20: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 int db_rget(SCR *, recno_t, char **, size_t *);
                    ^~~~~~~
                    regex_t
/home/job/nvi2/ex/../common/extern.h:44:20: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 int db_rset(SCR *, recno_t, char *, size_t);
                    ^~~~~~~
                    regex_t
/home/job/nvi2/ex/../common/extern.h:45:20: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 void db_err(SCR *, recno_t);
                    ^~~~~~~
                    regex_t
/home/job/nvi2/ex/../common/extern.h:49:21: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 int log_line(SCR *, recno_t, u_int);
                     ^~~~~~~
                     regex_t
/home/job/nvi2/ex/../common/extern.h:60:32: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 int mark_insdel(SCR *, lnop_t, recno_t);
                                ^~~~~~~
                                regex_t
/home/job/nvi2/ex/../common/extern.h:65:25: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 void msgq_status(SCR *, recno_t, u_int);
                         ^~~~~~~
                         regex_t
/home/job/nvi2/ex/../common/extern.h:121:21: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 int nonblank(SCR *, recno_t, size_t *);
                     ^~~~~~~
                     regex_t
[14/123] Building C object CMakeFiles/nvi.dir/Release/common/options_f.c.o
FAILED: CMakeFiles/nvi.dir/Release/common/options_f.c.o 
/usr/bin/cc -DLIBBSD_OVERLAY -D_GNU_SOURCE -D_XOPEN_SOURCE_EXTENDED -D__REGEX_PRIVATE -DCMAKE_INTDIR=\"Release\" -I/home/job/nvi2/build -I/home/job/nvi2/regex -O3 -DNDEBUG   -isystem /usr/include/bsd -Wuninitialized -Wno-dangling-else -Wstack-protector -fstack-protector -Wstrict-aliasing -fstrict-aliasing -MD -MT CMakeFiles/nvi.dir/Release/common/options_f.c.o -MF CMakeFiles/nvi.dir/Release/common/options_f.c.o.d -o CMakeFiles/nvi.dir/Release/common/options_f.c.o -c /home/job/nvi2/common/options_f.c
In file included from /home/job/nvi2/common/common.h:83,
                 from /home/job/nvi2/common/options_f.c:25:
/home/job/nvi2/common/cut.h:33:2: error: unknown type name ‘recno_t’
  recno_t  lno;   /* 1-N: file line. */
  ^~~~~~~
In file included from /home/job/nvi2/common/common.h:86,
                 from /home/job/nvi2/common/options_f.c:25:
/home/job/nvi2/common/mark.h:24:2: error: unknown type name ‘recno_t’
  recno_t  lno;   /* Line number. */
  ^~~~~~~
/home/job/nvi2/common/mark.h:30:2: error: unknown type name ‘recno_t’
  recno_t  lno;   /* Line number. */
  ^~~~~~~
In file included from /home/job/nvi2/common/common.h:88,
                 from /home/job/nvi2/common/options_f.c:25:
/home/job/nvi2/common/../ex/ex.h:69:2: error: unknown type name ‘recno_t’
  recno_t start, stop;  /* Start/stop of the range. */
  ^~~~~~~
/home/job/nvi2/common/../ex/ex.h:77:2: error: unknown type name ‘recno_t’
  recno_t   if_lno;  /* Associated line number. */
  ^~~~~~~
/home/job/nvi2/common/../ex/ex.h:94:2: error: unknown type name ‘recno_t’
  recno_t   range_lno;  /* @/global range: set line number. */
  ^~~~~~~
/home/job/nvi2/common/../ex/ex.h:113:2: error: unknown type name ‘recno_t’
  recno_t   lineno;  /* Command: line number. */
  ^~~~~~~
In file included from /home/job/nvi2/common/../ex/ex.h:231,
                 from /home/job/nvi2/common/common.h:88,
                 from /home/job/nvi2/common/options_f.c:25:
/home/job/nvi2/common/../ex/extern.h:44:32: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 int ex_g_insdel(SCR *, lnop_t, recno_t);
                                ^~~~~~~
                                regex_t
/home/job/nvi2/common/../ex/extern.h:72:46: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 int ex_readfp(SCR *, char *, FILE *, MARK *, recno_t *, int);
                                              ^~~~~~~
                                              regex_t
/home/job/nvi2/common/../ex/extern.h:78:22: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 int sscr_exec(SCR *, recno_t);
                      ^~~~~~~
                      regex_t
/home/job/nvi2/common/../ex/extern.h:116:41: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 void ex_cinit(SCR *, EXCMD *, int, int, recno_t, recno_t, int);
                                         ^~~~~~~
                                         regex_t
/home/job/nvi2/common/../ex/extern.h:116:50: error: unknown type name ‘recno_t’; did you mean ‘regex_t’?
 void ex_cinit(SCR *, EXCMD *, int, int, recno_t, recno_t, int);
                                                  ^~~~~~~
                                                  regex_t
In file included from /home/job/nvi2/common/common.h:89,
                 from /home/job/nvi2/common/options_f.c:25:
/home/job/nvi2/common/gs.h:26:2: error: unknown type name ‘recno_t’
  recno_t  lno;   /* 1-N: file cursor line. */
  ^~~~~~~
/home/job/nvi2/common/gs.h:90:2: error: unknown type name ‘recno_t’
  recno_t   if_lno;  /* Current associated line number. */
  ^~~~~~~
In file included from /home/job/nvi2/common/common.h:90,
                 from /home/job/nvi2/common/options_f.c:25:
/home/job/nvi2/common/screen.h:60:2: error: unknown type name ‘recno_t’
  recno_t  lno;   /* 1-N: file line. */

...

ninja: build stopped: subcommand failed.
lichray commented 4 months ago

The db.h is not provided by db1

job commented 4 months ago

The db.h is not provided by db1

What does this mean? Is a package missing?

lichray commented 4 months ago

db1 is the initial version of Berkeley DB. Your build system observed a db.h, but not the db.h. I don't know which RPM package provides db1 on CentOS 8, though.

leres commented 4 months ago

The db.h is not provided by db1

What does this mean? Is a package missing?

Something I've run into many times is that on linux you need to install the -devel version of the package to linkable libraries. Maybe something like libdb-devel?