EPICS Home

Experimental Physics and Industrial Control System


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

Subject: RE: Problem with example on win32
From: "Jeff Hill" <[email protected]>
To: "'Janet Anderson'" <[email protected]>, "'Mark Rivers'" <[email protected]>
Cc: "Chris Timossi" <[email protected]>, "Ken Evans" <[email protected]>, "EPICS-tech-talk" <[email protected]>
Date: Fri, 8 Aug 2003 10:40:07 -0600
Mark,

> Its tedious to have to update my windows path environment variable for
> all of the various different places where EPICS DLLs may end up
> getting installed by applications, extensions, and base.

There is a long tradition on windows of dumping all of the required sharable
libraries into one of the ms system directories during the install script. This
is also how programs dependent on newer versions of windows magically update
parts of the OS supplied DLLs on older windows versions. 

An EPICS base windows install script has not been addressed, but we should
probably think about what needs to be done. It would be nice to be able to
install EPICS on windows w/o compiling the source code.

So we have to decide if we want to follow the windows model for DLL
installation. I notice that some of the shareware programs don't. The install
script for each EPICS component {base, appl, extensions} could install into a
common directory under "program files" or they could install the DLLs into a MS
system directory. We would need to deal with situations where an EPICS program
is running and using a DLL that is being replaced by an install script (windows
does not permit a DLL to be replaced by a newer version if a program is
currently using it).

> Another problem with this is that existing 3.13 extensions (for
> example ezcaIDL) require some DLLs(ca.dll, com.dll) to be in the PATH, 
> but the versions in the PATH now are incompatible with the 3.14 
> versions, so this does not work. Is this the correct and desired 
> behavior?  

At compile time the R3.14 CA client interface should be fully backwards
compatible with the R3.13 interface. So, in theory, you need only remove R3.13,
build R3.14, and rebuild your extensions.

If we start doing binary installs then we will need to be more careful about
changing the binary interface to a DLL. We are currently not very careful about
when this is allowed to change. I think that the MS convention is to change the
name of the DLL if the binary interface is changed. The MS convention is also to
completely remove an old version from the machine when installing a new version.
There are sometimes "shim" DLLs that are created for the purpose of translating
between an old and a new binary interfaces presented by DLLs with different
names, but presenting similar interfaces along an evolution path.

> Is it possible to build dynamically linked applications on 
> Windows that have the paths to the required DLLs built into the 
> executable? 

I had a quick look at the ms linker and I didn't see any such option.

I remember hearing the discussion about adding this capability to the Linux
build. Personally, I'm not that fond of building paths into an executable
because if the executable is transported to a different machine it will not
work. 

So I agree that this issue needs to be discussed. If there are additional folks
on tech-talk that would like to join in this discussion then please let me know.

Jeff


