Skip to content

Unable to package NumPy >= 1.17.3 on linux #583

@davidfokkema

Description

@davidfokkema

Describe the bug
When using precompile NumPy wheels (available since version 1.17.3) briefcase run fails on linux. The problem is with the dynamic libraries:

Deploying dependencies for ELF file /app/appimage/Hello World/Hello World.AppDir/usr/app_packages/numpy/.libs/libopenblasp-r0-34a18dc3.3.7.so 
ERROR: Could not find dependency: libgfortran-ed201abd.so.3.0.0 
WARNING: Failed to deploy dependencies for ELF file /app/appimage/Hello World/Hello World.AppDir/usr/app_packages/numpy/.libs/libopenblasp-r0-34a18dc3.3.7.so, skipping 

I checked that the libraries are present when installing locally, but ldd does report some weirdness:

lib/python3.8/site-packages/numpy/.libs$ ldd libopenblasp-r0-34a18dc3.3.7.so 
	linux-vdso.so.1 (0x00007ffdc9f35000)
	libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f339369c000)
	libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f3393679000)
	libgfortran-ed201abd.so.3.0.0 => not found
	libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3393487000)
	/lib64/ld-linux-x86-64.so.2 (0x00007f339558f000)

I checked, the libgfortran lib is present. I'm not sure how NumPy tells the system to look for the library in the local folder, but if I remove the file I can't locally import numpy anymore. Maybe briefcase (via linuxdeploy) can ignore the 'missing dependency'?

To Reproduce
Steps to reproduce the behavior:

  1. Create new briefcase project (briefcase new)
  2. Add numpy==1.17.3 in the requires field.
  3. briefcase create on linux
  4. briefcase run on linux
  5. See error.

Expected behavior
I expect briefcase to package the app and briefcase run to just complete normally.

Environment:

  • Operating System: Ubuntu 20.04
  • Python version: 3.8
  • Software versions:
    • Briefcase: 0.3.5

Additional context
I suspect the problem to lie with the way linuxdeploy builds the appimage. When I have the time, I'll try to figure out how to use linuxdeploy or appimage and try to package NumPy without briefcase. Maybe the problem lies not with briefcase itself.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA crash or error in behavior.linuxThe issue relates Linux support.
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions