Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not build on Ubuntu 22.04 #3762

Closed
phopfgartner opened this issue Mar 31, 2023 · 2 comments
Closed

Can not build on Ubuntu 22.04 #3762

phopfgartner opened this issue Mar 31, 2023 · 2 comments

Comments

@phopfgartner
Copy link

phopfgartner commented Mar 31, 2023

Describe the bug

Can not build comdb2 with current sources on a clean Ubuntu 22.04 system.

To Reproduce
Steps to reproduce the behavior:

Following the README:

sudo apt-get install -y  \
    bison                \
    build-essential      \
    cmake                \
    flex                 \
    libevent-dev         \
    liblz4-dev           \
    libprotobuf-c-dev    \
    libreadline-dev      \
    libsqlite3-dev       \
    libssl-dev           \
    libunwind-dev        \
    ncurses-dev          \
    protobuf-c-compiler  \
    tcl                  \
    uuid-dev             \
    zlib1g-dev

mkdir build
cd build
cmake ..
make

The last step does not complete. In particular, it fails to build the header files in dbinc_auto/

...
[ 10%] Generating qam/qam_auto.c, dbinc_auto/qam_auto.h
awk: run time error: not enough arguments passed to printf("	int ufid_log = gbl_ufid_log || (gbl_ufid_dbreg_test ? rand() % 2 : 0);
")
	FILENAME="-" FNR=40 NR=40
[ 10%] Generating btree/btree_auto.c, dbinc_auto/btree_auto.h
awk: run time error: not enough arguments passed to printf("	int ufid_log = gbl_ufid_log || (gbl_ufid_dbreg_test ? rand() % 2 : 0);
")
	FILENAME="-" FNR=62 NR=62
[ 10%] Generating db/crdel_auto.c, dbinc_auto/crdel_auto.h
awk: run time error: not enough arguments passed to printf("	int ufid_log = gbl_ufid_log || (gbl_ufid_dbreg_test ? rand() % 2 : 0);
")
	FILENAME="-" FNR=44 NR=44
[ 10%] Generating db/db_auto.c, dbinc_auto/db_auto.h
awk: run time error: not enough arguments passed to printf("	int ufid_log = gbl_ufid_log || (gbl_ufid_dbreg_test ? rand() % 2 : 0);
")
	FILENAME="-" FNR=56 NR=56
[ 11%] Generating dbinc_auto/btree_ext.h
[ 11%] Generating dbinc_auto/common_ext.h
[ 11%] Generating dbinc_auto/crypto_ext.h
[ 11%] Generating dbinc_auto/db_ext.h
[ 11%] Generating dbreg/dbreg_auto.c, dbinc_auto/dbreg_auto.h
[ 11%] Generating dbinc_auto/dbreg_ext.h
[ 11%] Generating dbinc_auto/env_ext.h
[ 11%] Generating fileops/fileops_auto.c, dbinc_auto/fileops_auto.h
[ 11%] Generating dbinc_auto/fileops_ext.h
[ 11%] Generating hash/hash_auto.c, dbinc_auto/hash_auto.h
awk: run time error: not enough arguments passed to printf("	int ufid_log = gbl_ufid_log || (gbl_ufid_dbreg_test ? rand() % 2 : 0);
")
	FILENAME="-" FNR=87 NR=87
...

The generated header files are therefore corrupt:

...
[ 13%] Building C object berkdb/CMakeFiles/db.dir/btree/bt_compare.c.o
In file included from /home/phopfgartner/projects/comdb2/berkdb/dbinc/qam.h:174,
                 from /home/phopfgartner/projects/comdb2/berkdb/build/db_int.h:470,
                 from /home/phopfgartner/projects/comdb2/berkdb/btree/bt_compare.c:54:
/home/phopfgartner/projects/comdb2/build/berkdb/dbinc_auto/qam_auto.h:3: error: unterminated #ifndef
    3 | #ifndef __qam_AUTO_H
      | 
In file included from /home/phopfgartner/projects/comdb2/berkdb/dbinc/btree.h:347,
                 from /home/phopfgartner/projects/comdb2/berkdb/btree/bt_compare.c:56:
/home/phopfgartner/projects/comdb2/build/berkdb/dbinc_auto/btree_auto.h:3: error: unterminated #ifndef
    3 | #ifndef __bam_AUTO_H
      | 
In file included from /home/phopfgartner/projects/comdb2/berkdb/build/db_int.h:20,
                 from /home/phopfgartner/projects/comdb2/berkdb/btree/bt_compare.c:54:
/home/phopfgartner/projects/comdb2/build/berkdb/dbinc_auto/btree_ext.h:59:53: error: unknown type name ‘__bam_pgcompact_args’; did you mean ‘__bam_split_args’?
   59 | int __bam_pgcompact_redo_target __P((DBC *, PAGE *, __bam_pgcompact_args *));
      |                                                     ^~~~~~~~~~~~~~~~~~~~
/home/phopfgartner/projects/comdb2/berkdb/build/db.h:69:25: note: in definition of macro ‘__P’
   69 | #define __P(protos)     protos
      |                         ^~~~~~
...

Environment (please complete the following information):

  • Operating System and Version: Ubuntu Linux 22.04
@phopfgartner phopfgartner changed the title Can not bzuild on Ubuntu 22.04 Can not build on Ubuntu 22.04 Mar 31, 2023
@phopfgartner
Copy link
Author

Ubuntu 22.04 installs mawk as default.

after sudo apt install gawk the tree builds without any issue.

@akshatsikarwar
Copy link
Contributor

#4075

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants