[openssl-dev] Upcoming build system change

Richard Levitte levitte at openssl.org
Sat Jan 23 21:08:42 UTC 2016


In message <20160123202758.GA13479 at calimero.vinschen.de> on Sat, 23 Jan 2016 21:27:58 +0100, Corinna Vinschen <vinschen at redhat.com> said:

vinschen> Hi Richard,
vinschen> 
vinschen> On Jan 18 23:50, Richard Levitte wrote:
vinschen> > FYI,
vinschen> > 
vinschen> > The branch has been updated, the Makfile template now has install
vinschen> > targets as well, and I did the mods I could see would be necessary for
vinschen> > Cygwin and Mingw.  I would appreciate it if someone could help me try
vinschen> > those out.
vinschen> > 
vinschen> > Remember to configure with --unified.
vinschen> 
vinschen> I tested this on 64 bit Cygwin and stumbled over a minor and a major
vinschen> problem.  First, there's a typo in crypto/bn/Makefile.in, using eight
vinschen> spaces rather than a TAB:
vinschen> 
vinschen> 
vinschen> diff -upr origsrc/openssl-1.1-rc1/crypto/bn/Makefile.in src/openssl-1.1-rc1/crypto/bn/Makefile.in
vinschen> --- origsrc/openssl-1.1-rc1/crypto/bn/Makefile.in	2016-01-23 21:02:12.604753995 +0100
vinschen> +++ src/openssl-1.1-rc1/crypto/bn/Makefile.in	2016-01-23 21:03:58.394966621 +0100
vinschen> @@ -161,6 +161,6 @@ clean:
vinschen>  
vinschen>  # Different flavours of make disagree on where output goes
vinschen>  .c.o:
vinschen> -        $(CC) $(CFLAGS) -c $< -o $@
vinschen> +	$(CC) $(CFLAGS) -c $< -o $@

Ah hah!  I wonder why my make hasn't complained?

vinschen> Second, the build fails trying to compile crypto/cversion.c:
vinschen> 
vinschen> crypto/cversion.c:62:23: fatal error: buildinf.h: No such file or directory
vinschen>  # include "buildinf.h"
vinschen>                        ^
vinschen> 
vinschen> The reason is that buildinf.h can't be built because util/mkbuildinf.pl
vinschen> requires /usr/local/bin/perl rather than /usr/bin/perl:
vinschen> 
vinschen> diff -upr origsrc/openssl-1.1-rc1/util/mkbuildinf.pl src/openssl-1.1-rc1/util/mkbuildinf.pl
vinschen> --- origsrc/openssl-1.1-rc1/util/mkbuildinf.pl	2016-01-23 21:02:18.386710976 +0100
vinschen> +++ src/openssl-1.1-rc1/util/mkbuildinf.pl	2016-01-23 21:15:19.705883094 +0100
vinschen> @@ -1,4 +1,4 @@
vinschen> -#!/usr/local/bin/perl
vinschen> +#!/usr/bin/perl
vinschen>  
vinschen>  my ($cflags, $platform) = @ARGV;

Interesting...  Shouldn't the crypto/buildinf.h target have failed?

vinschen> The build eventually fails with the following error message, which I
vinschen> don't quite understand.  The libraries should have been built before
vinschen> trying to build the engines due to hard dependencies, but for some
vinschen> reason they aren't.  Sorry, I have no fix for that :(

I do.  Don't remember the details this moment, but that did happen to
me as well, and I recall figuring out what went on.

vinschen> Last but not least, we have another problem with enginesdir.  To allow a
vinschen> rolling release cycle, we have to support multiple versions of openssl
vinschen> in parallel.  The problem here is that the enginesdir needs to be
vinschen> versioned to allow per-openssl version engines.  The build scripts don't
vinschen> allow for this.  Right now we're using a patch as the below one to tweak
vinschen> the configury to allow specifying the engines dir during build time.
vinschen> Would it hurt terribly to include something like the below patch?
vinschen> 
vinschen> 
vinschen> +++ src/openssl-1.1-rc1/Configure	2016-01-23 21:03:43.604076740 +0100
vinschen> @@ -221,6 +221,7 @@ $config{prefix}="";
vinschen>  $config{openssldir}="";
vinschen>  $config{processor}="";
vinschen>  $config{libdir}="";
vinschen> +$config{enginesdir}="";
vinschen>  $config{install_prefix}= "$ENV{'INSTALL_PREFIX'}";
vinschen>  $config{cross_compile_prefix}="";
vinschen>  $config{fipslibdir}="/usr/local/ssl/fips-2.0/lib/";
vinschen> @@ -633,6 +634,10 @@ foreach (@argvcopy)
vinschen>  			{
vinschen>  			$config{libdir}=$1;
vinschen>  			}
vinschen> +		elsif (/^--enginesdir=(.*)$/)
vinschen> +			{
vinschen> +			$config{enginesdir}=$1;
vinschen> +			}
vinschen>  		elsif (/^--openssldir=(.*)$/)
vinschen>  			{
vinschen>  			$config{openssldir}=$1;
vinschen> @@ -893,7 +898,7 @@ if ($target{build_file} eq "Makefile"
vinschen>  $target{multilib}="" if !-d "$config{prefix}/lib$target{multilib}";
vinschen>  
vinschen>  $config{libdir}="lib$target{multilib}" if $config{libdir} eq "";
vinschen> -$config{enginesdir}=$config{prefix} . "/" . $config{libdir}  . "/engines";
vinschen> +$config{enginesdir}=$config{prefix} . "/" . $config{libdir}  . "/engines" if $config{enginesdir} eq "";
vinschen>  
vinschen>  push @{$config{defines}},
vinschen>      map { (my $x = $_) =~ s/^OPENSSL_NO_/OPENSSL_EXPERIMENTAL_/; $x }

Sure, that can be done.

BTW, the refactor-build branch is a little off right now...  I have a
bunch of fixes in my personal repo that haven't gone out there yet.
Dunno if you've followed what's happening in master, but FYI, the
refactor-build branch is starting to show up there, one little piece
at a time (doing it that way made it easier for our review process).
So right now, refactor-build is on pause until enough has come out on
master.

Cheers,
Richard

-- 
Richard Levitte         levitte at openssl.org
OpenSSL Project         http://www.openssl.org/~levitte/


More information about the openssl-dev mailing list