https://redmine.named-data.net/https://redmine.named-data.net/favicon.ico?14759811232017-02-28T18:53:20ZNDN project issue tracking systemndn-cxx - Bug #3982: Linker error when using NDN_LOG_*https://redmine.named-data.net/issues/3982?journal_id=184772017-02-28T18:53:20ZDavide Pesavento
<ul></ul><p>We did have <code>-DBOOST_LOG_DYN_LINK</code> in the .pc file in the hackathon project, but during the code review to integrate that code in the official ndn-cxx, Alex was against adding the define and it was removed. He said he preferred to add it to <code>ndn-cxx-config.hpp</code>, but didn't explain why. I believe the .pc file is the correct place for this.</p>
ndn-cxx - Bug #3982: Linker error when using NDN_LOG_*https://redmine.named-data.net/issues/3982?journal_id=184822017-03-01T12:51:16ZJunxiao Shi
<ul></ul><blockquote>
<p>add it to <code>ndn-cxx-config.hpp</code></p>
</blockquote>
<p>Adding <code>-DBOOST_LOG_DYN_LINK</code> to ndn-cxx-config.hpp is as good as adding it to .pc. Either way can fix this bug.</p>
ndn-cxx - Bug #3982: Linker error when using NDN_LOG_*https://redmine.named-data.net/issues/3982?journal_id=184962017-03-01T16:02:56ZDavide Pesavento
<ul></ul><p>Junxiao Shi wrote:</p>
<blockquote>
<p>Adding <code>-DBOOST_LOG_DYN_LINK</code> to ndn-cxx-config.hpp is a good as adding it to .pc. Either way can fix this bug.</p>
</blockquote>
<p>No, it's not the same thing. If the define is in ndn-cxx-config.hpp, third-party code needs to ensure that ndn-cxx-config.hpp is (indirectly) included before any Boost.Log headers. The .pc file doesn't have this shortcoming.</p>
ndn-cxx - Bug #3982: Linker error when using NDN_LOG_*https://redmine.named-data.net/issues/3982?journal_id=184992017-03-01T18:29:30ZJunxiao Shi
<ul></ul><blockquote>
<p>third-party code needs to ensure that ndn-cxx-config.hpp is (indirectly) included before any Boost.Log headers</p>
</blockquote>
<p>Third party code is not supposed to both directly use Boost.Log and use ndn-cxx logging. See <a class="issue tracker-1 status-5 priority-2 priority-default closed" title="Bug: Logging facility conflicts with app using Boost.Log (Closed)" href="https://redmine.named-data.net/issues/3782">#3782</a>.</p>
ndn-cxx - Bug #3982: Linker error when using NDN_LOG_*https://redmine.named-data.net/issues/3982?journal_id=185032017-03-01T19:20:00ZAlex Afanasyev
<ul></ul><p>Davide Pesavento wrote:</p>
<blockquote>
<p>Junxiao Shi wrote:</p>
<blockquote>
<p>Adding <code>-DBOOST_LOG_DYN_LINK</code> to ndn-cxx-config.hpp is a good as adding it to .pc. Either way can fix this bug.</p>
</blockquote>
<p>No, it's not the same thing. If the define is in ndn-cxx-config.hpp, third-party code needs to ensure that ndn-cxx-config.hpp is (indirectly) included before any Boost.Log headers. The .pc file doesn't have this shortcoming.</p>
</blockquote>
<p>I still don't agree with putting it in <code>.pc</code> file. The reason for the error is because code explicitly requires ndn-cxx log routines to be used. Which implies that all necessary elements should have been included (ndn-cxx-common.hpp) as part of that. Putting define in <code>.pc</code> precludes app from using Boost.Log in whatever other way the app wants to use Boost.Log.</p>
ndn-cxx - Bug #3982: Linker error when using NDN_LOG_*https://redmine.named-data.net/issues/3982?journal_id=185042017-03-01T20:37:27ZDavide Pesavento
<ul></ul><p>Alex Afanasyev wrote:</p>
<blockquote>
<p>Putting define in <code>.pc</code> precludes app from using Boost.Log in whatever other way the app wants to use Boost.Log.</p>
</blockquote>
<p>What does that mean? Why does the define preclude that?</p>
<p><code>-DBOOST_LOG_DYN_LINK</code> simply means "use dynamic linking", it doesn't change how the application uses the Boost.Log library.</p>
ndn-cxx - Bug #3982: Linker error when using NDN_LOG_*https://redmine.named-data.net/issues/3982?journal_id=198862017-07-14T07:44:14ZJunxiao Shi
<ul></ul><blockquote>
<p>third-party code needs to ensure that ndn-cxx-config.hpp is (indirectly) included before any Boost.Log headers</p>
</blockquote>
<p>... and that is a violation of rule 3.4 which requires "low level" Boost includes to appear before any ndn-cxx includes. Thus, pkg-config is the only way.</p>
ndn-cxx - Bug #3982: Linker error when using NDN_LOG_*https://redmine.named-data.net/issues/3982?journal_id=227882018-03-26T22:24:28ZDavide Pesavento
<ul><li><strong>Target version</strong> changed from <i>v0.6</i> to <i>v0.7</i></li><li><strong>Start date</strong> deleted (<del><i>02/28/2017</i></del>)</li></ul> ndn-cxx - Bug #3982: Linker error when using NDN_LOG_*https://redmine.named-data.net/issues/3982?journal_id=247082019-02-10T13:40:39ZAlex Afanasyev
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/24708/diff?detail_id=21758">diff</a>)</li></ul> ndn-cxx - Bug #3982: Linker error when using NDN_LOG_*https://redmine.named-data.net/issues/3982?journal_id=247092019-02-10T13:41:51ZAlex Afanasyev
<ul><li><strong>Assignee</strong> set to <i>Alex Afanasyev</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul> ndn-cxx - Bug #3982: Linker error when using NDN_LOG_*https://redmine.named-data.net/issues/3982?journal_id=247102019-02-10T13:41:57ZAlex Afanasyev
<ul><li><strong>Status</strong> changed from <i>New</i> to <i>Code review</i></li></ul> ndn-cxx - Bug #3982: Linker error when using NDN_LOG_*https://redmine.named-data.net/issues/3982?journal_id=247952019-02-14T22:40:44ZDavide Pesavento
<ul><li><strong>Status</strong> changed from <i>Code review</i> to <i>Closed</i></li></ul>