Git development
 help / color / mirror / Atom feed
* Not so happy about build system
@ 2008-07-23  9:33 Jan Engelhardt
  2008-07-23 10:33 ` Miklos Vajna
  0 siblings, 1 reply; 3+ messages in thread
From: Jan Engelhardt @ 2008-07-23  9:33 UTC (permalink / raw)
  To: git

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 :)

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-07-23 11:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-23  9:33 Not so happy about build system Jan Engelhardt
2008-07-23 10:33 ` Miklos Vajna
2008-07-23 11:04   ` Jan Engelhardt

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox