vacu9708 commented on PR #17808:
URL: https://github.com/apache/tvm/pull/17808#issuecomment-2792335964

   @mshr-h Thank you for your analysis.
   Based on your report, **I checked :**
   - The problematic "python/tvm/libtvm_runtime.so" and "python/tvm/libtvm.so" 
are appended at line 146 and 147 in libinfo.py.
       - Appending these paths seems like a an unintended behavior because it 
is libraries from "build/" that should be used for installation, not libraries 
from "python/tvm/".
       - As a result, "lib_path" at line 50 in setup.py contains 
['python/tvm/libtvm.so', 'build/libtvm.so', 'python/tvm/libtvm_runtime.so', 
'build/libtvm_runtime.so']
       - The library choice logic in get_lib_path() chooses elements that 
appear earlier from the library list. Here problematic libraries in python/tvm 
are chosen.
   
   **In my opinion**
   - It looks more valid to just prevent the unintended libraries from being 
appended to the library list, instead of changing the order of being appended 
to the library list as you proposed.
       - This will resolve the shutil.SameFileError exception that 
shutil.copy() raises.
   - Adding the cleanup logic earlier in case it is not executed due to a 
previous installation failure also looks valid to me
       - This will resolve the FileExistsErroexception that shutil.copytree() 
raises.
   
   Would these two changes be valid to resolve the issue?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to