Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build fails: error: unknown type name 'DLContext' #307

Open
yurivict opened this issue Jul 17, 2024 · 1 comment
Open

Build fails: error: unknown type name 'DLContext' #307

yurivict opened this issue Jul 17, 2024 · 1 comment

Comments

@yurivict
Copy link

yurivict commented Jul 17, 2024

In file included from /usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/src/runtime/file_util.cc:7:
In file included from /usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/include/decord/runtime/serializer.h:12:
/usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/include/decord/runtime/c_runtime_api.h:115:9: error: unknown type name 'DLContext'
  115 | typedef DLContext DECORDContext;
      |         ^
In file included from /usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/src/runtime/file_util.cc:7:
In file included from /usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/include/decord/runtime/serializer.h:13:
/usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/include/decord/runtime/ndarray.h:144:31: error: unknown type name 'DLContext'
  144 |   inline NDArray CopyTo(const DLContext& ctx) const;
      |                               ^
/usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/include/decord/runtime/ndarray.h:188:32: error: unknown type name 'DLContext'
  188 |                                DLContext ctx);
      |                                ^
/usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/include/decord/runtime/ndarray.h:347:3: error: unknown type name 'DLContext'
  347 |   DLContext cpu_ctx;
      |   ^
/usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/include/decord/runtime/ndarray.h:350:7: error: no member named 'ctx' in 'DLTensor'
  350 |   dlt.ctx = cpu_ctx;
      |   ~~~ ^
/usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/include/decord/runtime/ndarray.h:413:38: error: unknown type name 'DLContext'
  413 | inline NDArray NDArray::CopyTo(const DLContext& ctx) const {
      |                                      ^
/usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/include/decord/runtime/ndarray.h:456:3: error: unknown type name 'DLContext'
  456 |   DLContext cpu_ctx;
      |   ^
/usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/include/decord/runtime/ndarray.h:473:15: error: no member named 'ctx' in 'DLTensor'
  473 |       tensor->ctx.device_type == kDLCPU &&
      |       ~~~~~~  ^
/usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/include/decord/runtime/ndarray.h:503:3: error: unknown type name 'DLContext'
  503 |   DLContext ctx;
      |   ^
In file included from /usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/src/runtime/file_util.cc:7:
/usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/include/decord/runtime/serializer.h:34:16: error: use of undeclared identifier 'DLContext'
   34 | struct Handler<DLContext> {
      |                ^
In file included from /usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/src/runtime/file_util.cc:11:
In file included from /usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/src/runtime/file_util.h:10:
In file included from /usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/src/runtime/meta_data.h:11:
/usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/include/decord/runtime/packed_func.h:451:3: error: conversion function cannot be redeclared
  451 |   operator DECORDContext() const {
      |   ^
/usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/include/decord/runtime/packed_func.h:418:3: note: previous definition is here
  418 |   operator int() const {
      |   ^
/usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/include/decord/runtime/packed_func.h:513:26: error: redeclaration of using declaration
  513 |   using DECORDPODValue_::operator DECORDContext;
      |         ~~~~~~~~~~~~~~~~~^
/usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/include/decord/runtime/packed_func.h:508:26: note: previous using declaration
  508 |   using DECORDPODValue_::operator int;
      |                          ^
/usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/include/decord/runtime/packed_func.h:607:26: error: redeclaration of using declaration
  607 |   using DECORDPODValue_::operator DECORDContext;
      |         ~~~~~~~~~~~~~~~~~^
/usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/include/decord/runtime/packed_func.h:603:26: note: previous using declaration
  603 |   using DECORDPODValue_::operator int;
      |                          ^
/usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/include/decord/runtime/packed_func.h:675:19: error: class member cannot be redeclared
  675 |   DECORDRetValue& operator=(DECORDContext value) {
      |                   ^
/usr/ports/multimedia/decord/work/decord-0.6.0-7-gd2e5619/include/decord/runtime/packed_func.h:670:19: note: previous definition is here
  670 |   DECORDRetValue& operator=(int value) {
      |                   ^

rev. d2e5619
Latest released dlpack-1.0.rc
clang-18
FreeBSD 14.1

@chenc29xpeng
Copy link

Hi, @yurivict Have you fixed it? I meet the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants