lxc / incus

Powerful system container and virtual machine manager
https://linuxcontainers.org/incus
Apache License 2.0
2.67k stars 222 forks source link

cowsql error on Ubuntu 20.04 #449

Closed muslu closed 9 months ago

muslu commented 9 months ago

Hi,

I installed fresh Ubuntu 20.04.6.

sudo -s
apt update
apt install -y acl attr autoconf automake dnsmasq-base git golang-go libacl1-dev libcap-dev liblxc1 liblxc-dev libsqlite3-dev libtool libudev-dev liblz4-dev libuv1-dev make pkg-config rsync squashfs-tools tar tcl xz-utils ebtables

# storage drivers
apt install -y btrfs-progs ceph-common lvm2 thin-provisioning-tools zfsutils-linux

# test suite
apt install busybox-static curl gettext jq sqlite3 socat bind9-dnsutils
git clone https://github.com/lxc/incus
cd incus
make deps
root@licus:/tmp/incus# make deps
make: command: Command not found
make: command: Command not found
make: command: Command not found
make: command: Command not found
make: command: Command not found
Cloning into '/root/go/deps/raft'...
remote: Enumerating objects: 260, done.
remote: Counting objects: 100% (260/260), done.
remote: Compressing objects: 100% (244/244), done.
remote: Total 260 (delta 14), reused 123 (delta 7), pack-reused 0
Receiving objects: 100% (260/260), 426.80 KiB | 2.60 MiB/s, done.
Resolving deltas: 100% (14/14), done.
cd "/root/go/deps/raft" && \
    autoreconf -i && \
    ./configure && \
    make
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'ac'.
libtoolize: copying file 'ac/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:9: installing 'ac/compile'
configure.ac:11: installing 'ac/config.guess'
configure.ac:11: installing 'ac/config.sub'
configure.ac:7: installing 'ac/install-sh'
configure.ac:7: installing 'ac/missing'
Makefile.am: installing 'ac/depcomp'
parallel-tests: installing 'ac/test-driver'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for UV... yes
checking for LZ4... yes
checking whether to build with code coverage support... no
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking stdio.h usability... yes
checking stdio.h presence... yes
checking for stdio.h... yes
checking assert.h usability... yes
checking assert.h presence... yes
checking for assert.h... yes
checking for unistd.h... (cached) yes
checking linux/io_uring.h usability... yes
checking linux/io_uring.h presence... yes
checking for linux/io_uring.h... yes
checking linux/aio_abi.h usability... yes
checking linux/aio_abi.h presence... yes
checking for linux/aio_abi.h... yes
checking whether RWF_NOWAIT is declared... yes
checking for zfs... yes
checking for size_t... yes
checking for ssize_t... yes
checking for uint8_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint64_t... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking if gcc supports flag -std=c11 in envvar CFLAGS... yes
checking if gcc supports flag -g in envvar CFLAGS... yes
checking if gcc supports flag -pipe in envvar CFLAGS... yes
checking if gcc supports flag -fcf-protection in envvar CFLAGS... yes
checking if gcc supports flag --param=ssp-buffer-size=4 in envvar CFLAGS... yes
checking if gcc supports flag -fdiagnostics-color in envvar CFLAGS... yes
checking if gcc supports flag -fexceptions in envvar CFLAGS... yes
checking if gcc supports flag -fstack-clash-protection in envvar CFLAGS... yes
checking if gcc supports flag -fstack-protector-strong in envvar CFLAGS... yes
checking if gcc supports flag -fasynchronous-unwind-tables in envvar CFLAGS... yes
checking if gcc supports flag -fdiagnostics-show-option in envvar CFLAGS... yes
checking if gcc supports flag -Wall in envvar CFLAGS... yes
checking if gcc supports flag -Wextra in envvar CFLAGS... yes
checking if gcc supports flag -Wpedantic in envvar CFLAGS... yes
checking if gcc supports flag -Wimplicit-fallthrough=5 in envvar CFLAGS... yes
checking if gcc supports flag -Wcast-align in envvar CFLAGS... yes
checking if gcc supports flag -Wstrict-prototypes in envvar CFLAGS... yes
checking if gcc supports flag -Wlogical-op in envvar CFLAGS... yes
checking if gcc supports flag -Wmissing-include-dirs in envvar CFLAGS... yes
checking if gcc supports flag -Wold-style-definition in envvar CFLAGS... yes
checking if gcc supports flag -Winit-self in envvar CFLAGS... yes
checking if gcc supports flag -Wfloat-equal in envvar CFLAGS... yes
checking if gcc supports flag -Wsuggest-attribute=noreturn in envvar CFLAGS... yes
checking if gcc supports flag -Wformat=2 in envvar CFLAGS... yes
checking if gcc supports flag -Wendif-labels in envvar CFLAGS... yes
checking if gcc supports flag -Wdate-time in envvar CFLAGS... yes
checking if gcc supports flag -Wnested-externs in envvar CFLAGS... yes
checking if gcc supports flag -Wconversion in envvar CFLAGS... yes
checking if gcc supports flag -Werror=implicit-function-declaration in envvar CFLAGS... yes
checking if gcc supports flag -Wunused-but-set-variable in envvar CFLAGS... yes
checking if gcc supports flag -Werror=return-type in envvar CFLAGS... yes
checking if gcc supports flag -Werror=incompatible-pointer-types in envvar CFLAGS... yes
checking if gcc supports flag -Wshadow in envvar CFLAGS... yes
checking if gcc supports flag -Werror=overflow in envvar CFLAGS... yes
checking if gcc supports flag -Werror=shift-count-overflow in envvar CFLAGS... yes
checking if gcc supports flag -Werror=shift-overflow=2 in envvar CFLAGS... yes
checking if gcc supports flag -Warray-bounds in envvar CFLAGS... yes
checking if gcc supports flag -Wrestrict in envvar CFLAGS... yes
checking if gcc supports flag -Wreturn-local-addr in envvar CFLAGS... yes
checking if gcc supports flag -Wstringop-overflow in envvar CFLAGS... yes
checking if gcc supports flag -z in envvar LDFLAGS... no
checking if gcc supports flag relro in envvar LDFLAGS... no
checking if gcc supports flag -z in envvar LDFLAGS... (cached) no
checking if gcc supports flag now in envvar LDFLAGS... no
checking if gcc supports flag -fstack-protector-strong in envvar LDFLAGS... yes
checking if gcc supports flag --param=ssp-buffer-size=4 in envvar LDFLAGS... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating include/raft.h
config.status: creating raft.pc
config.status: creating Makefile
config.status: executing depfiles commands
config.status: executing libtool commands
make[1]: Entering directory '/root/go/deps/raft'
  CC       src/libraft_la-byte.lo
  CC       src/libraft_la-client.lo
  CC       src/libraft_la-compress.lo
  CC       src/libraft_la-configuration.lo
  CC       src/libraft_la-convert.lo
  CC       src/libraft_la-election.lo
  CC       src/libraft_la-entry.lo
  CC       src/libraft_la-err.lo
  CC       src/libraft_la-heap.lo
  CC       src/libraft_la-membership.lo
  CC       src/libraft_la-message.lo
  CC       src/libraft_la-progress.lo
  CC       src/libraft_la-random.lo
  CC       src/libraft_la-raft.lo
  CC       src/libraft_la-recv.lo
  CC       src/libraft_la-recv_append_entries.lo
  CC       src/libraft_la-recv_append_entries_result.lo
  CC       src/libraft_la-recv_request_vote.lo
  CC       src/libraft_la-recv_request_vote_result.lo
  CC       src/libraft_la-recv_install_snapshot.lo
  CC       src/libraft_la-recv_timeout_now.lo
  CC       src/libraft_la-restore.lo
  CC       src/libraft_la-replication.lo
  CC       src/libraft_la-state.lo
  CC       src/libraft_la-syscall.lo
  CC       src/libraft_la-tick.lo
  CC       src/libraft_la-tracing.lo
  CC       src/libraft_la-trail.lo
  CC       src/libraft_la-log.lo
  CC       src/libraft_la-legacy.lo
  CC       src/libraft_la-snapshot.lo
  CC       src/libraft_la-fixture.lo
  CC       src/libraft_la-uv.lo
  CC       src/libraft_la-uv_append.lo
  CC       src/libraft_la-uv_encoding.lo
  CC       src/libraft_la-uv_finalize.lo
  CC       src/libraft_la-uv_fs.lo
  CC       src/libraft_la-uv_ip.lo
  CC       src/libraft_la-uv_list.lo
  CC       src/libraft_la-uv_metadata.lo
  CC       src/libraft_la-uv_os.lo
  CC       src/libraft_la-uv_prepare.lo
  CC       src/libraft_la-uv_recv.lo
  CC       src/libraft_la-uv_segment.lo
  CC       src/libraft_la-uv_send.lo
  CC       src/libraft_la-uv_snapshot.lo
  CC       src/libraft_la-uv_tcp.lo
  CC       src/libraft_la-uv_tcp_listen.lo
  CC       src/libraft_la-uv_tcp_connect.lo
  CC       src/libraft_la-uv_truncate.lo
  CC       src/libraft_la-uv_writer.lo
  CCLD     libraft.la