> -----Original Message-----
> From: Janet Anderson [mailto:[email protected]]
> Sent: Friday, August 08, 2003 9:49 AM
> To: Mark Rivers; Hill Jeff
> Subject: Re: Problem with example on win32
> 
> 
> Mark, sorry for the delay in answering your email,
> I've been on vacation for the last 3 days.
> 
> Jeff, can you help with this problem?
> 
> Setting your path is the only way I know in which
> to find DLLs. From the Visual C++ documentation -
> 
> Search Path Used by Windows to Locate a DLL
> With both implicit and explicit linking, Windows first searches the set
> of
> pre-installed DLLs such as
>   the performance library (KERNEL32.DLL) and the security library
> (USER32.DLL).
> Windows then searches
> for the DLLs in the following sequence:
> The directory where the executable module for the current process is
> located.
> The current directory.
> The Windows system directory. The GetSystemDirectory function retrieves
> the path
> of this directory.
> The Windows directory. The GetWindowsDirectory function retrieves the
> path of
> this directory.
> The directories listed in the PATH environment variable.
> Note The LIBPATH environment variable is not used.
> 
> 
> Janet
> 
> 
> 
> 
> 
> Mark Rivers wrote:
> > Hi Janet,
> >
> > I've managed to build base, seq and the example applicatoin on
> > win32-x86.  I built the example dynamically.
> >
> > When I try to run myexample.exe it generates an error saying it can't
> > find dbIoc.dll.  I put my EPICS base bin/win32-x86 directory in my
> PATH
> > enivronment variable, and then it says it can't find seq.dll.  I then
> > put the seq/bin in my path, and the application runs OK.
> >
> > However, this is not the correct behavior, right?  I should not have
> to
> > put those directories in my path?  Is there a way to analyse the image
> > to find the path's it is using to look for the DLLs?  I can get the
> list
> > of DLLs using dumpbin/imports, but it does not show the paths.
> >
> > Thanks,
> > Mark
> >
> > J:\epics\3.14\example\iocBoot\iocmyexample>dumpbin /imports
> > ....\..\bin\win32-x86\myexample.exe
> > Microsoft (R) COFF Binary File Dumper Version 6.00.8168
> > Copyright (C) Microsoft Corp 1992-1998. All rights reserved.
> >
> >
> > Dump of file ..\..\bin\win32-x86\myexample.exe
> >
> > File Type: EXECUTABLE IMAGE
> >
> >   Section contains the following imports:
> >
> >     myexampleSupport.dll
> >                 402070 Import Address Table
> >                 4024C0 Import Name Table
> >                      0 time date stamp
> >                      0 Index of first forwarder reference
> >
> >                    0  pdevXxxSoft
> >                    1  pmySub
> >                    2  pxxxRSET
> >                    3  pxxxRecordSizeOffset
> >
> >     seq.dll
> >                 402164 Import Address Table
> >                 4025B4 Import Name Table
> >                      0 time date stamp
> >                      0 Index of first forwarder reference
> >
> >                    3  _seqRegisterSequencerCommands@0
> >                    4  _seqRegisterSequencerProgram@4
> >                    8  _seq_delayInit@16
> >                    7  _seq_delay@8
> >
> >     recIoc.dll
> >                 402084 Import Address Table
> >                 4024D4 Import Name Table
> >                      0 time date stamp
> >                      0 Index of first forwarder reference
> >
> >                   28  pmbbiRSET
> >                   25  plongoutRecordSizeOffset
> >                   24  plongoutRSET
> >                   23  plonginRecordSizeOffset
> >                   22  plonginRSET
> >                   1F  pfanoutRecordSizeOffset
> >                   1E  pfanoutRSET
> >                   1D  peventRecordSizeOffset
> >                   1C  peventRSET
> >                   13  pdfanoutRecordSizeOffset
> >                   12  pdfanoutRSET
> >                   11  pcompressRecordSizeOffset
> >                   10  pcompressRSET
> >                    F  pcalcoutRecordSizeOffset
> >                    E  pcalcoutRSET
> >                    D  pcalcRecordSizeOffset
> >                    C  pcalcRSET
> >                    B  pboRecordSizeOffset
> >                    A  pboRSET
> >                    9  pbiRecordSizeOffset
> >                    8  pbiRSET
> >                    7  paoRecordSizeOffset
> >                    6  paoRSET
> >                    5  paiRecordSizeOffset
> >                    4  paiRSET
> >                   38  pstringoutRSET
> >                   37  pstringinRecordSizeOffset
> >                   36  pstringinRSET
> >                   35  pstateRecordSizeOffset
> >                   29  pmbbiRecordSizeOffset
> >                   34  pstateRSET
> >                   33  pseqRecordSizeOffset
> >                   32  pseqRSET
> >                   31  pselRecordSizeOffset
> >                   30  pselRSET
> >                   2F  ppermissiveRecordSizeOffset
> >                   2E  ppermissiveRSET
> >                   2B  pmbboDirectRecordSizeOffset
> >                   2A  pmbboDirectRSET
> >                   2D  pmbboRecordSizeOffset
> >                   2C  pmbboRSET
> >                   39  pstringoutRecordSizeOffset
> >                   27  pmbbiDirectRecordSizeOffset
> >                   26  pmbbiDirectRSET
> >                   3C  psubRSET
> >                   3D  psubRecordSizeOffset
> >                   3A  psubArrayRSET
> >                   3B  psubArrayRecordSizeOffset
> >                   3E  pwaveformRSET
> >                   3F  pwaveformRecordSizeOffset
> >
> >     softDevIoc.dll
> >                 402178 Import Address Table
> >                 4025C8 Import Name Table
> >                      0 time date stamp
> >                      0 Index of first forwarder reference
> >
> >                    4  pdevBiSoft
> >                    3  pdevAoSoftRaw
> >                    7  pdevBoSoftRaw
> >                    8  pdevEventSoft
> >                    A  pdevLiSoft
> >                    B  pdevLoSoft
> >                    E  pdevMbbiSoft
> >                    2  pdevAoSoft
> >                    1  pdevAiSoftRaw
> >                    0  pdevAiSoft
> >                    5  pdevBiSoftRaw
> >                    F  pdevMbbiSoftRaw
> >                    C  pdevMbbiDirectSoft
> >                    D  pdevMbbiDirectSoftRaw
> >                   12  pdevMbboSoft
> >                   13  pdevMbboSoftRaw
> >                   10  pdevMbboDirectSoft
> >                   15  pdevSiSoft
> >                   16  pdevSoSoft
> >                   14  pdevSASoft
> >                   17  pdevWfSoft
> >                    6  pdevBoSoft
> >                   11  pdevMbboDirectSoftRaw
> >
> >     testDevIoc.dll
> >                 4021D8 Import Address Table
> >                 402628 Import Name Table
> >                      0 time date stamp
> >                      0 Index of first forwarder reference
> >
> >                    0  pdevAiTestAsyn
> >                    1  pdevAoTestAsyn
> >                    2  pdevBiTestAsyn
> >                    3  pdevBoTestAsyn
> >                    4  pdevEventTestIoEvent
> >                    6  pdevMbbiTestAsyn
> >                    7  pdevMbboTestAsyn
> >                    8  pdevSiTestAsyn
> >                    9  pdevSoTestAsyn
> >                    A  pdevWfTestAsyn
> >
> >     iocsh.dll
> >                 40205C Import Address Table
> >                 4024AC Import Name Table
> >                      0 time date stamp
> >                      0 Index of first forwarder reference
> >
> >                    A  _iocsh@4
> >                    C  _iocshRegister@8
> >
> >     miscIoc.dll
> >                 402068 Import Address Table
> >                 4024B8 Import Name Table
> >                      0 time date stamp
> >                      0 Index of first forwarder reference
> >
> >                    2  pasSub
> >
> >     dbIoc.dll
> >                 402048 Import Address Table
> >                 402498 Import Name Table
> >                      0 time date stamp
> >                      0 Index of first forwarder reference
> >
> >                   9A  pdbbase
> >
> >     registryIoc.dll
> >                 402150 Import Address Table
> >                 4025A0 Import Name Table
> >                      0 time date stamp
> >                      0 Index of first forwarder reference
> >
> >                    2  _registryDeviceSupportFind@4
> >                    B  _registryRecordTypeAdd@8
> >                    C  _registryRecordTypeFind@4
> >                    1  _registryDeviceSupportAdd@8
> >
> >     dbStaticIoc.dll
> >                 402050 Import Address Table
> >                 4024A0 Import Name Table
> >                      0 time date stamp
> >                      0 Index of first forwarder reference
> >
> >                   43  _dbInitEntry@8
> >                   1C  _dbFindRecordType@8
> >
> >     Com.dll
> >                 402000 Import Address Table
> >                 402450 Import Name Table
> >                      0 time date stamp
> >                      0 Index of first forwarder reference
> >
> >                  1CE  errlogPrintf
> >                  14D  _epicsThreadSleep@8
> >
> >     MSVCRT.dll
> >                 40200C Import Address Table
> >                 40245C Import Name Table
> >                      0 time date stamp
> >                      0 Index of first forwarder reference
> >
> >                  29E  printf
> >                   B7  _controlfp
> >                   CA  _except_handler3
> >                   81  __set_app_type
> >                   6F  __p__fmode
> >                   6A  __p__commode
> >                   9D  _adjust_fdiv
> >                   83  __setusermatherr
> >                  10F  _initterm
> >                   58  __getmainargs
> >                   64  __p___initenv
> >                  249  exit
> >                   48  _XcptFilter
> >                   D3  _exit
> >
> >   Summary
> >
> >         1000 .data
> >         1000 .rdata
> >         1000 .text
> >




Navigate by Date:
Prev: vxWorks for PC: memory map Vladis Korobov
Next: CAMAC equipment Bill Cruise
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: vxWorks for PC: memory map Vladis Korobov
Next: CAMAC equipment Bill Cruise
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  <20032004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024