<?xml version="1.0" encoding="UTF-8" ?>

<bugzilla version="5.2"
          urlbase="https://bugzilla.altlinux.org/"
          
          maintainer="jenya@basealt.ru"
>

    <bug>
          <bug_id>37969</bug_id>
          
          <creation_ts>2020-01-30 14:27:31 +0300</creation_ts>
          <short_desc>spdlog/fmt/bundled/core.h missing after upgrade to 1.5.0</short_desc>
          <delta_ts>2020-01-31 16:37:36 +0300</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>4</classification_id>
          <classification>Development</classification>
          <product>Sisyphus</product>
          <component>libspdlog-devel</component>
          <version>unstable</version>
          <rep_platform>all</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>CLOSED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Andrew Vasilyev">andy</reporter>
          <assigned_to name="Vitaly Lipatov">lav</assigned_to>
          <cc>andy</cc>
    
    <cc>antohami</cc>
    
    <cc>grenka</cc>
    
    <cc>lav</cc>
    
    <cc>nenderus</cc>
          
          <qa_contact>qa-sisyphus</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>187359</commentid>
    <comment_count>0</comment_count>
    <who name="Andrew Vasilyev">andy</who>
    <bug_when>2020-01-30 14:27:31 +0300</bug_when>
    <thetext>In spdlog 1.3.1:

apt-file spdlog/fmt/bundled/core.h
libspdlog-devel: /usr/include/spdlog/fmt/bundled/core.h

In spdlog 1.5.0:

rpm -ql libspdlog-devel-1.5.0-alt1 | fgrep /fmt/ 
/usr/include/spdlog/fmt/bin_to_hex.h
/usr/include/spdlog/fmt/fmt.h
/usr/include/spdlog/fmt/ostr.h

No spdlog/fmt/bundled/ directory at all.

But in 1.5.0 source tree it still exists:

[spdlog.git] / spdlog / include / spdlog / fmt / bundled /
drwxr-xr-x	 	..	
-rw-r--r--	1408	LICENSE.rst	blob | history | raw
-rw-r--r--	34870	chrono.h	blob | history | raw
-rw-r--r--	22421	color.h	blob | history | raw
-rw-r--r--	19797	compile.h	blob | history | raw
-rw-r--r--	50302	core.h	blob | history | raw
-rw-r--r--	50189	format-inl.h	blob | history | raw
-rw-r--r--	116422	format.h	blob | history | raw
-rw-r--r--	2870	locale.h	blob | history | raw
-rw-r--r--	4607	ostream.h	blob | history | raw
-rw-r--r--	9025	posix.h	blob | history | raw
-rw-r--r--	21679	printf.h	blob | history | raw
-rw-r--r--	11858	ranges.h	blob | history | raw</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187365</commentid>
    <comment_count>1</comment_count>
    <who name="Andrew Vasilyev">andy</who>
    <bug_when>2020-01-30 16:08:14 +0300</bug_when>
    <thetext>This is due to the following addition in spec:

-%cmake
+%cmake -DSPDLOG_BUILD_SHARED=ON \
+       -DSPDLOG_FMT_EXTERNAL=ON

Is there real need for having SPDLOG_FMT_EXTERNAL=ON ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187371</commentid>
    <comment_count>2</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2020-01-30 20:44:44 +0300</bug_when>
    <thetext>Опишите, в чём проблема у вас при сборке с новой версией spdlog.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187373</commentid>
    <comment_count>3</comment_count>
    <who name="Andrew Vasilyev">andy</who>
    <bug_when>2020-01-30 20:54:55 +0300</bug_when>
    <thetext>As a result the building of lizardfs failed with the following error:

make[2]: Entering directory &apos;/usr/src/RPM/BUILD/lizardfs-3.13.0/BUILD&apos;
[  0%] Building CXX object src/protocol/CMakeFiles/lzfsprotocol.dir/packet.cc.o
In file included from /usr/include/spdlog/common.h:38,
                 from /usr/include/spdlog/spdlog.h:12,
                 from /usr/src/RPM/BUILD/lizardfs-3.13.0/src/common/slogger.h:29,
                 from /usr/src/RPM/BUILD/lizardfs-3.13.0/src/common/massert.h:28,
                 from /usr/src/RPM/BUILD/lizardfs-3.13.0/src/common/serialization.h:37,
                 from /usr/src/RPM/BUILD/lizardfs-3.13.0/src/protocol/packet.h:28,
                 from /usr/src/RPM/BUILD/lizardfs-3.13.0/src/protocol/packet.cc:20:
/usr/include/spdlog/fmt/fmt.h:22:10: fatal error: spdlog/fmt/bundled/core.h: No such file or directory
   22 | #include &lt;spdlog/fmt/bundled/core.h&gt;
      |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/protocol/CMakeFiles/lzfsprotocol.dir/build.make:63: src/protocol/CMakeFiles/lzfsprotocol.dir/packet.cc.o] Error 1

  From /usr/include/spdlog/fmt/fmt.h: 
  
#if !defined(SPDLOG_FMT_EXTERNAL)
#ifdef SPDLOG_HEADER_ONLY
#ifndef FMT_HEADER_ONLY
#define FMT_HEADER_ONLY
#endif
#endif
#ifndef FMT_USE_WINDOWS_H
#define FMT_USE_WINDOWS_H 0
#endif
#include &lt;spdlog/fmt/bundled/core.h&gt;
#include &lt;spdlog/fmt/bundled/format.h&gt;
#else // SPDLOG_FMT_EXTERNAL is defined - use external fmtlib
#include &lt;fmt/core.h&gt;
#include &lt;fmt/format.h&gt;
#endif

  The problem caused by missed definition of macros SPDLOG_FMT_EXTERNAL, which should be probably defined in libspdlog-devel includes when built with external libfmt. 

  There is /usr/include/spdlog/tweakme.h with SPDLOG_FMT_EXTERNAL comment out.

  If define SPDLOG_FMT_EXTERNAL while building lizardfs, the compilation succeeds. But it is not the right solution, isn&apos;t it?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187377</commentid>
    <comment_count>4</comment_count>
    <who name="Vitaly Lipatov">lav</who>
    <bug_when>2020-01-30 22:11:36 +0300</bug_when>
    <thetext>(Ответ для Andrew Vasilyev на комментарий #3)
...
&gt;   There is /usr/include/spdlog/tweakme.h with SPDLOG_FMT_EXTERNAL comment
&gt; out.
&gt; 
&gt;   If define SPDLOG_FMT_EXTERNAL while building lizardfs, the compilation
&gt; succeeds. But it is not the right solution, isn&apos;t it?
Хорошо, я проверяю, чтобы этот макрос был раскомментирован в пакете.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187379</commentid>
    <comment_count>5</comment_count>
    <who name="Repository Robot">repository-robot</who>
    <bug_when>2020-01-30 23:20:10 +0300</bug_when>
    <thetext>spdlog-1.5.0-alt2 -&gt; sisyphus:

 Thu Jan 30 2020 Vitaly Lipatov &lt;lav@altlinux.ru&gt; 1.5.0-alt2
 - patch tweakme.h to use external libfmt for the library clients (ALT bug 37969)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>187398</commentid>
    <comment_count>6</comment_count>
    <who name="Andrew Vasilyev">andy</who>
    <bug_when>2020-01-31 16:37:36 +0300</bug_when>
    <thetext>  Спасибо!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>