Skip to content
This repository was archived by the owner on Dec 30, 2025. It is now read-only.
This repository was archived by the owner on Dec 30, 2025. It is now read-only.

broken git clone with MSYS2 in Windows #18

@pedrolcl

Description

@pedrolcl

If you try to clone this sonivox repository in Windows using the MSYS2 provided git program, you may end with a corrupted working copy.

$ git clone -b devel https://github.com/pedrolcl/sonivox.git sonivox-devel-bad
Cloning into 'sonivox-devel-bad'...
remote: Enumerating objects: 4546, done.
remote: Counting objects: 100% (517/517), done.
remote: Compressing objects: 100% (228/228), done.
remote: Total 4546 (delta 368), reused 333 (delta 269), pack-reused 4029
Receiving objects: 100% (4546/4546), 17.70 MiB | 27.93 MiB/s, done.
Resolving deltas: 100% (2386/2386), done.
Updating files: 100% (268/268), done.

When building the project, you may see errors like this:

[1/2] Building CXX object CMakeFiles/SonivoxTest.dir/test/SonivoxTest.cpp.obj
FAILED: CMakeFiles/SonivoxTest.dir/test/SonivoxTest.cpp.obj 
D:\msys64\mingw64\bin\c++.exe  -ID:/Desktop/sonivox-devel/build -ID:/Desktop/sonivox-devel/arm-wt-22k/include -ID:/Desktop/sonivox-devel/fakes -ID:/Desktop/sonivox-devel/arm-wt-22k/include/libsonivox -ID:/Desktop/sonivox-devel/build/libsonivox -isystem D:/Desktop/sonivox-devel/build/_deps/googletest-src/googletest/include -isystem D:/Desktop/sonivox-devel/build/_deps/googletest-src/googletest -std=gnu++14 -MD -MT CMakeFiles/SonivoxTest.dir/test/SonivoxTest.cpp.obj -MF CMakeFiles\SonivoxTest.dir\test\SonivoxTest.cpp.obj.d -o CMakeFiles/SonivoxTest.dir/test/SonivoxTest.cpp.obj -c D:/Desktop/sonivox-devel/test/SonivoxTest.cpp
In file included from D:/Desktop/sonivox-devel/build/libsonivox/eas.h:38,
                 from D:/Desktop/sonivox-devel/test/SonivoxTest.cpp:25:
D:/Desktop/sonivox-devel/arm-wt-22k/include/libsonivox/eas_types.h:1:1: error: expected unqualified-id before '.' token
    1 | ../../host_src/eas_types.h
      | ^

This is what you get, instead of the repository content:

https://github.com/pedrolcl/sonivox/tree/devel/arm-wt-22k/include/libsonivox

imagen

The files in the include subdirectory should be symlinks. Instead, they are regular files that contain a single line with the relative path to the destination. Also, the type is "C++ header file" and the size is 1 KB. Both columns are wrong.

This is what it should look like:

imagen

The proper solution would be to avoid using the git program provided by msys2, and use some other windows git implementation. For instance, Git for windows: https://gitforwindows.org/, and then perform all Git operations with Git bash instead of the MSYS2 MINGW64 shortcut:
Git bash

Other Git clients for windows may work as well, for instance Atlasian Sourcetree: https://www.sourcetreeapp.com/

To avoid other errors in the future, my advice is to remove the git program from MSYS2:

$ pacman -R git
checking dependencies...

Packages (1) git-2.44.0-1

Total Removed Size:  36.77 MiB

:: Do you want to remove these packages? [Y/n] y
:: Processing package changes...
(1/1) removing git                                           [###############################]


Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions