#4 ncurses header files


Hi, i noticed you are adding support for the libburnia libs. Thats very welcome. Thank you.
I dont know if this feature request can be implemented. In Arch Linux the ncurses headers are placed in /usr/include instead of /usr/include/ncursesw so i have to apply a patch like the attached one for cdw to find them. The maintainer of cdw in the AUR uses sed http://aur.archlinux.org/packages/cdw/PKGBUILD
Is there any way to autodetect the header files? That would make packaging cdw much easier. Anything that could improve the situation would help.


  • acerion

    acerion - 2011-03-28
    • assigned_to: nobody --> acerion
  • acerion

    acerion - 2011-03-28

    About libburnia libs: yes, I've started using, them, but currently only to extract information about a disc that can't be easily extracted using xorriso. For now.

    About correct location of ncurses header files: I'm sure that Autotools provide some handy trick to solve this kind of problems. I will look into it and commit to CVS an appropriate change once I learn how to do this.

  • Nobody/Anonymous

    On my Gentoo box here using =sys-libs/ncurses-5.7-r7, ncurses puts header files within the following folders; /usr/include and /usr/include/ncursesw.

    For some reason, (whatever) might not be recursing subfolders, or (it) might be looking in /usr/local only and not /usr. Might attaching config.log be a good suggestion?

    Not an expert, but with my above location of header files, I don't see this problem here. <shrugs>

  • acerion

    acerion - 2011-04-04

    I think I know who wrote the comment on 29.03 :)
    Thank you for the offer with config.log, but I see on my machine that it wouldn't tell me much.

    There will be two sets of changes to solve this problem:
    - one part will be moving all references to <whatever/ncurses.h>, <whatever/form.h> and <whatever/menu.h> from cdw *.c files to cdw header files, so there will be only 2 or 3 places where I would have to control which form of include is correct: <ncurses.h> or <ncursesw/ncurses.h>;
    - another part will be adding some shell code snippet to configure.ac that will detect location of ncurses header files on target system;

    I've seen on the net that people have similar problems, and it seems that the most elegant solution would be to write a macro in m4 (google for AC_NCURSES if you are interested), but I think that I will use more straightforward solution: shell code that searches for ncurses.h (and related) files. Hopefully this will work just fine, I will install Arch just to test this change.

    Implementing this may take 2-3 weeks, I'm rather busy at work these days :(

  • Nobody/Anonymous

    Thanks a lot for considering implementing it!

  • acerion

    acerion - 2011-04-10

    Change in how ncurses headers are included has been committed to CSV. It works on my box, but it hasn't been tested in Arch Linux (yet). I have a feeling that the fix will have to be further improved.

    Two notes for future reference:
    1. This bug
    indicates that this problem shouldn't exist anymore, at least in 5.6 version of ncurses package
    2. On the other hand ncurses packages 5.8 and 5.9 from Arch Linux repository (available here: http://www.archlinux.org/packages/testing/x86_64/ncurses/\) show that fix from version 5.6 is not applied to newer versions of ncurses packages. Unfortunately I don't have a quick access to version 5.6 of the package, so I have no way to tell how this was fixed in version 5.6.

  • Nobody/Anonymous

    Yes this has been reverted along the way. If you can provide a patch against 0.6.0 for this i can test this. Alternatively a tarball from cvs will do as well. Sorry, cant checkout myself.

  • Nobody/Anonymous

    Sorry, i didnt remember i could download a tarball. Compilation fails:

    ar cru libcdwdiscanddrive.a cdw_cdio.o cdw_cdio_drives.o cdw_disc.o cdw_drive.o
    ranlib libcdwdiscanddrive.a
    make[3]: Leaving directory `/home/user/cdw/src/cdw-0.7.0/src/disc_and_drive'
    make[3]: Entering directory `/home/user/cdw/src/cdw-0.7.0/src'
    gcc -DHAVE_CONFIG_H -I. -I.. -D _FILE_OFFSET_BITS=64 -I../src/ -I../src/external_tools/ -I../src/tasks/ -I../src/utilities/ -I../src/user_interface/ -I../src/configuration/ -I../src/native_file_system/ -I../src/optical_file_systems/ -I../src/disc_and_drive/ -I../gnulib/lib/ -DNDEBUG -std=gnu99 -O2 -march=i686 -mtune=generic -O2 -pipe -MT cdw-cddb.o -MD -MP -MF .deps/cdw-cddb.Tpo -c -o cdw-cddb.o `test -f 'cddb.c' || echo './'`cddb.c
    gcc -DHAVE_CONFIG_H -I. -I.. -D _FILE_OFFSET_BITS=64 -I../src/ -I../src/external_tools/ -I../src/tasks/ -I../src/utilities/ -I../src/user_interface/ -I../src/configuration/ -I../src/native_file_system/ -I../src/optical_file_systems/ -I../src/disc_and_drive/ -I../gnulib/lib/ -DNDEBUG -std=gnu99 -O2 -march=i686 -mtune=generic -O2 -pipe -MT cdw-main.o -MD -MP -MF .deps/cdw-main.Tpo -c -o cdw-main.o `test -f 'main.c' || echo './'`main.c
    cddb.c:28:30: fatal error: ncursesw/ncurses.h: No such file or directory
    compilation terminated.
    make[3]: *** [cdw-cddb.o] Error 1
    make[3]: *** Waiting for unfinished jobs....
    mv -f .deps/cdw-main.Tpo .deps/cdw-main.Po
    make[3]: Leaving directory `/home/user/cdw/src/cdw-0.7.0/src'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/home/user/cdw/src/cdw-0.7.0/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/user/cdw/src/cdw-0.7.0'
    make: *** [all] Error 2

  • acerion

    acerion - 2011-04-17

    Thank you for the report, I have committed a change to CVS head. I have tested this today on my 32-bit machine (installed Arch Linux 2010.05 and got latest updates of packages from default repository). The code compiles, ncurses headers seem to be detected and included correctly, the program starts correctly.

    This problem appears to be solved, I will keep this article open until I finish tests phase.

  • acerion

    acerion - 2011-04-17

    > I have committed a change to CVS head
    ... a change that fixes this remaining problem, of course :)

  • Nobody/Anonymous

    Thanks a lot, it compiles fine now.

  • acerion

    acerion - 2011-07-12
    • status: open --> closed
  • acerion

    acerion - 2011-07-12

    It seems to be working in soon-to-be-released cdw 0.7.0, I'm closing this item.


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks