[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1071820: marked as done (blender:FTBFS:compile failed(error: cast from ‘void*’ to ‘CUdeviceptr’ loses precision))



Your message dated Fri, 26 Jul 2024 14:58:52 +0100
with message-id <ZqOrnC2wQQ4Vmzsa@aurel32.net>
and subject line Re: Bug#1071820: blender:FTBFS:compile failed(error: cast from ‘void*’ to ‘CUdeviceptr’ loses precision)
has caused the Debian Bug report #1071820,
regarding blender:FTBFS:compile failed(error: cast from ‘void*’ to ‘CUdeviceptr’ loses precision)
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
1071820: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1071820
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Source: blender
Version: 4.0.2+dfsg-1
Severity: important
Tags: FTBFS, patch
User: debian-riscv@lists.debian.org
Usertags: riscv64
X-Debbugs-Cc: debian-riscv@lists.debian.org

Dear llvmlite Maintainer,
The blender compile failed on riscv64 caused by losing precision when cast from ‘void*’ to ‘CUdeviceptr’.The crucial buildd log below:
```
/<<PKGBUILDDIR>>/intern/cycles/device/cuda/device_impl.cpp:528:25: error: cast from ‘void*’ to ‘CUdeviceptr’ {aka ‘unsigned int’} loses precision [-fpermissive]
  528 |   cuda_assert(cuMemFree((CUdeviceptr)device_pointer));
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~~
/<<PKGBUILDDIR>>/intern/cycles/device/../device/cuda/util.h:32:25: note: in definition of macro ‘cuda_device_assert’
   32 |       CUresult result = stmt; \
      |                         ^~~~
/<<PKGBUILDDIR>>/intern/cycles/device/cuda/device_impl.cpp:528:3: note: in expansion of macro ‘cuda_assert’
  528 |   cuda_assert(cuMemFree((CUdeviceptr)device_pointer));
      |   ^~~~~~~~~~~
/<<PKGBUILDDIR>>/intern/cycles/device/cuda/device_impl.cpp: In member function ‘virtual void ccl::CUDADevice::copy_host_to_device(void*, void*, size_t)’:
/<<PKGBUILDDIR>>/intern/cycles/device/cuda/device_impl.cpp:558:28: error: cast from ‘void*’ to ‘CUdeviceptr’ {aka ‘unsigned int’} loses precision [-fpermissive]
  558 |   cuda_assert(cuMemcpyHtoD((CUdeviceptr)device_pointer, host_pointer, size));
```
The full buildd log is here:
https://buildd.debian.org/status/fetch.php?pkg=blender&arch=riscv64&ver=4.0.2%2Bdfsg-1&stamp=1704028470&raw=0

 My solution to this issue:
Convert the problematic conversion code to a uintptr_t intermediate type.I have tested this modification in local ,and it works well.Please let me know wheather this patch can be accepted. The patch is in the attachment.
Gui-Yue
Best Regards

--- End Message ---
--- Begin Message ---
On 2024-05-25 14:11, Yue Gui wrote:
> Source: blender
> Version: 4.0.2+dfsg-1
> Severity: important
> Tags: FTBFS, patch
> User: debian-riscv@lists.debian.org
> Usertags: riscv64
> X-Debbugs-Cc: debian-riscv@lists.debian.org
> 
> Dear llvmlite Maintainer,
> The blender compile failed on riscv64 caused by losing precision when cast
> from ‘void*’ to ‘CUdeviceptr’.The crucial buildd log below:
> ```

blender now builds fine on riscv64. Closing the bug.

Regards
Aurelien

-- 
Aurelien Jarno                          GPG: 4096R/1DDD8C9B
aurelien@aurel32.net                     http://aurel32.net

--- End Message ---

Reply to: