Skip to content

Instantly share code, notes, and snippets.

@kowey
Last active December 27, 2015 00:29
Show Gist options
  • Select an option

  • Save kowey/7238079 to your computer and use it in GitHub Desktop.

Select an option

Save kowey/7238079 to your computer and use it in GitHub Desktop.
building subversion (with perl bindings) with nix on Mac
/nix/store/y3x7hzdn3363xjz4snaws9glxq3s7732-perl-5.16.3$ grep cpp-precomp -R .
./lib/perl5/5.16.3/darwin-2level/Config_heavy.pl:ccflags='-fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -fstack-protector'
./lib/perl5/5.16.3/darwin-2level/Config_heavy.pl:cppflags='-no-cpp-precomp -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -fstack-protector'
./lib/perl5/5.16.3/darwin-2level/Config_heavy.pl:ccflags_nolargefiles='-fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -fstack-protector'
preConfigure = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace configure --replace "-no-cpp-precomp" ""
'';
preBuild = ''
makeFlagsArray=(APACHE_LIBEXECDIR=$out/modules)
'';
## using perl
SWIG_PL_INCLUDES='$(SWIG_INCLUDES) -fno-common -DPERL_DARWIN -no-cpp-precomp -fno-strict-aliasing -pipe -fstack-protector -I/nix/store/y3x7hzdn3363xjz4snaws9glxq3s7732-perl-5.16.3/lib/perl5/5.16.3/darwin-2level/CORE '
This goes wrong because the flag -no-cpp-precomp is not recognised
## using sysPerl
SWIG_PL_INCLUDES='$(SWIG_INCLUDES) -arch x86_64 -arch i386 -g -pipe -fno-common -DPERL_DARWIN -fno-strict-aliasing -fstack-protector -I/usr/local/include -I/System/Library/Perl/5.12/darwin-thread-multi-2level/CORE '
This goes wrong because of the following
gcc: error: x86_64: No such file or directory
gcc: error: i386: No such file or directory
gcc: error: unrecognized option '-arch'
gcc: error: unrecognized option '-arch'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment