Open DavidLibault opened 1 year ago
Not sure, but maybe this would help? (Reinstall Microsoft Visual C++ 2013 Redistributable package)
Download from here
@DavidLibault Thanks for submitting the issue! I am not able to reproduce this, Perl is building fine for me, and running your hello world test prints Hello World for me as well.
Maybe the build of Perl was interrupted in the middle, and now it is skipping to rebuild it because it is already installed. Have you tried rebuilding things with the --from-scratch
option?
I did :
> gvsbuild build --from-scratch perl
and got :
Build type is Configuration.debug_optimized
Cleanup build directories
Removing working/building dir (C:\gtk-build\build\x64\release)
Removing destination dir (C:\gtk-build\gtk\x64\release)
Removing git expand dir (C:\gtk-build\src\git-exp)
Removing tools dir (C:\gtk-build\tools)
Cleaning up the build environment
Checking msys tool
Using C:\tools\msys64 for msys installation
Checking Msvc tool
Visual Studio installation(s) found:
Visual Studio Community 2022 @ C:\Program Files\Microsoft Visual
Studio\2022\Community
Visual Studio Build Tools 2022 @ C:\Program Files (x86)\Microsoft Visual
Studio\2022\BuildTools
Using Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
Downloading packages
Traceback (most recent call last):
File "C:\Users\DavidLibault\.local\pipx\venvs\gvsbuild\Lib\site-packages\gvsbuild\utils\builder.py", line 525, in build
if self.__build_one(p):
^^^^^^^^^^^^^^^^^^^
File "C:\Users\DavidLibault\.local\pipx\venvs\gvsbuild\Lib\site-packages\gvsbuild\utils\builder.py", line 618, in __build_one
proj.prepare_build_dir()
File "C:\Users\DavidLibault\.local\pipx\venvs\gvsbuild\Lib\site-packages\gvsbuild\utils\base_project.py", line 467, in prepare_build_dir
if self.update_build_dir():
^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\DavidLibault\.local\pipx\venvs\gvsbuild\Lib\site-packages\gvsbuild\utils\base_tool.py", line 55, in update_build_dir
self.unpack()
File "C:\Users\DavidLibault\.local\pipx\venvs\gvsbuild\Lib\site-packages\gvsbuild\tools.py", line 200, in unpack
self.mark_deps = extract_exec(
^^^^^^^^^^^^^
File "C:\Users\DavidLibault\.local\pipx\venvs\gvsbuild\Lib\site-packages\gvsbuild\utils\base_expanders.py", line 144, in extract_exec
tar.extractall(
File "C:\Python311\Lib\tarfile.py", line 2257, in extractall
self._extract_one(tarinfo, path, set_attrs=not tarinfo.isdir(),
File "C:\Python311\Lib\tarfile.py", line 2324, in _extract_one
self._handle_fatal_error(e)
File "C:\Python311\Lib\tarfile.py", line 2320, in _extract_one
self._extract_member(tarinfo, os.path.join(path, tarinfo.name),
File "C:\Python311\Lib\tarfile.py", line 2403, in _extract_member
self.makefile(tarinfo, targetpath)
File "C:\Python311\Lib\tarfile.py", line 2448, in makefile
with bltn_open(targetpath, "wb") as target:
^^^^^^^^^^^^^^^^^^^^^^^^^^^
PermissionError: [Errno 13] Permission denied: 'C:\\gtk-build\\tools\\perl-5.20.0\\x64\\lib\\AnyDBM_File.pm'
Error: perl build failed
The 'AnyDBM_File.pm' has the following access permissions :
> ls 'C:\gtk-build\tools\perl-5.20.0\x64\lib\AnyDBM_File.pm\AnyDBM_File.pm
Répertoire : C:\gtk-build\tools\perl-5.20.0\x64\lib
Mode LastWriteTime Length Name
---- ------------- ------ ----
-ar--- 31/01/2014 21:55 2618 AnyDBM_File.pm
So I understand gvsbuild is trying to open AnyDBM_File.pm with write permissions although the file has been installed with read only permissions...
Having installed perl modules with read only permissions looks right to me, what would gvsbuild want to modify a perl module for ?
@DavidLibault have you tried removing the C:\gtk-build\tools directory entirely prior to building? Gvsbuild is trying to extract the tar ball, and for some reason it can't do so.
@danyeaw : yes, deleting the perl directory in C:\gtk-build\tools did allow perl to install. Thanks. Maybe the --from-scratch option should also clean the tools directory...
But perl was still not working.
When launching perl from the command line (Windows PowerShell), the executable silently failed to run. But when gvsbuild tried to launch perl it was giving the MSVCR120.dll missing error (see my first post).
@tjwilli58 : you were right, installing the "Microsoft Visual C++ 2013 Redistributable package" fixes the problem.
As I am not using Visual C++ 2013 (outdated), the dll was not on my build system. I don't know how this issue should be properly addressed... Probably by building perl from sources instead of doing the (uncomplete) binary install...
@DavidLibault Our Perl install is using Strawberry Perl for Windows which is the standard way to install Perl. A few options:
choco install strawberryperl
or through the installerchoco install vcredist-all
Installing Visual Studio 2013 Redestributable fixes the original issue. https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#visual-studio-2013-vc-120--no-longer-supported
We could temporarily add this to the README and then work on getting a newer version of Perl supported.
Hi all,
I installed gvsbuild on a fresh windows 11 Pro (version 22H2) following the gvsbuild readme. GTK4 built, (although I don't understand why gtk4-demo.exe did not build automatically...).
To have gstreamer on the system, I did :
but the gst-plugins-good build fails as libvpx refuses to build :
perl was built by gvsbuild, and the executable is located at :
For information, launching a gvsbuild build of perl gives :
but when I try it with :
The command returns without printing anything on the console (perl --help doesn't return anything either). So it looks like the perl package install on gvsbuild silently failed.