搜尋此網誌

openwrt tool cmake build fail due to lacking /lib/libtinfo.so.5

  
         The cmake make file friendly tell us to add /lib/libtinfo.so.5 into linker command line, but it's didn't
   tell us how in detail.

          I spent a lot of time to figure out it, try follow :

            just export LDFLAGS="-ltinfo"; before you run cmake bootstrap shell script.
     so, it would look like this:

                   export LDFLAGS="-ltinfo"; ./bootstrap; make ;make install.

         on openwrt build root :

       add overlap build target on tools/cmake/Makefile:

define Host/Configure

echo "####################### overlap host configure ###################"
cd $(HOST_BUILD_DIR) && LibArchive_LIBRARY=libtinfo.so.5 LibArchive_INCLUDE_DIR=/lib export LDFLAGS="-ltinfo"; \
./bootstrap --system-libs --no-system-zlib --system-bzip2 --no-qt-gui --no-system-libarchive \
--prefix=$(STAGING_DIR_HOST) --docdir=$(STAGING_DIR_HOST)/doc --mandir=$(STAGING_DIR_HOST)/man
endef