[openssl.org #1812] the openssl build environment is broken

2014-06-30 Thread Rich Salz via RT
We are not going to do the ideas in this ticket, but we will be improving the
build system.

Or at least changing it a bit :)

__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org


[openssl.org #1812] the openssl build environment is broken

2009-01-08 Thread Felix von Leitner via RT
First of all, .../lib/ is hard coded, which forces me to do kludges like
this to get openssl to install correctly:

  sed -e 's@/lib\@/li...@g' -e 's...@\*/li...@\*/l...@g'  Makefile  
Makefile.fnord; mv -f Makefile.fnord Makefile; \
  sed -e 's@/lib/@/lib64/@g'  engines/Makefile  Makefile.fnord; mv -f 
Makefile.fnord engines/Makefile; \
  sed -e 's@/lib/@/lib64/@g'  fips/Makefile  Makefile.fnord; mv -f 
Makefile.fnord fips/Makefile; \

This is clearly unacceptable.

Second, $CC is passed incorrectly to sub-makes.  Apart from the inherent
wrongness of doing recursive make (see
http://miller.emu.id.au/pmiller/books/rmch/ and note that the
traditionally cited reason for doing recursive makes, namely being able
to go into apps and doing make install to only get the apps content
installed, does not actually work with openssl) the makefiles pass $CC
incorrectly, like this:

$(MAKE) -f $(TOP)/Makefile.shared -e \
CC=$${CC} APPNAME=$$target$(EXE_EXT) OBJECTS=$$target.o \
LIBDEPS=$(PEX_LIBS) $$LIBRARIES $(EX_LIBS) \
link_app.$${shlib_target}

(taken from test/Makefile).  This is wrong because CC might contain
spaces.  I, for example, build openssl using CC=diet -Os gcc
-nostdinc.  Which in your broken Makefiles leads to -Os being passed to
make as an argument.  This is really a very basic beginner's mistake.

Here's my workaround:

$(MAKE) -f $(TOP)/Makefile.shared -e \
CC=\$${CC}\ APPNAME=$$target$(EXE_EXT) OBJECTS=$$target.o 
\
LIBDEPS=$(PEX_LIBS) $$LIBRARIES $(EX_LIBS) \
link_app.$${shlib_target}

There is other issues, like make install taking FOREVER to install a few
man pages, and this process not getting faster the second time you run
it.  It feels like a few perl interpreters are run for each installed
man page.  WTF?  Installing the man pages takes up 90% of make install!

These issues are broken on all platforms and compiler versions and all
recent versions of openssl.  All the distributions have horrible
workaround of varying ugliness to work around your build system.  Please
fix it.  At this point even GNU autoconf would be an improvement.

Felix

__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org


Re: [openssl.org #1812] the openssl build environment is broken

2009-01-08 Thread Bodo Moeller via RT
On Thu, Jan 8, 2009 at 4:01 PM, Felix von Leitner via RT r...@openssl.org 
wrote:

 [...]  Apart from the inherent
 wrongness of doing recursive make (see
 http://miller.emu.id.au/pmiller/books/rmch/ and note that the
 traditionally cited reason for doing recursive makes, namely being able
 to go into apps and doing make install to only get the apps content
 installed, does not actually work with openssl)

For this particular point, note that while having all those
mini-makefiles is awkward, it does serve a purpose here in that you
can individually remove the source code sub-directories corresponding
to various cryptographic algorithms that you might want to exclude
from your builds (such as for patent reasons).  If you say no-rc5
(say) when configuring OpenSSL, then cyrpto/rc5/Makefile won't be
invoked at all.

Also, while you can't do make install to only install the apps
content, you can go to a subdirectory to only *build* the stuff in
there (so you won't always have to wait for the recursive make to
finish if you're just doing development work within some part of
OpenSSL).  The sub-Makefile will invoke the master Makefile,
instructing it to invoke the appropriate sub-Makefile with appropriate
settings (well ... mostly: you've pointed to CC issues).

These are aspects that the Recursive Make Considered Harmful paper
doesn't talk about.

I'm not saying that the whole Configure/Makefile thing shouldn't be
thoroughly redone -- it's just much more complex than just pasting
everything into a single file.  (There's some support for having this
done automatically, actually: util/mk1mf.pl, which is used for Windows
builds.  You can try make makefile.one to see this.  Currently this
set-up is mostly adding to the overall complexity because many
configuration options need to be handled in mk1mf.pl as special cases
that are already handled outside mk1mf.pl for Unix builds.  Maybe some
kind of makefile.one setup should be used for Unix platforms too: we'd
be keeping individual per-directory Makefiles mostly to record
information on what is in the respective directory [to be used to
create makefile.one], but would not actually call these when building
stuff.)

Bodo


__
OpenSSL Project http://www.openssl.org
Development Mailing List   openssl-dev@openssl.org
Automated List Manager   majord...@openssl.org