make[1]: Leaving directory '/root/go/deps/raft'
# cowsql
Cloning into '/root/go/deps/cowsql'...
remote: Enumerating objects: 198, done.
remote: Counting objects: 100% (198/198), done.
remote: Compressing objects: 100% (183/183), done.
remote: Total 198 (delta 7), reused 129 (delta 6), pack-reused 0
Receiving objects: 100% (198/198), 394.12 KiB | 2.51 MiB/s, done.
Resolving deltas: 100% (7/7), done.
cd "/root/go/deps/cowsql" && \
    autoreconf -i && \
    PKG_CONFIG_PATH="/root/go/deps/raft" ./configure && \
    make CFLAGS="-I/root/go/deps/raft/include/" LDFLAGS="-L/root/go/deps/raft/.libs/"
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'ac'.
libtoolize: copying file 'ac/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
libtoolize: copying file 'm4/libtool.m4'
libtoolize: copying file 'm4/ltoptions.m4'
libtoolize: copying file 'm4/ltsugar.m4'
libtoolize: copying file 'm4/ltversion.m4'
libtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:9: installing 'ac/compile'
configure.ac:12: installing 'ac/config.guess'
configure.ac:12: installing 'ac/config.sub'
configure.ac:6: installing 'ac/install-sh'
configure.ac:6: installing 'ac/missing'
Makefile.am: installing 'ac/depcomp'
parallel-tests: installing 'ac/test-driver'
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... none needed
checking for gcc option to accept ISO Standard C... (cached) none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking for a sed that does not truncate output... /usr/bin/sed
checking whether gcc is Clang... no
checking whether pthreads work with "-pthread" and "-lpthread"... yes
checking for joinable pthread attribute... PTHREAD_CREATE_JOINABLE
checking whether more special flags are required for pthreads... no
checking for PTHREAD_PRIO_INHERIT... yes
checking how to print strings... printf
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1572864
checking how to convert x86_64-pc-linux-gnu file names to x86_64-pc-linux-gnu format... func_convert_file_noop
checking how to convert x86_64-pc-linux-gnu file names to toolchain format... func_convert_file_noop
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... mt
checking if mt is a manifest tool... no
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fPIC -DPIC
checking if gcc PIC flag -fPIC -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking whether to build with code coverage support... no
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking for stdint.h... (cached) yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for unistd.h... (cached) yes
checking for size_t... yes
checking for ssize_t... yes
checking for uint16_t... yes
checking for uint32_t... yes
checking for uint8_t... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for SQLITE... yes
checking for UV... yes
checking for RAFT... yes
checking if gcc supports flag -std=c11 in envvar CFLAGS... yes
checking if gcc supports flag -g in envvar CFLAGS... yes
checking if gcc supports flag --mcet in envvar CFLAGS... no
checking if gcc supports flag -fcf-protection in envvar CFLAGS... yes
checking if gcc supports flag --param=ssp-buffer-size=4 in envvar CFLAGS... yes
checking if gcc supports flag -pipe in envvar CFLAGS... yes
checking if gcc supports flag -fno-strict-aliasing in envvar CFLAGS... yes
checking if gcc supports flag -fdiagnostics-color in envvar CFLAGS... yes
checking if gcc supports flag -fexceptions in envvar CFLAGS... yes
checking if gcc supports flag -fstack-clash-protection in envvar CFLAGS... yes
checking if gcc supports flag -fstack-protector-strong in envvar CFLAGS... yes
checking if gcc supports flag -fasynchronous-unwind-tables in envvar CFLAGS... yes
checking if gcc supports flag -fdiagnostics-show-option in envvar CFLAGS... yes
checking if gcc supports flag -Wall in envvar CFLAGS... yes
checking if gcc supports flag -Wextra in envvar CFLAGS... yes
checking if gcc supports flag -Wimplicit-fallthrough=5 in envvar CFLAGS... yes
checking if gcc supports flag -Wcast-align in envvar CFLAGS... yes
checking if gcc supports flag -Wstrict-prototypes in envvar CFLAGS... yes
checking if gcc supports flag -Wlogical-op in envvar CFLAGS... yes
checking if gcc supports flag -Wmissing-include-dirs in envvar CFLAGS... yes
checking if gcc supports flag -Wold-style-definition in envvar CFLAGS... yes
checking if gcc supports flag -Winit-self in envvar CFLAGS... yes
checking if gcc supports flag -Wfloat-equal in envvar CFLAGS... yes
checking if gcc supports flag -Wsuggest-attribute=noreturn in envvar CFLAGS... yes
checking if gcc supports flag -Wformat=2 in envvar CFLAGS... yes
checking if gcc supports flag -Wshadow in envvar CFLAGS... yes
checking if gcc supports flag -Wendif-labels in envvar CFLAGS... yes
checking if gcc supports flag -Wdate-time in envvar CFLAGS... yes
checking if gcc supports flag -Wnested-externs in envvar CFLAGS... yes
checking if gcc supports flag -Wconversion in envvar CFLAGS... yes
checking if gcc supports flag -Werror in envvar CFLAGS... yes
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating cowsql.pc
config.status: creating Makefile
config.status: executing depfiles commands
config.status: executing libtool commands
make[1]: Entering directory '/root/go/deps/cowsql'
  CC       src/libcowsql_la-bind.lo
  CC       src/client/libcowsql_la-protocol.lo
  CC       src/libcowsql_la-command.lo
  CC       src/libcowsql_la-conn.lo
  CC       src/libcowsql_la-db.lo
  CC       src/libcowsql_la-cowsql.lo
  CC       src/libcowsql_la-error.lo
  CC       src/libcowsql_la-format.lo
  CC       src/libcowsql_la-fsm.lo
  CC       src/libcowsql_la-gateway.lo
  CC       src/libcowsql_la-id.lo
  CC       src/libcowsql_la-leader.lo
  CC       src/lib/libcowsql_la-addr.lo
  CC       src/lib/libcowsql_la-buffer.lo
  CC       src/lib/libcowsql_la-transport.lo
  CC       src/libcowsql_la-logger.lo
  CC       src/libcowsql_la-message.lo
  CC       src/libcowsql_la-metrics.lo
  CC       src/libcowsql_la-config.lo
  CC       src/libcowsql_la-query.lo
  CC       src/libcowsql_la-registry.lo
  CC       src/libcowsql_la-request.lo
  CC       src/libcowsql_la-response.lo
  CC       src/libcowsql_la-roles.lo
  CC       src/libcowsql_la-server.lo
  CC       src/libcowsql_la-stmt.lo
  CC       src/libcowsql_la-tracing.lo
  CC       src/libcowsql_la-transport.lo
  CC       src/libcowsql_la-translate.lo
  CC       src/libcowsql_la-tuple.lo
  CC       src/libcowsql_la-vfs.lo
  CCLD     libcowsql.la
