New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could NOT find ICONV (Origin: bugzilla #787088) #6248
Comments
I have this error on freebsd 10.3 also: root@:~/doxygen-master # cmake -G "Unix Makefiles"
-- The C compiler identification is Clang 3.4.1
-- The CXX compiler identification is Clang 3.4.1
-- Check for working C compiler: /usr/bin/cc
-- Check for working C compiler: /usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found PythonInterp: /usr/local/bin/python2.7 (found version "2.7.11")
-- Found FLEX: /usr/bin/flex (found version "2.5.37")
-- Found BISON: /usr/local/bin/bison (found version "3.1")
-- Looking for pthread.h
-- Looking for pthread.h - found
-- Looking for pthread_create
-- Looking for pthread_create - not found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Looking for iconv_open
-- Looking for iconv_open - found
-- Performing Test ICONV_COMPILES
-- Performing Test ICONV_COMPILES - Failed
-- Could NOT find ICONV (missing: ICONV_COMPILES)
CMake Error at cmake/FindIconv.cmake:130 (MESSAGE):
Unable to determine iconv() signature
Call Stack (most recent call first):
CMakeLists.txt:105 (find_package)
uname -a
FreeBSD 10.3-RELEASE-p29 FreeBSD 10.3-RELEASE-p29 #0: Tue Apr 3 19:55:05 UTC 2018 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC amd64 |
@joenio did you install libiconv (development version for the |
I recently installed doxygen (development) on a system with Cygwin and also installed libiconv (after I first missed it) and had no problems. |
I have libiconv installed by the system package: root@:~/doxygen-master # pkg search libiconv
libiconv-1.14_11 Character set conversion library
root@:~/doxygen-master # pkg show libiconv-1.14_11
libiconv-1.14_11
Name : libiconv
Version : 1.14_11
Installed on : Sat Aug 3 15:51:42 2019 UTC
Origin : converters/libiconv
Architecture : FreeBSD:10:amd64
Prefix : /usr/local
Categories : devel converters
Licenses : GPLv3
Maintainer : gnome@FreeBSD.org
WWW : http://www.gnu.org/software/libiconv/
Comment : Character set conversion library
Options :
DOCS : on
ENCODINGS : on
PATCHES : off
Shared Libs provided:
libiconv.so.2
libcharset.so.1
Annotations :
FreeBSD_version: 1004000
repo_type : binary
repository : FreeBSD
Flat size : 2.21MiB
Description :
This library provides an iconv() implementation, for use on systems which
don't have one, or whose implementation cannot convert from/to Unicode.
It can convert from any of these encodings to any other, through Unicode
conversion. It has also some limited support for transliteration, i.e.
when a character cannot be represented in the target character set, it can
be approximated through one or several similarly looking characters.
libiconv is for you if your application needs to support multiple character
encodings, but that support lacks from your system.
See either README or website for the list of supported encodings.
WWW: http://www.gnu.org/software/libiconv/
Locked : no
root@:~/doxygen-master # pkg list libiconv
/usr/local/bin/iconv
/usr/local/include/iconv.h
/usr/local/include/libcharset.h
/usr/local/include/localcharset.h
/usr/local/lib/charset.alias
/usr/local/lib/libcharset.a
/usr/local/lib/libcharset.so
/usr/local/lib/libcharset.so.1
/usr/local/lib/libcharset.so.1.0.0
/usr/local/lib/libiconv.a
/usr/local/lib/libiconv.so
/usr/local/lib/libiconv.so.2
/usr/local/lib/libiconv.so.2.5.1
/usr/local/man/man1/iconv.1.gz
/usr/local/man/man3/iconv.3.gz
/usr/local/man/man3/iconv_close.3.gz
/usr/local/man/man3/iconv_open.3.gz
/usr/local/man/man3/iconv_open_into.3.gz
/usr/local/man/man3/iconvctl.3.gz
/usr/local/share/doc/libiconv/iconv.1.html
/usr/local/share/doc/libiconv/iconv.3.html
/usr/local/share/doc/libiconv/iconv_close.3.html
/usr/local/share/doc/libiconv/iconv_open.3.html
/usr/local/share/doc/libiconv/iconv_open_into.3.html
/usr/local/share/doc/libiconv/iconvctl.3.html
/usr/local/share/licenses/libiconv-1.14_11/GPLv3
/usr/local/share/licenses/libiconv-1.14_11/LICENSE
/usr/local/share/licenses/libiconv-1.14_11/catalog.mk |
I'm not sure, but maybe the Find for Iconv doesn't like the local directory (I think the FindIconv.cmake on the cmake directory of doxygen is used). Some alternatives:
|
thanks for help @albert-github, but none of these works, I tried also a fresh install of libiconv with no success, follow my /root/doxygen-master/CMakeFiles/CMakeError.log: root@:~/doxygen-master # cat /root/doxygen-master/CMakeFiles/CMakeError.log
Determining if the pthread_create exist failed with the following output:
Change Dir: /root/doxygen-master/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_91eea/fast"
/usr/bin/make -f CMakeFiles/cmTC_91eea.dir/build.make CMakeFiles/cmTC_91eea.dir/build
Building C object CMakeFiles/cmTC_91eea.dir/CheckSymbolExists.c.o
/usr/bin/cc -I/usr/local/include -o CMakeFiles/cmTC_91eea.dir/CheckSymbolExists.c.o -c /root/doxygen-master/CMakeFiles/CMakeTmp/CheckSymbolExists.c
Linking C executable cmTC_91eea
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_91eea.dir/link.txt --verbose=1
/usr/bin/cc CMakeFiles/cmTC_91eea.dir/CheckSymbolExists.c.o -o cmTC_91eea
CMakeFiles/cmTC_91eea.dir/CheckSymbolExists.c.o: In function `main':
/root/doxygen-master/CMakeFiles/CMakeTmp/CheckSymbolExists.c:(.text+0x19): undefined reference to `pthread_create'
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
Stop.
make[1]: stopped in /root/doxygen-master/CMakeFiles/CMakeTmp
*** Error code 1
Stop.
make: stopped in /root/doxygen-master/CMakeFiles/CMakeTmp
File /root/doxygen-master/CMakeFiles/CMakeTmp/CheckSymbolExists.c:
/* */
#include <pthread.h>
int main(int argc, char** argv)
{
(void)argv;
#ifndef pthread_create
return ((int*)(&pthread_create))[argc];
#else
(void)argc;
return 0;
#endif
}
Determining if the function pthread_create exists in the pthreads failed with the following output:
Change Dir: /root/doxygen-master/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_3064b/fast"
/usr/bin/make -f CMakeFiles/cmTC_3064b.dir/build.make CMakeFiles/cmTC_3064b.dir/build
Building C object CMakeFiles/cmTC_3064b.dir/CheckFunctionExists.c.o
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create -o CMakeFiles/cmTC_3064b.dir/CheckFunctionExists.c.o -c /usr/local/share/cmake/Modules/CheckFunctionExists.c
Linking C executable cmTC_3064b
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_3064b.dir/link.txt --verbose=1
/usr/bin/cc -DCHECK_FUNCTION_EXISTS=pthread_create CMakeFiles/cmTC_3064b.dir/CheckFunctionExists.c.o -o cmTC_3064b -lpthreads
/usr/bin/ld: cannot find -lpthreads
cc: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
Stop.
make[1]: stopped in /root/doxygen-master/CMakeFiles/CMakeTmp
*** Error code 1
Stop.
make: stopped in /root/doxygen-master/CMakeFiles/CMakeTmp
Performing C++ SOURCE FILE Test ICONV_COMPILES failed with the following output:
Change Dir: /root/doxygen-master/CMakeFiles/CMakeTmp
Run Build Command:"/usr/bin/make" "cmTC_b3571/fast"
/usr/bin/make -f CMakeFiles/cmTC_b3571.dir/build.make CMakeFiles/cmTC_b3571.dir/build
Building CXX object CMakeFiles/cmTC_b3571.dir/src.cxx.o
/usr/bin/c++ -I/usr/local/include -DICONV_COMPILES -o CMakeFiles/cmTC_b3571.dir/src.cxx.o -c /root/doxygen-master/CMakeFiles/CMakeTmp/src.cxx
Linking CXX executable cmTC_b3571
/usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_b3571.dir/link.txt --verbose=1
/usr/bin/c++ -DICONV_COMPILES CMakeFiles/cmTC_b3571.dir/src.cxx.o -o cmTC_b3571
CMakeFiles/cmTC_b3571.dir/src.cxx.o: In function `main':
/root/doxygen-master/CMakeFiles/CMakeTmp/src.cxx:(.text+0x29): undefined reference to `libiconv'
c++: error: linker command failed with exit code 1 (use -v to see invocation)
*** Error code 1
Stop.
make[1]: stopped in /root/doxygen-master/CMakeFiles/CMakeTmp
*** Error code 1
Stop.
make: stopped in /root/doxygen-master/CMakeFiles/CMakeTmp
Source file was:
#include <iconv.h>
int main() {
iconv(iconv_t(-1), 0, 0, 0, 0);
} I tried also: cmake -G "Unix Makefiles" -DCMAKE_REQUIRED_INCLUDES=/usr/local/include/ I'm following try to solve this... |
I guess the problem is with clang compiler, have you ever success compiling doxygen with clang instead of gcc? |
I myself didn't use the clang compiler. I checked for a Find_Iconv (google: find iconv cmake) and found https://github.com/Kitware/CMake/blob/master/Modules/FindIconv.cmake and its documentation https://cmake.org/cmake/help/git-stage/module/FindIconv.html maybe you can use this file instead of the one provided by doxygen. In your log file I see: I also see that the first message is about Please also post the complete terminal output of the |
@joenio I use clang on MacOSX without problems. I think the problem is your installation. pthread and iconv can be part of libc on some systems, or need to be linked explicitly on other systems. The cmake scripts try to detect what the configuration is, but somehow fail on your system, i.e. they try to link pthread but fail to find it (maybe because it is already part of libc) and they don't link iconv, but that causes an unresolved symbol (so it probably needed to be linked separately). So I don't think this is a doxygen specific issue. |
in fact, it's not a doxygen issue, it's a freebsd 10.3 issue, I discovered that the system has 2 libiconv.h installed, one at /usr/local/include/ and other at /usr/include/, I removed one at /usr/local/include/ (provided by libiconv) and cmake works as expected. pkg remove libiconv
pkg remove iconv but my real issue is to fix the cpantester building where I have no way to remove or install anything by hand (joenio/alien-doxyparse#1), that way I found a cmake flag to do the job without removing libiconv myself, cmake -G "Unix Makefiles" -DCMAKE_IGNORE_PATH=/usr/local/include/ before, I reinstalled libiconv package and all works well pkg install libiconv I'm going to fix alien-doxyparse Perl package to add that cmake flag CMAKE_IGNORE_PATH, I hope it will works as expected. thanks @doxygen and @albert-github for the help! |
Seen the comments I think the original problem does not exist anymore and the problem of joenio is a non doxygen problem, so the issue can be closed. |
status NEW severity normal in component build for ---
Reported in version 1.8.14-GIT on platform Other
Assigned to: Dimitri van Heesch
Original attachment names and IDs:
On 2017-08-31 15:29:32 +0000, GCHAN310@GMAIL.COM wrote:
The text was updated successfully, but these errors were encountered: