View Issue Details

IDProjectCategoryView StatusLast Update
0005604GNUnetdocumentationpublic2019-02-28 11:17
ReporterschanzenAssigned Toschanzen 
PrioritynormalSeverityminorReproducibilityhave not tried
Status closedResolutionfixed 
PlatformOSmacOS / BSDOS Version
Product VersionSVN HEAD 
Target Version0.11.0Fixed in Version0.11.0 
Summary0005604: Make in handbook fails
DescriptionBuilding the handbook fails
Steps To Reproduce$ make
  MAKEINFO gnunet.info
gnunet.texi:5: warning: unrecognized encoding name `UTF-8'.
sed: 1: "gversion.texi": extra characters at the end of g command
make: *** [version.texi/replacement] Error 1

$ make html
  MAKEINFO gnunet.html
makeinfo: unrecognized option `--css-ref=manual.css'
Try `makeinfo --help' for more information.
make: *** [gnunet.html] Error 1
Additional Informationmakeinfo --version
makeinfo (GNU texinfo) 4.8

Copyright (C) 2004 Free Software Foundation, Inc.
There is NO warranty. You may redistribute this software
under the terms of the GNU General Public License.
For more information about these matters, see the files named COPYING.
TagsNo tags attached.

Activities

ng0

2019-02-23 13:12

developer   ~0013960

> gnunet.texi:5: warning: unrecognized encoding name `UTF-8'.

should be ignored, i can build it with this warning

ng0

2019-02-23 13:13

developer   ~0013961

the css one could mean you needs to be looked into

ng0

2019-02-23 13:14

developer   ~0013962

which make command was run?

schanzen

2019-02-23 15:02

developer   ~0013963

The first error is related to this issue: https://myshittycode.com/2014/07/24/os-x-sed-extra-characters-at-the-end-of-l-command-error/

I am not touching this for now as I do not understand why it is built in this way.
Why is there a revert for the info in gversion.texi?

Also: This build does not work on macOS specifically as a lot of the makeinfo does not work for me. E.g. --pdf. And configure does not detect this.
The sed is not portable becuase of "-i" (Although I do not think this is really what should happen anyway).
The "make all" does nothing (?).

schanzen

2019-02-23 15:07

developer   ~0013964

I suggest we disable the build of documentation for not for macOS / darwin. However, I am pretty sure this also breaks for other BSDs/Unixes.

ng0

2019-02-23 23:36

developer   ~0013965

