git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Not so happy about build system

From
JEJan Engelhardt <jengelh@medozas.de>
Date
Jul 23, 2008, 09:33 UTC
Message-ID
<alpine.LNX.1.10.0807222036230.23410@fbirervta.pbzchgretzou.qr>
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 :)

Next: Miklos Vajna
Message 1 of 3 in “Not so happy about build system”
  1. Jan EngelhardtJul 23, 2008
  2. Miklos VajnaJul 23, 2008
  3. Jan EngelhardtJul 23, 2008

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.