asyn icon indicating copy to clipboard operation
asyn copied to clipboard

Build fails on Window when TIRPC is YES

Open hanak opened this issue 2 years ago • 3 comments

Problem: We are building for both Linux and Windows. When TIRPC is YES, testGpibApp fails to build on Windows. When TIRPC is not set, asyn fails to build on Linux (due to missing rpc.h).

Cause: While "asyn" Makefile states:

ifeq ($(TIRPC),YES)
  USR_INCLUDES_Linux += -I/usr/include/tirpc
  asyn_SYS_LIBS_Linux += tirpc
endif

"testGpibApp" Makefile states:

ifeq ($(TIRPC),YES)
  USR_INCLUDES += -I/usr/include/tirpc
  testGpib_SYS_LIBS += tirpc
endif

Since the suffix _Linux is missing, the setting applies to all OS.

Workaround: Set USR_INCLUDES_Linux, asyn_SYS_LIBS_Linux , and testGpib_SYS_LIBS_Linux in CONFIG_SITE instead of TIRPC.

hanak avatar Oct 30 '23 15:10 hanak

@hanak can you open a PR changing testGpibApp to use the _Linux suffix? That seems like the most reasonable fix, and might have been missed back when TIRPC support was first added.

ericonr avatar Jan 07 '25 21:01 ericonr

The problem is probably because you are modifying CONFIG_SITE to set TIRPC=YES.

If you do that, then you need to have a CONFIG_SITE.Common.windows-x64 that sets TIRPC=NO.

Preferably, don't change CONFIG_SITE. but rather add TIRPC=YES to CONFIG_SITE.Common.linux-x86_64. I just added that as the default in that file

MarkRivers avatar Jan 07 '25 22:01 MarkRivers

@MarkRivers Thank you. Still, there is a difference between "asyn" Makefile and "testBpibApp" Makefile which causes different behavior while compiling on Windows. I can make it disappear by using CONFIG_SITE dedicated to a specific OS. Yet, is this meant to be like this?

hanak avatar Jan 08 '25 13:01 hanak