copying selected object files to avoid basename conflicts...
make[1]: Leaving directory '/root/go/deps/cowsql'
# environment

Please set the following in your environment (possibly ~/.bashrc)
export CGO_CFLAGS="-I/root/go/deps/raft/include/ -I/root/go/deps/cowsql/include/"
export CGO_LDFLAGS="-L/root/go/deps/raft/.libs -L/root/go/deps/cowsql/.libs/"
export LD_LIBRARY_PATH="/root/go/deps/raft/.libs/:/root/go/deps/cowsql/.libs/"
export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)"
root@licus:/tmp/incus# make
make: command: Command not found
make: command: Command not found
make: command: Command not found
make: command: Command not found
make: command: Command not found
Missing cowsql, run "make deps" to setup.
exit 1
make: *** [Makefile:34: build] Error 1

Install COWSQL

git clone https://github.com/cowsql/raft.git
cd raft
autoreconf -i
./configure
make
sudo make install
cd ..

Reinstall Incus

...
...
make[1]: Entering directory '/root/go/deps/cowsql'
  CC       src/libcowsql_la-command.lo
  CC       src/libcowsql_la-conn.lo
  CC       src/libcowsql_la-db.lo
  CC       src/libcowsql_la-cowsql.lo
  CC       src/libcowsql_la-fsm.lo
  CC       src/libcowsql_la-gateway.lo
  CC       src/libcowsql_la-leader.lo
  CC       src/lib/libcowsql_la-transport.lo
  CC       src/libcowsql_la-logger.lo
  CC       src/libcowsql_la-config.lo
  CC       src/libcowsql_la-registry.lo
  CC       src/libcowsql_la-roles.lo
  CC       src/libcowsql_la-server.lo
  CC       src/libcowsql_la-transport.lo
  CC       src/libcowsql_la-translate.lo
  CC       src/libcowsql_la-vfs.lo
  CCLD     libcowsql.la
copying selected object files to avoid basename conflicts...
make[1]: Leaving directory '/root/go/deps/cowsql'
# environment

Please set the following in your environment (possibly ~/.bashrc)
export CGO_CFLAGS="-I/root/go/deps/raft/include/ -I/root/go/deps/cowsql/include/"
export CGO_LDFLAGS="-L/root/go/deps/raft/.libs -L/root/go/deps/cowsql/.libs/"
export LD_LIBRARY_PATH="/root/go/deps/raft/.libs/:/root/go/deps/cowsql/.libs/"
export CGO_LDFLAGS_ALLOW="(-Wl,-wrap,pthread_create)|(-Wl,-z,now)"
root@licus:/tmp/incus# make
make: command: Command not found
make: command: Command not found
make: command: Command not found
make: command: Command not found
make: command: Command not found
Missing cowsql, run "make deps" to setup.
exit 1
make: *** [Makefile:34: build] Error 1

PPA COWSQL I created issue on cowsql github.

root@licus:/tmp/incus# add-apt-repository ppa:cowsql/master
Cannot add PPA: 'ppa:~cowsql/ubuntu/master'.
The team named '~cowsql' has no PPA named 'ubuntu/master'
Please choose from the following available PPAs:
 * 'main':  main cowsql builds
 * 'stable':  stable cowsql builds

