Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 922515 - dev-libs/dynolog-0.3.1_p20230126-r1 Compile failed - /var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126/./hbt/src/common/System.h:454:24: error: could not convert ‘std::make_pair<pair<long unsigned int, unsigned int>&, unsig
Summary: dev-libs/dynolog-0.3.1_p20230126-r1 Compile failed - /var/tmp/portage/dev-lib...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: riscv Linux
: Normal normal
Assignee: Tupone Alfredo
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-19 23:18 UTC by Andrew Cameron
Modified: 2024-01-23 19:49 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Build Log (build.log,71.26 KB, text/x-log)
2024-01-19 23:18 UTC, Andrew Cameron
Details
Info (info,8.03 KB, text/plain)
2024-01-19 23:19 UTC, Andrew Cameron
Details
Environment (environment,110.20 KB, text/plain)
2024-01-19 23:19 UTC, Andrew Cameron
Details
pqv log (pqv,277 bytes, text/plain)
2024-01-19 23:20 UTC, Andrew Cameron
Details
Riscv Patch (riscv.patch,535 bytes, patch)
2024-01-22 12:24 UTC, Andrew Cameron
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Cameron 2024-01-19 23:18:12 UTC
Created attachment 882662 [details]
Build Log

AILED: hbt/src/common/CMakeFiles/System.dir/System.cpp.o 
/usr/lib/ccache/bin/riscv64-unknown-linux-gnu-g++  -I/var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126/. -I/var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126/third_party/pfs/include -I/var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126 -I/var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126/third_party/fmt/include  -mabi=lp64d -march=rv64imafdc_zicsr_zba_zbb -mcpu=sifive-u74 -mtune=sifive-7-series -O2 -pipe -fomit-frame-pointer -pthread -std=gnu++17 -fPIC -Wconversion -MD -MT hbt/src/common/CMakeFiles/System.dir/System.cpp.o -MF hbt/src/common/CMakeFiles/System.dir/System.cpp.o.d -o hbt/src/common/CMakeFiles/System.dir/System.cpp.o -c /var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126/hbt/src/common/System.cpp
In file included from /var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126/hbt/src/common/System.cpp:6:
/var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126/./hbt/src/common/System.h: In function ‘std::pair<long unsigned int, unsigned int> facebook::hbt::rdtscp()’:
/var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126/./hbt/src/common/System.h:453:23: error: too many arguments to function ‘std::pair<long unsigned int, unsigned int> facebook::hbt::rdtscp()’
  453 |   auto tstamp = rdtscp(cpu_id);
      |                 ~~~~~~^~~~~~~~
/var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126/./hbt/src/common/System.h:451:36: note: declared here
  451 | inline std::pair<TimeStamp, CpuId> rdtscp() {
      |                                    ^~~~~~
/var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126/./hbt/src/common/System.h:454:24: error: could not convert ‘std::make_pair<pair<long unsigned int, unsigned int>&, unsigned int&>(tstamp, cpu_id)’ from ‘pair<std::pair<long unsigned int, unsigned int>,[...]>’ to ‘pair<long unsigned int,[...]>’
  454 |   return std::make_pair(tstamp, cpu_id);
      |          ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~
      |                        |
      |                        pair<std::pair<long unsigned int, unsigned int>,[...]>
In file included from /var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126/./hbt/src/common/System.h:9:
/var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126/./hbt/src/perf_event/json_events/generated/CpuArch.h: In function ‘std::ostream& facebook::hbt::perf_event::operator<<(std::ostream&, CpuFamily)’:
/var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126/./hbt/src/perf_event/json_events/generated/CpuArch.h:23:1: warning: control reaches end of non-void function [-Wreturn-type]
   23 | }
      | ^
[18/155] /usr/lib/ccache/bin/riscv64-unknown-linux-gnu-g++  -I/var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126/. -I/var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126/third_party/pfs/include -I/var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126 -I/var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126/third_party/fmt/include  -mabi=lp64d -march=rv64imafdc_zicsr_zba_zbb -mcpu=sifive-u74 -mtune=sifive-7-series -O2 -pipe -fomit-frame-pointer -pthread -std=gnu++17 -fPIC -MD -MT hbt/src/intel_pt/CMakeFiles/IptEventBuilder.dir/IptEventBuilder.cpp.o -MF hbt/src/intel_pt/CMakeFiles/IptEventBuilder.dir/IptEventBuilder.cpp.o.d -o hbt/src/intel_pt/CMakeFiles/IptEventBuilder.dir/IptEventBuilder.cpp.o -c /var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126/hbt/src/intel_pt/IptEventBuilder.cpp
FAILED: hbt/src/intel_pt/CMakeFiles/IptEventBuilder.dir/IptEventBuilder.cpp.o 
/usr/lib/ccache/bin/riscv64-unknown-linux-gnu-g++  -I/var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126/. -I/var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126/third_party/pfs/include -I/var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126 -I/var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126/third_party/fmt/include  -mabi=lp64d -march=rv64imafdc_zicsr_zba_zbb -mcpu=sifive-u74 -mtune=sifive-7-series -O2 -pipe -fomit-frame-pointer -pthread -std=gnu++17 -fPIC -MD -MT hbt/src/intel_pt/CMakeFiles/IptEventBuilder.dir/IptEventBuilder.cpp.o -MF hbt/src/intel_pt/CMakeFiles/IptEventBuilder.dir/IptEventBuilder.cpp.o.d -o hbt/src/intel_pt/CMakeFiles/IptEventBuilder.dir/IptEventBuilder.cpp.o -c /var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126/hbt/src/intel_pt/IptEventBuilder.cpp
In file included from /var/tmp/portage/dev-libs/dynolog-0.3.1_p20230126-r1/work/dynolog-0.3.1_p20230126/./hbt/src/intel_pt/IptEventBuilder.h:14,
Comment 1 Andrew Cameron 2024-01-19 23:19:03 UTC
Created attachment 882663 [details]
Info
Comment 2 Andrew Cameron 2024-01-19 23:19:32 UTC
Created attachment 882664 [details]
Environment
Comment 3 Andrew Cameron 2024-01-19 23:20:02 UTC
Created attachment 882665 [details]
pqv log
Comment 4 Tupone Alfredo gentoo-dev 2024-01-21 12:16:07 UTC
I'm not a riscv guy so I don't know how to fix

The build system does not find rdtscp.

The System.h file defines it on i386 x86_64 aarch64.

If you know how to fix it and prepare a patch, I will include it
Comment 5 Andrew Cameron 2024-01-22 12:24:00 UTC
Created attachment 882842 [details, diff]
Riscv Patch

Applying this Patch and adding -fpermissive to my Compile flags allowed me to emerge this package.
EG
CFLAGS="${CFLAGS} -fpermissive" 
CXXFLAGS="${CXXFLAGS} -fpermissive"
Comment 6 Andrew Cameron 2024-01-22 12:40:13 UTC
I have also created this issue
https://github.com/facebookincubator/dynolog/issues/215
Comment 7 Larry the Git Cow gentoo-dev 2024-01-23 19:49:48 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e0312de38c6fe743ecae9ed06c6309c9bf047dff

commit e0312de38c6fe743ecae9ed06c6309c9bf047dff
Author:     Alfredo Tupone <tupone@gentoo.org>
AuthorDate: 2024-01-23 19:48:25 +0000
Commit:     Alfredo Tupone <tupone@gentoo.org>
CommitDate: 2024-01-23 19:49:22 +0000

    dev-libs/dynolog: build on riscv
    
    Closes: https://bugs.gentoo.org/922515
    Signed-off-by: Alfredo Tupone <tupone@gentoo.org>

 dev-libs/dynolog/dynolog-0.3.1_p20230126-r1.ebuild     |  1 +
 .../dynolog/files/dynolog-0.3.1_p20230126-riscv.patch  | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+)