Skip to content

probe2trace.pl: arch embedded eq mismatch #455

Open
@maxsharabayko

Description

@maxsharabayko

When building quicly in Ubintu under Windows Subsystem for Linux there is an error in the generated embedded-probes.h file. There is no matching #endif in the end.

probe2trace.pl:

my $arch = $^O; # here 'linux'

GetOptions("arch=s" => \$arch) # here embedded
    or die "invalid command option\n";

After GetOptions(..) arch contains embedded with some extra character in the end. Probably /n. Therefore the following condition returns false:

if ($arch eq 'embedded\r') {
print << 'EOT';

#endif
EOT
}

The best I could do to trace the issue without known perl:

print "Arch in the end: $arch\n";

if ($arch eq 'embedded') {
print << 'EOT';

#endif
EOT
}
else {
print "Arch does not match embedded: $arch...";
}

results in:

Arch in the end: embedded
Arch does not match embedded: embedded
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions