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

gio build failed: cannot open input file 'z.lib' #409

Open
CyanBlob opened this issue Jan 24, 2021 · 4 comments
Open

gio build failed: cannot open input file 'z.lib' #409

CyanBlob opened this issue Jan 24, 2021 · 4 comments

Comments

@CyanBlob
Copy link

I'm trying to build this on Windows 10, but I'm getting a failure when linking against z.lib. It looks like zlib is being built properly, so I'm not sure why that would be.

Here is the interesting part of the build output:

Building project zlib (1.2.11)
Building project glib (2.66.4)
[1/120] Linking target gio/gio-2.0-0.dll
FAILED: gio/gio-2.0-0.dll gio/gio-2.0-0.pdb
"link" @gio/gio-2.0-0.dll.rsp
LINK : fatal error LNK1181: cannot open input file 'z.lib'
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "C:\gtk-build\github\gvsbuild\gvsbuild\utils\builder.py", line 492, in build
    if self.__build_one(p):
  File "C:\gtk-build\github\gvsbuild\gvsbuild\utils\builder.py", line 618, in __build_one
    skip_deps = proj.build()
  File "C:\gtk-build\github\gvsbuild\gvsbuild\projects.py", line 490, in build
    Meson.build(self, meson_params='-Dinternal_pcre=true')
  File "C:\gtk-build\github\gvsbuild\gvsbuild\utils\base_builders.py", line 76, in build
    self.builder.exec_ninja(params='install', working_dir=ninja_build)
  File "C:\gtk-build\github\gvsbuild\gvsbuild\utils\builder.py", line 902, in exec_ninja
    self.__execute(self.__sub_vars(cmd), working_dir=working_dir, add_path=add_path, env=self.vs_env)
  File "C:\gtk-build\github\gvsbuild\gvsbuild\utils\builder.py", line 942, in __execute
    subprocess.check_call(args, cwd=working_dir, env=env, shell=True)
  File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.9_3.9.496.0_x64__qbz5n2kfra8p0\lib\subprocess.py", line 373, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'ninja install' returned non-zero exit status 1.
Error: glib build failed

The full output can be found here: https://pastebin.com/AJ3nF75V

I've tried building both 64 and 32 bit with the same issue in both. I'm also using Visual Studio 2019

I'd appreciate help getting this working!

@h3rl
Copy link

h3rl commented Feb 10, 2021

im having the same issue aswell

@andriyDev
Copy link

In my case, I had previously installed zlib separately without msys2, so I think meson was finding that one so gvsbuild couldn't use its built version. Renaming my zlib.pc in my pkgconfig dir to something else seemed to work around the issue.

@heyjinny
Copy link

heyjinny commented Jul 27, 2021

Solved this problem after installing gstreamer-1.0-msvc-x86_64-1.18.4.msi, gstreamer-1.0-devel-msvc-x86_64-1.18.4.msi (remove mingw version first). You can download these from https://gstreamer.freedesktop.org/download/. Do not forget reboot. z.lib is located in d:\gstreamer\1.0\msvc_x86_64\bin. The system language must be english.

@hassanhdc
Copy link

@CyanBlob were you able to resolve this issue? I'm running into the same problem and for the life of me can't figure out a solution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants