Opened 10 years ago

Closed 10 years ago

#45695 closed defect (invalid)

libiconv: build cannot find stdarg.h

Reported by: normadize@… Owned by: ryandesign (Ryan Carsten Schmidt)
Priority: Normal Milestone:
Component: ports Version: 2.3.2
Keywords: Cc:
Port: libiconv

Description (last modified by larryv (Lawrence Velázquez))

I'm on Yosemite 10.10 final, XCode 6.1 installed. Seems like it's trying to include a missing file.

sudo port -v install libiconv
--->  Computing dependencies for libiconv.
--->  Building libiconv
if test -n "$GNULIB_TOOL"; then \
	  $GNULIB_TOOL --lib=libicrt --source-base=srclib --m4-base=srcm4 --makefile-name=Makefile.gnulib --no-libtool --local-dir=gnulib-local --no-vc-files \
	    --import binary-io error gettext gettext-h mbstate memmove progname relocatable-prog safe-read sigpipe stdio stdlib strerror unistd uniwidth/width unlocked-io xalloc libiconv-misc; \
	fi
cd libcharset && make -f Makefile.devel all
make[1]: Nothing to be done for `all'.
cd preload && make -f Makefile.devel all
make[1]: Nothing to be done for `all'.
make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_libiconv/libiconv/work/libiconv-1.14'
cd lib && /Applications/Xcode.app/Contents/Developer/usr/bin/make all
make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_libiconv/libiconv/work/libiconv-1.14/lib'
/bin/sh ../libtool --mode=compile /usr/bin/clang -I. -I. -I../include -I./../include -I.. -I./..  -pipe -Os -arch x86_64 -fvisibility=hidden -DLIBDIR=\"/opt/local/lib\" -DBUILDING_LIBICONV -DBUILDING_DLL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/opt/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libiconv_set_relocation_prefix -Drelocate=libiconv_relocate -DHAVE_CONFIG_H -c ./iconv.c
libtool: compile:  /usr/bin/clang -I. -I. -I../include -I./../include -I.. -I./.. -pipe -Os -arch x86_64 -fvisibility=hidden -DLIBDIR=\"/opt/local/lib\" -DBUILDING_LIBICONV -DBUILDING_DLL -DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"/opt/local/lib\" -DNO_XMALLOC -Dset_relocation_prefix=libiconv_set_relocation_prefix -Drelocate=libiconv_relocate -DHAVE_CONFIG_H -c ./iconv.c  -fno-common -DPIC -o .libs/iconv.o
In file included from ./iconv.c:21:
In file included from ../include/iconv.h:117:
/usr/include/wchar.h:89:10: fatal error: 'stdarg.h' file not found
#include <stdarg.h>
         ^
1 error generated.
make[1]: *** [iconv.lo] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_libiconv/libiconv/work/libiconv-1.14/lib'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_libiconv/libiconv/work/libiconv-1.14'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_libiconv/libiconv/work/libiconv-1.14" && /usr/bin/make CC=/usr/bin/clang -f Makefile.devel && /usr/bin/make -j8 -w all
Exit code: 2
Error: org.macports.build for port libiconv returned: command execution failed
Warning: targets not executed for libiconv: org.macports.activate org.macports.build org.macports.destroot org.macports.install
Please see the log file for port libiconv for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_libiconv/libiconv/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port libiconv failed

Change History (5)

comment:1 in reply to:  description Changed 10 years ago by normadize@…

XCode was installed normally and successfully as far as I can tell. However, there is no /usr/include/stdarg.h but there is /usr/include/c++/4.2.1/tr1/stdarg.h

clang issues?

comment:2 in reply to:  description ; Changed 10 years ago by normadize@…

I think there's somethign odd going on with clang. Command LIne tools are installed, as per

$ xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

$ gcc --version
Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 6.0 (clang-600.0.54) (based on LLVM 3.5svn)
Target: x86_64-apple-darwin14.0.0
Thread model: posix

It shows the gxx-include-dir to be the one that does contain stdarg.h but shouldn't the prefix be /Library/Developer/CommandLineTools/usr instead of /Applications/Xcode.app/Contents/Developer/usr ?

Same goes for

$ xcode-select -p
/Applications/Xcode.app/Contents/Developer

Should that be /Library/Developer/CommandLineTools ?

Note that I download XCode 6.1 and the CLT 6.1 from the apple developer website and installed the pkg manually. I didn't do it from the App Store.

comment:3 in reply to:  2 Changed 10 years ago by larryv (Lawrence Velázquez)

Description: modified (diff)
Owner: changed from macports-tickets@… to ryandesign@…
Port: libiconv added
Summary: libiconv fails to buildlibiconv: build cannot find stdarg.h

Replying to normadize@…:

It shows the gxx-include-dir to be the one that does contain stdarg.h but shouldn't the prefix be /Library/Developer/CommandLineTools/usr instead of /Applications/Xcode.app/Contents/Developer/usr ?

Same goes for

$ xcode-select -p
/Applications/Xcode.app/Contents/Developer

Should that be /Library/Developer/CommandLineTools ?

No. Your active developer directory is correct.

Please run the following commands and attach the main.log file immediately afterwards:

% sudo port clean libiconv
% sudo port install libiconv

