Configure (chm_open) fail to find chmlib

  • Huang-Nan Huang

    Huang-Nan Huang - 2004-11-14

    I am using the Mac OS X 10.3 to compile the xchm 0.9.6. I have installed the chmlib-0.35 and wxMac-2.5.3. After that, the following error appears:
    checking chm_lib.h usability... yes
    checking chm_lib.h presence... yes
    checking for chm_lib.h... yes
    checking for chm_open in -lchm... no
    configure: error: Can't find/use -lchm. Please install CHMLIB first.
    How could I solve this problem?

    Note: my chmlib is installed in /usr/local/lib with the following files:
    -rw-r--r--  1 root  staff  66216 14 11 17:48 libchm.0.0.0.dylib
    lrwxr-xr-x  1 root  staff     18 14 11 17:48 libchm.0.dylib -> libchm.0.0.0.dylib
    -rw-r--r--  1 root  staff  57488 14 11 17:48 libchm.a
    lrwxr-xr-x  1 root  staff     18 14 11 17:48 libchm.dylib -> libchm.0.0.0.dylib
    -rw-r--r--  1 root  staff    819 14 11 17:48

    • Razvan Cojocaru

      Razvan Cojocaru - 2004-11-15

      I don't know, don't have access to a Mac.
      I guess you should try to install chmlib in /usr instead of /usr/local. I seem to remember that some people found this to be the problem on Mac OS. If you have an file in /etc, you might try to add a line that says:


      and run ldconfig. If all else fails, you might want to read Martin Use's Mac OS HOWTO at:

      and maybe contact him about it.

    • Arun G Nair

      Arun G Nair - 2005-01-07

          I too have the same problem, but on my OpenBSD 3.6. Any work arounds ?
      ./configure --with-wx-config=/usr/local/bin/wxgtk-2.4-config CFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/lib

      This is what i used...

    • Richard Project

      Richard Project - 2005-09-20

      A quick hack to force configure to procede even if the test fails is to just open up the "configure" file and comment out (by placing a # at the beginning of the lines) the if-else check for -lchm so that it is always true. Search for the line:

      "if test $ac_cv_lib_chm_chm_open = yes; then"

      comment out this line. Then skip to the line:


      and comment from this line to the closing "fi" line.
      Note: Once you do this, you will have to manually verify that libchm is installed by locating the files. You may also have to manually put this lib dir location in the makefile at the "LINKOPT" or "LIBS" label like so: "-L/path/libchm/dir".



Log in to post a comment.