Bug 110735 - Meson can't find 32-bit libXvMCW in non-standard path
Summary: Meson can't find 32-bit libXvMCW in non-standard path
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: mesa-dev
QA Contact: mesa-dev
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-23 05:22 UTC by charlie
Modified: 2019-09-18 20:19 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
attachment-30153-0.html (2.29 KB, text/html)
2019-07-04 17:14 UTC, Dylan Baker
Details
attachment-31572-0.html (2.22 KB, text/html)
2019-07-05 14:36 UTC, Dylan Baker
Details

Description charlie 2019-05-23 05:22:04 UTC
When compiling mesa in 32-bit mode meson finds 64-bit XvMCW instead of 32-bit XvMCW during configuring. The 32-bit XvMCW library is in a non-standard path.

meson-log.txt: "Compiler stderr: src/gallium/state_trackers/xvmc/meson.build:31:2: ERROR: C library 'XvMCW' not found"

Yes, both 64-bit and 32-bit libXvMC are installed in separate directories.

PKG_CONFIG_PATH, LD_LIBRARY_PATH, LDFLAGS, CXXLDFLAGS, CPPFLAGS are pointed to the 32-bit path location of XvMCW and have no effect.

The CC='/usr/bin/32/gcc' and CXX='/usr/bin/32/g++' wrappers have no effect.

I did not attempt hardcoding an rpath into an 32-bit XvMCW recompile yet.

Software:
gcc-9.1.0_multilib
meson-0.50.0
Comment 1 charlie 2019-07-04 07:32:20 UTC
As a temporary work around--link to code from non-standard directory to the 32-bit /usr/lib directory, for example:

if [[ $ARCH == *86 ]]; then
sudo find ${HOME}/lib32/ -name "libXvMC*" -type f -maxdepth 1 -exec bash -c 'ln -s "$0" /usr/lib/"${0##*/}"' {} \;
sudo find ${HOME}/lib32/ -name "libXvMC*" -type l -maxdepth 1 -exec bash -c 'ln -s "$0" /usr/lib/"${0##*/}"' {} \;
fi

Then delete links after compiling finishes:

sudo rm /usr/lib/libXvMC*

_____
Update: setting an rpath on 32-bit complied libXvMC* would still not let Meson find the libs.
Comment 2 Dylan Baker 2019-07-04 17:14:08 UTC
Created attachment 144704 [details]
attachment-30153-0.html

I'm not at my computer right now (its a holiday here), but you might be
able to fix this by seeing -Dc_link_args="-L /path/with/xvmc"

I'm on mobile, please excuse autocorrect fail.

On Thu, Jul 4, 2019, 00:32 <bugzilla-daemon@freedesktop.org> wrote:

> *Comment # 1 <https://bugs.freedesktop.org/show_bug.cgi?id=110735#c1> on
> bug 110735 <https://bugs.freedesktop.org/show_bug.cgi?id=110735> from
> charlie <bug0xa3d2@hushmail.com> *
>
> As a temporary work around--link to code from non-standard directory to the
> 32-bit /usr/lib directory, for example:
>
> if [[ $ARCH == *86 ]]; then
> sudo find ${HOME}/lib32/ -name "libXvMC*" -type f -maxdepth 1 -exec bash -c 'ln
> -s "$0" /usr/lib/"${0##*/}"' {} \;
> sudo find ${HOME}/lib32/ -name "libXvMC*" -type l -maxdepth 1 -exec bash -c 'ln
> -s "$0" /usr/lib/"${0##*/}"' {} \;
> fi
>
> Then delete links after compiling finishes:
>
> sudo rm /usr/lib/libXvMC*
>
> _____
> Update: setting an rpath on 32-bit complied libXvMC* would still not let Meson
> find the libs.
>
> ------------------------------
> You are receiving this mail because:
>
>    - You are on the CC list for the bug.
>
>
Comment 3 charlie 2019-07-05 00:56:34 UTC
I can wait.

Setting "-Dc_link_args" in a config file results in:
meson: error: unrecognized arguments: ..

So I set it in a meson crossfile like:
[properties]
c_link_args = ['-L /home/a/lib32']

Results in 'XvMCW not found'.

I also tried setting a native file (https://mesonbuild.com/Native-environments.html) mesa32.ini like:

[paths]
libdir = '/home/a/lib32'
prefix = '/home/a'

Still not found.
Comment 4 Dylan Baker 2019-07-05 14:36:49 UTC
Created attachment 144713 [details]
attachment-31572-0.html

Ah, sorry. The -D version is for the command line, in the cross file it
would be :
c_link_args = ['-L', '/path']

I'm on mobile, please excuse autocorrect fail.

On Thu, Jul 4, 2019, 17:56 <bugzilla-daemon@freedesktop.org> wrote:

> *Comment # 3 <https://bugs.freedesktop.org/show_bug.cgi?id=110735#c3> on
> bug 110735 <https://bugs.freedesktop.org/show_bug.cgi?id=110735> from
> charlie <bug0xa3d2@hushmail.com> *
>
> I can wait.
>
> Setting "-Dc_link_args" in a config file results in:
> meson: error: unrecognized arguments: ..
>
> So I set it in a meson crossfile like:
> [properties]
> c_link_args = ['-L /home/a/lib32']
>
> Results in 'XvMCW not found'.
>
> I also tried setting a native file
> (https://mesonbuild.com/Native-environments.html) mesa32.ini like:
>
> [paths]
> libdir = '/home/a/lib32'
> prefix = '/home/a'
>
> Still not found.
>
> ------------------------------
> You are receiving this mail because:
>
>    - You are on the CC list for the bug.
>
>
Comment 5 charlie 2019-07-05 21:05:07 UTC
In a crossfile, setting like:

c_link_args = ['-L', '/home/a/lib']

terminates meson configuring earlier and results in a new error:

meson.build:1114:2: ERROR: C library 'dl' not found

Thanks for your time.
Comment 6 Dylan Baker 2019-07-08 17:20:36 UTC
I started thinking about this over the weekend, and realized that all of this work-arounding a lack of a .pc file for libxvmcw is silly, we should just add a pkg-config file so this is less painful:
https://gitlab.freedesktop.org/xorg/lib/libxvmc/merge_requests/2
Comment 7 charlie 2019-07-09 17:15:04 UTC
I recompiled both 32-bit and 64-bit libXvMC with the patch applied and mesa meson configure error remains.
Comment 8 GitLab Migration User 2019-09-18 20:19:23 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/939.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.