Results 1 to 6 of 6

Thread: Compiling Midnight Commander -- what does provide stdscr

  1. #1

    Default Compiling Midnight Commander -- what does provide stdscr

    Hello everyone :-),

    openSUSE Tumbleweed here, and I try to build mc from the sources. When I compile it against slang, no problem, but when I try to compile it against ncurses it fails at configure phase complaining about "stdscr" function, like this:

    Code:
    checking for library containing addwstr... -lncursesw
    checking for library containing stdscr... no
    configure: error: Cannot find a library providing stdscr
    As you can see I have ncurses (devel) installed and it is recognized. No matter what version (5 or 6) I have I get the same error. The only lead I found (however it might be invalid) is the info, ncurses might be split into two packages, and "stdscr" sits in other one (tinfo). Howeve as far as I can see there is no such package (tinfo) available.

    So how to build mc with ncurses support instead of slang?

    Thank you very much in advance for the help.

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    29,122
    Blog Entries
    15

    Default Re: Compiling Midnight Commander -- what does provide stdscr

    Quote Originally Posted by truemacias View Post
    Hello everyone :-),

    openSUSE Tumbleweed here, and I try to build mc from the sources. When I compile it against slang, no problem, but when I try to compile it against ncurses it fails at configure phase complaining about "stdscr" function, like this:

    Code:
    checking for library containing addwstr... -lncursesw
    checking for library containing stdscr... no
    configure: error: Cannot find a library providing stdscr
    As you can see I have ncurses (devel) installed and it is recognized. No matter what version (5 or 6) I have I get the same error. The only lead I found (however it might be invalid) is the info, ncurses might be split into two packages, and "stdscr" sits in other one (tinfo). Howeve as far as I can see there is no such package (tinfo) available.

    So how to build mc with ncurses support instead of slang?

    Thank you very much in advance for the help.
    Hi
    Have you looked at the openSUSE build, I see no reference in the logs....
    https://build.opensuse.org/build/Bas...x86_64/mc/_log

    Check out the spec file and also lots of patches.....
    https://build.opensuse.org/package/show/Base:System/mc
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Sep 2012
    Posts
    5,752

    Default Re: Compiling Midnight Commander -- what does provide stdscr


  4. #4

    Default Re: Compiling Midnight Commander -- what does provide stdscr

    Thank you very much. I forgot to mention (sorry), I grabbed the source rpm from the repository (unpacked it because I needed to make some extra tests) and compiled it with to flavors -- slang (this succeeded) and ncurses (this didn't).

    So this patch mc-fix_lib_search_path.patch is on the list and it is applied -- actually it is the very first patch that is applied to the sources.

    Anyway, as you can see ncurses is found, configure does not complain, only this function "stdscr" is not -- so I wonder if there was a split indeed?

  5. #5
    Join Date
    Sep 2012
    Posts
    5,752

    Default Re: Compiling Midnight Commander -- what does provide stdscr

    Quote Originally Posted by truemacias View Post
    Anyway, as you can see ncurses is found, configure does not complain, only this function "stdscr" is not -- so I wonder if there was a split indeed?
    There are two different flavors of ncurses - libncurses5 and libncurses6. They are built from the same source but with different ABI (and library major version). libncurses6 is built with --enable-reentrant which changes some variable names, so stdscr becomes __nc_stdscr. You have two options

    1. Fix MC autoconfig checks. You will need to make sure proper includes are detected before and used in code looking for stdscr (so compiled program is using correct name). This is upstream issue and needs to be reported and fixed upstream.
    2. Use libncurses5 (and ncurses5-devel) to build your package as short term workaround.

  6. #6

    Default Re: Compiling Midnight Commander -- what does provide stdscr

    Currently I tried ncurses 5 approach, but with the same result as ncurses 6. I am not sure if it is not because ncurses-devel for version 5 requires ncurses-devel for version 6 (sic!) so in effect when compiling mc I have both versions and maybe the active one is ncurses 6. And this is the reason the error is still the same.

    I will try to change configure for mc next.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •