build detected deprecated functions usage #111

Closed
opened 2021-05-18 17:50:49 +00:00 by prandnum · 23 comments
prandnum commented 2021-05-18 17:50:49 +00:00 (Migrated from gitlab.com)

build detected deprecated functions usage

[ 92%] Building CXX object libraries/plugins/peerplays_sidechain/CMakeFiles/peerplays_sidechain.dir/sidechain_net_handler_bitcoin.cpp.o
[ 92%] Building CXX object libraries/plugins/peerplays_sidechain/CMakeFiles/peerplays_sidechain.dir/sidechain_net_handler_hive.cpp.o
/home/peerplays/src/peerplays/libraries/plugins/peerplays_sidechain/sidechain_net_handler_bitcoin.cpp: In member function 'std::vector<zmq::message_t> graphene::peerplays_sidechain::zmq_listener::receive_multipart()':
/home/peerplays/src/peerplays/libraries/plugins/peerplays_sidechain/sidechain_net_handler_bitcoin.cpp:877:26: warning: 'bool zmq::detail::socket_base::recv(zmq::message_t*, int)' is deprecated: from 4.3.1, use recv taking a reference to message_t and recv_flags [-Wdeprecated-declarations]
  877 |       socket.recv(&msg, 0);
      |                          ^
In file included from /home/peerplays/src/peerplays/libraries/plugins/peerplays_sidechain/include/graphene/peerplays_sidechain/sidechain_net_handler_bitcoin.hpp:7,
                 from /home/peerplays/src/peerplays/libraries/plugins/peerplays_sidechain/sidechain_net_handler_bitcoin.cpp:1:
/usr/include/zmq.hpp:1407:10: note: declared here
 1407 |     bool recv(message_t *msg_, int flags_ = 0)
      |          ^~~~
[ 94%] Building CXX object libraries/plugins/peerplays_sidechain/CMakeFiles/peerplays_sidechain.dir/sidechain_net_handler_peerplays.cpp.o
/home/peerplays/src/peerplays/libraries/plugins/peerplays_sidechain/sidechain_net_handler_peerplays.cpp: In constructor 'graphene::peerplays_sidechain::sidechain_net_handler_peerplays::sidechain_net_handler_peerplays(graphene::peerplays_sidechain::peerplays_sidechain_plugin&, const boost::program_options::variables_map&)':
/home/peerplays/src/peerplays/libraries/plugins/peerplays_sidechain/sidechain_net_handler_peerplays.cpp:29:15: warning: variable 'get_asset_id' set but not used [-Wunused-but-set-variable]
   29 |    const auto get_asset_id = [&assets_by_symbol](const string &symbol) {
      |               ^~~~~~~~~~~~
[ 94%] Building CXX object libraries/plugins/peerplays_sidechain/CMakeFiles/peerplays_sidechain.dir/bitcoin/bech32.cpp.o
[ 94%] Building CXX object libraries/plugins/peerplays_sidechain/CMakeFiles/peerplays_sidechain.dir/bitcoin/bitcoin_address.cpp.o
build detected deprecated functions usage ``` [ 92%] Building CXX object libraries/plugins/peerplays_sidechain/CMakeFiles/peerplays_sidechain.dir/sidechain_net_handler_bitcoin.cpp.o [ 92%] Building CXX object libraries/plugins/peerplays_sidechain/CMakeFiles/peerplays_sidechain.dir/sidechain_net_handler_hive.cpp.o /home/peerplays/src/peerplays/libraries/plugins/peerplays_sidechain/sidechain_net_handler_bitcoin.cpp: In member function 'std::vector<zmq::message_t> graphene::peerplays_sidechain::zmq_listener::receive_multipart()': /home/peerplays/src/peerplays/libraries/plugins/peerplays_sidechain/sidechain_net_handler_bitcoin.cpp:877:26: warning: 'bool zmq::detail::socket_base::recv(zmq::message_t*, int)' is deprecated: from 4.3.1, use recv taking a reference to message_t and recv_flags [-Wdeprecated-declarations] 877 | socket.recv(&msg, 0); | ^ In file included from /home/peerplays/src/peerplays/libraries/plugins/peerplays_sidechain/include/graphene/peerplays_sidechain/sidechain_net_handler_bitcoin.hpp:7, from /home/peerplays/src/peerplays/libraries/plugins/peerplays_sidechain/sidechain_net_handler_bitcoin.cpp:1: /usr/include/zmq.hpp:1407:10: note: declared here 1407 | bool recv(message_t *msg_, int flags_ = 0) | ^~~~ [ 94%] Building CXX object libraries/plugins/peerplays_sidechain/CMakeFiles/peerplays_sidechain.dir/sidechain_net_handler_peerplays.cpp.o /home/peerplays/src/peerplays/libraries/plugins/peerplays_sidechain/sidechain_net_handler_peerplays.cpp: In constructor 'graphene::peerplays_sidechain::sidechain_net_handler_peerplays::sidechain_net_handler_peerplays(graphene::peerplays_sidechain::peerplays_sidechain_plugin&, const boost::program_options::variables_map&)': /home/peerplays/src/peerplays/libraries/plugins/peerplays_sidechain/sidechain_net_handler_peerplays.cpp:29:15: warning: variable 'get_asset_id' set but not used [-Wunused-but-set-variable] 29 | const auto get_asset_id = [&assets_by_symbol](const string &symbol) { | ^~~~~~~~~~~~ [ 94%] Building CXX object libraries/plugins/peerplays_sidechain/CMakeFiles/peerplays_sidechain.dir/bitcoin/bech32.cpp.o [ 94%] Building CXX object libraries/plugins/peerplays_sidechain/CMakeFiles/peerplays_sidechain.dir/bitcoin/bitcoin_address.cpp.o ```
prandnum commented 2021-05-18 17:50:49 +00:00 (Migrated from gitlab.com)

added to epic &77

added to epic &77
prandnum commented 2021-05-18 17:51:08 +00:00 (Migrated from gitlab.com)

@bobinson @serkixenos

CC: @hbelakon

@bobinson @serkixenos CC: @hbelakon
serkixenos commented 2021-05-19 12:44:14 +00:00 (Migrated from gitlab.com)

Related: https://gitlab.com/PBSA/peerplays/-/issues/34

Note that the Docker image is using Ubuntu 20.04, while our default platform is still 18.04. The differences between these two is the reason for this particular message:

bool zmq::detail::socket_base::recv(zmq::message_t*, int)' is deprecated

Fixing this warning for 20.04 will create build errors on 18.04 (Verified).

#44 should be done first, to avoid double work.

Switching to 20.04 is more a matter of infrastructure (build server and tools), than software, as some team members are using 20.04 for quite some time now. We know that it builds and runs properly on 20.04, but our CI/CD is 18.04, test servers are 18.04, etc...

Related: https://gitlab.com/PBSA/peerplays/-/issues/34 Note that the Docker image is using Ubuntu 20.04, while our default platform is still 18.04. The differences between these two is the reason for this particular message: bool zmq::detail::socket_base::recv(zmq::message_t*, int)' is deprecated Fixing this warning for 20.04 will create build errors on 18.04 (Verified). #44 should be done first, to avoid double work. Switching to 20.04 is more a matter of infrastructure (build server and tools), than software, as some team members are using 20.04 for quite some time now. We know that it builds and runs properly on 20.04, but our CI/CD is 18.04, test servers are 18.04, etc...
serkixenos commented 2021-05-19 19:17:12 +00:00 (Migrated from gitlab.com)

assigned to @prandnum and unassigned @serkixenos

assigned to @prandnum and unassigned @serkixenos
serkixenos commented 2021-05-19 19:20:30 +00:00 (Migrated from gitlab.com)

mentioned in issue PBSA/tools-libs/peerplays-fc#13

mentioned in issue PBSA/tools-libs/peerplays-fc#13
serkixenos commented 2021-05-19 19:28:32 +00:00 (Migrated from gitlab.com)
Also related https://gitlab.com/PBSA/peerplays/-/issues/34
hbelakon commented 2021-06-09 01:30:45 +00:00 (Migrated from gitlab.com)

changed time estimate to 16h

changed time estimate to 16h
hbelakon commented 2021-06-09 01:32:25 +00:00 (Migrated from gitlab.com)

@serkixenos I estimated 16 hr. Please correct me if I am wrong!

@serkixenos I estimated 16 hr. Please correct me if I am wrong!
serkixenos commented 2021-07-07 12:28:25 +00:00 (Migrated from gitlab.com)

mentioned in issue #44

mentioned in issue #44
serkixenos commented 2021-07-07 12:28:39 +00:00 (Migrated from gitlab.com)

mentioned in issue #34

mentioned in issue #34
serkixenos commented 2021-07-07 12:28:48 +00:00 (Migrated from gitlab.com)
Related: https://gitlab.com/PBSA/peerplays/-/issues/34 https://gitlab.com/PBSA/peerplays/-/issues/44
hbelakon commented 2021-10-14 01:02:57 +00:00 (Migrated from gitlab.com)

changed epic to &370

changed epic to &370
hbelakon commented 2021-10-14 03:40:30 +00:00 (Migrated from gitlab.com)

@prandnum is this still an issue? Please check

@prandnum is this still an issue? Please check
prandnum commented 2021-10-15 08:29:59 +00:00 (Migrated from gitlab.com)

Yes, still an issue:

/home/peerplays/peerplays-network/src/peerplays/libraries/fc/src/crypto/openssl.cpp: In constructor 'fc::openssl_scope::openssl_scope()':
/home/peerplays/peerplays-network/src/peerplays/libraries/fc/src/crypto/openssl.cpp:33:33: warning: 'void OPENSSL_config(const char*)' is deprecated [-Wdeprecated-declarations]
   33 |           OPENSSL_config(nullptr);
      |                                 ^
In file included from /usr/include/openssl/ec.h:14,
                 from /home/peerplays/peerplays-network/src/peerplays/libraries/fc/include/fc/crypto/openssl.hpp:2,
                 from /home/peerplays/peerplays-network/src/peerplays/libraries/fc/src/crypto/openssl.cpp:1:
/usr/include/openssl/conf.h:91:1: note: declared here
   91 | DEPRECATEDIN_1_1_0(void OPENSSL_config(const char *config_name))
      | ^~~~~~~~~~~~~~~~~~
/home/peerplays/peerplays-network/src/peerplays/libraries/fc/src/crypto/openssl.cpp:33:33: warning: 'void OPENSSL_config(const char*)' is deprecated [-Wdeprecated-declarations]
   33 |           OPENSSL_config(nullptr);
      |                                 ^
In file included from /usr/include/openssl/ec.h:14,
                 from /home/peerplays/peerplays-network/src/peerplays/libraries/fc/include/fc/crypto/openssl.hpp:2,
                 from /home/peerplays/peerplays-network/src/peerplays/libraries/fc/src/crypto/openssl.cpp:1:
/usr/include/openssl/conf.h:91:1: note: declared here
   91 | DEPRECATEDIN_1_1_0(void OPENSSL_config(const char *config_name))
      | ^~~~~~~~~~~~~~~~~~
[ 26%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/crypto/hex.cpp.o


[ 97%] Building CXX object libraries/plugins/peerplays_sidechain/CMakeFiles/peerplays_sidechain.dir/hive/types.cpp.o
/home/peerplays/peerplays-network/src/peerplays/libraries/plugins/peerplays_sidechain/sidechain_net_handler_bitcoin.cpp: In member function 'std::vector<zmq::message_t> graphene::peerplays_sidechain::zmq_listener::receive_multipart()':
/home/peerplays/peerplays-network/src/peerplays/libraries/plugins/peerplays_sidechain/sidechain_net_handler_bitcoin.cpp:878:26: warning: 'bool zmq::detail::socket_base::recv(zmq::message_t*, int)' is deprecated: from 4.3.1, use recv taking a reference to message_t and recv_flags [-Wdeprecated-declarations]
  878 |       socket.recv(&msg, 0);
      |                          ^
In file included from /home/peerplays/peerplays-network/src/peerplays/libraries/plugins/peerplays_sidechain/include/graphene/peerplays_sidechain/sidechain_net_handler_bitcoin.hpp:6,
                 from /home/peerplays/peerplays-network/src/peerplays/libraries/plugins/peerplays_sidechain/sidechain_net_handler_bitcoin.cpp:1:
/usr/include/zmq.hpp:1407:10: note: declared here
 1407 |     bool recv(message_t *msg_, int flags_ = 0)
      |          ^~~~
[ 98%] Linking CXX static library libgraphene_snapshot.a
Yes, still an issue: ``` /home/peerplays/peerplays-network/src/peerplays/libraries/fc/src/crypto/openssl.cpp: In constructor 'fc::openssl_scope::openssl_scope()': /home/peerplays/peerplays-network/src/peerplays/libraries/fc/src/crypto/openssl.cpp:33:33: warning: 'void OPENSSL_config(const char*)' is deprecated [-Wdeprecated-declarations] 33 | OPENSSL_config(nullptr); | ^ In file included from /usr/include/openssl/ec.h:14, from /home/peerplays/peerplays-network/src/peerplays/libraries/fc/include/fc/crypto/openssl.hpp:2, from /home/peerplays/peerplays-network/src/peerplays/libraries/fc/src/crypto/openssl.cpp:1: /usr/include/openssl/conf.h:91:1: note: declared here 91 | DEPRECATEDIN_1_1_0(void OPENSSL_config(const char *config_name)) | ^~~~~~~~~~~~~~~~~~ /home/peerplays/peerplays-network/src/peerplays/libraries/fc/src/crypto/openssl.cpp:33:33: warning: 'void OPENSSL_config(const char*)' is deprecated [-Wdeprecated-declarations] 33 | OPENSSL_config(nullptr); | ^ In file included from /usr/include/openssl/ec.h:14, from /home/peerplays/peerplays-network/src/peerplays/libraries/fc/include/fc/crypto/openssl.hpp:2, from /home/peerplays/peerplays-network/src/peerplays/libraries/fc/src/crypto/openssl.cpp:1: /usr/include/openssl/conf.h:91:1: note: declared here 91 | DEPRECATEDIN_1_1_0(void OPENSSL_config(const char *config_name)) | ^~~~~~~~~~~~~~~~~~ [ 26%] Building CXX object libraries/fc/CMakeFiles/fc.dir/src/crypto/hex.cpp.o [ 97%] Building CXX object libraries/plugins/peerplays_sidechain/CMakeFiles/peerplays_sidechain.dir/hive/types.cpp.o /home/peerplays/peerplays-network/src/peerplays/libraries/plugins/peerplays_sidechain/sidechain_net_handler_bitcoin.cpp: In member function 'std::vector<zmq::message_t> graphene::peerplays_sidechain::zmq_listener::receive_multipart()': /home/peerplays/peerplays-network/src/peerplays/libraries/plugins/peerplays_sidechain/sidechain_net_handler_bitcoin.cpp:878:26: warning: 'bool zmq::detail::socket_base::recv(zmq::message_t*, int)' is deprecated: from 4.3.1, use recv taking a reference to message_t and recv_flags [-Wdeprecated-declarations] 878 | socket.recv(&msg, 0); | ^ In file included from /home/peerplays/peerplays-network/src/peerplays/libraries/plugins/peerplays_sidechain/include/graphene/peerplays_sidechain/sidechain_net_handler_bitcoin.hpp:6, from /home/peerplays/peerplays-network/src/peerplays/libraries/plugins/peerplays_sidechain/sidechain_net_handler_bitcoin.cpp:1: /usr/include/zmq.hpp:1407:10: note: declared here 1407 | bool recv(message_t *msg_, int flags_ = 0) | ^~~~ [ 98%] Linking CXX static library libgraphene_snapshot.a ```
serkixenos commented 2022-01-31 14:12:58 +00:00 (Migrated from gitlab.com)

unassigned @prandnum

unassigned @prandnum
serkixenos commented 2022-02-07 13:36:29 +00:00 (Migrated from gitlab.com)

assigned to @pavel.baykov

assigned to @pavel.baykov
serkixenos commented 2022-02-15 18:21:39 +00:00 (Migrated from gitlab.com)

@prandnum
Related MR
https://gitlab.com/PBSA/peerplays/-/merge_requests/65

Test instructions:

  1. Verify that the build log is clean and no deprecated function warnings.
  2. Verify that BTC deposit and withdrawal are executed successfully.
@prandnum Related MR https://gitlab.com/PBSA/peerplays/-/merge_requests/65 Test instructions: 1. Verify that the build log is clean and no deprecated function warnings. 2. Verify that BTC deposit and withdrawal are executed successfully.
serkixenos commented 2022-02-15 18:21:50 +00:00 (Migrated from gitlab.com)

assigned to @prandnum

assigned to @prandnum
prandnum commented 2022-02-20 11:12:21 +00:00 (Migrated from gitlab.com)

Following warnings are still present:

/home/qa/20022022/src/peerplays/libraries/fc/src/crypto/openssl.cpp:33:33: warning: 'void OPENSSL_config(const char*)' is deprecated [-Wdeprecated-declarations]
/home/qa/20022022/src/peerplays/libraries/plugins/peerplays_sidechain/sidechain_net_handler_bitcoin.cpp:878:26: warning: 'bool zmq::detail::socket_base::recv(zmq::message_t*, int)' is deprecated: from 4.3.1, use recv taking a reference to message_t and recv_flags [-Wdeprecated-declarations]

full build logs are attached. buildlogs_20022022.zip

Following warnings are still present: ``` /home/qa/20022022/src/peerplays/libraries/fc/src/crypto/openssl.cpp:33:33: warning: 'void OPENSSL_config(const char*)' is deprecated [-Wdeprecated-declarations] /home/qa/20022022/src/peerplays/libraries/plugins/peerplays_sidechain/sidechain_net_handler_bitcoin.cpp:878:26: warning: 'bool zmq::detail::socket_base::recv(zmq::message_t*, int)' is deprecated: from 4.3.1, use recv taking a reference to message_t and recv_flags [-Wdeprecated-declarations] ``` full build logs are attached. [buildlogs_20022022.zip](/uploads/de0ee1f5048cd6b61466a6553c2b2496/buildlogs_20022022.zip)
serkixenos commented 2022-02-20 18:20:41 +00:00 (Migrated from gitlab.com)

Looks like you are not building latest source code, or not on Ubuntu 20.04. CI/CD log does not show these warnings:

https://gitlab.com/PBSA/peerplays/-/jobs/2102009511

Please retest with latest source code, using Ubuntu 20.04, which is now default platform.

Looks like you are not building latest source code, or not on Ubuntu 20.04. CI/CD log does not show these warnings: https://gitlab.com/PBSA/peerplays/-/jobs/2102009511 Please retest with latest source code, using Ubuntu 20.04, which is now default platform.
serkixenos commented 2022-02-20 18:35:21 +00:00 (Migrated from gitlab.com)

You are building master branch, where our changes are not applied yet. You should build develop branch. Also, no need for building Boost from the source, 20.04 provides Boost v1.67 from its repos. README on develop branch provides updated instructions.

No "git checkout develop" command:

qa@PBSA-Dev:~/20022022/src$ git clone https://github.com/peerplays-network/peerplays.git && cd peerplays && git submodule update --init --recursive && cmake -DBOOST_ROOT="$BOOST_ROOT" -DCMAKE_BUILD_TYPE=Release -DBUILD_PEERPLAYS_TESTNET=1 && make -j4 && sudo make install
You are building master branch, where our changes are not applied yet. You should build develop branch. Also, no need for building Boost from the source, 20.04 provides Boost v1.67 from its repos. README on develop branch provides updated instructions. No "git checkout develop" command: ``` qa@PBSA-Dev:~/20022022/src$ git clone https://github.com/peerplays-network/peerplays.git && cd peerplays && git submodule update --init --recursive && cmake -DBOOST_ROOT="$BOOST_ROOT" -DCMAKE_BUILD_TYPE=Release -DBUILD_PEERPLAYS_TESTNET=1 && make -j4 && sudo make install ```
prandnum commented 2022-02-23 14:46:29 +00:00 (Migrated from gitlab.com)

The above-mentioned error is not seen. Raised https://gitlab.com/PBSA/peerplays/-/issues/289 for new a deprecated file usage.

The above-mentioned error is not seen. Raised https://gitlab.com/PBSA/peerplays/-/issues/289 for new a deprecated file usage.
prandnum commented 2022-02-23 14:46:53 +00:00 (Migrated from gitlab.com)

attaching build logs. peerplays-build-develop.log

attaching build logs. [peerplays-build-develop.log](/uploads/35c9cf41025a84a1f858c81ea865b6ba/peerplays-build-develop.log)
prandnum (Migrated from gitlab.com) closed this issue 2022-02-23 14:47:11 +00:00
Sign in to join this conversation.
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Peerplays_Blockchain/peerplays_migrated#111
No description provided.