Re: Cold welcoming message when installing anything because of LLVM bitcode stuff

2018-04-29 Thread Michael Paquier
On Sun, Apr 29, 2018 at 03:49:53PM -0700, Andres Freund wrote:
> Isn't that what bc19b7836215b1a847524041a1bd138d7bb5cbef did?

Oops, sorry.  Missed this one.
--
Michael


signature.asc
Description: PGP signature


Re: Cold welcoming message when installing anything because of LLVM bitcode stuff

2018-04-29 Thread Andres Freund
On 2018-04-30 07:43:46 +0900, Michael Paquier wrote:
> On Sat, Apr 28, 2018 at 02:32:06PM -0400, Tom Lane wrote:
> > Ugh.  I'd tried the core code but not contrib.  Will look.
> 
> The thread has stalled a bit.

Huh? It's a weekend. The last message was yesterday afternoon.


> What are the other issues you were
> seeing?  Are those related to --with-llvm?  On my side, if I just apply
> something like the attached I am able to get rid of all those output
> comments.

Isn't that what bc19b7836215b1a847524041a1bd138d7bb5cbef did?

Greetings,

Andres Freund



Re: Cold welcoming message when installing anything because of LLVM bitcode stuff

2018-04-29 Thread Michael Paquier
On Sat, Apr 28, 2018 at 02:32:06PM -0400, Tom Lane wrote:
> Ugh.  I'd tried the core code but not contrib.  Will look.

The thread has stalled a bit.  What are the other issues you were
seeing?  Are those related to --with-llvm?  On my side, if I just apply
something like the attached I am able to get rid of all those output
comments.
--
Michael
diff --git a/src/Makefile.global.in b/src/Makefile.global.in
index 252920279f..5fe0e8494d 100644
--- a/src/Makefile.global.in
+++ b/src/Makefile.global.in
@@ -1017,18 +1017,15 @@ endif
 # $(1) name of the module (e.g. an extension's name or postgres for core code)
 # $(2) source objects, with .o suffix
 #
+# This makes sure to create the directory structurs if files are in
+# subdirectories.  Note that the many INSTALL_DATA are not particularly
+# fast and that it may be better to coalesce them in the future.
+# The last step generates indexes.
 define install_llvm_module
-# Create target directory
 $(MKDIR_P) "$(DESTDIR)${bitcodedir}/$(1)"
-# Create sub-directories, if files are in subdirectories
 $(MKDIR_P) $(sort $(dir $(addprefix $(DESTDIR)${bitcodedir}/$(1)/, $(2
-# Then install files
-#
-# The many INSTALL_DATA invocations aren't particularly fast, it'd be
-# good if we could coalesce them, but I didn't find a good way.
 $(foreach obj, ${2}, $(INSTALL_DATA) $(patsubst %.o,%.bc, $(obj)) $(DESTDIR)/${bitcodedir}/$(1)/$(dir $(obj));
 )
-# and generate index
 (cd "$(DESTDIR)${bitcodedir}" && $(LLVM_BINPATH)/llvm-lto -thinlto -thinlto-action=thinlink -o $(1).index.bc $(addprefix $(1)/,$(patsubst %.o,%.bc, $(2
 endef
 


signature.asc
Description: PGP signature


Re: Cold welcoming message when installing anything because of LLVM bitcode stuff

2018-04-28 Thread Tom Lane
Andres Freund  writes:
> On April 28, 2018 11:05:15 AM PDT, Tom Lane  wrote:
>> Close inspection of the
>> "make install" output revealed a few other issues, which I hope
>> I fixed rather than making things worse.

> Broke the llvm enabled part of the bf. Will have a look once I'm home (1.5h), 
> unless you get to it first.

Ugh.  I'd tried the core code but not contrib.  Will look.

regards, tom lane



Re: Cold welcoming message when installing anything because of LLVM bitcode stuff

2018-04-28 Thread Andres Freund


On April 28, 2018 11:05:15 AM PDT, Tom Lane  wrote:
>Michael Paquier  writes:
>> JIT is introducing the installation of LLVM bitcode modules, and any
>> installation done results in the following comment in output, which
>> repeats basically for all the extensions installed:
>> # Then install files
>> #
>> # The many INSTALL_DATA invocations aren't particularly fast, it'd be
>> # good if we could coalesce them, but I didn't find a good way.
>
>> Andres, could it be possible to move at least that block of comments
>in
>> a place where this is not user-visible?

Yes, that seems sensible. I don't think they hurt much given the existing 
verbosity, but they don't add anything.


>  Close inspection of the
>"make install" output revealed a few other issues, which I hope
>I fixed rather than making things worse.

Broke the llvm enabled part of the bf. Will have a look once I'm home (1.5h), 
unless you get to it first.

Andres
-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



Re: Cold welcoming message when installing anything because of LLVM bitcode stuff

2018-04-28 Thread Tom Lane
Michael Paquier  writes:
> JIT is introducing the installation of LLVM bitcode modules, and any
> installation done results in the following comment in output, which
> repeats basically for all the extensions installed:
> # Then install files
> #
> # The many INSTALL_DATA invocations aren't particularly fast, it'd be
> # good if we could coalesce them, but I didn't find a good way.

> Andres, could it be possible to move at least that block of comments in
> a place where this is not user-visible?

Agreed, there shouldn't be comments in the emitted shell commands;
I'm a bit surprised that works at all.  Close inspection of the
"make install" output revealed a few other issues, which I hope
I fixed rather than making things worse.

regards, tom lane



Cold welcoming message when installing anything because of LLVM bitcode stuff

2018-04-28 Thread Michael Paquier
Hi all,

JIT is introducing the installation of LLVM bitcode modules, and any
installation done results in the following comment in output, which
repeats basically for all the extensions installed:
# Then install files
#
# The many INSTALL_DATA invocations aren't particularly fast, it'd be
# good if we could coalesce them, but I didn't find a good way.

Andres, could it be possible to move at least that block of comments in
a place where this is not user-visible?  I would be of the opinion to
move away also the "# Create target directory", "# Create
sub-directories, if files are in subdirectories", and "# and generate
index" as the information is not especially useful for anobody compiling
the code with --with-llvm.

Thanks,
--
Michael


signature.asc
Description: PGP signature