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

runpath stripped on ninja install #4136

Closed
mbiebl opened this issue Sep 6, 2018 · 9 comments
Closed

runpath stripped on ninja install #4136

mbiebl opened this issue Sep 6, 2018 · 9 comments

Comments

@mbiebl
Copy link

mbiebl commented Sep 6, 2018

Version: 0.47.2-1

gnome-boxes uses subprojects: https://gitlab.gnome.org/GNOME/gnome-boxes/tree/master/subprojects
In Debian, gtk-frdp and libovf-glib are not packaged as system libraries yet, so when building gnome-boxes the internal subprojects are used.
The binary in the build dir has

RUNPATH              $ORIGIN/../subprojects/gtk-frdp/src:$ORIGIN/../subprojects/libovf-glib/govf

The two libraries are installed into pkglibdir and required by the binary:

  NEEDED               libgtk-frdp-0.1.so
  NEEDED               libgovf-0.1.so

After a ninja install, the runpath is gone from the binary. The result is, that the binary crashes, as it can't find the libraries.

@jpakkane
Copy link
Member

jpakkane commented Sep 6, 2018

To set the install time rpath, use install_rpath kwarg on the target.

@mbiebl
Copy link
Author

mbiebl commented Sep 6, 2018

Is this a bug in gnome-boxes then in how it uses subprojects?

@mbiebl
Copy link
Author

mbiebl commented Sep 6, 2018

@felipeborges bringing you into the loop here

@jpakkane
Copy link
Member

jpakkane commented Sep 9, 2018

FWICT Debian guidelines seem to indicate that each package is responsible for installing non-public shared libraries to a secret location and is also responsible for adding rpaths. This would seem to indicate that if gnome-boxes builds subprojects, it should set this up properly.

@mbiebl
Copy link
Author

mbiebl commented Sep 9, 2018

@jpakkane so, a bug in gnome-boxes then or the subprojects? which of those is supposed to set the install_rpath?

@jpakkane
Copy link
Member

jpakkane commented Sep 9, 2018

Rpath is the property of the executable that is running, so in this case it should be set on gnome-boxes executable (FWICT). Thus it would be the master project's responsibility.

@mbiebl
Copy link
Author

mbiebl commented Sep 9, 2018

If the subprojects are available as system libraries, then no rpath is needed in the binary. What's the idiomatic way to set rpath properly in this case?

@jpakkane
Copy link
Member

jpakkane commented Sep 9, 2018

Something like:

if dep_object.type_name() == 'internal'
  # set up rpath
else
  # deps comr from the system, no need for rpathing
endif

@mbiebl
Copy link
Author

mbiebl commented Sep 9, 2018

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

2 participants