• Many notices and warnings with compiling YottaDB 1.32 from sources

    From =?UTF-8?B?0KHQtdGA0LPQtdC5INCa0LDQv@21:1/5 to All on Sat Oct 2 07:52:25 2021
    Hi!
    Is that how it should be? Is this normal or am I doing something wrong?
    gcc 10.3.0

    ...
    [ 89%] Building C object CMakeFiles/libyottadb.dir/sr_unix/ftok_main.c.o
    [ 89%] Linking C shared module libyottadb.so /tmp/tmp/YDB/sr_port/gdsfhead.h:1101:21: warning: type of ‘pin_fail_bt’ does not match original declaration [-Wlto-type-mismatch]
    1101 | GBLREF bt_rec_ptr_t pin_fail_bt; /* Pointer to bt of the cache-record that we failed to pin */
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:891:21: note: ‘pin_fail_bt’ was previously declared here
    891 | GBLDEF bt_rec_ptr_t pin_fail_bt; /* Pointer to bt of the cache-record that we failed to pin */
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:891:21: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    /tmp/tmp/YDB/sr_port/gdsfhead.h:1102:16: warning: type of ‘pin_fail_bt_contents’ does not match original declaration [-Wlto-type-mismatch]
    1102 | GBLREF bt_rec pin_fail_bt_contents; /* Contents of bt of the cache-record that we failed to pin */
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:892:16: note: ‘pin_fail_bt_contents’ was previously declared here
    892 | GBLDEF bt_rec pin_fail_bt_contents; /* Contents of bt of the cache-record that we failed to pin */
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:892:16: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    /tmp/tmp/YDB/sr_port/dm_setup.c:20:18: warning: type of ‘gtm_err_dev’ does not match original declaration [-Wlto-type-mismatch]
    20 | GBLREF io_desc *gtm_err_dev;
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:412:19: note: ‘gtm_err_dev’ was previously declared here
    412 | GBLDEF io_desc *gtm_err_dev;
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:412:19: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    /tmp/tmp/YDB/sr_port/m_zwrite.c:47:25: warning: type of ‘svn_data’ does not match original declaration [-Wlto-type-mismatch]
    47 | LITREF svn_data_type svn_data[];
    | ^
    /tmp/tmp/YDB/sr_port/expritem.c:147:22: note: ‘svn_data’ was previously declared here
    147 | LITDEF svn_data_type svn_data[] =
    | ^
    /tmp/tmp/YDB/sr_port/op_close.c:27:18: warning: type of ‘active_device’ does not match original declaration [-Wlto-type-mismatch]
    27 | GBLREF io_desc *active_device;
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:161:18: note: ‘active_device’ was previously declared here
    161 | GBLDEF io_desc *active_device;
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:161:18: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    [ 89%] Built target libyottadb
    Scanning dependencies of target dse
    Scanning dependencies of target gtcm_pkdisp
    Scanning dependencies of target yottadb
    Scanning dependencies of target dbcertify
    Scanning dependencies of target lke
    Scanning dependencies of target mupip
    Scanning dependencies of target gtmsecshr_real
    [ 89%] Building C object CMakeFiles/dse.dir/sr_unix/dse.c.o
    [ 89%] Building C object CMakeFiles/semstat2.dir/sr_unix/semstat2.c.o
    [ 89%] Building C object CMakeFiles/gtcm_pkdisp.dir/sr_unix_cm/gtcm_pkdisp.c.o ...

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From K.S. Bhaskar@21:1/5 to suka...@gmail.com on Mon Oct 4 12:13:17 2021
    On Saturday, October 2, 2021 at 10:52:26 AM UTC-4, suka...@gmail.com wrote:
    Hi!
    Is that how it should be? Is this normal or am I doing something wrong?
    gcc 10.3.0

    ...
    [ 89%] Building C object CMakeFiles/libyottadb.dir/sr_unix/ftok_main.c.o
    [ 89%] Linking C shared module libyottadb.so /tmp/tmp/YDB/sr_port/gdsfhead.h:1101:21: warning: type of ‘pin_fail_bt’ does not match original declaration [-Wlto-type-mismatch]
    1101 | GBLREF bt_rec_ptr_t pin_fail_bt; /* Pointer to bt of the cache-record that we failed to pin */
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:891:21: note: ‘pin_fail_bt’ was previously declared here
    891 | GBLDEF bt_rec_ptr_t pin_fail_bt; /* Pointer to bt of the cache-record that we failed to pin */
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:891:21: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    /tmp/tmp/YDB/sr_port/gdsfhead.h:1102:16: warning: type of ‘pin_fail_bt_contents’ does not match original declaration [-Wlto-type-mismatch]
    1102 | GBLREF bt_rec pin_fail_bt_contents; /* Contents of bt of the cache-record that we failed to pin */
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:892:16: note: ‘pin_fail_bt_contents’ was previously declared here
    892 | GBLDEF bt_rec pin_fail_bt_contents; /* Contents of bt of the cache-record that we failed to pin */
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:892:16: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    /tmp/tmp/YDB/sr_port/dm_setup.c:20:18: warning: type of ‘gtm_err_dev’ does not match original declaration [-Wlto-type-mismatch]
    20 | GBLREF io_desc *gtm_err_dev;
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:412:19: note: ‘gtm_err_dev’ was previously declared here
    412 | GBLDEF io_desc *gtm_err_dev;
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:412:19: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    /tmp/tmp/YDB/sr_port/m_zwrite.c:47:25: warning: type of ‘svn_data’ does not match original declaration [-Wlto-type-mismatch]
    47 | LITREF svn_data_type svn_data[];
    | ^
    /tmp/tmp/YDB/sr_port/expritem.c:147:22: note: ‘svn_data’ was previously declared here
    147 | LITDEF svn_data_type svn_data[] =
    | ^
    /tmp/tmp/YDB/sr_port/op_close.c:27:18: warning: type of ‘active_device’ does not match original declaration [-Wlto-type-mismatch]
    27 | GBLREF io_desc *active_device;
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:161:18: note: ‘active_device’ was previously declared here
    161 | GBLDEF io_desc *active_device;
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:161:18: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    [ 89%] Built target libyottadb
    Scanning dependencies of target dse
    Scanning dependencies of target gtcm_pkdisp
    Scanning dependencies of target yottadb
    Scanning dependencies of target dbcertify
    Scanning dependencies of target lke
    Scanning dependencies of target mupip
    Scanning dependencies of target gtmsecshr_real
    [ 89%] Building C object CMakeFiles/dse.dir/sr_unix/dse.c.o
    [ 89%] Building C object CMakeFiles/semstat2.dir/sr_unix/semstat2.c.o
    [ 89%] Building C object CMakeFiles/gtcm_pkdisp.dir/sr_unix_cm/gtcm_pkdisp.c.o
    ...

    Are you following the instructions in the README, or are you trying to compile it yourself with your own gcc flags? gcc flags do matter. Also, which Linux distribution/version are you using? Thank you.

    Regards
    – Bhaskar

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From K.S. Bhaskar@21:1/5 to K.S. Bhaskar on Tue Oct 5 08:30:10 2021
    On Monday, October 4, 2021 at 3:13:18 PM UTC-4, K.S. Bhaskar wrote:
    On Saturday, October 2, 2021 at 10:52:26 AM UTC-4, suka...@gmail.com wrote:
    Hi!
    Is that how it should be? Is this normal or am I doing something wrong? gcc 10.3.0

    ...
    [ 89%] Building C object CMakeFiles/libyottadb.dir/sr_unix/ftok_main.c.o
    [ 89%] Linking C shared module libyottadb.so /tmp/tmp/YDB/sr_port/gdsfhead.h:1101:21: warning: type of ‘pin_fail_bt’ does not match original declaration [-Wlto-type-mismatch]
    1101 | GBLREF bt_rec_ptr_t pin_fail_bt; /* Pointer to bt of the cache-record that we failed to pin */
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:891:21: note: ‘pin_fail_bt’ was previously declared here
    891 | GBLDEF bt_rec_ptr_t pin_fail_bt; /* Pointer to bt of the cache-record that we failed to pin */
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:891:21: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    /tmp/tmp/YDB/sr_port/gdsfhead.h:1102:16: warning: type of ‘pin_fail_bt_contents’ does not match original declaration [-Wlto-type-mismatch]
    1102 | GBLREF bt_rec pin_fail_bt_contents; /* Contents of bt of the cache-record that we failed to pin */
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:892:16: note: ‘pin_fail_bt_contents’ was previously declared here
    892 | GBLDEF bt_rec pin_fail_bt_contents; /* Contents of bt of the cache-record that we failed to pin */
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:892:16: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    /tmp/tmp/YDB/sr_port/dm_setup.c:20:18: warning: type of ‘gtm_err_dev’ does not match original declaration [-Wlto-type-mismatch]
    20 | GBLREF io_desc *gtm_err_dev;
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:412:19: note: ‘gtm_err_dev’ was previously declared here
    412 | GBLDEF io_desc *gtm_err_dev;
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:412:19: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    /tmp/tmp/YDB/sr_port/m_zwrite.c:47:25: warning: type of ‘svn_data’ does not match original declaration [-Wlto-type-mismatch]
    47 | LITREF svn_data_type svn_data[];
    | ^
    /tmp/tmp/YDB/sr_port/expritem.c:147:22: note: ‘svn_data’ was previously declared here
    147 | LITDEF svn_data_type svn_data[] =
    | ^
    /tmp/tmp/YDB/sr_port/op_close.c:27:18: warning: type of ‘active_device’ does not match original declaration [-Wlto-type-mismatch]
    27 | GBLREF io_desc *active_device;
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:161:18: note: ‘active_device’ was previously declared here
    161 | GBLDEF io_desc *active_device;
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:161:18: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    [ 89%] Built target libyottadb
    Scanning dependencies of target dse
    Scanning dependencies of target gtcm_pkdisp
    Scanning dependencies of target yottadb
    Scanning dependencies of target dbcertify
    Scanning dependencies of target lke
    Scanning dependencies of target mupip
    Scanning dependencies of target gtmsecshr_real
    [ 89%] Building C object CMakeFiles/dse.dir/sr_unix/dse.c.o
    [ 89%] Building C object CMakeFiles/semstat2.dir/sr_unix/semstat2.c.o
    [ 89%] Building C object CMakeFiles/gtcm_pkdisp.dir/sr_unix_cm/gtcm_pkdisp.c.o
    ...
    Are you following the instructions in the README, or are you trying to compile it yourself with your own gcc flags? gcc flags do matter. Also, which Linux distribution/version are you using? Thank you.

    Regards
    – Bhaskar

    Thank you for reporting this. For some reason, the great G is not showing your later post that you are compiling on Gentoo.

    I just tried building r1.32 on Debian 11, one of the Supported platforms with gcc version 10.2.1 and it compiled without any warnings. There are many Linux distributions, many versions of gcc, and a plethora of compilation flags that control warnings. As
    newer versions of gcc generate more warnings, part of our development activity is to check those warnings, determine which are legitimate (and should be addressed) vs. those which are “check this out” (and should be suppressed with flags).

    Regards
    – Bhaskar

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?B?0KHQtdGA0LPQtdC5INCa0LDQv@21:1/5 to All on Wed Oct 6 03:04:22 2021
    I incorrectly sent the answer to the mailing list from another email, so you did not see it.

    Yes I followed instructions for gcc from README.
    I'm using Calculate Linux Desktop (Gentoo based distro).
    Kernel 5.10.32

    As far as I remember, when compiling with an early version gcc 10.2.? (may be 10.2.1), there were also problems.

    Sergey.

    Hi!
    Is that how it should be? Is this normal or am I doing something wrong? gcc 10.3.0

    ...
    [ 89%] Building C object CMakeFiles/libyottadb.dir/sr_unix/ftok_main.c.o [ 89%] Linking C shared module libyottadb.so /tmp/tmp/YDB/sr_port/gdsfhead.h:1101:21: warning: type of ‘pin_fail_bt’ does not match original declaration [-Wlto-type-mismatch]
    1101 | GBLREF bt_rec_ptr_t pin_fail_bt; /* Pointer to bt of the cache-record that we failed to pin */
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:891:21: note: ‘pin_fail_bt’ was previously declared here
    891 | GBLDEF bt_rec_ptr_t pin_fail_bt; /* Pointer to bt of the cache-record that we failed to pin */
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:891:21: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    /tmp/tmp/YDB/sr_port/gdsfhead.h:1102:16: warning: type of ‘pin_fail_bt_contents’ does not match original declaration [-Wlto-type-mismatch]
    1102 | GBLREF bt_rec pin_fail_bt_contents; /* Contents of bt of the cache-record that we failed to pin */
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:892:16: note: ‘pin_fail_bt_contents’ was previously declared here
    892 | GBLDEF bt_rec pin_fail_bt_contents; /* Contents of bt of the cache-record that we failed to pin */
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:892:16: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    /tmp/tmp/YDB/sr_port/dm_setup.c:20:18: warning: type of ‘gtm_err_dev’ does not match original declaration [-Wlto-type-mismatch]
    20 | GBLREF io_desc *gtm_err_dev;
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:412:19: note: ‘gtm_err_dev’ was previously declared here
    412 | GBLDEF io_desc *gtm_err_dev;
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:412:19: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    /tmp/tmp/YDB/sr_port/m_zwrite.c:47:25: warning: type of ‘svn_data’ does not match original declaration [-Wlto-type-mismatch]
    47 | LITREF svn_data_type svn_data[];
    | ^
    /tmp/tmp/YDB/sr_port/expritem.c:147:22: note: ‘svn_data’ was previously declared here
    147 | LITDEF svn_data_type svn_data[] =
    | ^
    /tmp/tmp/YDB/sr_port/op_close.c:27:18: warning: type of ‘active_device’ does not match original declaration [-Wlto-type-mismatch]
    27 | GBLREF io_desc *active_device;
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:161:18: note: ‘active_device’ was previously declared here
    161 | GBLDEF io_desc *active_device;
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:161:18: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    [ 89%] Built target libyottadb
    Scanning dependencies of target dse
    Scanning dependencies of target gtcm_pkdisp
    Scanning dependencies of target yottadb
    Scanning dependencies of target dbcertify
    Scanning dependencies of target lke
    Scanning dependencies of target mupip
    Scanning dependencies of target gtmsecshr_real
    [ 89%] Building C object CMakeFiles/dse.dir/sr_unix/dse.c.o
    [ 89%] Building C object CMakeFiles/semstat2.dir/sr_unix/semstat2.c.o
    [ 89%] Building C object CMakeFiles/gtcm_pkdisp.dir/sr_unix_cm/gtcm_pkdisp.c.o
    ...
    Are you following the instructions in the README, or are you trying to compile it yourself with your own gcc flags? gcc flags do matter. Also, which Linux distribution/version are you using? Thank you.

    Regards
    – Bhaskar
    Thank you for reporting this. For some reason, the great G is not showing your later post that you are compiling on Gentoo.

    I just tried building r1.32 on Debian 11, one of the Supported platforms with gcc version 10.2.1 and it compiled without any warnings. There are many Linux distributions, many versions of gcc, and a plethora of compilation flags that control warnings.
    As newer versions of gcc generate more warnings, part of our development activity is to check those warnings, determine which are legitimate (and should be addressed) vs. those which are “check this out” (and should be suppressed with flags).

    Regards
    – Bhaskar

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?B?0KHQtdGA0LPQtdC5INCa0LDQv@21:1/5 to All on Thu Oct 7 10:34:45 2021
    I incorrectly sent the answer to the mailing list from another email, so you did not see it.

    Yes I followed instructions for gcc from README.
    I'm using Calculate Linux Desktop (Gentoo based distro).
    Kernel 5.10.32

    As far as I remember, when compiling with an early version gcc 10.2.? (may be 10.2.1), there were also problems.

    Sergey.
    Hi!
    Is that how it should be? Is this normal or am I doing something wrong?
    gcc 10.3.0

    ...
    [ 89%] Building C object CMakeFiles/libyottadb.dir/sr_unix/ftok_main.c.o
    [ 89%] Linking C shared module libyottadb.so /tmp/tmp/YDB/sr_port/gdsfhead.h:1101:21: warning: type of ‘pin_fail_bt’ does not match original declaration [-Wlto-type-mismatch]
    1101 | GBLREF bt_rec_ptr_t pin_fail_bt; /* Pointer to bt of the cache-record that we failed to pin */
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:891:21: note: ‘pin_fail_bt’ was previously declared here
    891 | GBLDEF bt_rec_ptr_t pin_fail_bt; /* Pointer to bt of the cache-record that we failed to pin */
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:891:21: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    /tmp/tmp/YDB/sr_port/gdsfhead.h:1102:16: warning: type of ‘pin_fail_bt_contents’ does not match original declaration [-Wlto-type-mismatch]
    1102 | GBLREF bt_rec pin_fail_bt_contents; /* Contents of bt of the cache-record that we failed to pin */
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:892:16: note: ‘pin_fail_bt_contents’ was previously declared here
    892 | GBLDEF bt_rec pin_fail_bt_contents; /* Contents of bt of the cache-record that we failed to pin */
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:892:16: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    /tmp/tmp/YDB/sr_port/dm_setup.c:20:18: warning: type of ‘gtm_err_dev’ does not match original declaration [-Wlto-type-mismatch]
    20 | GBLREF io_desc *gtm_err_dev;
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:412:19: note: ‘gtm_err_dev’ was previously declared here
    412 | GBLDEF io_desc *gtm_err_dev;
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:412:19: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    /tmp/tmp/YDB/sr_port/m_zwrite.c:47:25: warning: type of ‘svn_data’ does not match original declaration [-Wlto-type-mismatch]
    47 | LITREF svn_data_type svn_data[];
    | ^
    /tmp/tmp/YDB/sr_port/expritem.c:147:22: note: ‘svn_data’ was previously declared here
    147 | LITDEF svn_data_type svn_data[] =
    | ^
    /tmp/tmp/YDB/sr_port/op_close.c:27:18: warning: type of ‘active_device’ does not match original declaration [-Wlto-type-mismatch]
    27 | GBLREF io_desc *active_device;
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:161:18: note: ‘active_device’ was previously declared here
    161 | GBLDEF io_desc *active_device;
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:161:18: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    [ 89%] Built target libyottadb
    Scanning dependencies of target dse
    Scanning dependencies of target gtcm_pkdisp
    Scanning dependencies of target yottadb
    Scanning dependencies of target dbcertify
    Scanning dependencies of target lke
    Scanning dependencies of target mupip
    Scanning dependencies of target gtmsecshr_real
    [ 89%] Building C object CMakeFiles/dse.dir/sr_unix/dse.c.o
    [ 89%] Building C object CMakeFiles/semstat2.dir/sr_unix/semstat2.c.o [ 89%] Building C object CMakeFiles/gtcm_pkdisp.dir/sr_unix_cm/gtcm_pkdisp.c.o
    ...
    Are you following the instructions in the README, or are you trying to compile it yourself with your own gcc flags? gcc flags do matter. Also, which Linux distribution/version are you using? Thank you.

    Regards
    – Bhaskar
    Thank you for reporting this. For some reason, the great G is not showing your later post that you are compiling on Gentoo.

    I just tried building r1.32 on Debian 11, one of the Supported platforms with gcc version 10.2.1 and it compiled without any warnings. There are many Linux distributions, many versions of gcc, and a plethora of compilation flags that control warnings.
    As newer versions of gcc generate more warnings, part of our development activity is to check those warnings, determine which are legitimate (and should be addressed) vs. those which are “check this out” (and should be suppressed with flags).

    Regards
    – Bhaskar


    I tested compilation with gcc 10.2.0-r5. Same 10 warnings and notices.

    [ 89%] Building C object CMakeFiles/libyottadb.dir/sr_unix/ftok_main.c.o
    [ 89%] Linking C shared module libyottadb.so /tmp/YDB/sr_port/gdsfhead.h:1101:21: warning: type of ‘pin_fail_bt’ does not match original declaration [-Wlto-type-mismatch]
    1101 | GBLREF bt_rec_ptr_t pin_fail_bt; /* Pointer to bt of the cache-record that we failed to pin */
    | ^
    /tmp/YDB/sr_port/gbldefs.c:891:21: note: ‘pin_fail_bt’ was previously declared here
    891 | GBLDEF bt_rec_ptr_t pin_fail_bt; /* Pointer to bt of the cache-record that we failed to pin */
    | ^
    /tmp/YDB/sr_port/gbldefs.c:891:21: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    /tmp/YDB/sr_port/gdsfhead.h:1102:16: warning: type of ‘pin_fail_bt_contents’ does not match original declaration [-Wlto-type-mismatch]
    1102 | GBLREF bt_rec pin_fail_bt_contents; /* Contents of bt of the cache-record that we failed to pin */
    | ^
    /tmp/YDB/sr_port/gbldefs.c:892:16: note: ‘pin_fail_bt_contents’ was previously declared here
    892 | GBLDEF bt_rec pin_fail_bt_contents; /* Contents of bt of the cache-record that we failed to pin */
    | ^
    /tmp/YDB/sr_port/gbldefs.c:892:16: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    /tmp/YDB/sr_port/dm_setup.c:20:18: warning: type of ‘gtm_err_dev’ does not match original declaration [-Wlto-type-mismatch]
    20 | GBLREF io_desc *gtm_err_dev;
    | ^
    /tmp/YDB/sr_port/gbldefs.c:412:19: note: ‘gtm_err_dev’ was previously declared here
    412 | GBLDEF io_desc *gtm_err_dev;
    | ^
    /tmp/YDB/sr_port/gbldefs.c:412:19: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    /tmp/YDB/sr_port/m_zwrite.c:47:25: warning: type of ‘svn_data’ does not match original declaration [-Wlto-type-mismatch]
    47 | LITREF svn_data_type svn_data[];
    | ^
    /tmp/YDB/sr_port/expritem.c:147:22: note: ‘svn_data’ was previously declared here
    147 | LITDEF svn_data_type svn_data[] =
    | ^
    /tmp/YDB/sr_port/op_close.c:27:18: warning: type of ‘active_device’ does not match original declaration [-Wlto-type-mismatch]
    27 | GBLREF io_desc *active_device;
    | ^
    /tmp/YDB/sr_port/gbldefs.c:161:18: note: ‘active_device’ was previously declared here
    161 | GBLDEF io_desc *active_device;
    | ^
    /tmp/YDB/sr_port/gbldefs.c:161:18: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    [ 89%] Built target libyottadb
    Scanning dependencies of target dbcertify
    Scanning dependencies of target dse
    Scanning dependencies of target mupip

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From K.S. Bhaskar@21:1/5 to All on Mon Oct 11 08:33:41 2021
    On Thursday, October 7, 2021 at 1:34:46 PM UTC-4, Сергей Каменев wrote:
    I incorrectly sent the answer to the mailing list from another email, so you did not see it.

    Yes I followed instructions for gcc from README.
    I'm using Calculate Linux Desktop (Gentoo based distro).
    Kernel 5.10.32

    As far as I remember, when compiling with an early version gcc 10.2.? (may be 10.2.1), there were also problems.

    Sergey.
    Hi!
    Is that how it should be? Is this normal or am I doing something wrong?
    gcc 10.3.0

    ...
    [ 89%] Building C object CMakeFiles/libyottadb.dir/sr_unix/ftok_main.c.o
    [ 89%] Linking C shared module libyottadb.so /tmp/tmp/YDB/sr_port/gdsfhead.h:1101:21: warning: type of ‘pin_fail_bt’ does not match original declaration [-Wlto-type-mismatch]
    1101 | GBLREF bt_rec_ptr_t pin_fail_bt; /* Pointer to bt of the cache-record that we failed to pin */
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:891:21: note: ‘pin_fail_bt’ was previously declared here
    891 | GBLDEF bt_rec_ptr_t pin_fail_bt; /* Pointer to bt of the cache-record that we failed to pin */
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:891:21: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    /tmp/tmp/YDB/sr_port/gdsfhead.h:1102:16: warning: type of ‘pin_fail_bt_contents’ does not match original declaration [-Wlto-type-mismatch]
    1102 | GBLREF bt_rec pin_fail_bt_contents; /* Contents of bt of the cache-record that we failed to pin */
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:892:16: note: ‘pin_fail_bt_contents’ was previously declared here
    892 | GBLDEF bt_rec pin_fail_bt_contents; /* Contents of bt of the cache-record that we failed to pin */
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:892:16: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    /tmp/tmp/YDB/sr_port/dm_setup.c:20:18: warning: type of ‘gtm_err_dev’ does not match original declaration [-Wlto-type-mismatch]
    20 | GBLREF io_desc *gtm_err_dev;
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:412:19: note: ‘gtm_err_dev’ was previously declared here
    412 | GBLDEF io_desc *gtm_err_dev;
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:412:19: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    /tmp/tmp/YDB/sr_port/m_zwrite.c:47:25: warning: type of ‘svn_data’ does not match original declaration [-Wlto-type-mismatch]
    47 | LITREF svn_data_type svn_data[];
    | ^
    /tmp/tmp/YDB/sr_port/expritem.c:147:22: note: ‘svn_data’ was previously declared here
    147 | LITDEF svn_data_type svn_data[] =
    | ^
    /tmp/tmp/YDB/sr_port/op_close.c:27:18: warning: type of ‘active_device’ does not match original declaration [-Wlto-type-mismatch]
    27 | GBLREF io_desc *active_device;
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:161:18: note: ‘active_device’ was previously declared here
    161 | GBLDEF io_desc *active_device;
    | ^
    /tmp/tmp/YDB/sr_port/gbldefs.c:161:18: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    [ 89%] Built target libyottadb
    Scanning dependencies of target dse
    Scanning dependencies of target gtcm_pkdisp
    Scanning dependencies of target yottadb
    Scanning dependencies of target dbcertify
    Scanning dependencies of target lke
    Scanning dependencies of target mupip
    Scanning dependencies of target gtmsecshr_real
    [ 89%] Building C object CMakeFiles/dse.dir/sr_unix/dse.c.o
    [ 89%] Building C object CMakeFiles/semstat2.dir/sr_unix/semstat2.c.o
    [ 89%] Building C object CMakeFiles/gtcm_pkdisp.dir/sr_unix_cm/gtcm_pkdisp.c.o
    ...
    Are you following the instructions in the README, or are you trying to compile it yourself with your own gcc flags? gcc flags do matter. Also, which Linux distribution/version are you using? Thank you.

    Regards
    – Bhaskar
    Thank you for reporting this. For some reason, the great G is not showing your later post that you are compiling on Gentoo.

    I just tried building r1.32 on Debian 11, one of the Supported platforms with gcc version 10.2.1 and it compiled without any warnings. There are many Linux distributions, many versions of gcc, and a plethora of compilation flags that control
    warnings. As newer versions of gcc generate more warnings, part of our development activity is to check those warnings, determine which are legitimate (and should be addressed) vs. those which are “check this out” (and should be suppressed with flags)
    .

    Regards
    – Bhaskar
    I tested compilation with gcc 10.2.0-r5. Same 10 warnings and notices.
    [ 89%] Building C object CMakeFiles/libyottadb.dir/sr_unix/ftok_main.c.o
    [ 89%] Linking C shared module libyottadb.so /tmp/YDB/sr_port/gdsfhead.h:1101:21: warning: type of ‘pin_fail_bt’ does not match original declaration [-Wlto-type-mismatch]
    1101 | GBLREF bt_rec_ptr_t pin_fail_bt; /* Pointer to bt of the cache-record that we failed to pin */
    | ^
    /tmp/YDB/sr_port/gbldefs.c:891:21: note: ‘pin_fail_bt’ was previously declared here
    891 | GBLDEF bt_rec_ptr_t pin_fail_bt; /* Pointer to bt of the cache-record that we failed to pin */
    | ^
    /tmp/YDB/sr_port/gbldefs.c:891:21: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    /tmp/YDB/sr_port/gdsfhead.h:1102:16: warning: type of ‘pin_fail_bt_contents’ does not match original declaration [-Wlto-type-mismatch]
    1102 | GBLREF bt_rec pin_fail_bt_contents; /* Contents of bt of the cache-record that we failed to pin */
    | ^
    /tmp/YDB/sr_port/gbldefs.c:892:16: note: ‘pin_fail_bt_contents’ was previously declared here
    892 | GBLDEF bt_rec pin_fail_bt_contents; /* Contents of bt of the cache-record that we failed to pin */
    | ^
    /tmp/YDB/sr_port/gbldefs.c:892:16: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    /tmp/YDB/sr_port/dm_setup.c:20:18: warning: type of ‘gtm_err_dev’ does not match original declaration [-Wlto-type-mismatch]
    20 | GBLREF io_desc *gtm_err_dev;
    | ^
    /tmp/YDB/sr_port/gbldefs.c:412:19: note: ‘gtm_err_dev’ was previously declared here
    412 | GBLDEF io_desc *gtm_err_dev;
    | ^
    /tmp/YDB/sr_port/gbldefs.c:412:19: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    /tmp/YDB/sr_port/m_zwrite.c:47:25: warning: type of ‘svn_data’ does not match original declaration [-Wlto-type-mismatch]
    47 | LITREF svn_data_type svn_data[];
    | ^
    /tmp/YDB/sr_port/expritem.c:147:22: note: ‘svn_data’ was previously declared here
    147 | LITDEF svn_data_type svn_data[] =
    | ^
    /tmp/YDB/sr_port/op_close.c:27:18: warning: type of ‘active_device’ does not match original declaration [-Wlto-type-mismatch]
    27 | GBLREF io_desc *active_device;
    | ^
    /tmp/YDB/sr_port/gbldefs.c:161:18: note: ‘active_device’ was previously declared here
    161 | GBLDEF io_desc *active_device;
    | ^
    /tmp/YDB/sr_port/gbldefs.c:161:18: note: code may be misoptimized unless ‘-fno-strict-aliasing’ is used
    [ 89%] Built target libyottadb
    Scanning dependencies of target dbcertify
    Scanning dependencies of target dse
    Scanning dependencies of target mupip

    Different versions of compilers or even the same version of a compiler on different Linux distributions may generate different warnings for the same code. In some cases the warnings are correct and we take remedial action, and in some cases the warnings
    are not because there are reasons for the code being the way it is, and we have to add compiler flags to turn off a specific warning (and in some cases, if the flag is not available in an earlier version of a compiler, we may opt to not add the flag).
    This is an ongoing process that never stops.

    What I would ask is that when you see a warning, please do investigate whether it appears legitimate. If it does, please submit a merge request on GitLab with a fix, and if it does not and there is a compiler flag to turn if off, please submit a merge
    request with the updated flag. Thank you.

    Regards
    – Bhaskar

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)