cygrpc.cpython compilation instructions for linux

36 views
Skip to first unread message

Sasha Solganik

unread,
Sep 20, 2024, 1:03:42 PM9/20/24
to grpc.io
Hi Guys, i am trying to implement GRPC monitoring using UBPF for version 1.66.1. 
While been sucessfull on ARM, i fail to do so on X86 processors.
I had tried to to compile  cygrpc.cpython-310-x86_64-linux-gnu.so  according top instructions here:

But the resulting SO i get is different from the production one (it is with debug symbols and not inlined functions). Also it seems that some optimizations are not applied.

My question is how to build cygrpc.cpython exactly the same way as it is released to pypi.
Thanks in advance.

Richard Belleville

unread,
Sep 20, 2024, 1:41:01 PM9/20/24
to Sasha Solganik, grpc.io
This is the script used to build the production artifacts in CI for Posix environments. It should get you all the settings you need to reproduce.

--
You received this message because you are subscribed to the Google Groups "grpc.io" group.
To unsubscribe from this group and stop receiving emails from it, send an email to grpc-io+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/0b231c19-53ba-4e94-9341-d139761c3388n%40googlegroups.com.

Sasha Solganik

unread,
Sep 24, 2024, 1:10:40 PM9/24/24
to grpc.io
@Richard thanks for quick reply, I had tried to repro with the build script you mentioned, but got same results as instructions i followed on the readme. 
There are 2 interesting points:
1. For ARM build my own compilation and the one i pulled from pypi worked perfectly (all symbol positions were the same).
2. For Intel (64 bit), there is a difference in structs positions between my own compilation and the one i pulled from pypi. For example  function "grpc_chttp2_list_pop_writable_stream" offset is different,  GRPC metadata presence bits (struct grpc_metadata_batch) are different for some Enums (in particular for grpc_core::HttpPathMetadata), local and remote addresses (offsets) from SocketNode were different. 

Like if intel version was compiled either from different source, or patched or used some additional flags when compiled for Pypi upload. 
Is there anywhere in opensource where i can see the Job that produced the library that was uploaded to Pypi for intel processor ? or any other way to reproduce the exact build ? 

Thanks in advance. 
Reply all
Reply to author
Forward
0 new messages