Skip to content

elf_file.cpp: "skipping linker related object" for unrelated files, for instance when build folder is named "build-linux-qt5-packaging" #315

@krf

Description

@krf

Hey,

we just identified an issue within linuxdeploy when build folders are named in a certain way; this caught us on surprise.

Consider the following build folder name:
/home/foo/workspace/project/build-linux-qt5-packaging/bin/myexe

Then running linuxdeployqt with at least --verbosity=0 (debug) reveals something like this:

...
Deploying dependencies for ELF file /home/foo/workspace/project/build-linux-qt5-packaging/bin/myexe
DEBUG: skipping linker related object   linux-vdso.so.1 (0x00007ffc43dd7000)
DEBUG: skipping linker related object   libMyLib.so.1.5.0 => /home/foo/workspace/project/build-linux-qt5-packaging/lib/libMyLib.so.1.5.0 (0x00007f0335072000)

linuxdeployqt thinks libMyLib.so.1.5.0 is a linker related object but it isn't, thus it will not deploy it
=> resulting appdir does not contain this library
=> executable from appdir unusable.

Bug is in https://github.com/linuxdeploy/linuxdeploy/blame/c28054bab6623e72e0e27ffec88c41df5ce46667/src/core/elf_file.cpp#L229 -- The regex is too broad: In our case it matches /home/foo/workspace/project/bui**ld-linux-**qt5-packaging/lib/libMyLib.so.1.5.0

It should be limited to scan the file name only, not the file path.

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