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

[sairpcgen][ENH] Add way to link additional libraries to compiled rpcserver #1532

Closed
chrispsommers opened this issue Jul 11, 2022 · 1 comment

Comments

@chrispsommers
Copy link
Contributor

Some libsai implementations require additional libraries besides libsai.so to link the final target. There needs to be a way to pass instructions to the final linker phase in the Makefile, e.g. see code below. I will follow-up with a PR to add this.

# Define extra libs for rpcserver:
SAIRPC_EXTRA_LIBS="\
		-L/lib/x86_64-linux-gnu -Wl,-rpath=/lib/x86_64-linux-gnu -lm \
		-L/usr/local/lib/ -Wl,-rpath=/usr/local/lib \
	        -lpthread \
	        -lpiprotogrpc \
	        -lpiprotobuf \
	        -lprotobuf \
	        -lgrpc++ \
	        -lgrpc \
	        -lpiall \
	        -lpi_dummy \
	        -lpthread \
	        -labsl_synchronization \
	        -labsl_status \
	        -labsl_raw_hash_set \
		-lgpr \
		-lre2 \
		-lssl \
		-laddress_sorting"

# Build the rpcserver:
export SAITHRIFTV2=y && \
export GEN_SAIRPC_OPTS="-ve" && \
export SAIRPC_EXTRA_LIBS=$(SAIRPC_EXTRA_LIBS) && \
make saithrift-build
@chrispsommers
Copy link
Contributor Author

Fixed by #1533

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

No branches or pull requests

1 participant