An alternative for now (I'm positive to solve this though) would be to rely on texi2mdoc and use the rule I wrote for this to generate the mdoc outputs. this is release time and packaging stuff though.. ideally Christian has texi2mdoc installed at release time and we include this output in the release tarball.

ng0

2019-02-23 23:37

developer   ~0013966

For what it's worth, I have texinfo 4.8 and did not hit any issue in normal make.
I get the warning about UTF-8 being unrecognized encoding name, but that's just a warning that can't be fixed in an upwards compatible way, and nothing else.

ng0

2019-02-23 23:38

developer   ~0013967

I can reproduce the lack of css-ref=manual.css

ng0

2019-02-23 23:40

developer   ~0013968

I have base texinfo 4.8 and additionally texinfo 6.5 from pkgsrc (for texi2pdf)

ng0

2019-02-23 23:42

developer   ~0013969

For the utf-8 warning: Does makeinfo --help display "enable-encoding" as one option?
We should be using a comparable texinfo, it exists here in my 4.8 based on an import from GNU.

ng0

2019-02-23 23:56

developer   ~0013970

Part one (--css-ref) should be fixed now.

ng0

2019-02-23 23:58

developer   ~0013971

Part two...

wtf. I though I got rid of the gversion rules. I really have no idea why it's there.
I'll need to look into this tomorrow. Past self: next time make a more useful comment.

ng0

2019-02-24 00:04

developer   ~0013972

Some of the standard targets need to be made portable.

For pdf:
texi2dvi here can't use option --output with more than one argument, but this only happens
because texi2dvi is used and not texi2pdf.

ng0

2019-02-24 00:40

developer   ~0013973

please get back to me with feedback if this resolves the original bug ("normal" make and make html, not known to be broken makerules right now (pdf, ps,...).

Christian Grothoff

2019-02-24 08:32

manager   ~0013980

On my system here all targets (html, info, pdf) now work (with the @geq elimination).

ng0

2019-02-24 10:30

developer   ~0013981

Why does this break texi2pdf? I'm just curious because this is 1:1 what later versions of texinfo use for geq etc.

schanzen

2019-02-24 10:33

developer   ~0013983

As I mentioned in https://bugs.gnunet.org/view.php?id=5604#c13963, sed -i is not portable.

For Linux:

$ sed -i "s/GPACKAGE_VERSION/$(PACKAGE_VERSION)/g" gversion.texi

For macOS:

$ sed -i '' "s/GPACKAGE_VERSION/$(PACKAGE_VERSION)/g" gversion.texi

The -i swtich in both cases actually has an argument. The "extension". Only in Linux can you omit the extension. From the macOS man page:

-i extension
             Edit files in-place, saving backups with the specified extension. If a zero-length extension is given,
             no backup will be saved. It is not recommended to give a zero-length extension when in-place editing
             files, as you risk corruption or partial content in situations where disk space is exhausted, etc.

Now, unfortunately, the GNU sed uses an odd way of handling the optional agument: You add it directly to the -i, e.g.:

$ sed -i'' "s/GPACKAGE_VERSION/$(PACKAGE_VERSION)/g" gversion.texi

Hence, sed -i is not portable.

schanzen

2019-02-24 10:33

developer   ~0013984

Btw sed -i used in other places as well, e.g. doc/tutorial

ng0

2019-02-24 10:35

developer   ~0013985

But why does this still happen for you? I have pushed patches last night to no longer use the sed using rules (I still have to find out why I wrote them in the first place!).

ng0

2019-02-24 10:38

developer   ~0013986

> Btw sed -i used in other places as well, e.g. doc/tutorial

Can you tell me if outside of the doc folder anything related to sed throws an error for you?

schanzen

2019-02-24 10:39

developer   ~0013987

Last edited: 2019-02-24 10:40

View 2 revisions

Ah, yes:

Well it still happens if I "make" or "make all".

"make html" and "make pdf" now works

ng0

2019-02-24 10:41

developer   ~0013988

Okay, can you append an log? I know where in doc I still need to fix rules.

schanzen

2019-02-24 10:46

developer   ~0013990

The log wont help you much:

make
  MAKEINFO gnunet.info
sed: 1: "gversion.texi": extra characters at the end of g command
make: *** [version.texi/replacement] Error 1

GNUnet currently FTBFS but I presume it will also fail to build during a regular make in /

ng0

2019-02-24 10:48

developer   ~0013991

Okay, this happens after I removed the rule in doc/handbook/Makefile.am as a dependency of the rule "all"?

ng0

2019-02-24 10:51

developer   ~0013992

Question related to awk, just in case: What kind of awk does macOS use? Does this awk follow standards?

ng0

2019-02-24 10:57

developer   ~0013993

The rules with sed (version.texi/replacement and the other one) only exist as a precondition for TEXI2MDOC_GENERATION so that "make gnunet-tutorial.7" could be run on its own without texinfo.
Or something similar related to texi2mdoc. I'll fix this today.

schanzen

2019-02-24 10:59

developer   ~0013994

There are no standards to these kinds of programs. macOS is using a version which is probably derived from older UNIX versions and not the GNU version.

schanzen

2019-02-24 11:00

developer   ~0013995

And isnt "make" and "make all" synonimous?

ng0

2019-02-24 11:03

developer   ~0013996

the standard question: I mean if it does anything out of the ordinary like Gnu sed. I'm looking at the possibilities here how to fix this.

ng0

2019-02-24 11:08

developer   ~0013997

wrt "-i" I know what you mean now: https://unix.stackexchange.com/questions/92895/how-can-i-achieve-portability-with-sed-i-in-place-editing
NetBSD base sed supports "-i".

ng0

2019-02-24 11:21

developer   ~0013999

The question was rather stupid, but I had forgotten about the differences and what -i does. My last 2 patches have fixed every ocurence of sed -i in .am files.

schanzen

2019-02-24 11:22

developer   ~0014000

I can confirm this works again.

ng0

2019-02-24 11:32

developer   ~0014001

Okay. Ticket resolved?

I'll make a note about portability, we should emphasize portable solutions over non-standard ones as long as the portable ones are, well, portable.

Issue History

Date Modified Username Field Change
2019-02-23 12:57 schanzen New Issue
2019-02-23 13:12 ng0 Note Added: 0013960
2019-02-23 13:13 ng0 Note Added: 0013961
2019-02-23 13:14 ng0 Note Added: 0013962
2019-02-23 13:25 ng0 Assigned To => Christian Grothoff
2019-02-23 13:25 ng0 Status new => assigned
2019-02-23 15:02 schanzen Note Added: 0013963
2019-02-23 15:07 schanzen Note Added: 0013964
2019-02-23 19:17 schanzen OS => macOS / BSD
2019-02-23 23:23 ng0 Assigned To Christian Grothoff => ng0
2019-02-23 23:36 ng0 Note Added: 0013965
2019-02-23 23:37 ng0 Note Added: 0013966
2019-02-23 23:38 ng0 Status assigned => confirmed
2019-02-23 23:38 ng0 Note Added: 0013967
2019-02-23 23:40 ng0 Note Added: 0013968
2019-02-23 23:42 ng0 Note Added: 0013969
2019-02-23 23:56 ng0 Note Added: 0013970
2019-02-23 23:58 ng0 Note Added: 0013971
2019-02-24 00:04 ng0 Note Added: 0013972
2019-02-24 00:40 ng0 Note Added: 0013973
2019-02-24 00:40 ng0 Assigned To ng0 => schanzen
2019-02-24 08:32 Christian Grothoff Note Added: 0013980
2019-02-24 10:30 ng0 Note Added: 0013981
2019-02-24 10:33 schanzen Note Added: 0013983
2019-02-24 10:33 schanzen Note Added: 0013984
2019-02-24 10:35 ng0 Note Added: 0013985
2019-02-24 10:38 ng0 Note Added: 0013986
2019-02-24 10:39 schanzen Note Added: 0013987
2019-02-24 10:40 schanzen Note Edited: 0013987 View Revisions
2019-02-24 10:41 ng0 Note Added: 0013988
2019-02-24 10:46 schanzen Note Added: 0013990
2019-02-24 10:48 ng0 Note Added: 0013991
2019-02-24 10:48 ng0 Assigned To schanzen => ng0
2019-02-24 10:51 ng0 Note Added: 0013992
2019-02-24 10:57 ng0 Note Added: 0013993
2019-02-24 10:59 schanzen Note Added: 0013994
2019-02-24 11:00 schanzen Note Added: 0013995
2019-02-24 11:03 ng0 Note Added: 0013996
2019-02-24 11:08 ng0 Note Added: 0013997
2019-02-24 11:21 ng0 Note Added: 0013999
2019-02-24 11:22 schanzen Note Added: 0014000
2019-02-24 11:32 ng0 Note Added: 0014001
2019-02-24 11:55 ng0 Assigned To ng0 => schanzen
2019-02-24 12:06 schanzen Status confirmed => resolved
2019-02-24 12:06 schanzen Resolution open => fixed
2019-02-24 12:06 schanzen Fixed in Version => 0.11.0
2019-02-28 11:17 Christian Grothoff Status resolved => closed