Thank you for sharing this valuable information! It's great to know that updating libtirpc to version 1.2.6 resolves the issue with compiling on GCC 10 or newer. This kind of information can be very helpful for others who may run into the same problem. However, you could provide a bit more context for readers who might not be familiar with the specifics. For instance, you could briefly explain what libtirpc is used for or why upgrading the library is necessary for resolving the issue.
But, I have used an alternative solution for my website Sassa-Status-Check
The solution is:
Modify the Code.
Check for duplicate definitions of svc_xports in your code.
If duplicate definitions exist, use conditional compilation (#ifndef and #define) to ensure that svc_xports is defined only once.
If the conflict is between libtirpc and other libraries or code, consider renaming svc_xports to something unique in your code to avoid the conflict.
Ensure that libraries are linked in the correct order, and experiment with changing the order if necessary.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
libtirpc v1.1.4 has a know bug with compiling with > GCC-10
https://bugs.gentoo.org/705896
Returns error
/usr/lib/gcc/x86_64-cros-linux-gnu/10.3.0/../../../../x86_64-cros-linux-gnu/bin/ld: /tmp/git/libnvidia-container/deps/usr/local/lib/libtirpc.a(libtirpc_la-rpc_generic.o):/tmp/git/libnvidia-container/deps/src/libtirpc-1.1.4/src/rpc_com.h:64: multiple definition of `__svc_xports';
Updating libtirpc to v1.2.6 corrects the issue
Thank you for sharing this valuable information! It's great to know that updating libtirpc to version 1.2.6 resolves the issue with compiling on GCC 10 or newer. This kind of information can be very helpful for others who may run into the same problem. However, you could provide a bit more context for readers who might not be familiar with the specifics. For instance, you could briefly explain what libtirpc is used for or why upgrading the library is necessary for resolving the issue.
But, I have used an alternative solution for my website Sassa-Status-Check
The solution is:
Modify the Code.
Check for duplicate definitions of svc_xports in your code.
If duplicate definitions exist, use conditional compilation (#ifndef and #define) to ensure that svc_xports is defined only once.
If the conflict is between libtirpc and other libraries or code, consider renaming svc_xports to something unique in your code to avoid the conflict.
Ensure that libraries are linked in the correct order, and experiment with changing the order if necessary.