Hi Pierrick,
Where in your configure/CONFIG_SITE files are you setting TIRPC=YES?
There are 2 places in Asyn where GnuMake looks at the TIRPC variable. Both asyn/Makefile and testGpibApp/src/Makefile do this:
# Some linux systems moved RPC related symbols to libtirpc
# Define TIRPC in configure/CONFIG_SITE in this case
ifeq ($(TIRPC),YES)
USR_INCLUDES_Linux += -I/usr/include/tirpc
asyn_SYS_LIBS_Linux += tirpc
endif
For cross-compilation you really don’t want that to be enabled in either Makefile, so if you’re setting TIRPC=YES in your onfigure/CONFIG_SITE file you also need to set TIRPC=NO in your
CONFIG_SITE.Common.linux-arm_raspberrypi5 file. Alternatively only set it to YES in the target-specific CONFIG_SITE.Common.$(T_A) files where those are needed.
HTH,
- Andrew
Complexity comes for free, Simplicity you have to work for.
On 4/18/25, 3:10 PM, "Tech-talk" <tech-talk-bounces at aps.anl.gov> wrote:
I guess that my real question is, how does one turn "off" the
/usr/include when cross-compiling
On 4/18/25 12:31, Pierrick M Hanlet via Tech-talk wrote:
> [EXTERNAL] – This message is from an external sender
>
> Greetings all,
> I've recently added the raspberrypi5 platform to my list of supported
> platforms and in attempting to build asyn
> found that I've never correctly pointed my builds to pick up the correct
> header file for tirpc:
>
> /usr/local/products/buildroot/raspberrypi5_generic/host/usr/bin/aarch64-linux-gcc
> -D_GNU_SOURCE -D_DEFAULT_SOURCE -DUSE_TYPED_RSET -DUSE_TYPED_DSET
> -DUSE_TYPED_DRVET -DBUILDING_asyn_API -DUNIX -Dlinux -O3 -g
> -Wall -Werror-implicit-function-declaration -DUSE_TYPED_RSET
> -DUSE_TYPED_DSET -DUSE_TYPED_DRVET -DHAVE_LSREC -DHAVE_CALCMOD
> -DHAVE_DEVINT64 -D_FILE_OFFSET_BITS=64 -g -fPIC -I. -I../O.Common
> -I. -I. -I../../asyn/drvAsynSerial/os/Linux
> -I../../asyn/drvAsynSerial/os/default -I.. -I../../asyn/asynDriver
> -I../../asyn/asynGpib -I../../asyn/drvAsynSerial -I../../asyn/interfaces
> -I../../asyn/miscellaneous -I../../asyn/asynPortDriver/exceptions
> -I../../asyn/asynPortDriver -I../../asyn/asynPortClient
> -I../../asyn/devEpics -I../../asyn/asynRecord -I../../asyn/vxi11
> -I../../asyn/drvPrologixGPIB -I../../asyn/gsIP488 -I../../asyn/ni1014
> -I../../asyn/devGpib -I../../include/compiler/gcc
> -I../../include/os/Linux -I../../include
> -I/usr/local/epics/securePVA/Support/ipac/include
> -I/usr/local/epics/securePVA/Support/seq/include
> -I/usr/local/epics/securePVA/Support/calc/include
> -I/usr/local/epics/securePVA/Support/sscan/include
> -I/usr/local/epics/securePVA/base/include/compiler/gcc
> -I/usr/local/epics/securePVA/base/include/os/Linux
> -I/usr/local/epics/securePVA/base/include -I/usr/include/tirpc
> -I/usr/local/products/buildroot/raspberrypi5_generic/host/usr/aarch64-buildroot-linux-gnu/sysroot/usr/include
> -I/usr/local/products/buildroot/raspberrypi5_generic/host/usr/aarch64-buildroot-linux-gnu/sysroot/usr/include/tirpc
> -MM -MF asynManager.d ../../asyn/asynDriver/asynManager.c
> aarch64-linux-gcc: ERROR: unsafe header/library path used in
> cross-compilation: '-I/usr/include/tirpc'
>
> In configure/os/CONFIG_SITE.Common.linux-arm_raspberrypi5, I have:
>
> OP_SYS_INCLUDES+=-I$(GNU_DIR)/$(ARCH_DIR)/sysroot/usr/include
> OP_SYS_INCLUDES+=-I$(GNU_DIR)/$(ARCH_DIR)/sysroot/usr/include/tirpc
> OP_SYS_LDLIBS += -ltirpc
>
> Should I be using a different environment variable?
>
> I'm using base-7.0.9 with C++20 on AL9 and asyn-R4-44
>
> Many thanks,
> Pierrick
>
>
> --
> Pierrick Hanlet
> Fermi National Accelerator
> Accelerator Front End Controls
> +1-630-840-5555 -- lab
> +1-312-687-4980 -- mobile
>
> "Whether you think you can or think you can't, you're right" -- Henry Ford
>
--
-- Pierrick Hanlet
+1-630-840-5555 office
+1-312-687-4980 mobile
=== "Whether you think you can or think you can't, either way, you're correct" -- Henry Ford