GO

root@licus:/tmp/incus# go version
go version go1.13.8 linux/amd64
stgraber commented 9 months ago

Did you run the 5 commands at the end of make deps in the same terminal as make (and prior to running make)?

stgraber commented 9 months ago

Also if just looking at getting Incus on 20.04, you can install the packages from https://github.com/zabbly/incus

stgraber commented 9 months ago

Looks like you got the bad PPA name for cowsql from their README, I've sent a fix. Our own instructions do use ppa:cowsql/stable which is the correct name.

muslu commented 9 months ago

thank you and your team.

respect.

lucaszcai commented 6 months ago

Hi!

I'm currently trying to set up Incus for contributing by following the instructions to Install Incus from source here

I've followed the same steps as in this issue, and I'm getting the same error that cowsql is missing. I was wondering what the solution was to fix this.

Thanks!

stgraber commented 6 months ago

@lucaszcai you need to make sure to run the export commands showed at the end of make deps. You can put those in your .bashrc so new terminals get them automatically, but for your current one, you'll need to manually run them.

lucaszcai commented 6 months ago

@stgraber I just started with a clean version of incus cloned from the Github, followed the steps, and I'm still running into the same issues.

The steps I took were to clone the repo, cd into the incus folder, run make deps, paste in the export lines into the terminal, and then run make.

I've attached a screenshot of what that looks like from my end. Please let me know if I'm doing anything wrong along the way, thanks!

Screenshot 2024-04-15 at 4 19 28 PM

stgraber commented 6 months ago

Don't use sudo

stgraber commented 6 months ago

You don't need to run make as root and sudo strips the environment so that's why it's failing for you