Opened 5 years ago

Closed 5 years ago

Last modified 4 years ago

#15524 closed defect (fixed)

makefile rules for *.i files broken

Reported by: Alan Owned by:
Priority: Medium Milestone:
Component: Core Tor/Tor Version: Tor:
Severity: Keywords: makefile
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:


The makefile rules for generating the *.i files are not working for me under cygwin. The rules are intended to generate .i files that contain lines like:

"388282ad2a9be7209d64f18d05b1ba65fd254dc8 *src/common/aes.c\n"

However, instead of inserting the substring "\n", the makefile is inserting a 0x0A control character, so the trailing doublequote is getting split to a second line, like this:

"388282ad2a9be7209d64f18d05b1ba65fd254dc8 *src/common/aes.c

As a result, the file will not compile.

The fix for me was to edit the makefile to change the rules for src/common/common_sha1.i and src/or/or_sha1.i. Where the rules read:

"sed" -n [some more stuff] [backslash]1[backslash][backslash]n"/p'

I changed the backslash-backslash-n to backslash-backslash-backslash-n, so that it then reads:

"sed" -n [some more stuff] [backslash]1[backslash][backslash][backslash]n"/p'

Note: when I typed multiple \ characters into the description above, they disappeared in the preview screen, so I have used [backslash] to represent a single \ character in the lines above.

In summary, I made a total of four changes, inserting one \ character on four different "sed" lines in the makefile. With these changes, the *.i files were generated correctly.

Child Tickets

Change History (4)

comment:1 Changed 5 years ago by nickm

See #14742; it is probably best to remove the sha1.i files entirely.

comment:2 Changed 5 years ago by teor

Milestone: Tor: 0.2.???
Resolution: fixed
Status: newclosed

I think this ticket has been resolved by deleting the *.i files with the source code hashes in them in #14742. However, there is still micro-revision.i with the git commit hash.

Please reopen this bug if this is still an issue for micro-revision.i on Windows / cygwin.

comment:3 Changed 4 years ago by teor

Milestone: Tor: 0.2.???Tor: 0.3.???

Milestone renamed

comment:4 Changed 4 years ago by nickm

Milestone: Tor: 0.3.???

Milestone deleted

Note: See TracTickets for help on using tickets.