Giter Club home page Giter Club logo

Comments (9)

arybczak avatar arybczak commented on May 19, 2024

What happens if you add -D_XOPEN_SOURCE=500 to your CFLAGS/CXXFLAGS?

from ncmpcpp.

ttohin avatar ttohin commented on May 19, 2024

With -D_XOPEN_SOURCE=500 I have same errors but..
I added -D_XOPEN_SOURCE_EXTENDED to CXXFLAGS and it works. I can make pull request with changes but I don't sure that is cross platform solution. Could you check it?
And second thing:
Does ncmpcpp really depends on ICU? Because I configured the project with ICU_CFLAGS=trash ICU_LIBS=trash and it works (to avoid errors because I don't have icu libraries in pkg-config).
May be we should remove the dependency?

from ncmpcpp.

arybczak avatar arybczak commented on May 19, 2024

With -D_XOPEN_SOURCE=500 I have same errors but..
I added -D_XOPEN_SOURCE_EXTENDED to CXXFLAGS and it works. I can make pull request with changes but I don't sure that is cross platform solution. Could you check it?

That it weird, from man feature_test_macros:

_XOPEN_SOURCE_EXTENDED
              If  this  macro  is defined, and _XOPEN_SOURCE is defined, then expose
              definitions corresponding to the XPG4v2 (SUSv1) UNIX extensions  (UNIX
              95).   This  macro  is  also  implicitly  defined  if _XOPEN_SOURCE is
              defined with a value of 500 or more.

So something fishy is going on there. Also, because of the above, defining _XOPEN_SOURCE_EXTENDED explicitly is definitely not a good general way to solve it.

ncmpcpp should depend on ICU only if boost was compiled with ICU. Does configure fail if ICU is not installed?

from ncmpcpp.

ttohin avatar ttohin commented on May 19, 2024
/*
 * With XPG4, you must define _XOPEN_SOURCE_EXTENDED, it is redundant (or
 * conflicting) when _XOPEN_SOURCE is 500 or greater.
 */
#undef NCURSES_WIDECHAR
#if defined(_XOPEN_SOURCE_EXTENDED) || defined(_XPG5)
#define NCURSES_WIDECHAR
#endif

It is from my /usr/local/Cellar/ncurses/5.9/include/ncursesw/curses.h. And I see "you must define _XOPEN_SOURCE_EXTENDED"

from ncmpcpp.

arybczak avatar arybczak commented on May 19, 2024

and after the comma it says exactly what I pasted above.

from ncmpcpp.

ttohin avatar ttohin commented on May 19, 2024

Yes.

defining _XOPEN_SOURCE_EXTENDED explicitly is definitely not a good general way to solve it.

So what is the good way? I'm not familiar with this feature_test_macros_magic.

from ncmpcpp.

arybczak avatar arybczak commented on May 19, 2024

I have no idea. I'm also not familiar with it, what I wrote is just what I found after checking out yesterday the fragment of curses.h you pasted.

You can locally define XOPEN_SOURCE_EXTENDED if for some reason it's not defined by XOPEN_SOURCE.

from ncmpcpp.

ttohin avatar ttohin commented on May 19, 2024

I managed that it happens because there is no features.h on macosx. This feature_test_macros_magic is in the header. So I'll pass XOPEN_SOURCE_EXTENDED to homebrew formula (macosx package manager). You can close the issue. Thanks.

from ncmpcpp.

nijikon avatar nijikon commented on May 19, 2024

I still need to add -D_XOPEN_SOURCE_EXTENDED in order to build ncmpcpp 0.7.1 on macosx El Capitan. Is this the correct way?

from ncmpcpp.

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.