bitshares / bitshares/bitshares-core

Compiler warnings in macOS build (cross-build in Linux)

Open
#2,340 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
1.2k
Forks
660
Avg merge
8h 17m
Merged PRs (30d)
26

Description

Target bitshares-core 5.1.0

> file: libfc.a(non_preemptable_scope_check.cpp.o) has no symbols

> ld: warning: direct access in function ... from file '../../libraries/fc/libfc.a(websocket.cpp.o)' to global weak symbol ... means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.

> ld: warning: object file (/home/ubuntu/build/lib/lib/libcurl.a(libcurl_la-easy.o)) was built for newer OSX version (10.13) than being linked (10.9)

(^^ this is actually a bitshares-gitian issue, should be fixed by https://github.com/bitshares/bitshares-gitian/pull/66)

Target bitshares-core 6.0.0

>static_variant.hpp:91:13: warning: destructor called on non-final 'graphene::protocol::credit_offer_accept_operation' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
reinterpret_cast(data)->~T();
^

>/home/ubuntu/build/bitshares/libraries/fc/include/fc/static_variant.hpp:91:13: warning: destructor called on non-final 'graphene::custom_operations::account_storage_map' that has virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
reinterpret_cast(data)->~T();
^

and etc (see also #2501, fixed by #2566).

>/home/ubuntu/build/bitshares/libraries/chain/db_maint.cpp:530:27: warning: lambda capture 'witness_budget' is not used [-Wunused-lambda-capture]
modify(core, [&rec,&witness_budget,&worker_budget,&leftover_worker_funds,&dpo]
^
/home/ubuntu/build/bitshares/libraries/chain/db_maint.cpp:530:43: warning: lambda capture 'worker_budget' is not used [-Wunused-lambda-capture]
modify(core, [&rec,&witness_budget,&worker_budget,&leftover_worker_funds,&dpo]
^
/home/ubuntu/build/bitshares/libraries/chain/db_maint.cpp:530:58: warning: lambda capture 'leftover_worker_funds' is not used [-Wunused-lambda-capture]
modify(core, [&rec,&witness_budget,&worker_budget,&leftover_worker_funds,&dpo]
^
/home/ubuntu/build/bitshares/libraries/chain/db_maint.cpp:530:81: warning: lambda capture 'dpo' is not used [-Wunused-lambda-capture]
modify(core, [&rec,&witness_budget,&worker_budget,&leftover_worker_funds,&dpo]
^

(should be fixed by https://github.com/bitshares/bitshares-core/pull/2660)

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the macOS cross-builds for BitShares Core 5.1.0 and 6.0.0, then inspect libraries/fc/include/fc/static_variant.hpp and libraries/chain/db_maint.cpp alongside the referenced PRs #66, #2566, and #2660. Done means the reported compiler and linker warnings are resolved or explicitly verified as external to bitshares-core.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.