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

[possible regression in 0.55] New rpath must not be longer than the old one #7551

Closed
yurivict opened this issue Aug 5, 2020 · 11 comments · Fixed by #7629
Closed

[possible regression in 0.55] New rpath must not be longer than the old one #7551

yurivict opened this issue Aug 5, 2020 · 11 comments · Fixed by #7629
Labels
OS:*BSD Issues specific to one of the BSD Operating Systems regression
Milestone

Comments

@yurivict
Copy link

yurivict commented Aug 5, 2020

Several projects fail to build with meson with the error from the subject.
For example devel/gnome-builder: http://package22.nyi.freebsd.org/data/113amd64-default-PR244008/2020-07-15_21h37m37s/logs/errors/gnome-builder-3.28.4_4.log
See the list here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=247935#c2

Could you please comment on this? Why did these build before and not with 0.55?

FreeBSD 12.1

Thanks,
Yuri

@dcbaker
Copy link
Member

dcbaker commented Aug 5, 2020

I looked at the code, that particular error code has existed (Unchanged I think) since 2016. It's possible that we changed either the BUILD rpath code or the install RPATH code in 0.55.

@dcbaker dcbaker added this to the 0.55.1 milestone Aug 5, 2020
@jpakkane
Copy link
Member

jpakkane commented Aug 7, 2020

This is probably because earlier we reserved the exact amount of space needed by install_rpath and nuked everything else. Now we preserve rpaths coming from external sources but don't account for them when calculating how much space to reserve.

@yurivict
Copy link
Author

yurivict commented Aug 7, 2020

This bug is a show-stopper since so many ports are failing with this error.

@jpakkane
Copy link
Member

jpakkane commented Aug 7, 2020

I tried to reproduce this locally but could not. I.e. eog builds and installs just fine and the rpath length calculation also works. This may be FreeBSD specific. Would it be possible for you to run one of the failing builds with the patch from #7565 applied to Meson?

@dcbaker dcbaker added the OS:*BSD Issues specific to one of the BSD Operating Systems label Aug 8, 2020
@nirbheek
Copy link
Member

Note: the next stable point release will happen in the next couple of days. This open issue / merge request is marked for the point release but will not block its release.

@nirbheek nirbheek modified the milestones: 0.55.1, 0.55.2 Aug 15, 2020
@yurivict
Copy link
Author

With meson-0.55.1 the failure looks like this:

New rpath must not be longer than the old one.
 Old: b'/usr/local/lib/dpdk/pmds-20.0'
 New: b'/usr/local/lib/dpdk/pmds-20.0:/usr/local/lib/dpdk/pmds-20.0'
FAILED: meson-install 

See the log: http://package22.nyi.freebsd.org/data/113amd64-default-PR244008/2020-08-18_07h28m26s/logs/errors/dpdk-19.11.3.log

@nirbheek
Copy link
Member

Attaching here in case the build log upstream expires: dpdk-19.11.3.log

@jpakkane
Copy link
Member

Can you test if #7629 fixes the issue for you?

@nathankidd
Copy link
Contributor

nathankidd commented Aug 27, 2020

We hit the "New rpath must not be longer" issue on sunos-sparc64 (Solaris 10) using meson-0.55.0.

With latest master @ 6fc0673 we get the rpath error message :

New rpath must not be longer than the old one.
Old: b'$ORIGIN'
New: b'$ORIGIN:$ORIGIN'
FAILED: meson-install

With #7629 we get:

Traceback (most recent call last):
File "/localu/maker/src/meson/mesonbuild/mesonmain.py", line 131, in run
return options.run_func(options)
File "/localu/maker/src/meson/mesonbuild/minstall.py", line 540, in run
installer.do_install(datafilename)
File "/localu/maker/src/meson/mesonbuild/minstall.py", line 360, in do_install
self.install_targets(d)
File "/localu/maker/src/meson/mesonbuild/minstall.py", line 514, in install_targets
install_name_mappings, verbose=False)
File "/localu/maker/src/meson/mesonbuild/scripts/depfixer.py", line 464, in fix_rpath
fix_elf(fname, rpath_dirs_to_remove, new_rpath, verbose)
File "/localu/maker/src/meson/mesonbuild/scripts/depfixer.py", line 372, in fix_elf
e.fix_rpath(rpath_dirs_to_remove, new_rpath)
File "/localu/maker/src/meson/mesonbuild/scripts/depfixer.py", line 296, in fix_rpath
self.fix_rpathtype_entry(rpath_dirs_to_remove, new_rpath, DT_RPATH)
File "/localu/maker/src/meson/mesonbuild/scripts/depfixer.py", line 312, in fix_rpathtype_entry
new_rpaths = mesonlib.OrderedSet()
NameError: name 'mesonlib' is not defined
FAILED: meson-install

After fixing that up with

diff --git a/mesonbuild/scripts/depfixer.py b/mesonbuild/scripts/depfixer.py
index 8184be4..d6ebe15 100644
--- a/mesonbuild/scripts/depfixer.py
+++ b/mesonbuild/scripts/depfixer.py
@@ -16,6 +16,7 @@
 import sys, struct
 import shutil, subprocess

+from .. import mesonlib
 from ..mesonlib import OrderedSet

install works.

@yurivict
Copy link
Author

This holds the meson port update, and a number of other ports that depend on higher versions of meson.

@jpakkane
Copy link
Member

Updated the MR. If you want to distro patch, take that. Otherwise it will be in the next point release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OS:*BSD Issues specific to one of the BSD Operating Systems regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants