Skip to content

Add support for ARM architecture #457

Closed
@aitva

Description

@aitva

I built sqlc on an ARM64 laptop and I got this error:

# github.com/lfittl/pg_query_go/parser
In file included from go/src/github.com/lfittl/pg_query_go/parser/include/utils/dsa.h:17:0,
                 from go/src/github.com/lfittl/pg_query_go/parser/include/nodes/tidbitmap.h:26,
                 from go/src/github.com/lfittl/pg_query_go/parser/include/access/genam.h:19,
                 from go/src/github.com/lfittl/pg_query_go/parser/include/nodes/execnodes.h:17,
                 from go/src/github.com/lfittl/pg_query_go/parser/include/commands/trigger.h:17,
                 from go/src/github.com/lfittl/pg_query_go/parser/include/plpgsql.h:21,
                 from pg_query_json_plpgsql.h:5,
                 from pg_query_json_plpgsql.c:2:
go/src/github.com/lfittl/pg_query_go/parser/include/port/atomics.h:68:35: fatal error: port/atomics/arch-arm.h: No such file or directory
 #include "port/atomics/arch-arm.h"
                                   ^
compilation terminated.

There is an open issue lfittl/pg_query_go#27 for ARM support in pg_query_go. Using the fix mentioned and go mod edit I was able to build a working version of sqlc.

If you are interested, I can fork pg_query_go and fix lfittl/pg_query_go#24, lfittl/pg_query_go#26 and lfittl/pg_query_go#27.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions