Skip to content

'StaticLibrary' object has no attribute 'import_filename' #4877

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

Closed
CoffeeFlux opened this issue Feb 4, 2019 · 0 comments · Fixed by #5997
Closed

'StaticLibrary' object has no attribute 'import_filename' #4877

CoffeeFlux opened this issue Feb 4, 2019 · 0 comments · Fixed by #5997

Comments

@CoffeeFlux
Copy link
Contributor

CoffeeFlux commented Feb 4, 2019

This came up while attempting to build the harfbuzz meson port with --default-library=static and msvc on win10. As far as I can tell this is a meson bug, since it's not offering an error in their config and appears to be a mistaken assumption in the pkgconfig module, so I've reported it here. The full error is below:

Traceback (most recent call last):
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\mesonmain.py", line 112, in run
    return options.run_func(options)
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\msetup.py", line 230, in run
    app.generate()
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\msetup.py", line 161, in generate
    self._generate(env)
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\msetup.py", line 190, in _generate
    intr.run()
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\interpreter.py", line 3874, in run
    super().run()
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\interpreterbase.py", line 408, in run
    self.evaluate_codeblock(self.ast, start=1)
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\interpreterbase.py", line 432, in evaluate_codeblock
    raise e
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\interpreterbase.py", line 426, in evaluate_codeblock
    self.evaluate_statement(cur)
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\interpreterbase.py", line 437, in evaluate_statement
    return self.function_call(cur)
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\interpreterbase.py", line 763, in function_call
    return func(node, posargs, kwargs)
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\interpreterbase.py", line 292, in wrapped
    return f(*wrapped_args, **wrapped_kwargs)
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\interpreterbase.py", line 181, in wrapped
    return f(*wrapped_args, **wrapped_kwargs)
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\interpreter.py", line 3447, in func_subdir
    self.evaluate_codeblock(codeblock)
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\interpreterbase.py", line 432, in evaluate_codeblock
    raise e
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\interpreterbase.py", line 426, in evaluate_codeblock
    self.evaluate_statement(cur)
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\interpreterbase.py", line 441, in evaluate_statement
    return self.method_call(cur)
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\interpreterbase.py", line 799, in method_call
    return obj.method_call(method_name, args, kwargs)
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\interpreter.py", line 1621, in method_call
    value = fn(state, args, kwargs)
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\interpreterbase.py", line 292, in wrapped
    return f(*wrapped_args, **wrapped_kwargs)
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\interpreterbase.py", line 292, in wrapped
    return f(*wrapped_args, **wrapped_kwargs)
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\interpreterbase.py", line 181, in wrapped
    return f(*wrapped_args, **wrapped_kwargs)
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\modules\pkgconfig.py", line 428, in generate
    version, pcfile, conflicts, variables)
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\modules\pkgconfig.py", line 321, in generate_pkgconfig_file
    ofile.write('Libs: {}\n'.format(' '.join(generate_libs_flags(deps.pub_libs))))
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\modules\pkgconfig.py", line 312, in generate_libs_flags
    lname = self._get_lname(l, msg, pcfile)
  File "c:\users\ryan\appdata\local\programs\python\python37\lib\site-packages\mesonbuild\modules\pkgconfig.py", line 225, in _get_lname
    if l.import_filename:
AttributeError: 'StaticLibrary' object has no attribute 'import_filename'
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

Successfully merging a pull request may close this issue.

1 participant