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

Doesn't work on newer Linux #63

Open
izahn opened this issue Jun 18, 2022 · 7 comments
Open

Doesn't work on newer Linux #63

izahn opened this issue Jun 18, 2022 · 7 comments

Comments

@izahn
Copy link
Contributor

izahn commented Jun 18, 2022

Hmm, now when I try to start emacs in a fresh environment, I just get

emacs: symbol lookup error: emacs: undefined symbol: malloc_set_state, version GLIBC_2.2.5

This happens because malloc_set_state has been removed from glibc:

  • The deprecated functions malloc_get_state and malloc_set_state have been
    moved from the core C library into libc_malloc_debug.so. Legacy applications
    that still use these functions will now need to preload libc_malloc_debug.so
    in their environment using the LD_PRELOAD environment variable.

So actually this is not because of a change in conda-forge packaging but because of a change in the host operating system. You can work-around with

export LD_PRELOAD=/usr/lib/libc_malloc_debug.so

(assuming you have /usr/lib/libc_malloc_debug.so on the host OS, adjust as needed).

Originally posted by @izahn in #60 (comment)

@asmeurer
Copy link
Member

Is there a fix for this? I guess we should check if emacs 28.2 still has the same problem.

@izahn
Copy link
Contributor Author

izahn commented Sep 13, 2022

I don't think there is any fix others than the LD_PRELOAD work-around. Long-term this will be fixed by building on a host VM with a more recent glibc but conda-forge has been very conservative in that regard, even sticking with CentOS 6 long past EOL.

@zklaus
Copy link

zklaus commented Oct 26, 2022

I guess one thing we can do is add a pin on __glibc (IIRC). That won't make it work, but it will prevent the installation of an incompatible package.

@izahn
Copy link
Contributor Author

izahn commented Oct 26, 2022

It's not all the way incompatible though, the LD_PRELOAD work-around is effective. Maybe we can automate it in the activation script?

@zklaus
Copy link

zklaus commented Oct 27, 2022

Hm. There is the whereis utility. I don't have a Linux with libc_malloc_debug, but could you try

whereis -b libc_malloc_debug

?

Perhaps that allows us to determine the path needed, which we could put in a wrapper startup script.

Alternatively it might be possible to hack the configure script. Basically, we need to tell it that the present libc doesn't have a "Doug Lea Style" malloc; or we could move to a more modern build platform.

@asmeurer
Copy link
Member

Does this help?

$ whereis -b libc_malloc_debug
libc_malloc_debug: /usr/lib/x86_64-linux-gnu/libc_malloc_debug.so

@asmeurer asmeurer mentioned this issue Sep 14, 2023
3 tasks
@PythonNut
Copy link

I don't have libc_malloc_debug on my system:

❯ whereis -b libc_malloc_debug
libc_malloc_debug:

What are my options for getting emacs working (without root access)?

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

4 participants