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  2018  <20192020  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  2018  <20192020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: SPEC "can't get a big memory buffer" issue
From: Gerry Swislow via Tech-talk <[email protected]>
To: Matt Newville <[email protected]>
Cc: Zhang Dongzhou <[email protected]>, Joanne Stubbs <[email protected]>, Peter Eng <[email protected]>, "[email protected]" <[email protected]>
Date: Wed, 23 Jan 2019 11:19:08 -0500
Hi Matt,

I don't know perl, but just to get through the build, I added a line to the file modules/ca/src/perl/Makefile in the EPICS 7.0.2 distribution as shown.  With that, the build completes on the macOS Mojave platform.  And as far as linking goes, the next release of spec will link with the 7.0 channel access libraries if the spec install configuration points to them.

I would think that the EPICS build should work with the stock perl distributed with macOS.  If it is a bug in the way macOS packages perl, maybe the EPICS configuration tools should work around the bug, as macOS is a rather mainstream platform.  It seems excessive to have to install a /usr/local version of perl just to fix the one "-I" flag.

- Gerry

*** Makefile	2019-01-23 10:08:06.000000000 -0500
--- Makefile.sav	2018-12-17 18:40:49.000000000 -0500
***************
*** 53,60 ****
  
  Cap5_SRCS = Cap5.xs
  Cap5_LIBS = ca Com
! Cap5_INCLUDES = -I$(shell $(PERL) ../perlConfig.pl archlib)/CORE \
! -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE/
  Cap5_CFLAGS = $(shell $(PERL) ../perlConfig.pl ccflags)
  
  CLEANS += Cap5.c
--- 53,59 ----
  
  Cap5_SRCS = Cap5.xs
  Cap5_LIBS = ca Com
! Cap5_INCLUDES = -I$(shell $(PERL) ../perlConfig.pl archlib)/CORE
  Cap5_CFLAGS = $(shell $(PERL) ../perlConfig.pl ccflags)
  
  CLEANS += Cap5.c


Begin forwarded message:

> From: Matt Newville <[email protected]>
> Subject: Re: SPEC "can't get a big memory buffer" issue
> Date: January 18, 2019 at 12:57:45 PM EST
> To: Gerry Swislow <[email protected]>
> Cc: Mark Rivers <[email protected]>,  "[email protected]" <[email protected]>, Joanne Stubbs <[email protected]>,  Zhang Dongzhou <[email protected]>, Peter Eng <[email protected]>
> 
> Hi Gerry,
> 
> On Thu, Jan 17, 2019 at 9:32 AM Gerry Swislow <[email protected]> wrote:
> Hi Matt,
> 
> My system does have the file 
> 
>  /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE/EXTERN.h
> 
> But the folder containing the file is not included as a -I flag in the compile instruction.  The closest directive is -I/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE, which is a folder that only contains the file
> 
>  -rwxr-xr-x  1 root  wheel  2505712 Nov 30 02:32 libperl.dylib*
> - Gerry
> 
> 
> Yes, it does look like a problem with building epics base on MacOS (at least with 10.14) with Apple-supplied Perl (5.18).   I get the same error as you (perl's XS tool cannot find its EXTERN.h) trying to build both base-3.16.2 and base-7.0.2 with Apple-supplied Perl (/usr/bin/perl).
> 
> I can build both base-3-16.2 and base-7.0.2 using perl (5.26) from MacPorts.  Using that perl  which got installed to /opt/local/bin/perl), the section of the build looks like this:
> 
> /Applications/Xcode.app/Contents/Developer/usr/bin/make -C O.darwin-x86 -f ../Makefile TOP=../../.. \
> 	    T_A=darwin-x86 install
> rm -f Cap5.c Cap5.c_new
> perl -CSD /opt/local/bin/xsubpp -typemap /opt/local/lib/perl5/5.26/ExtUtils/typemap ../Cap5.xs > Cap5.c_new && mv Cap5.c_new Cap5.c
> perl -CSD /Users/Newville/local/epics/base-7.0.2/bin/darwin-x86/mkmf.pl  -m Cap5.d -I. -I../O.Common -I. -I. -I.. -I/Users/Newville/local/epics/base-7.0.2/include/compiler/clang -I/Users/Newville/local/epics/base-7.0.2/include/os/Darwin -I/Users/Newville/local/epics/base-7.0.2/include -I/Users/Newville/local/epics/base-7.0.2/include/compiler/clang -I/Users/Newville/local/epics/base-7.0.2/include/os/Darwin -I/Users/Newville/local/epics/base-7.0.2/include   -I/opt/local/lib/perl5/5.26/darwin-thread-multi-2level/CORE     Cap5.o Cap5.c
> cc              -DUNIX  -Ddarwin     -O3 -g   -Wall   -fno-common -DPERL_DARWIN -mmacosx-version-min=10.13 -pipe -Os  -fno-strict-aliasing -fstack-protector-strong -I/opt/local/include -DPERL_USE_SAFE_PUTENV    -arch x86_64    -fno-common -fPIC -I. -I../O.Common -I. -I. -I.. -I/Users/Newville/local/epics/base-7.0.2/include/compiler/clang -I/Users/Newville/local/epics/base-7.0.2/include/os/Darwin -I/Users/Newville/local/epics/base-7.0.2/include -I/Users/Newville/local/epics/base-7.0.2/include/compiler/clang -I/Users/Newville/local/epics/base-7.0.2/include/os/Darwin -I/Users/Newville/local/epics/base-7.0.2/include   -I/opt/local/lib/perl5/5.26/darwin-thread-multi-2level/CORE     -c Cap5.c
> c++ -o Cap5.bundle -bundle -undefined dynamic_lookup -L/Users/Newville/local/epics/base-7.0.2/lib/darwin-x86        -arch x86_64            Cap5.o    -lca -lCom      -lreadline -lm 
> Installing loadable shared library /Users/Newville/local/epics/base-7.0.2/lib/perl/5.26.2/darwin-thread-multi-2level/Cap5.bundle
> 
> which does correctly specifiy the include path for EXTERN.h as /opt/local/lib/perl5/5.26/darwin-thread-multi-2level/CORE.
> 
> It seems like "/usr/bin/perl -V" is not reporting the absolute location of its include directories correctly, which might be part of the problem:
> 
> ~> /usr/bin/perl -V
> ....
>  @INC:
>     /Library/Perl/5.18/darwin-thread-multi-2level
>     /Library/Perl/5.18
>     /Network/Library/Perl/5.18/darwin-thread-multi-2level
>     /Network/Library/Perl/5.18
>     /Library/Perl/Updates/5.18.2/darwin-thread-multi-2level
>     /Library/Perl/Updates/5.18.2
>     /System/Library/Perl/5.18/darwin-thread-multi-2level
>     /System/Library/Perl/5.18
>     /System/Library/Perl/Extras/5.18/darwin-thread-multi-2level
>     /System/Library/Perl/Extras/5.18
>     .
> 
> 
> whereas EXTERN.h is actually in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Perl/5.18/darwin-thread-multi-2level/CORE/EXTERN.h
> 
> Hope that helps.
> 
> --Matt
> 

Replies:
Re: SPEC "can't get a big memory buffer" issue Johnson, Andrew N. via Tech-talk
Re: SPEC "can't get a big memory buffer" issue Heinz Junkes via Tech-talk
References:
Re: SPEC "can't get a big memory buffer" issue Mark Rivers via Tech-talk
Re: SPEC "can't get a big memory buffer" issue Matt Newville via Tech-talk
Re: SPEC "can't get a big memory buffer" issue Gerry Swislow via Tech-talk
Re: SPEC "can't get a big memory buffer" issue Matt Newville via Tech-talk

Navigate by Date:
Prev: Re: Simple alarm monitor Michael Davidsaver via Tech-talk
Next: Re: SPEC "can't get a big memory buffer" issue Johnson, Andrew N. via Tech-talk
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  2018  <20192020  2021  2022  2023  2024 
Navigate by Thread:
Prev: Re: SPEC "can't get a big memory buffer" issue Matt Newville via Tech-talk
Next: Re: SPEC "can't get a big memory buffer" issue Johnson, Andrew N. via Tech-talk
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  2018  <20192020  2021  2022  2023  2024 
ANJ, 07 Feb 2019 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·