Re: [ccache] ccache version 3.2.3 has been released

2015-08-19 Thread Mike Frysinger
On 17 Aug 2015 21:06, Joel Rosdahl wrote:
 Tom Lane t...@sss.pgh.pa.us wrote:
  [...] this fails to build for me on late-model OS X:
 
 Bummer. Here's my proposed fix:
 https://git.samba.org/?p=ccache.git;a=commitdiff;h=f74c76107933046309861680b741adc67ac2a34e.
 Perhaps you could try it out?

that might work, but i think it's incorrect and can/will lead to problems in
the future.  ldflags should not contain libs for linking ... that's what LIBS
is for.  so you probably want:

--- a/configure.ac
+++ b/configure.ac
@@ -120,7 +120,7 @@ if test x${use_bundled_zlib} = xyes; then
 extra_libs=zlib/libz.a
 mkdir -p zlib
 else
-extra_ldflags=-lz
+LIBS=$LIBS -lz
 fi
 
 dnl Linking on Windows needs ws2_32

-mike


signature.asc
Description: Digital signature
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] ccache version 3.2.3 has been released

2015-08-17 Thread Tom Lane
Mike Frysinger vap...@gentoo.org writes:
 On 16 Aug 2015 13:39, Tom Lane wrote:
 and of course -lz isn't a valid dependency.

 that's not really true.  make will expand it internally into paths like 
 /usr/lib/libz.so.

Hmm ... there may be versions of make for which that's true, but
Apple's version (which is gnu make 3.81) does not like it.

regards, tom lane

___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] ccache version 3.2.3 has been released

2015-08-17 Thread Joel Rosdahl
Tom Lane t...@sss.pgh.pa.us wrote:

 [...] this fails to build for me on late-model OS X:


Bummer. Here's my proposed fix:
https://git.samba.org/?p=ccache.git;a=commitdiff;h=f74c76107933046309861680b741adc67ac2a34e.
Perhaps you could try it out?

-- Joel
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] ccache version 3.2.3 has been released

2015-08-17 Thread Jürgen Buchmüller
Am Montag, den 17.08.2015, 00:50 -0400 schrieb Mike Frysinger:
 On 16 Aug 2015 13:39, Tom Lane wrote:
  $ grep extra_libs Makefile
  extra_libs = -lz
  ccache$(EXEEXT): $(ccache_objs) $(extra_libs)
  $(CC) $(all_cflags) -o $@ $(ccache_objs) $(all_ldflags) 
  $(extra_libs) $(LIBS)
  test/main$(EXEEXT): $(base_objs) $(test_objs) $(extra_libs)
  $(CC) $(all_cflags) -o $@ $(base_objs) $(test_objs) 
  $(all_ldflags) $(extra_libs) $(LIBS)
  
  and of course -lz isn't a valid dependency.
 
 that's not really true.  make will expand it internally into paths 
 like 
 /usr/lib/libz.so.

FWIW We encountered the same problem when cross compiling from x86_64
for armv[67]l ccache with the Void Linux binary package build system.
Compiling for the native architecture worked as expected.

 that said, there's no value anymore in putting -l flags into the deps 
 list
 and should just omit it from builds.
 -mike

Yes, please. Simply stripping $(extra_libs) from the dependencies for
ccache$(EXEEXT) solved the issue for us as well.

Jürgen


___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] ccache version 3.2.3 has been released

2015-08-16 Thread Tom Lane
Joel Rosdahl j...@rosdahl.net writes:
 I'm happy to announce ccache version 3.2.3.

Hate to be the bearer of bad news, but this fails to build for me on
late-model OS X:

$ ./configure
$ make 
gcc -DHAVE_CONFIG_H  -DSYSCONFDIR=/usr/local/etc -I. -I.  -g -O2 -Wall -W -c -o 
main.o main.c
...
gcc -DHAVE_CONFIG_H  -DSYSCONFDIR=/usr/local/etc -I. -I.  -g -O2 -Wall -W -c -o 
conf.o conf.c
make: *** No rule to make target `-lz', needed by `ccache'.  Stop.

The reason appears to be that the Makefile gets generated like so:

$ grep extra_libs Makefile
extra_libs = -lz
ccache$(EXEEXT): $(ccache_objs) $(extra_libs)
$(CC) $(all_cflags) -o $@ $(ccache_objs) $(all_ldflags) $(extra_libs) 
$(LIBS)
test/main$(EXEEXT): $(base_objs) $(test_objs) $(extra_libs)
$(CC) $(all_cflags) -o $@ $(base_objs) $(test_objs) $(all_ldflags) 
$(extra_libs) $(LIBS)

and of course -lz isn't a valid dependency.  Manually removing
$(extra_libs) from these two dependency lists fixes it.

I do not recall having had this problem the last time I built ccache,
but that was 3.2.1, so I don't know whether it was introduced in
3.2.2 or 3.2.3.

regards, tom lane

___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache


Re: [ccache] ccache version 3.2.3 has been released

2015-08-16 Thread Mike Frysinger
On 16 Aug 2015 13:39, Tom Lane wrote:
 $ grep extra_libs Makefile
 extra_libs = -lz
 ccache$(EXEEXT): $(ccache_objs) $(extra_libs)
 $(CC) $(all_cflags) -o $@ $(ccache_objs) $(all_ldflags) $(extra_libs) 
 $(LIBS)
 test/main$(EXEEXT): $(base_objs) $(test_objs) $(extra_libs)
 $(CC) $(all_cflags) -o $@ $(base_objs) $(test_objs) $(all_ldflags) 
 $(extra_libs) $(LIBS)
 
 and of course -lz isn't a valid dependency.

that's not really true.  make will expand it internally into paths like 
/usr/lib/libz.so.

that said, there's no value anymore in putting -l flags into the deps list
and should just omit it from builds.
-mike


signature.asc
Description: Digital signature
___
ccache mailing list
ccache@lists.samba.org
https://lists.samba.org/mailman/listinfo/ccache