Relevant system information:
Describe the bug
I get the error below when trying to build it from source.
./bootstrap -DREGRESS_CHECKS=OFF
cd build && gmake
[ 33%] Building C object src/CMakeFiles/timescaledb.dir/jsonb_utils.c.o
[ 34%] Building C object src/CMakeFiles/timescaledb.dir/license_guc.c.o
[ 34%] Building C object src/CMakeFiles/timescaledb.dir/partitioning.c.o
In file included from /usr/pgsql-12/include/server/postgres.h:46,
from /root/rpmbuild/BUILD/timescaledb/src/partitioning.c:6:
/root/rpmbuild/BUILD/timescaledb/src/partitioning.c: In function 'ts_partitioning_info_create':
/root/rpmbuild/BUILD/timescaledb/src/partitioning.c:187:2: error: 'strncpy' specified bound 64 equals destination size [-Werror=stringop-truncation]
187 | StrNCpy(pinfo->partfunc.name, partfunc, NAMEDATALEN);
| ^~~~~~~
/root/rpmbuild/BUILD/timescaledb/src/partitioning.c:188:2: error: 'strncpy' specified bound 64 equals destination size [-Werror=stringop-truncation]
188 | StrNCpy(pinfo->column, partcol, NAMEDATALEN);
| ^~~~~~~
/root/rpmbuild/BUILD/timescaledb/src/partitioning.c:196:2: error: 'strncpy' specified bound 64 equals destination size [-Werror=stringop-truncation]
196 | StrNCpy(pinfo->partfunc.schema, schema, NAMEDATALEN);
| ^~~~~~~
cc1: all warnings being treated as errors
gmake[2]: *** [src/CMakeFiles/timescaledb.dir/build.make:628: src/CMakeFiles/timescaledb.dir/partitioning.c.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:1011: src/CMakeFiles/timescaledb.dir/all] Error 2
gmake: *** [Makefile:149: all] Error 2
error: Bad exit status from /var/tmp/rpm-tmp.u8LEud (%build)
RPM build errors:
Bad exit status from /var/tmp/rpm-tmp.u8LEud (%build)
same error also seen when trying to build timscaledb 2.0.0 with postgres 12.5 on kali 2019.4 (x86_64), with GCC version 9.3.0
@zdm @jgoff Can you provide -DWARNINGS_AS_ERRORS=OFF to the bootstrap? It should solve treating this warning as error?
maybe it will be better to fix this?
On 22.12.2020 09:30, Ruslan Fomkin wrote:
@zdm https://github.com/zdm @jgoff https://github.com/jgoff Can you
provide |-DWARNINGS_AS_ERRORS=OFF| to the bootstrap? It should solve
treating this warning as error?—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/timescale/timescaledb/issues/2770#issuecomment-749393326,
or unsubscribe
https://github.com/notifications/unsubscribe-auth/AAH2MSDBMXZEEB5R2ZO2YJTSWBDJ5ANCNFSM4VFEXRWA.
maybe it will be better to fix this?
Yes.
For me it fails with:
[ 25%] Building C object src/CMakeFiles/timescaledb.dir/dimension_vector.c.o
/home/akukushkin/git/timescaledb/src/dimension_vector.c: In function ‘ts_dimension_vec_add_slice’:
/home/akukushkin/git/timescaledb/src/dimension_vector.c:41:18: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Werror=strict-overflow]
if (vec != NULL && vec->capacity >= new_capacity)
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/akukushkin/git/timescaledb/src/dimension_vector.c: In function ‘ts_dimension_vec_add_unique_slice’:
/home/akukushkin/git/timescaledb/src/dimension_vector.c:41:18: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Werror=strict-overflow]
if (vec != NULL && vec->capacity >= new_capacity)
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/akukushkin/git/timescaledb/src/dimension_vector.c: In function ‘ts_dimension_vec_add_slice_sort’:
/home/akukushkin/git/timescaledb/src/dimension_vector.c:41:18: error: assuming signed overflow does not occur when assuming that (X + c) < X is always false [-Werror=strict-overflow]
if (vec != NULL && vec->capacity >= new_capacity)
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
src/CMakeFiles/timescaledb.dir/build.make:614: recipe for target 'src/CMakeFiles/timescaledb.dir/dimension_vector.c.o' failed
It is sort of strange to have defaults that most likely would fail.
Another problem is that due to the https://github.com/timescale/timescaledb/commit/c90397fd6a0cfb5cc6487207424eeac5e6920c52 the bootstrap script fails on ubuntu 18.04 because there is only cmake 3.10 available, but perfectly works after manually changing requirement in the CMakeLists.txt.
@zdm @jgoff Can you provide
-DWARNINGS_AS_ERRORS=OFFto the bootstrap? It should solve treating this warning as error?
@k-rus , confirming that it compiles OK with this workaround flag
Thank you for confirmation. We will look to remove the need for this flag in future release.
Most helpful comment