Not so happy about build system

3 messages, 2 authors, 2016-06-15 · open the first message on its own page

Not so happy about build system

From: Jan Engelhardt <hidden>
Date: 2016-06-15 22:45:00

Hi,


I just tried git 1.5.6.4 on a Solaris 10 box. Building mostly went 
smooth, but a few unhappy edges turned up:

~/git-1.5.6.4>gmake MAKE=gmake
    LINK git-daemon
ld: fatal: library -lcurl: not found
ld: fatal: library -lcrypto: not found
ld: fatal: File processing errors. No output written to git-daemon
collect2: ld returned 1 exit status
gmake: *** [git-daemon] Error 1

Of course curl is available, it's just somewhere else. And that is where 
the fun begins that comes with plain Makefiles.

	"What's the variable I ought to set?"

Yes, usually it is LDFLAGS, and this is also true for git. But not 
everyone necessarily adheres to that, and looking through the Makefile 
is not fun. That also reminds me of CFLAGS, which about every Makefile 
write happily sets to

	CFLAGS = -g -O2 -Wall -Wmy-fancy-flags

which would give no way to keep -Wmy-fancy-flags while also overriding 
it. Autotools solved this whereby a developer puts -Wmy-fancy-flags that 
shall always be present into AM_CFLAGS instead and only puts the really 
freely choosable flags into CFLAGS. Of course I could list all the 
developers flags that are needed/wanted (-Wmy-fancy-flags) like

	make CFLAGS="-Wdevelopers-fancy-flags -O3 -g0"

but one would have to look them up first and and etc.
Ok, enough Makefile ramblings, as there seems to be a configure script 
lurking. What's the Makefile good for then if configure will create it 
anyway?

Trying my luck with configure, I call

	./configure --prefix=$HOME/rt --with-openssl=/opt/csw 
	--with-curl=/opt/csw

but what I get is that it obviously did not find neither openssl nor 
curl, though they do exist in /opt/csw/include and /opt/csw/lib:

	checking for SHA1_Init in -lcrypto... no
	checking for SHA1_Init in -lssl... no
	checking for curl_global_init in -lcurl... no
	checking for XML_ParserCreate in -lexpat... no

(someone please fix that)

	./configure --prefix=$HOME/rt --with-openssl=/opt/csw 
	--with-curl=/opt/csw CFLAGS="-O2 -I/opt/csw/include -L/opt/csw/lib 
	-R/opt/csw/lib"
# using /usr/ccs/bin/ld, not GNU ld

That finally made it succeed in finding SHA1_Init. Then however,

	~/git-1.5.6.4>make
	make: Fatal error in reader: Makefile, line 158: Unexpected end 
	of line seen

So configure did not create a POSIX-compatible Makefile. Ok, 
I had gmake, so the story is successfully done here :)

Re: Not so happy about build system

From: Miklos Vajna <hidden>
Date: 2016-06-15 22:45:00

On Wed, Jul 23, 2008 at 11:33:56AM +0200, Jan Engelhardt [off-list ref] wrote:
	./configure --prefix=$HOME/rt --with-openssl=/opt/csw 
	--with-curl=/opt/csw CFLAGS="-O2 -I/opt/csw/include -L/opt/csw/lib 
	-R/opt/csw/lib"
Why do you put -L/opt/csw/lib to CFLAGS instead of LDFLAGS?

Re: Not so happy about build system

From: Jan Engelhardt <hidden>
Date: 2016-06-15 22:45:00

On Wednesday 2008-07-23 12:33, Miklos Vajna wrote:
On Wed, Jul 23, 2008 at 11:33:56AM +0200, Jan Engelhardt [off-list ref] wrote:
quoted
	./configure --prefix=$HOME/rt --with-openssl=/opt/csw 
	--with-curl=/opt/csw CFLAGS="-O2 -I/opt/csw/include -L/opt/csw/lib 
	-R/opt/csw/lib"
Why do you put -L/opt/csw/lib to CFLAGS instead of LDFLAGS?
Oversight I guess. Had --with-{openssl,curl} any effect, I would not even
need the -I and -L.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help