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

policy platform.longpaths has no effect when setting up existing git repository #4905

Closed
xq114 opened this issue Mar 31, 2024 · 5 comments
Closed
Labels
Milestone

Comments

@xq114
Copy link
Contributor

xq114 commented Mar 31, 2024

Xmake 版本

2.8.9

操作系统版本和架构

Windows 11

描述问题

package中写

set_policy("platform.longpaths", true)

仅在git clone时生效;对于已经clone下来的repo,执行git -c core.fsmonitor=false submodule foreach --recursive git reset --hard仍然会失败

期待的结果

进行git 其他操作的时候也设置上longpaths

工程配置

任意longpath的library,测试安装时取消,再运行一遍xmake l scripts/test.lua -v -D --shallow amgx

附加信息和错误日志

> xmake l scripts/test.lua -v -D --shallow amgx
{ 
  "amgx" 
}

C:\Users\xq114\AppData\Local\Temp\.xmake\240331\xmake-repo\test
add local repository(local-repo): C:\Users\xq114\Projects\xmake-repo ok!
local repositories:
    local-repo C:\Users\xq114\Projects\xmake-repo 

global repositories:
    build-artifacts https://gitee.com/xmake-mirror/build-artifacts.git main 
    xmake-repo https://gitee.com/tboox/xmake-repo.git master 
    builtin-repo C:\Users\xq114\xmake\repository 

4 repositories were found!
checking for platform ... windows
checking for architecture ... x64
checking for cl.exe ... C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64\cl.exe
checking for Microsoft Visual Studio (x64) version ... 2022
checking for Microsoft C/C++ Compiler (x64) version ... 19.39.33522
checkinfo: cannot runv(zig.exe version), No such file or directory
checking for zig ... no
checkinfo: cannot runv(zig.exe version), No such file or directory
checking for zig ... no
checkinfo: cannot runv(nim.exe --version), No such file or directory
checking for nim ... no
checkinfo: cannot runv(nim.exe --version), No such file or directory
checking for nim ... no
checking for link.exe ... C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64\link.exe
checking for the linker (ld) ... link.exe
configure
{
    arch = x64
    ndk_stdcxx = true
    kind = static
    host = windows
    mode = release
    clean = true
    plat = windows
    vs = 2022
    theme = default
    ccache = true
    network = public
    buildir = build
    pkg_searchdirs = C:\Users\xq114\Downloads
    proxy_pac = pac.lua
}
checkinfo: cannot runv(unzip.exe -v), No such file or directory
checking for unzip ... no
checking for 7z ... C:\Users\xq114\xmake\winenv\bin\7z
checking for git ... ok
checkinfo: cannot runv(gzip.exe --version), No such file or directory
checking for gzip ... no
git rev-parse HEAD
checking for cl.exe ... C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64\cl.exe
checking for the c compiler (cc) ... cl.exe
checking for cl.exe ... C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX64\x64\cl.exe
checking for the c++ compiler (cxx) ... cl.exe
checking for Cuda SDK directory ... C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v12.2
checking for cmake ... no
checking for Microsoft Visual Studio (x64) version ... 2022
checking for cmake ... no
checking for cmake ... no
checkinfo: cannot runv(cmake.exe --version), No such file or directory
checking for cmake ... no
checking for cmake ... C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\IDE\CommonExtensions\Microsoft\CMake\CMake\bin\cmake
checking for local-repo::openmp ... openmp 
checking for local-repo::cuda ... cuda 
checking for ping ... ok
pinging the host(github.com) ... 69 ms
git -c core.fsmonitor=false clean -d -f -x
git -c core.fsmonitor=false reset --hard
HEAD is now at 2b4762f Fix final set of warnings ready for v2.4.0 (#274)
git -c core.fsmonitor=false submodule foreach --recursive git clean -d -f -x
Entering 'thrust'
Entering 'thrust/dependencies/cub'
Entering 'thrust/dependencies/libcudacxx'
git -c core.fsmonitor=false submodule foreach --recursive git reset --hard
Entering 'thrust'
HEAD is now at 3cd56842 Add 2.0.1 and 2.1.0 changelogs.
Entering 'thrust/dependencies/cub'
HEAD is now at 48b55589 Add 2.0.1 and 2.1.0 changelogs.
Entering 'thrust/dependencies/libcudacxx'
error: unable to create file docker/host_aarch64/ubuntu_18.04/target_aarch64/ubuntu_18.04/gcc_7/cxx_11/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long
error: unable to create file docker/host_aarch64/ubuntu_18.04/target_aarch64/ubuntu_18.04/gcc_7/cxx_14/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long
error: unable to create file docker/host_aarch64/ubuntu_18.04/target_aarch64/ubuntu_18.04/gcc_8/cxx_11/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long
error: unable to create file docker/host_aarch64/ubuntu_18.04/target_aarch64/ubuntu_18.04/gcc_8/cxx_14/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long
error: unable to create file docker/host_aarch64/ubuntu_18.04/target_aarch64/ubuntu_18.04/gcc_8/cxx_17/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long
error: unable to create file docker/host_x86_64/centos_7.6.1810/target_x86_64/centos_7.6.1810/gcc_4.8/cxx_11/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long   
error: unable to create file docker/host_x86_64/ubuntu_18.04/target_x86_64/ubuntu_18.04/clang_10/cxx_11/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long        
error: unable to create file docker/host_x86_64/ubuntu_18.04/target_x86_64/ubuntu_18.04/clang_10/cxx_14/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long        
error: unable to create file docker/host_x86_64/ubuntu_18.04/target_x86_64/ubuntu_18.04/clang_10/cxx_17/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long        
error: unable to create file docker/host_x86_64/ubuntu_18.04/target_x86_64/ubuntu_18.04/clang_6/cxx_11/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long
error: unable to create file docker/host_x86_64/ubuntu_18.04/target_x86_64/ubuntu_18.04/clang_6/cxx_14/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long
error: unable to create file docker/host_x86_64/ubuntu_18.04/target_x86_64/ubuntu_18.04/clang_7/cxx_11/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long
error: unable to create file docker/host_x86_64/ubuntu_18.04/target_x86_64/ubuntu_18.04/clang_7/cxx_14/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long
error: unable to create file docker/host_x86_64/ubuntu_18.04/target_x86_64/ubuntu_18.04/clang_8/cxx_11/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long
error: unable to create file docker/host_x86_64/ubuntu_18.04/target_x86_64/ubuntu_18.04/clang_8/cxx_14/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long
error: unable to create file docker/host_x86_64/ubuntu_18.04/target_x86_64/ubuntu_18.04/clang_8/cxx_17/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long
error: unable to create file docker/host_x86_64/ubuntu_18.04/target_x86_64/ubuntu_18.04/clang_9/cxx_11/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long
error: unable to create file docker/host_x86_64/ubuntu_18.04/target_x86_64/ubuntu_18.04/clang_9/cxx_14/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long
error: unable to create file docker/host_x86_64/ubuntu_18.04/target_x86_64/ubuntu_18.04/clang_9/cxx_17/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long
error: unable to create file docker/host_x86_64/ubuntu_20.04/target_x86_64/ubuntu_20.04/clang_11/cxx_11/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long        
error: unable to create file docker/host_x86_64/ubuntu_20.04/target_x86_64/ubuntu_20.04/clang_11/cxx_14/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long        
error: unable to create file docker/host_x86_64/ubuntu_20.04/target_x86_64/ubuntu_20.04/clang_11/cxx_17/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long        
error: unable to create file docker/host_x86_64/ubuntu_20.04/target_x86_64/ubuntu_20.04/clang_12/cxx_11/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long        
error: unable to create file docker/host_x86_64/ubuntu_20.04/target_x86_64/ubuntu_20.04/clang_12/cxx_14/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long        
error: unable to create file docker/host_x86_64/ubuntu_20.04/target_x86_64/ubuntu_20.04/clang_12/cxx_17/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long        
error: unable to create file docker/host_x86_64/ubuntu_21.10/target_x86_64/ubuntu_21.10/clang_13/cxx_11/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long        
error: unable to create file docker/host_x86_64/ubuntu_21.10/target_x86_64/ubuntu_21.10/clang_13/cxx_14/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long        
error: unable to create file docker/host_x86_64/ubuntu_21.10/target_x86_64/ubuntu_21.10/clang_13/cxx_17/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long        
error: unable to create file docker/host_x86_64/ubuntu_21.10/target_x86_64/ubuntu_21.10/clang_13/cxx_20/import_base_docker_image_and_attach_cuda_driver_and_run_docker_image.bash: Filename too long        
error: unable to create file libcxx/test/std/experimental/memory/memory.polymorphic.allocator.class/memory.polymorphic.allocator.mem/select_on_container_copy_construction.pass.cpp: Filename too long      
error: unable to create file libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/assign_convertible_propagate_const.pass.cpp: Filename too long
error: unable to create file libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.assignment/move_assign_convertible_propagate_const.pass.cpp: Filename too long    
error: unable to create file libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_element_type.non-explicit.ctor.pass.cpp: Filename too long      
error: unable to create file libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.ctors/convertible_propagate_const.explicit.move_ctor.pass.cpp: Filename too long  
error: unable to create file libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.non-const_observers/explicit_operator_element_type_ptr.pass.cpp: Filename too long
error: unable to create file libcxx/test/std/experimental/utilities/propagate_const/propagate_const.class/propagate_const.non-const_observers/operator_element_type_ptr.pass.cpp: Filename too long
error: unable to create file libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/greater_equal.pass.cpp: Filename too long        
error: unable to create file libcxx/test/std/experimental/utilities/propagate_const/propagate_const.nonmembers/propagate_const.comparison_function_objects/not_equal_to.pass.cpp: Filename too long
error: unable to create file libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/lock_shared.pass.cpp: Filename too long       
error: unable to create file libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_for.pass.cpp: Filename too long      
error: unable to create file libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared.pass.cpp: Filename too long   
error: unable to create file libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared_for.pass.cpp: Filename too long
error: unable to create file libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_shared_until.pass.cpp: Filename too long
error: unable to create file libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_until.pass.cpp: Filename too long    
error: unable to create file libcxx/test/std/thread/thread.mutex/thread.mutex.requirements/thread.sharedtimedmutex.requirements/thread.sharedtimedmutex.class/try_lock_until_deadlock_bug.pass.cpp: Filename too long
fatal: Could not reset index file to revision 'HEAD'.
fatal: run_command returned non-zero status for thrust/dependencies/libcudacxx
.
fatal: run_command returned non-zero status while recursing in the nested submodules of thrust
.
error: @programdir\core\sandbox\modules\os.lua:378: execv(git -c core.fsmonitor=false submodule foreach --recursive git reset --hard) failed(128)
stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:957]:
    [@programdir\core\sandbox\modules\os.lua:378]:
    [@programdir\core\sandbox\modules\os.lua:291]: in function 'vrunv'
    [@programdir\modules\devel\git\submodule\reset.lua:83]:
    [...modules\private\action\require\impl\actions\download.lua:53]: in function '_checkout'
    [...modules\private\action\require\impl\actions\download.lua:342]:

  => clone https://github.com/NVIDIA/AMGX.git v2.4.0 .. failed

we can also download these packages manually:
  - https://github.com/NVIDIA/AMGX.git
to the local search directories: C:\Users\xq114\Downloads
  - amgx, AMGX
and we can run `xmake g --pkg_searchdirs=/xxx` to set the search directories.
error: @programdir\core\main.lua:329: @programdir\modules\async\runjobs.lua:338: ...modules\private\action\require\impl\actions\download.lua:399: 
stack traceback:
    [C]: in function 'error'
    [@programdir\core\base\os.lua:957]:
    [...modules\private\action\require\impl\actions\download.lua:399]: in function 'catch'
    [@programdir\core\sandbox\modules\try.lua:123]: in function 'try'
    [...modules\private\action\require\impl\actions\download.lua:319]:
    [...modules\private\action\require\impl\install_packages.lua:480]: in function 'jobfunc'
    [@programdir\modules\async\runjobs.lua:256]:

stack traceback:
        [C]: in function 'error'
        @programdir\core\base\os.lua:957: in function 'os.raiselevel'
        (...tail calls...)
        @programdir\core\main.lua:329: in upvalue 'cotask'
        @programdir\core\base\scheduler.lua:406: in function <@programdir\core\base\scheduler.lua:399>
error: execv(xmake require -f -y --build -v -D --shallow --extra={configs={shared=false}} amgx) failed(-1)
@waruqi
Copy link
Member

waruqi commented Mar 31, 2024

再试试,#4909

@waruqi waruqi added this to the v2.9.1 milestone Mar 31, 2024
waruqi added a commit that referenced this issue Apr 1, 2024
enable longpaths for submodule/reset #4905
@xq114
Copy link
Contributor Author

xq114 commented Apr 1, 2024

0a6b495
这里为什么不直接加到前面参数-c里?不用设置全局的

git -c core.longpaths=true submodule foreach --recursive git reset --hard

本地这么写是ok的

@waruqi
Copy link
Member

waruqi commented Apr 1, 2024

忘记当初为啥这么弄了,回头试下

@Issues-translate-bot
Copy link

Bot detected the issue body's language is not English, translate it automatically.


I forgot why I did it in the first place, I’ll try it again.

@waruqi
Copy link
Member

waruqi commented Apr 9, 2024

我改了,再试试 #4953

@waruqi waruqi closed this as completed Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants