{"thread":{"id":"14616","subject":"Not so happy about build system","startedAt":"2008-07-23T09:33:56Z","lastAt":"2008-07-23T11:04:36Z","messageCount":3,"participants":["Jan Engelhardt","Miklos Vajna"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"84453","messageId":"alpine.LNX.1.10.0807222036230.23410@fbirervta.pbzchgretzou.qr","threadId":"14616","inReplyTo":null,"subject":"Not so happy about build system","fromName":"Jan Engelhardt","fromEmail":"jengelh@medozas.de","sentAt":"2008-07-23T09:33:56Z","receivedAt":"2008-07-23T09:33:56Z","isPatch":false,"sender":{"key":"jengelh@medozas.de","avatar":null},"body":"Hi,\n\n\nI just tried git 1.5.6.4 on a Solaris 10 box. Building mostly went \nsmooth, but a few unhappy edges turned up:\n\n~/git-1.5.6.4>gmake MAKE=gmake\n    LINK git-daemon\nld: fatal: library -lcurl: not found\nld: fatal: library -lcrypto: not found\nld: fatal: File processing errors. No output written to git-daemon\ncollect2: ld returned 1 exit status\ngmake: *** [git-daemon] Error 1\n\nOf course curl is available, it's just somewhere else. And that is where \nthe fun begins that comes with plain Makefiles.\n\n\t\"What's the variable I ought to set?\"\n\nYes, usually it is LDFLAGS, and this is also true for git. But not \neveryone necessarily adheres to that, and looking through the Makefile \nis not fun. That also reminds me of CFLAGS, which about every Makefile \nwrite happily sets to\n\n\tCFLAGS = -g -O2 -Wall -Wmy-fancy-flags\n\nwhich would give no way to keep -Wmy-fancy-flags while also overriding \nit. Autotools solved this whereby a developer puts -Wmy-fancy-flags that \nshall always be present into AM_CFLAGS instead and only puts the really \nfreely choosable flags into CFLAGS. Of course I could list all the \ndevelopers flags that are needed/wanted (-Wmy-fancy-flags) like\n\n\tmake CFLAGS=\"-Wdevelopers-fancy-flags -O3 -g0\"\n\nbut one would have to look them up first and and etc.\nOk, enough Makefile ramblings, as there seems to be a configure script \nlurking. What's the Makefile good for then if configure will create it \nanyway?\n\nTrying my luck with configure, I call\n\n\t./configure --prefix=$HOME/rt --with-openssl=/opt/csw \n\t--with-curl=/opt/csw\n\nbut what I get is that it obviously did not find neither openssl nor \ncurl, though they do exist in /opt/csw/include and /opt/csw/lib:\n\n\tchecking for SHA1_Init in -lcrypto... no\n\tchecking for SHA1_Init in -lssl... no\n\tchecking for curl_global_init in -lcurl... no\n\tchecking for XML_ParserCreate in -lexpat... no\n\n(someone please fix that)\n\n\t./configure --prefix=$HOME/rt --with-openssl=/opt/csw \n\t--with-curl=/opt/csw CFLAGS=\"-O2 -I/opt/csw/include -L/opt/csw/lib \n\t-R/opt/csw/lib\"\n# using /usr/ccs/bin/ld, not GNU ld\n\nThat finally made it succeed in finding SHA1_Init. Then however,\n\n\t~/git-1.5.6.4>make\n\tmake: Fatal error in reader: Makefile, line 158: Unexpected end \n\tof line seen\n\nSo configure did not create a POSIX-compatible Makefile. Ok, \nI had gmake, so the story is successfully done here :)\n"},{"id":"84461","messageId":"20080723103312.GE32057@genesis.frugalware.org","threadId":"14616","inReplyTo":"alpine.LNX.1.10.0807222036230.23410@fbirervta.pbzchgretzou.qr","subject":"Re: Not so happy about build system","fromName":"Miklos Vajna","fromEmail":"vmiklos@frugalware.org","sentAt":"2008-07-23T10:33:12Z","receivedAt":"2008-07-23T10:33:12Z","isPatch":false,"sender":{"key":"vmiklos@frugalware.org","avatar":"https://gravatar.com/avatar/401c1cbbb3a5d13e650c691a2c71d6fd0b80df1a01bc74d9f1972675dd58f2bd?d=mp&s=160"},"body":"On Wed, Jul 23, 2008 at 11:33:56AM +0200, Jan Engelhardt <jengelh@medozas.de> wrote:\n> \t./configure --prefix=$HOME/rt --with-openssl=/opt/csw \n> \t--with-curl=/opt/csw CFLAGS=\"-O2 -I/opt/csw/include -L/opt/csw/lib \n> \t-R/opt/csw/lib\"\n\nWhy do you put -L/opt/csw/lib to CFLAGS instead of LDFLAGS?\n"},{"id":"84465","messageId":"alpine.LNX.1.10.0807231304170.23410@fbirervta.pbzchgretzou.qr","threadId":"14616","inReplyTo":"20080723103312.GE32057@genesis.frugalware.org","subject":"Re: Not so happy about build system","fromName":"Jan Engelhardt","fromEmail":"jengelh@medozas.de","sentAt":"2008-07-23T11:04:36Z","receivedAt":"2008-07-23T11:04:36Z","isPatch":false,"sender":{"key":"jengelh@medozas.de","avatar":null},"body":"\nOn Wednesday 2008-07-23 12:33, Miklos Vajna wrote:\n\n>On Wed, Jul 23, 2008 at 11:33:56AM +0200, Jan Engelhardt <jengelh@medozas.de> wrote:\n>> \t./configure --prefix=$HOME/rt --with-openssl=/opt/csw \n>> \t--with-curl=/opt/csw CFLAGS=\"-O2 -I/opt/csw/include -L/opt/csw/lib \n>> \t-R/opt/csw/lib\"\n>\n>Why do you put -L/opt/csw/lib to CFLAGS instead of LDFLAGS?\n>\nOversight I guess. Had --with-{openssl,curl} any effect, I would not even\nneed the -I and -L.\n"}]}