Friday, April 23, 2010

git-core +svn MacPorts Install in Snow Leopard

Paul Downman has a great article on converting svn to git repositories, but upon trying to run the first command in OS X 10.6.2:
sudo port install git-core +svn
I got:
...
--->  Building cyrus-sasl2
Error: Target org.macports.build returned: shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_security_cyrus-sasl2/work/cyrus-sasl-2.1.23" && /usr/bin/make -j3 all " returned error 2
Command output:  fi
if /bin/sh ../libtool --mode=compile /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../include   -I/opt/local/include -I/opt/local/include  -Wall -W -O2 -arch x86_64 -MT db_ndbm.lo -MD -MP -MF ".deps/db_ndbm.Tpo" \
   -c -o db_ndbm.lo `test -f 'db_ndbm.c' || echo './'`db_ndbm.c; \
 then mv -f ".deps/db_ndbm.Tpo" ".deps/db_ndbm.Plo"; \
 else rm -f ".deps/db_ndbm.Tpo"; exit 1; \
 fi
if /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../include   -I/opt/local/include -I/opt/local/include  -Wall -W -O2 -arch x86_64 -MT db_ndbm.o -MD -MP -MF ".deps/db_ndbm.Tpo" \
   -c -o db_ndbm.o `test -f 'db_ndbm.c' || echo './'`db_ndbm.c; \
 then mv -f ".deps/db_ndbm.Tpo" ".deps/db_ndbm.Po"; \
 else rm -f ".deps/db_ndbm.Tpo"; exit 1; \
 fi
if /usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../include   -I/opt/local/include -I/opt/local/include  -Wall -W -O2 -arch x86_64 -MT allockey.o -MD -MP -MF ".deps/allockey.Tpo" \
   -c -o allockey.o `test -f 'allockey.c' || echo './'`allockey.c; \
 then mv -f ".deps/allockey.Tpo" ".deps/allockey.Po"; \
 else rm -f ".deps/allockey.Tpo"; exit 1; \
 fi
/usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../include -I/opt/local/include -I/opt/local/include -Wall -W -O2 -arch x86_64 -MT allockey.lo -MD -MP -MF .deps/allockey.Tpo -c allockey.c  -fno-common -DPIC -o allockey.lo
/usr/bin/gcc-4.2 -DHAVE_CONFIG_H -I. -I. -I.. -I../include -I../include -I/opt/local/include -I/opt/local/include -Wall -W -O2 -arch x86_64 -MT db_ndbm.lo -MD -MP -MF .deps/db_ndbm.Tpo -c db_ndbm.c  -fno-common -DPIC -o db_ndbm.lo
allockey.c: In function '_sasldb_putsecret':
allockey.c:191: warning: pointer targets in passing argument 6 of '_sasldb_putdata' differ in signedness
allockey.c: In function '__sasldb_internal_list':
allockey.c:197: warning: unused parameter 'rock'
allockey.c: In function '_sasldb_putsecret':
allockey.c:191: warning: pointer targets in passing argument 6 of '_sasldb_putdata' differ in signedness
allockey.c: In function '__sasldb_internal_list':
allockey.c:197: warning: unused parameter 'rock'
mv: rename .deps/allockey.Tpo to .deps/allockey.Plo: No such file or directory
make[2]: *** [allockey.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

Error: The following dependencies failed to build: p5-svn-simple subversion-perlbindings cyrus-sasl2 neon serf subversion p5-term-readkey
Error: Status 1 encountered during processing.
Before reporting a bug, first run the command again with the -d flag to get complete output.
After getting this I first tried to clean the dependencies that failed to build:
sudo port clean p5-svn-simple subversion-perlbindings cyrus-sasl2 neon serf subversion p5-term-readkey
and then did "sudo port install git-core +svn" again, and it failed. Following a lead on something else I saw, I tried:
sudo port install cyrus-sasl2 +universal
and got:
--->  Computing dependencies for cyrus-sasl2
--->  Fetching cyrus-sasl2
--->  Verifying checksum(s) for cyrus-sasl2
--->  Extracting cyrus-sasl2
--->  Applying patches to cyrus-sasl2
--->  Configuring cyrus-sasl2
Error: You cannot install cyrus-sasl2 for the architecture(s) x86_64 i386 because
Error: its dependency openssl only contains the architecture(s) x86_64.
Error: 
Error: Try rebuilding openssl (and all its dependencies) with
Error: the +universal variant by running
Error: 
Error:     sudo port upgrade --enforce-variants openssl +universal
Error: 
Error: Target org.macports.configure returned: incompatible architectures in dependencies
Error: Status 1 encountered during processing.
Before reporting a bug, first run the command again with the -d flag to get complete output.
So then I did:
sudo port upgrade --enforce-variants openssl +universal
sudo port install cyrus-sasl2 +universal
sudo port install git-core +svn
and it installed.

No comments: