Opened 10 years ago

Last modified 10 years ago

#45695 closed defect

libiconv: build cannot find stdarg.h — at Version 3

Reported by: normadize@… Owned by: ryandesign@…
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 (3)

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
Note: See TracTickets for help on using tickets.