comment:4 Changed 10 years ago by normadize@…

I just did a complete wipe and reinstall of XCode and CLT (by wipe I mean moved to thrash then manually deleting all files mentioned in /var/db/receipts/*{DevSDK,CLTools}*.bom) and installed XCode from App Store and CLT by doing xcode-select --install.

Attempting to install libiconv again (needed by gcc49), I now get a different error:

$ sudo port -v install libiconv
--->  Computing dependencies for libiconv.
--->  Building libiconv
if test -n "$GNULIB_TOOL"; then \
	  $GNULIB_TOOL --lib=libicrt --source-base=srclib --m4-base=srcm4 --makefile-name=Makefile.gnulib --no-libtool --local-dir=gnulib-local --no-vc-files \
	    --import binary-io error gettext gettext-h mbstate memmove progname relocatable-prog safe-read sigpipe stdio stdlib strerror unistd uniwidth/width unlocked-io xalloc libiconv-misc; \
	fi
cd libcharset && make -f Makefile.devel all
make[1]: Nothing to be done for `all'.
cd preload && make -f Makefile.devel all
make[1]: Nothing to be done for `all'.
make: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_libiconv/libiconv/work/libiconv-1.14'
cd lib && /Applications/Xcode.app/Contents/Developer/usr/bin/make all
make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_libiconv/libiconv/work/libiconv-1.14/lib'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_libiconv/libiconv/work/libiconv-1.14/lib'
cd preload && /Applications/Xcode.app/Contents/Developer/usr/bin/make all
make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_libiconv/libiconv/work/libiconv-1.14/preload'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_libiconv/libiconv/work/libiconv-1.14/preload'
cd srclib && /Applications/Xcode.app/Contents/Developer/usr/bin/make all
make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_libiconv/libiconv/work/libiconv-1.14/srclib'
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_libiconv/libiconv/work/libiconv-1.14'
make[2]: Nothing to be done for `am--refresh'.
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_libiconv/libiconv/work/libiconv-1.14'
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
make[2]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_libiconv/libiconv/work/libiconv-1.14/srclib'
make[3]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_libiconv/libiconv/work/libiconv-1.14'
make[3]: Nothing to be done for `am--refresh'.
make[3]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_libiconv/libiconv/work/libiconv-1.14'
make[2]: Nothing to be done for `all-am'.
make[2]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_libiconv/libiconv/work/libiconv-1.14/srclib'
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_libiconv/libiconv/work/libiconv-1.14/srclib'
cd src && /Applications/Xcode.app/Contents/Developer/usr/bin/make all
make[1]: Entering directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_libiconv/libiconv/work/libiconv-1.14/src'
/usr/bin/clang -c -I. -I. -I.. -I../include -I./../include -I../srclib -I./../srclib -I../lib -pipe -Os -arch x86_64  -DINSTALLDIR=\"/opt/local/bin\" -DLOCALEDIR=\"/opt/local/share/locale\" ./iconv_no_i18n.c
/usr/bin/clang -c -I. -I. -I.. -I../include -I./../include -I../srclib -I./../srclib -I../lib -pipe -Os -arch x86_64  -DINSTALLDIR=\"/opt/local/bin\" -DLOCALEDIR=\"/opt/local/share/locale\" ./iconv.c
In file included from ./iconv_no_i18n.c:2:
In file included from ./iconv.c:27:
In file included from ../include/iconv.h:117:
In file included from /usr/include/wchar.h:76:
/usr/include/sys/_types/_mbstate_t.h:31In file included from ./iconv.c:27:
In file included from ../include/iconv.h:117:
In file included from /usr/include/wchar.h:76:
/usr/include/sys/_types/_mbstate_t.h:31:28: error: :28: errorcannot combine with previous 'type-name' declaration specifier:
cannot combine with previous 'type-name' declaration specifier
typedef __darwin_mbstate_t mbstate_t;typedef __darwin_mbstate_t mbstate_t;

                           ^                           ^

../config.h:865../config.h::19865:: 19note::  expanded from macro 'mbstate_t'note
: expanded from macro 'mbstate_t'
#define mbstate_t int
                  ^
#define mbstate_t int
                  ^
1 error generated.
1 error generated.
make[1]: *** [iconv.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [iconv_no_i18n.o] Error 1
make[1]: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_libiconv/libiconv/work/libiconv-1.14/src'
make: *** [all] Error 2
make: Leaving directory `/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_libiconv/libiconv/work/libiconv-1.14'
Command failed:  cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_libiconv/libiconv/work/libiconv-1.14" && /usr/bin/make CC=/usr/bin/clang -f Makefile.devel && /usr/bin/make -j8 -w all
Exit code: 2
Error: org.macports.build for port libiconv returned: command execution failed
Warning: targets not executed for libiconv: org.macports.activate org.macports.build org.macports.destroot org.macports.install
Please see the log file for port libiconv for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_textproc_libiconv/libiconv/main.log
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port libiconv failed

I then did, as you suggested:

$ sudo port clean libiconv
$ sudo port install libiconv

... and now it worked. I take it that something was fixed on the Macports side?

Cheers

comment:5 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

Resolution: invalid
Status: newclosed

Nope, we changed nothing. The problem was that you did not clean before trying again.

Note: See TracTickets for help on using tickets.