EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: cross-compiling for ppc64 with seq 2.1 and 2.2
From: Jeong Han Lee <[email protected]>
To: "[email protected]" <[email protected]>
Date: Thu, 1 Feb 2018 21:58:18 +0100
Hi,

I am trying to build the seq 2.1.21 and 2.2.6 for linux-ppc64 target by cross-compiling. And I've got the following error:


```
/opt/fsl-qoriq/current/sysroots/x86_64-fslsdk-linux/usr/bin/powerpc64-fsl-linux/powerpc64-fsl-linux-gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -DUSE_TYPED_RSET -D_ppc_64_ -DUNIX -Dlinux -O3 -Wall -m64 --sysroot=/opt/fsl-qoriq/current/sysroots/ppc64e6500-fsl-linux -mhard-float -mcpu=e6500 -pipe -feliminate-unused-debug-types -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include -I/home/jhlee/epics_env/epics-base/include/compiler/gcc -I/home/jhlee/epics_env/epics-base/include/os/ -I/home/jhlee/epics_env/epics-base/include -MM -MF pv.d ../pv.c


In file included from /home/jhlee/epics_env/epics-base/include/cadef.h:40:0,
                 from ../pv.c:5:
/home/jhlee/epics_env/epics-base/include/epicsThread.h:214:23: fatal error: osdThread.h: No such file or directory
 #include "osdThread.h"
```

Got the hint from EPICS_BASE/CONFIG, I changed seq/configure/CONFIG as follows:

$ git diff configure/CONFIG
diff --git a/configure/CONFIG b/configure/CONFIG
index 3861c7e..cd9f838 100644
--- a/configure/CONFIG
+++ b/configure/CONFIG
@@ -22,7 +22,9 @@ include $(TOP)/configure/CONFIG_SITE
 ifdef T_A
   -include $(TOP)/configure/CONFIG_SITE.Common.$(T_A)
   -include $(TOP)/configure/CONFIG_SITE.$(EPICS_HOST_ARCH).$(T_A)
-  -include $(TOP)/configure/O.$(T_A)/CONFIG_APP_INCLUDE
+  ifneq ($(CONFIG),$(TOP)/configure)
+    -include $(CONFIG)/CONFIG_APP_INCLUDE
+  endif
 endif

The cross compilation works again.


```
/opt/fsl-qoriq/current/sysroots/x86_64-fslsdk-linux/usr/bin/powerpc64-fsl-linux/powerpc64-fsl-linux-gcc -D_GNU_SOURCE -D_DEFAULT_SOURCE -DUSE_TYPED_RSET -D_ppc_64_ -DUNIX -Dlinux -O3 -Wall -m64 --sysroot=/opt/fsl-qoriq/current/sysroots/ppc64e6500-fsl-linux -mhard-float -mcpu=e6500 -pipe -feliminate-unused-debug-types -fPIC -I. -I../O.Common -I. -I. -I.. -I../../../include/compiler/gcc -I../../../include/os/Linux -I../../../include -I/home/jhlee/epics_env/epics-base/include/compiler/gcc -I/home/jhlee/epics_env/epics-base/include/os/ -I/home/jhlee/epics_env/epics-base/include -I/home/jhlee/epics_env/epics-base/include/compiler/gcc -I/home/jhlee/epics_env/epics-base/include/os/Linux -I/home/jhlee/epics_env/epics-base/include -MM -MF pv.d ../pv.c
```

It looks like somehow OS_CLASS is missing. Can I get some more insights about them?


The weird CONFIG_SITE.Common.linux-ppc64e6500 is as follows:

```
include $(CONFIG)/os/CONFIG.Common.linux-ppc64

TOOLCHAIN_VER=current
TOOLCHAIN=fsl
TOOLCHAIN_SUFFIX=-qoriq

GNU_TARGET=powerpc64-$(TOOLCHAIN)-linux
SYSROOTS=/opt/$(TOOLCHAIN)$(TOOLCHAIN_SUFFIX)/$(TOOLCHAIN_VER)/sysroots
SDKTARGETSYSROOT=$(SYSROOTS)/ppc64e6500-$(TOOLCHAIN)-linux

CROSS_INCLUDES =

FSL_CFLAG = --sysroot=$(SDKTARGETSYSROOT) -mhard-float -mcpu=e6500

#ARCH_DEP_CPPFLAGS += $(FSL_CFLAG)

ARCH_DEP_CFLAGS   += $(FSL_CFLAG)
ARCH_DEP_CXXFLAGS += $(FSL_CFLAG)
ARCH_DEP_LDFLAGS  += --sysroot=$(SDKTARGETSYSROOT)


ARCH_DEP_CFLAGS   += -pipe -feliminate-unused-debug-types
ARCH_DEP_CXXFLAGS += -pipe -feliminate-unused-debug-types
ARCH_DEP_LDFLAGS  += -Wl,-O1
ARCH_DEP_LDFLAGS  += -Wl,--hash-style=gnu
ARCH_DEP_LDFLAGS  += -Wl,--as-needed

OECORE_NATIVE=x86_64-$(TOOLCHAIN)sdk-linux
GNU_DIR=$(SYSROOTS)/$(OECORE_NATIVE)/usr
GNU_BIN=$(GNU_DIR)/bin/$(GNU_TARGET)
GNU_TARGET_LIB_DIR=$(GNU_DIR)/lib
```

Best,
Han




Replies:
Re: cross-compiling for ppc64 with seq 2.1 and 2.2 Jeong Han Lee
Re: cross-compiling for ppc64 with seq 2.1 and 2.2 Benjamin Franksen

Navigate by Date:
Prev: RE: Segmentation fault when setting motorStatusProblem_ to 1 Sobhani, Bayan
Next: Re: Phytron Phymotion reset on IOC boot Nilson Pereira
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: Segmentation fault when setting motorStatusProblem_ to 1 Sobhani, Bayan
Next: Re: cross-compiling for ppc64 with seq 2.1 and 2.2 Jeong Han Lee
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  <20182019  2020  2021  2022  2023  2024 
ANJ, 09 Feb 2018 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·