[Nix-dev] Issues with Nix from source on OSX
Jonas Pfenniger (zimbatm)
jonas at pfenniger.name
Wed Feb 6 14:01:36 CET 2013
Everything works if I use the pre-build binaries but I thought I would
share my experience by installing from source.
I have XCode 4.6 with the command-line tools installed on OSX 10.8.2.
Homebrew is also installed but they don't link things that are provided by
the OS like new autotools.
On a clean git repo ( 8add116a ), if I run the ./bootstrap.sh script I get
the following error:
$ ./bootstrap.sh
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force
autoreconf: configure.ac: tracing
autoreconf: running: glibtoolize --copy --force
glibtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, `config'.
glibtoolize: copying file `config/ltmain.sh'
glibtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and
glibtoolize: rerunning glibtoolize, to keep the correct libtool macros
in-tree.
glibtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am.
autoreconf: running: /usr/bin/autoconf --force
configure.ac:101: error: possibly undefined macro: AC_DEFINE
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
autoreconf: /usr/bin/autoconf failed with exit status: 1
$ autoconf --version
autoconf (GNU Autoconf) 2.61
Unfortunately I don't know how to debug auto* tools and didn't want to
invest too much time to learn it so I didn't keep following that route.
If I use the nix-1.3.tar.gz archive instead, the first error is that
sqlite3 is not found. I can work around that issue by using the sqlite3
provided by Homebrew but then the WWW::Curl package is missing and cpan
doesn't seem to be able to add it to my system. Again I don't know much
about cpan so I left it at that. Maybe these will help someone else get a
little bit further:
$ export SQLITE3_CFLAGS=-I/usr/local/Cellar/sqlite/3.7.15.1/include
$ export SQLITE3_LIBS="-L/usr/local/Cellar/sqlite/3.7.15.1/lib -lsqlite3"
$ ./configure
checking for a BSD-compatible install... /usr/local/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking for a sed that does not truncate output... /usr/local/bin/gsed
checking build system type... x86_64-apple-darwin12.2.1
checking host system type... x86_64-apple-darwin12.2.1
checking for the canonical Nix system name... x86_64-darwin
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking dependency style of g++... gcc3
checking how to print strings... printf
checking for a sed that does not truncate output... (cached)
/usr/local/bin/gsed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc...
/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld
checking if the linker
(/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm
checking the name lister (/usr/bin/nm) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking how to convert x86_64-apple-darwin12.2.1 file names to
x86_64-apple-darwin12.2.1 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin12.2.1 file names to toolchain
format... func_convert_file_noop
checking for /usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld
option to reload object files... -r
checking for objdump... no
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm output from gcc object... ok
checking for sysroot... no
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker
(/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) supports
shared libraries... yes
checking dynamic linker characteristics... darwin12.2.1 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++...
/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld
checking if the linker
(/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) is GNU ld... no
checking whether the g++ linker
(/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) supports
shared libraries... yes
checking for g++ option to produce PIC... -fno-common -DPIC
checking if g++ PIC flag -fno-common -DPIC works... yes
checking if g++ static flag -static works... no
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker
(/usr/llvm-gcc-4.2/libexec/gcc/i686-apple-darwin11/4.2.1/ld) supports
shared libraries... yes
checking dynamic linker characteristics... darwin12.2.1 dyld
checking how to hardcode library paths into programs... immediate
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for pubsetbuf... yes
checking for chroot... yes
checking for unshare... no
checking sched.h usability... yes
checking sched.h presence... yes
checking for sched.h... yes
checking sys/param.h usability... yes
checking sys/param.h presence... yes
checking for sys/param.h... yes
checking for sys/mount.h... yes
checking for lutimes... yes
checking whether it is possible to create a link to a symlink... no
checking locale usability... yes
checking locale presence... yes
checking for locale... yes
checking err.h usability... yes
checking err.h presence... yes
checking for err.h... yes
checking sys/personality.h usability... no
checking sys/personality.h presence... no
checking for sys/personality.h... no
checking linux/fs.h usability... no
checking linux/fs.h presence... no
checking for linux/fs.h... no
checking tr1/unordered_set usability... yes
checking tr1/unordered_set presence... yes
checking for tr1/unordered_set... yes
checking for curl... /usr/bin/curl
checking for bash... /bin/bash
checking for patch... /usr/bin/patch
checking for xmllint... /usr/bin/xmllint
checking for xsltproc... /usr/bin/xsltproc
checking for w3m... false
checking for flex... /usr/bin/flex
checking for bison... /usr/bin/bison
checking for perl... /usr/bin/perl
checking for sed... /usr/bin/sed
checking for tar... /usr/bin/tar
checking for bzip2... /usr/bin/bzip2
checking for xz... /Users/zimbatm/.nix-profile/bin/xz
checking for dot... /usr/local/bin/dot
checking for dblatex... no
checking for gzip... /usr/bin/gzip
checking for pv... pv
checking whether Perl is recent enough... yes
checking for the Perl installation prefix...
$(libdir)/perl5/site_perl/5.12.4/darwin-thread-multi-2level
checking for cat... /bin/cat
checking for tr... /usr/bin/tr
checking for openssl... /usr/bin/openssl
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for OPENSSL... yes
checking for BZ2_bzWriteOpen in -lbz2... yes
checking bzlib.h usability... yes
checking bzlib.h presence... yes
checking for bzlib.h... yes
checking for SQLITE3... yes
checking whether DBD::SQLite works... yes
checking whether WWW::Curl works... no
configure: error: in
`/Users/zimbatm/code/mediacore/paas/deploy-stuff/nixenv/nix-1.3':
configure: error: The Perl module WWW::Curl is missing.
See `config.log' for more details
$ sudo cpan install WWW::Curl
Password:
Going to read '/Users/zimbatm/.cpan/Metadata'
Database was generated on Mon, 04 Feb 2013 11:41:03 GMT
Fetching with LWP:
ftp://mirror.tje.me.uk/pub/mirrors/ftp.cpan.org/authors/01mailrc.txt.gz
Going to read '/Users/zimbatm/.cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Fetching with LWP:
ftp://mirror.tje.me.uk/pub/mirrors/ftp.cpan.org/modules/02packages.details.txt.gz
Going to read
'/Users/zimbatm/.cpan/sources/modules/02packages.details.txt.gz'
Database was generated on Wed, 06 Feb 2013 11:07:29 GMT
..............
New CPAN.pm version (v1.9800) available.
[Currently running version is v1.9456]
You might want to try
install CPAN
reload cpan
to both upgrade CPAN.pm and run the new version without leaving
the current session.
..............................................................DONE
Fetching with LWP:
ftp://mirror.tje.me.uk/pub/mirrors/ftp.cpan.org/modules/03modlist.data.gz
Going to read '/Users/zimbatm/.cpan/sources/modules/03modlist.data.gz'
............................................................................DONE
Going to write /Users/zimbatm/.cpan/Metadata
Running install for module 'WWW::Curl'
Running make for S/SZ/SZBALINT/WWW-Curl-4.15.tar.gz
Checksum for
/Users/zimbatm/.cpan/sources/authors/id/S/SZ/SZBALINT/WWW-Curl-4.15.tar.gz
ok
CPAN.pm: Going to build S/SZ/SZBALINT/WWW-Curl-4.15.tar.gz
Locating required external dependency bin:curl-config... found at
/usr/bin/curl-config.
The version is libcurl 7.24.0
Found curl.h in /usr/include/curl/curl.h
In file included from /usr/include/stdio.h:500,
from /usr/include/curl/curl.h:47:
/usr/include/secure/_stdio.h:48: error: syntax error in macro parameter list
/usr/include/secure/_stdio.h:55: error: syntax error in macro parameter list
Building curlopt-constants.c for your libcurl version
Building Easy.pm constants for your libcurl version
Building Share.pm constants for your libcurl version
Checking if your kit is complete...
Looks good
Writing Makefile for WWW::Curl
cp lib/WWW/Curl/Share.pm blib/lib/WWW/Curl/Share.pm
cp lib/WWW/Curl/Form.pm blib/lib/WWW/Curl/Form.pm
cp lib/WWW/Curl.pm blib/lib/WWW/Curl.pm
cp lib/WWW/Curl/Easy.pm blib/lib/WWW/Curl/Easy.pm
cp lib/WWW/Curl/Multi.pm blib/lib/WWW/Curl/Multi.pm
/usr/bin/perl "-Iinc" /System/Library/Perl/5.12/ExtUtils/xsubpp -typemap
/System/Library/Perl/5.12/ExtUtils/typemap -typemap typemap Curl.xs >
Curl.xsc && mv Curl.xsc Curl.c
clang -c -I/usr/include -arch i386 -arch x86_64 -g -pipe -fno-common
-DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include
-Os -DVERSION=\"4.15\" -DXS_VERSION=\"4.15\"
"-I/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE" Curl.c
Running Mkbootstrap for WWW::Curl ()
chmod 644 Curl.bs
rm -f blib/arch/auto/WWW/Curl/Curl.bundle
LD_RUN_PATH="/usr/lib" clang -mmacosx-version-min=10.8 -arch i386 -arch
x86_64 -bundle -undefined dynamic_lookup -L/usr/local/lib -fstack-protector
Curl.o -o blib/arch/auto/WWW/Curl/Curl.bundle \
-lcurl \
chmod 755 blib/arch/auto/WWW/Curl/Curl.bundle
cp Curl.bs blib/arch/auto/WWW/Curl/Curl.bs
chmod 644 blib/arch/auto/WWW/Curl/Curl.bs
Manifying blib/man3/WWW::Curl.3pm
SZBALINT/WWW-Curl-4.15.tar.gz
/usr/bin/make -- OK
'YAML' not installed, will not store persistent state
Running make test
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'inc', 'blib/lib', 'blib/arch')" t/*.t
t/00constants.t ........... ok
t/01basic.t ............... ok
t/02callbacks.t ........... ok
t/04abort-test.t .......... ok
t/05progress.t ............ ok
t/06http-post.t ........... skipped: Not performing http POST/upload tests
t/07ftp-upload.t .......... skipped: Not performing ftp upload tests
t/08ssl.t ................. ok
t/09times.t ............... ok
t/10errbuf.t .............. ok
t/13slowleak.t ............ skipped: Not performing slow leakage regression
test
t/14duphandle.t ........... ok
t/15duphandle-callback.t .. ok
t/16formpost.t ............ skipped: Not performing POST
t/17slist.t ............... skipped: Not performing printenv cgi tests
t/18twinhandles.t ......... ok
t/19multi.t ............... 1/20
# Failed test 'The read or write fdset contains one fd'
# at t/19multi.t line 61.
# Failed test 'The read or write fdset still only contains one fd'
# at t/19multi.t line 64.
# Failed test 'The read or write fdset contains two fds'
# at t/19multi.t line 67.
t/19multi.t ............... 16/20 # Looks like you failed 3 tests of 20.
t/19multi.t ............... Dubious, test returned 3 (wstat 768, 0x300)
Failed 3/20 subtests
t/20undefined_subs.t ...... ok
t/21write-to-scalar.t ..... ok
t/meta.t .................. skipped: Test::CPAN::Meta required for testing
META.yml
t/pod-coverage.t .......... skipped: Test::Pod::Coverage 1.04 required for
testing POD coverage
t/pod.t ................... ok
Test Summary Report
-------------------
t/19multi.t (Wstat: 768 Tests: 20 Failed: 3)
Failed tests: 11-13
Non-zero exit status: 3
Files=22, Tests=821, 46 wallclock secs ( 0.17 usr 0.06 sys + 1.09 cusr
0.20 csys = 1.52 CPU)
Result: FAIL
Failed 1/22 test programs. 3/821 subtests failed.
make: *** [test_dynamic] Error 255
SZBALINT/WWW-Curl-4.15.tar.gz
/usr/bin/make test -- NOT OK
//hint// to see the cpan-testers results for installing this module, try:
reports SZBALINT/WWW-Curl-4.15.tar.gz
Running make install
make test had returned bad status, won't install without force
Cheers,
Jonas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.science.uu.nl/pipermail/nix-dev/attachments/20130206/a33342f3/attachment-0001.html
More information about the nix-dev
mailing list