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

how to compile python-fcl wheel from source? #67

Open
jacky-ch93 opened this issue Jul 25, 2023 · 1 comment
Open

how to compile python-fcl wheel from source? #67

jacky-ch93 opened this issue Jul 25, 2023 · 1 comment

Comments

@jacky-ch93
Copy link

jacky-ch93 commented Jul 25, 2023

@mikedh
Hi, I want to compile python-fcl on windows, but failed. I do not know how to compile this wheel successfully? Thanks!
and It also failed by using the dockerfile or compiling on linux
step as blew:

  1. powershell .\build_dependencies\install_windows.ps1
  2. cd python-fcl
  3. pip wheel ./ --no-deps -w wheelhouse/

get the errro

Processing d:\works\basic_lib\python-fcl
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [105 lines of output]

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
              return list(self.objs)

          def collide(self, *args):
              if len(args) == 2 and inspect.isroutine(args[1]):
                  fn = CollisionFunction(args[1], args[0])
                  self.thisptr.collide(<void*> fn, CollisionCallBack)
                                                   ^
      ------------------------------------------------------------

      src\fcl\fcl.pyx:529:45: Cannot assign type 'bool (CollisionObjectd *, CollisionObjectd *, void *) except? -1' to 'CollisionCallBack'

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
              if len(args) == 2 and inspect.isroutine(args[1]):
                  fn = CollisionFunction(args[1], args[0])
                  self.thisptr.collide(<void*> fn, CollisionCallBack)
              elif len(args) == 3 and isinstance(args[0], DynamicAABBTreeCollisionManager):
                  fn = CollisionFunction(args[2], args[1])
                  self.thisptr.collide((<DynamicAABBTreeCollisionManager?> args[0]).thisptr, <void*> fn, CollisionCallBack)
                                      ^
      ------------------------------------------------------------

      src\fcl\fcl.pyx:532:32: no suitable method found

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
              elif len(args) == 3 and isinstance(args[0], DynamicAABBTreeCollisionManager):
                  fn = CollisionFunction(args[2], args[1])
                  self.thisptr.collide((<DynamicAABBTreeCollisionManager?> args[0]).thisptr, <void*> fn, CollisionCallBack)
              elif len(args) == 3 and inspect.isroutine(args[2]):
                  fn = CollisionFunction(args[2], args[1])
                  self.thisptr.collide((<CollisionObject?> args[0]).thisptr, <void*> fn, CollisionCallBack)
                                      ^
      ------------------------------------------------------------

      src\fcl\fcl.pyx:535:32: no suitable method found

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
                  raise ValueError

          def distance(self, *args):
              if len(args) == 2 and inspect.isroutine(args[1]):
                  fn = DistanceFunction(args[1], args[0])
                  self.thisptr.distance(<void*> fn, DistanceCallBack)
                                                    ^
      ------------------------------------------------------------

      src\fcl\fcl.pyx:542:46: Cannot assign type 'bool (CollisionObjectd *, CollisionObjectd *, void *, double &) except? -1' to 'DistanceCallBack'

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
              if len(args) == 2 and inspect.isroutine(args[1]):
                  fn = DistanceFunction(args[1], args[0])
                  self.thisptr.distance(<void*> fn, DistanceCallBack)
              elif len(args) == 3 and isinstance(args[0], DynamicAABBTreeCollisionManager):
                  fn = DistanceFunction(args[2], args[1])
                  self.thisptr.distance((<DynamicAABBTreeCollisionManager?> args[0]).thisptr, <void*> fn, DistanceCallBack)
                                       ^
      ------------------------------------------------------------

      src\fcl\fcl.pyx:545:33: no suitable method found

      Error compiling Cython file:
      ------------------------------------------------------------
      ...
              elif len(args) == 3 and isinstance(args[0], DynamicAABBTreeCollisionManager):
                  fn = DistanceFunction(args[2], args[1])
                  self.thisptr.distance((<DynamicAABBTreeCollisionManager?> args[0]).thisptr, <void*> fn, DistanceCallBack)
              elif len(args) == 3 and inspect.isroutine(args[2]):
                  fn = DistanceFunction(args[2], args[1])
                  self.thisptr.distance((<CollisionObject?> args[0]).thisptr, <void*> fn, DistanceCallBack)
                                       ^
      ------------------------------------------------------------

      src\fcl\fcl.pyx:548:33: no suitable method found
@HiroIshida
Copy link

I'm not 100% sure, but recent relase of cython version 3 seem to be the cause.
Try pip3 install "cython<3.0" and compile again.
At lease in my environment (aarch64, ubuntu20.04), the compilation fail with cython>=3.0 but successes with cython<3.0

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