Coder Social home page Coder Social logo

In the old version of glibc and O2 is enabled, replacing the strncmp argument with a macro will cause the compilation to fail about neovim HOT 14 CLOSED

hardboydu avatar hardboydu commented on June 25, 2024
In the old version of glibc and O2 is enabled, replacing the strncmp argument with a macro will cause the compilation to fail

from neovim.

Comments (14)

hardboydu avatar hardboydu commented on June 25, 2024 1

Maybe the minimum glibc version has been increased. That would in that case be a documentation issue and this would be a wontfix. I'll need to check.

TODO: if this turns out to be the case, look into adding a minimum glibc check in build.yml if it's simple to do so.

CentOS 7.x is so widely used as a production system that I don't think it's time to give up on supporting it

from neovim.

moonstruckmoth avatar moonstruckmoth commented on June 25, 2024 1

I'm facing the same issue and I've tracked down the commit from where it started failing to compile.

The commit is as below

commit c37695a (HEAD)
Author: James [email protected]
Date: Tue Jun 11 22:40:24 2024 +0700

refactor: use S_LEN(s) instead of s, n (#29219)

from neovim.

dundargoc avatar dundargoc commented on June 25, 2024

Which version of glibc are you using?

from neovim.

hardboydu avatar hardboydu commented on June 25, 2024

Which version of glibc are you using?

GNU C Library (GNU libc) stable release version 2.17

from neovim.

dundargoc avatar dundargoc commented on June 25, 2024

Maybe the minimum glibc version has been increased. That would in that case be a documentation issue and this would be a wontfix. I'll need to check.

TODO: if this turns out to be the case, look into adding a minimum glibc check in build.yml if it's simple to do so.

from neovim.

clason avatar clason commented on June 25, 2024

CentOS 7.x is so widely used as a production system that I don't think it's time to give up on supporting it

So is Neovim 0.9. If you run a legacy version of an OS, you should expect to have to run legacy versions of applications as well. We don't drop support at a whim; we try to keep things running on as many platforms as possible. But at the same time, we will not refrain from making necessary or useful changes just for the sake of legacy platforms. (Again, you can keep using older versions; it's not like they are removed from the internet...)

In this specific case, we are talking about a nightly build for a version that will be released in months -- long after CentOS 7's end of life (June 30, 2024).

from neovim.

dundargoc avatar dundargoc commented on June 25, 2024

This discussion is premature. I have no idea yet if the problem is in fact that minimum glibc has been increased. I probably shouldn't have brought up the possibility of "wontfix" before confirming it.

@hardboydu can you bisect the commit where building breaks for you? make distclean may help here in case the build breaks for unrelated reasons.

from neovim.

dundargoc avatar dundargoc commented on June 25, 2024

@IAKOBVS

from neovim.

IAKOBVS avatar IAKOBVS commented on June 25, 2024

@IAKOBVS

S_LEN macro doesn't work when passed as an argument to another macro. That's why I didn't use it for the STRNICMP macros, only functions.

from neovim.

clason avatar clason commented on June 25, 2024

Yes, obviously. Can you fix this so it works on all supported platforms, or should we revert that commit?

from neovim.

IAKOBVS avatar IAKOBVS commented on June 25, 2024

Yes, obviously. Can you fix this so it works on all supported platforms, or should we revert that commit?

Just revert it.

from neovim.

gpanders avatar gpanders commented on June 25, 2024

Is this something we can test for in CI? Otherwise how we will know if any use of S_LEN is safe? (Unless we make a rule: "never use S_LEN in stdlib functions because those could secretly be macros").

from neovim.

clason avatar clason commented on June 25, 2024

Not without containers. (But I believe this sort of "macro wrappers for gcc" in glibc can be researched; It will take some effort, though.)

from neovim.

dundargoc avatar dundargoc commented on June 25, 2024

Is this something we can test for in CI? Otherwise how we will know if any use of S_LEN is safe? (Unless we make a rule: "never use S_LEN in stdlib functions because those could secretly be macros").

I don't see how we could. Even if we start testing centos specifically it won't account for other distros. We could start testing a slew of popular distros (centos, debian, fedora, arch, manjaro, etc etc) but that is going to be expensive CI-wise.

from neovim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.