Skip to contentSkip to conversation

libtraceevent: make doc-install tries different file names than generated

DISCUSSION Zamir SUN 2 participants 4 messages Oct 8, 2020 – Oct 12, 2020 Documentation

lore
Share & tools
lore

Zamir SUN

author
#0 lore raw

Hi,

When I try to compiling the document of libtraceevent with the fix I mentioned in [1] applied, make doc-install fails with errors like

"/usr/bin/install: cannot stat 'libtraceevent-record_parse.3': No such file or directory"

Checking the compiled documents I see a lot of tep_*.3 generated, and some libtraceevent_*.html. However no libtraceevent_*.3.

$ ls Documentation/*3 | head
Documentation/libtraceevent.3
Documentation/tep_alloc.3
Documentation/tep_clear_flag.3
Documentation/tep_cmdline_pid.3
Documentation/tep_data_comm_from_pid.3
Documentation/tep_data_flags.3
Documentation/tep_data_pid.3
Documentation/tep_data_pid_from_comm.3
Documentation/tep_data_preempt_count.3
Documentation/tep_data_type.3
ls Documentation/*html | head
Documentation/libtraceevent-commands.html
Documentation/libtraceevent-cpus.html
Documentation/libtraceevent-endian_read.html
Documentation/libtraceevent-event_find.html
Documentation/libtraceevent-event_get.html
Documentation/libtraceevent-event_list.html
Documentation/libtraceevent-event_print.html
Documentation/libtraceevent-field_find.html
Documentation/libtraceevent-field_get_val.html
Documentation/libtraceevent-field_print.html

I also tried to port the Makefile from trace-cmd/Documentation to the document dir, and it still only generates tep_*.3 files, so I feel this is not the issue with the patch from [1].

As for my local environment, I have xmlto and asciidoc installed[2], but not asciidoctor. I expect asciidoc could generate the documentations like what it did in trace-cmd before.

Any idea if this is issue with my environment or it's something that need to be implemented in the Makefile?

Thanks in advance.

[1] https://lore.kernel.org/linux-trace-devel/[email protected]/T/#t
[2] $ rpm -q asciidoc xmlto
asciidoc-8.6.10-0.14.20180605git986f99d.fc32.noarch
xmlto-0.0.28-13.fc32.x86_64

Signature · 3 lines
Zamir SUN
Fedora user
GPG : 1D86 6D4A 49CE 4BBD 72CF FCF5 D856 6E11 F2A0 525E
#1 lore raw
Quoted 38 lines · On Thu, 8 Oct 2020 17:50:19 +0800 Zamir SUN <[email protected]> wrote:

Hi,

When I try to compiling the document of libtraceevent with the fix I mentioned in [1] applied, make doc-install fails with errors like

"/usr/bin/install: cannot stat 'libtraceevent-record_parse.3': No such file or directory"

Checking the compiled documents I see a lot of tep_*.3 generated, and some libtraceevent_*.html. However no libtraceevent_*.3.

$ ls Documentation/*3 | head
Documentation/libtraceevent.3
Documentation/tep_alloc.3
Documentation/tep_clear_flag.3
Documentation/tep_cmdline_pid.3
Documentation/tep_data_comm_from_pid.3
Documentation/tep_data_flags.3
Documentation/tep_data_pid.3
Documentation/tep_data_pid_from_comm.3
Documentation/tep_data_preempt_count.3
Documentation/tep_data_type.3
ls Documentation/*html | head
Documentation/libtraceevent-commands.html
Documentation/libtraceevent-cpus.html
Documentation/libtraceevent-endian_read.html
Documentation/libtraceevent-event_find.html
Documentation/libtraceevent-event_get.html
Documentation/libtraceevent-event_list.html
Documentation/libtraceevent-event_print.html
Documentation/libtraceevent-field_find.html
Documentation/libtraceevent-field_get_val.html
Documentation/libtraceevent-field_print.html

I also tried to port the Makefile from trace-cmd/Documentation to the document dir, and it still only generates tep_*.3 files, so I feel this is not the issue with the patch from [1].

Quoted 7 lines

As for my local environment, I have xmlto and asciidoc installed[2], but not asciidoctor. I expect asciidoc could generate the documentations like what it did in trace-cmd before.

Any idea if this is issue with my environment or it's something that need to be implemented in the Makefile?

Hi Zamir,

Thanks a lot for looking into this. I took your advice and reverted my blind copy of the Makefiles, scripts and include headers, and instead copied over their full history from the Linux kernel Tools directory.

You can see that update no (which now includes the utilities.mak as well).

Can you see if this patch fixes your current issue?

-- Steve

Documentation/Makefile +1 -1
index edb8623..3a981be 100644
@@ -157,7 +157,7 @@ endif
 do-install-man: man
 	$(call QUIET_INSTALL, Documentation-man) \
 		$(INSTALL) -d -m 755 $(DESTDIR)$(man3dir); \
-		$(INSTALL) -m 644 $(DOC_MAN3) $(DESTDIR)$(man3dir);
+		$(INSTALL) -m 644 $(OUTPUT)*.3 $(DESTDIR)$(man3dir);
 
 install-man: check-man-tools man do-install-man
 
author
#2 lore raw
Quoted 67 lines · Steven Rostedt
Quoted 38 lines · On Thu, 8 Oct 2020 17:50:19 +0800 Zamir SUN <[email protected]> wrote:

Hi,

When I try to compiling the document of libtraceevent with the fix I mentioned in [1] applied, make doc-install fails with errors like

"/usr/bin/install: cannot stat 'libtraceevent-record_parse.3': No such file or directory"

Checking the compiled documents I see a lot of tep_*.3 generated, and some libtraceevent_*.html. However no libtraceevent_*.3.

$ ls Documentation/*3 | head
Documentation/libtraceevent.3
Documentation/tep_alloc.3
Documentation/tep_clear_flag.3
Documentation/tep_cmdline_pid.3
Documentation/tep_data_comm_from_pid.3
Documentation/tep_data_flags.3
Documentation/tep_data_pid.3
Documentation/tep_data_pid_from_comm.3
Documentation/tep_data_preempt_count.3
Documentation/tep_data_type.3
ls Documentation/*html | head
Documentation/libtraceevent-commands.html
Documentation/libtraceevent-cpus.html
Documentation/libtraceevent-endian_read.html
Documentation/libtraceevent-event_find.html
Documentation/libtraceevent-event_get.html
Documentation/libtraceevent-event_list.html
Documentation/libtraceevent-event_print.html
Documentation/libtraceevent-field_find.html
Documentation/libtraceevent-field_get_val.html
Documentation/libtraceevent-field_print.html

I also tried to port the Makefile from trace-cmd/Documentation to the document dir, and it still only generates tep_*.3 files, so I feel this is not the issue with the patch from [1].

Quoted 7 lines

As for my local environment, I have xmlto and asciidoc installed[2], but not asciidoctor. I expect asciidoc could generate the documentations like what it did in trace-cmd before.

Any idea if this is issue with my environment or it's something that need to be implemented in the Makefile?

Hi Zamir,

Thanks a lot for looking into this. I took your advice and reverted my blind copy of the Makefiles, scripts and include headers, and instead copied over their full history from the Linux kernel Tools directory.

You can see that update no (which now includes the utilities.mak as well).

Can you see if this patch fixes your current issue?

-- Steve

Documentation/Makefile +0 -0
index edb8623..3a981be 100644

Documentation/Makefile endif · line 163

Quoted 8 lines
Documentation/Makefile +1 -1
@@ -157,7 +157,7 @@ endif
  do-install-man: man
  	$(call QUIET_INSTALL, Documentation-man) \
  		$(INSTALL) -d -m 755 $(DESTDIR)$(man3dir); \
-		$(INSTALL) -m 644 $(DOC_MAN3) $(DESTDIR)$(man3dir);
+		$(INSTALL) -m 644 $(OUTPUT)*.3 $(DESTDIR)$(man3dir);
 
  install-man: check-man-tools man do-install-man
 

Hi Steve,

I just tried compiling the document. IIUC with this patch, the man pages are generated. Most of them still have tep_ prefix. Not sure if this is intended so I'm posting the list of generated man page in gist as it's a bit long.
https://gist.github.com/sztsian/442db46a48c1d1ec3500b161a1232a0a

OTOH, I notice that a lot of generation tasks was executing during the doc-install phase. I'm really not familiar with man page compiling, so can you check if this is an intended way? I posted the doc-install log in the following link.

https://gist.github.com/sztsian/6d1588272c07c7b2c3bed14a049b7df2

HTH.

Signature · 3 lines
Zamir SUN
Fedora user
GPG : 1D86 6D4A 49CE 4BBD 72CF FCF5 D856 6E11 F2A0 525E
#3 lore raw
Quoted 8 lines · On Mon, 12 Oct 2020 20:35:20 +0800 Zamir SUN <[email protected]> wrote:

Hi Steve,

I just tried compiling the document. IIUC with this patch, the man pages are generated. Most of them still have tep_ prefix. Not sure if this is intended so I'm posting the list of generated man page in gist as it's a bit long.
https://gist.github.com/sztsian/442db46a48c1d1ec3500b161a1232a0a

Quoted 7 lines

OTOH, I notice that a lot of generation tasks was executing during the doc-install phase. I'm really not familiar with man page compiling, so can you check if this is an intended way? I posted the doc-install log in the following link.

https://gist.github.com/sztsian/6d1588272c07c7b2c3bed14a049b7df2

Bah, I'm not sure how the documentation build system here works. Ideally, we want to make sure that "man tep_.." works, and people don't need to state "man libtraceevent_...", as the tep_* commands are what will be used.

Let me investigate this.

Thanks!

-- Steve