Hi Andrew,
Thank you for your response!
Yes I have tried setting TIRPC=NO, by leaving the main CONFIG_SITE file intact this leaves the (TIRPC=YES commented) and manually setting TIRPC=YES, on the CONFIG_SITE.Common.linux-x86_64. By doing this, it results in the following error
code:
“
In file included from vxi11core_xdr.c:6:
Vxi11core.h:9:10: fatal error: rpc/rpc.h: No such file or directory
9 | #include <rpc/rpc.h>
|
compilation terminated.
Also, I have both libtirpc and libtirpc-devel installed. I have run through the commands you have shown below, and I get the exact same outputs.
Best,
Jacob R.
From: Johnson, Andrew N. <anj at anl.gov>
Sent: Monday, July 15, 2024 2:10 PM
To: Ramirez-Morales, Jacob J (CONTR) <RAMIREJJ at nv.doe.gov>; tech-talk at aps.anl.gov
Subject: [EXTERNAL]Re: Asyn Module Cross-Compilation: Cannot find -ltirpc
Hi Jacob,
Whether you need to use tirpc for the cRIO build would depend on the libc (presumably glibc) that your linux-x86_64-cRIO target uses, not what OS the cross-compiler runs on. I don't know the answer to that, but given the error you are seeing
have you tried setting TIRPC=NO in your CONFIG_SITE.Common.linux-x86_64.linux-x86_64-cRIO file? That tells the Asyn build that the RPC routines are found in the standard C libraries, not in an external rpc library.
If you have been told that you need to use tirpc for the target, it might be that you also need to install a -devel package. On my RHEL-8 system here the host's libtirpc.so.3.0.0 shared library is installed from the RPM libtirpc-1.1.4-8.el8.x86_64
but there is a soft-link used for library versioning and that Asyn actually links to which comes from the RPM libtirpc-devel-1.1.4-8.el8.x86_64 (and also provides the header files):
voltctl% ls -l /usr/lib64/libtirpc*
lrwxrwxrwx
1 root root
17 Aug
3 2022 /usr/lib64/libtirpc.so -> libtirpc.so.3.0.0*
lrwxrwxrwx. 1 root root
17 Aug
3 2022 /usr/lib64/libtirpc.so.3 -> libtirpc.so.3.0.0*
-rwxr-xr-x. 1 root root 217696 Aug
3 2022 /usr/lib64/libtirpc.so.3.0.0*
voltctl% rpm -qf /usr/lib64/libtirpc.so.3
libtirpc-1.1.4-8.el8.x86_64
voltctl% rpm -qf /usr/lib64/libtirpc.so.3.0.0
libtirpc-1.1.4-8.el8.x86_64
voltctl% rpm -qf /usr/lib64/libtirpc.so
libtirpc-devel-1.1.4-8.el8.x86_64
HTH,
- Andrew
Complexity comes for free, Simplicity you have to work for.
Hello EPICS community,
I am currently working on a project where I need to cross-compile my EPICS environment for my linux-x86_64-cRIO target. I was able to compile EPICS base with the target architecture included as a STATIC_BUILD. To
do this I followed the steps show below:
1.
Downloaded and ran the National instruments GNU C & C++ Compile Tools x64 (Version: 2023 Q4)
2.
In my epics-base configure directory, I added the following files:
·
CONFIG_SITE.local
o
CROSS_COMILER_TARGET_ARCHS += linux-x86_64-cRIO
·
os/CONFIG_SITE.Common.linux-x86_64.linux-x86_64-cRIO
o
STATIC_BUILD=YES
o
SHARED_LIBRARIES=NO
·
os/CONFIG.Common.linux-x86_64-cRIO
3.
After these are included, I am able to run make under epics-base successfully.
However, I am encountering an issue during the compilation process of Asyn, specifically with the following error message:
“/ni/oecore-x86_64/sysroots/x86_64-nilrtsdk-linux/usr/libexec/x86_64-nilrt-linux/gcc/x86_64-nilrt-linux/11.3.0/ld: cannot find -ltirpc: No such file or directory
Collect2: error: ld returned 1 exit status”
The ‘ni/oecore-x86_64’ is the directory I have downloaded my GNU C & C++ Compiler Toolchain. Additionally, I have confirmed that libtirpc should also be included with the compile toolchain for my cRIO target, along
with numerous other libraries.
I understand the ltripc is the library for the RPC (Remote Procedure Call) interface; I have set the TIRPC=YES flag in my ‘asyn/configure/CONFIG_SITE’ file since I am running RHEL 8.10.
Could anyone provide guidance or share their experiences with cross-compiling the Asyn module for a cRIO target using libtirpc.
Best,
Jacob R.