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  <20152016  2017  2018  2019  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  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: trouble building asyn driver on FreeBSD
From: Mark Rivers <[email protected]>
To: Franklin Fuller <[email protected]>, "[email protected]" <[email protected]>
Date: Thu, 29 Jan 2015 03:22:06 +0000
Hi Franklin,

I think I see the problem.

asyn/asyn/vxi11/ contains a file called osiRpc.h

It contains these lines:

#ifdef __APPLE__
#define rpcTaskInit() 0
#endif

I suspect that is the problem.  It is looking for a macro called __APPLE__ to be defined.  Since your build defines freebsd try adding the following to that file:

#ifdef freebsd
#define rpcTaskInit() 0
#endif

I think, however, that you should be able to build with clang on Darwin, you don't need to use gcc.


Mark

________________________________
From: [email protected] [[email protected]] on behalf of Franklin Fuller [[email protected]]
Sent: Wednesday, January 28, 2015 9:03 PM
To: [email protected]
Subject: Re: trouble building asyn driver on FreeBSD

Copy paste error on my part:

The error at the end is:

/usr/bin/g++ -c  -D_POSIX_THREADS           -D_X86_64_  -DUNIX  -D_BSD_SOURCE -Dfreebsd  -D_REENTRANT   -O3   -Wall           -MMD -I. -I../O.Common -I. -I.. -I../../../include/os/freebsd -I../../../include -I/home/yanolab/EPICS/base/include/os/freebsd -I/home/yanolab/EPICS/base/include       ../testMain.cpp
/usr/bin/g++ -o test  -L/usr/home/yanolab/EPICS/modules/asyn4-23/lib/freebsd-x86_64 -L/usr/home/yanolab/EPICS/base-3.14.12.4/lib/freebsd-x86_64 -Wl,-rpath,/usr/home/yanolab/EPICS/modules/asyn4-23/lib/freebsd-x86_64 -Wl,-rpath,/usr/home/yanolab/EPICS/base-3.14.12.4/lib/freebsd-x86_64                     test_registerRecordDeviceDriver.o testMain.o    -ltestSupport -lasyn -lrecIoc -lsoftDevIoc -lmiscIoc -lrsrvIoc -ldbtoolsIoc -lasIoc -ldbIoc -lregistryIoc -ldbStaticIoc -lca -lCom
/usr/home/yanolab/EPICS/modules/asyn4-23/lib/freebsd-x86_64/libasyn.so: undefined reference to `rpcTaskInit'
collect2: error: ld returned 1 exit status


On Wed, Jan 28, 2015 at 7:02 PM, Franklin Fuller <[email protected]<mailto:[email protected]>> wrote:
Hello,

I'm getting the following errors while trying to build asyn on FreeBSD 10

The first warning:

/usr/bin/gcc -c  -D_POSIX_THREADS           -D_X86_64_  -DUNIX  -D_BSD_SOURCE -Dfreebsd  -D_REENTRANT   -O3   -Wall          -fPIC -MMD -I. -I../O.Common -I. -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/devEpics -I../../asyn/asynRecord -I../../asyn/vxi11 -I../../asyn/ni1014 -I../../asyn/devGpib -I../../include/os/freebsd -I../../include -I/home/yanolab/EPICS/base/include/os/freebsd -I/home/yanolab/EPICS/base/include       ../../asyn/vxi11/drvVxi11.c
../../asyn/vxi11/drvVxi11.c: In function 'vxiCreateDeviceLink':
../../asyn/vxi11/drvVxi11.c:292:13: warning: format '%lu' expects argument of type 'long unsigned int', but argument 8 has type 'u_int' [-Wformat=]
             asynPrint(pasynUser,ASYN_TRACE_ERROR,
             ^
../../asyn/vxi11/drvVxi11.c: In function 'vxiConnectPort':
../../asyn/vxi11/drvVxi11.c:878:9: warning: implicit declaration of function 'rpcTaskInit' [-Wimplicit-function-declaration]
         if(rpcTaskInit() == -1) {


The final error:

/usr/bin/gcc -c  -D_POSIX_THREADS           -D_X86_64_  -DUNIX  -D_BSD_SOURCE -Dfreebsd  -D_REENTRANT   -O3   -Wall          -fPIC -MMD -I. -I../O.Common -I. -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/devEpics -I../../asyn/asynRecord -I../../asyn/vxi11 -I../../asyn/ni1014 -I../../asyn/devGpib -I../../include/os/freebsd -I../../include -I/home/yanolab/EPICS/base/include/os/freebsd -I/home/yanolab/EPICS/base/include       ../../asyn/vxi11/drvVxi11.c
../../asyn/vxi11/drvVxi11.c: In function 'vxiCreateDeviceLink':
../../asyn/vxi11/drvVxi11.c:292:13: warning: format '%lu' expects argument of type 'long unsigned int', but argument 8 has type 'u_int' [-Wformat=]
             asynPrint(pasynUser,ASYN_TRACE_ERROR,
             ^
../../asyn/vxi11/drvVxi11.c: In function 'vxiConnectPort':
../../asyn/vxi11/drvVxi11.c:878:9: warning: implicit declaration of function 'rpcTaskInit' [-Wimplicit-function-declaration]
         if(rpcTaskInit() == -1) {


I tried my best to find references to this.  I see there was some issues with mac os x and their RPC a long while ago, but I've built recent versions of asyn on os x without troubles.  Typing "man rpc" into os x and freeBSD give similar man pages, so something is there for both of them.

Perhaps the only fishy thing is this:

EPICS expects gcc, while FreeBSD ships with clang.  I installed gcc/g++ 4.8 into /usr/local/bin and then soft-linked them to /usr/bin.  This allowed me to build base without any errors, but then I ran into these troubles with asyn.

Ideas?

~Franklin



References:
trouble building asyn driver on FreeBSD Franklin Fuller
Re: trouble building asyn driver on FreeBSD Franklin Fuller

Navigate by Date:
Prev: Re: trouble building asyn driver on FreeBSD Franklin Fuller
Next: Re: Problem in building EPICS Rahul Jain
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: trouble building asyn driver on FreeBSD Franklin Fuller
Next: Re: trouble building asyn driver on FreeBSD Andrew Johnson
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  <20152016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 16 Dec 2015 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·