Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error building in Ubuntu 24.04 #802

Open
2 tasks done
javsalgar opened this issue Aug 23, 2024 · 2 comments
Open
2 tasks done

Error building in Ubuntu 24.04 #802

javsalgar opened this issue Aug 23, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@javsalgar
Copy link

Bug report

  • I confirm this is a bug with Supabase, not with my own application.
  • I confirm I have searched the Docs, GitHub Discussions, and Discord.

Describe the bug

I'm trying to build supabase postgres-meta in my ubuntu 24.04 machine and I get this error

npm error gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm error Cloning into 'libpg_query'...
npm error Note: switching to 'e7c14fe399c4903223362790c212bcbeb6832864'.
npm error
npm error You are in 'detached HEAD' state. You can look around, make experimental
npm error changes and commit them, and you can discard any commits you make in this
npm error state without impacting any branches by switching back to a branch.
npm error
npm error If you want to create a new branch to retain commits you create, you may
npm error do so (now or later) by using -c with the switch command. Example:
npm error
npm error   git switch -c <new-branch-name>
npm error
npm error Or undo this operation with:
npm error
npm error   git switch -
npm error
npm error Turn off this advice by setting config variable advice.detachedHead to false
npm error
npm error HEAD is now at e7c14fe fix(makefile): ar var to inherit ar command
npm error src/postgres/src_port_snprintf.c:374:1: error: conflicting types for 'strchrnul'; have 'const char *(const char *, int)'
npm error   374 | strchrnul(const char *s, int c)
npm error       | ^~~~~~~~~
npm error In file included from ./src/postgres/include/c.h:61,
npm error                  from src/postgres/src_port_snprintf.c:62:
npm error /usr/include/string.h:286:14: note: previous declaration of 'strchrnul' with type 'char *(const char *, int)'
npm error   286 | extern char *strchrnul (const char *__s, int __c)
npm error       |              ^~~~~~~~~
npm error make[1]: *** [Makefile:172: src/postgres/src_port_snprintf.o] Error 1
npm error make: *** [queryparser.target.mk:13: libpg_query/include/pg_query.h] Error 1
npm error gyp ERR! build error
npm error gyp ERR! stack Error: `make` failed with exit code: 2

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Spin up a Ubuntu 24.04 environment
  2. Run npm clean-install

Expected behavior

It should build in this distro

Screenshots

If applicable, add screenshots to help explain your problem.

System information

  • OS: Ubuntu 24.04

Additional context

Add any other context about the problem here.

@javsalgar javsalgar added the bug Something isn't working label Aug 23, 2024
@javsalgar
Copy link
Author

Note: I checked that building the latest release of libpg_query work without issues, but in postgres-meta it is fixed to commit `e7c14fe399c4903223362790c212bcbeb6832864'. Is it possible to change that ref?

@javsalgar
Copy link
Author

For example, I checked with this ref it works without issues: d49cc8e1ffe412d67d3dbae6c7020a35edacbe93

commit d49cc8e1ffe412d67d3dbae6c7020a35edacbe93 (HEAD -> 16-latest, origin/HEAD, origin/16-latest)
Author: Dan Lynch <[email protected]>
Date:   Thu May 2 17:52:57 2024 -0700

    Update README.md

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant