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

Tk.pm loads 32 bit libX11 on 64 bit platform #99

Open
mtelka opened this issue Feb 13, 2024 · 0 comments
Open

Tk.pm loads 32 bit libX11 on 64 bit platform #99

mtelka opened this issue Feb 13, 2024 · 0 comments

Comments

@mtelka
Copy link

mtelka commented Feb 13, 2024

In the Tk.pm file there is this piece of code:

# This is a workround for Solaris X11 locale handling
Preload(DynaLoader::dl_findfile('-L/usr/openwin/lib','-lX11'))
  if (NeedPreload() && -d '/usr/openwin/lib');

It pre-loads libX11 from /usr/openwin/lib which contains 32 bit libraries. In a case we build 64 bit the 32 bit library is still attempted to load. This fails with errors like this:

$ /usr/bin/snmpcheck
Cannot load /usr/openwin/lib/libX11.so at /usr/perl5/vendor_perl/5.38/i86pc-solaris-thread-multi-64/Tk.pm line 93.
Compilation failed in require at /usr/bin/snmpcheck line 652.
BEGIN failed--compilation aborted at /usr/bin/snmpcheck line 652.
$

The correct path for 64 bit libraries is /usr/openwin/lib/64.

The other question is whether the code in question is still needed. The comment says something about workaround, but it is unclear what exactly is (was) the problem this was aiming to work around. I tried to remove offending lines and everything seemed to work.

Tested on OpenIndiana.

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

1 participant