Skip to content

Build error on old Macs #3335

@qianbinbin

Description

@qianbinbin

Describe the bug

When building from source with BSD sed, following error happens:

./src/version.h:1:1: error: unknown type name 'x23define'
x23define JQ_VERSION "1.8.0"

I think the bug was brought by

jq/Makefile.am

Line 102 in 62cafa2

generate_ver = ver="`{ $(srcdir)/scripts/version || echo '$(VERSION)' ; } | sed 's/.*/\x23define JQ_VERSION \"&\"/'`"

If we change \x23 to \# everything works fine.

To Reproduce

Build with BSD sed, like /usr/bin/sed on macOS.

Expected behavior

Build successfully.

Environment (please complete the following information):

  • OS and Version: macOS
  • jq version 1.8

Additional context

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