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

Fix builds on systems where protobuf-c package isn't in the default location #8017

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

elprans
Copy link
Member

@elprans elprans commented Nov 21, 2024

Use a procedure similar to other library lookup to set up CFLAGS for protobuf-c.

…ocation

Use a procedure similar to other library lookup to set up CFLAGS for protobuf-c.
Copy link
Member

@fantix fantix left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM; is this to fix the failing nightly generic builds? I was looking at that issue too and noticed a wrong include dir:

https://github.com/edgedb/edgedb/actions/runs/11944890842/job/33296624198

2024-11-21T02:03:55.4341953Z   building 'edb.pgsql.parser.parser' extension
2024-11-21T02:03:55.4342598Z   creating build/temp.linux-x86_64-cpython-312/edb/pgsql
2024-11-21T02:03:55.4343137Z   creating build/temp.linux-x86_64-cpython-312/edb/pgsql/parser
2024-11-21T02:03:55.4352051Z   gcc -pthread -fno-strict-overflow -DNDEBUG -g -O3 -Wall -fno-semantic-interposition -g -O2 -D_FORTIFY_SOURCE=2 -fstack-protector-strong -Wdate-time -Wformat -Werror=format-security -I/tmp/metapkg.0to4_k89/edgedb-server-6-dev8997/edgedb-server/edgedb-server/../../../_artifacts/install/postgresql-edgedb/opt/edgedb-server-6-dev8997/include -I/tmp/metapkg.0to4_k89/edgedb-server-6-dev8997/edgedb-server/edgedb-server/../../../_artifacts/install/python-edgedb/opt/edgedb-server-6-dev8997/include -I/tmp/metapkg.0to4_k89/edgedb-server-6-dev8997/edgedb-server/edgedb-server/../../../_artifacts/install/pgext-pgvector/opt/edgedb-server-6-dev8997/include -I/tmp/metapkg.0to4_k89/edgedb-server-6-dev8997/edgedb-server/edgedb-server/../../../_artifacts/install/libprotobuf-c/opt/edgedb-server-6-dev8997/include -fPIC -I/tmp/metapkg.0to4_k89/edgedb-server-6-dev8997/edgedb-server/edgedb-server/edb/server/pgproto -I/tmp/metapkg.0to4_k89/edgedb-server-6-dev8997/edgedb-server/edgedb-server/edb/pgsql/parser/libpg_query -I/tmp/metapkg.0to4_k89/edgedb-server-6-dev8997/edgedb-server/thirdparty/python-edgedb/Include -I/tmp/metapkg.0to4_k89/edgedb-server-6-dev8997/_artifacts/build/python-edgedb -c edb/pgsql/parser/parser.c -o build/temp.linux-x86_64-cpython-312/edb/pgsql/parser/parser.o -O2 -Wno-error=incompatible-pointer-types -std=c99 -fsigned-char -Wall -Wsign-compare -Wconversion
2024-11-21T02:03:55.4792087Z   In file included from edb/pgsql/parser/parser.c:1280:
2024-11-21T02:03:55.4793457Z   /tmp/metapkg.0to4_k89/edgedb-server-6-dev8997/edgedb-server/edgedb-server/edb/pgsql/parser/libpg_query/protobuf/pg_query.pb-c.h:7:10: fatal error: protobuf-c/protobuf-c.h: No such file or directory
2024-11-21T02:03:55.4794562Z       7 | #include <protobuf-c/protobuf-c.h>
2024-11-21T02:03:55.4795128Z         |          ^~~~~~~~~~~~~~~~~~~~~~~~~
2024-11-21T02:03:55.4795436Z   compilation terminated.
2024-11-21T02:03:55.4803886Z   error: command '/opt/rh/devtoolset-11/root/usr/bin/gcc' failed with exit code 1
2024-11-21T02:03:55.5256802Z   error: subprocess-exited-with-error
2024-11-21T02:03:55.5257231Z   
2024-11-21T02:03:55.5261952Z   × Building wheel for gel-server (pyproject.toml) did not run successfully.
2024-11-21T02:03:55.5266576Z   │ exit code: 1
2024-11-21T02:03:55.5270237Z   ╰─> See above for output.

where the relevant include option resolves to:

-I/tmp/metapkg.0to4_k89/_artifacts/install/libprotobuf-c/opt/edgedb-server-6-dev8997/include

(missing the edgedb-server-6-dev8997/ after /tmp/metapkg.0to4_k89/, I'm testing a fix).

@elprans elprans merged commit 59c5c3c into master Nov 26, 2024
23 checks passed
@elprans elprans deleted the improve-pgsql-parser-build branch November 26, 2024 21:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants