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  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: Re: Problems getting edm functional on NetBSD
From: "David Dudley" <[email protected]>
To: tech-talk <[email protected]>, "John Sinclair" <[email protected]>
Date: Fri, 16 Jan 2009 14:47:33 -0600
Well, edm is now running on NetBSD.

There are two bugs I've found, one related to NetBSD, and one related to edm.

NetBSD had an internal failure when you try to load a shared object
file, and that shared object file attempts to load another shared
object file during it's startup.  libEpics.so was calling some of the
host name functions, that were attempting to load libraries that
didn't exist, and the error was propagated up incorrectly.  That has
been fixed, now.

Edm-1.11.1z has an error in the utility.cc function formatString.  In
a number of places, that routine might be called with a null trailing
pointer, and the function does not test for the existance of the
string.  This causes the routine to error with a SEGM error.
Correcting the format error fixes the problem completely.  There are
actually 3 ways to fix the error, but I'll leave it to John Sinclair
as to how he wants to handle it.

David

On 12/16/08, David Dudley <[email protected]> wrote:
> Narrowing down the problems, and now time to bring in more people.
>
> I'm having problems using channel access in edm under NetBSD.  I've got
> everything ported and operational, and edm itself functions correctly.  I
> can install all the libraries except for two, those being epicsPv.so and
> logPv.so.  When I try to load these two libraries, I get an error message
> about not being able to find 'nss_dns.so.0'.
>
> Now, I wouldn't concern anyone with this problem normally, after all, NetBSD
> is not a supported architecture.  However, the problem is coming from trying
> to load the channel access library into the program, not from a problem with
> edm.
>
> The exact function call that looks like it's failing is gethostbyname, and
> I'm just wondering if there are some tricks done in Epics to get access to
> that function.
>
> David
>
> On Tue, Dec 16, 2008 at 11:47 AM, David Dudley <[email protected]> wrote:
>
>> Think I may have found this one.
>> I had an older version of include/edm/* include files still installed.
>>
>> Deleting them and re-making seems to have fixed that problem.
>>
>> Now, it's back to figureing out the dns problem.
>>
>> David
>>
>>   On Tue, Dec 16, 2008 at 11:40 AM, David Dudley
>> <[email protected]>wrote:
>>
>>> All the other subdirs compile without problems, but when I get to
>>> baselib,
>>> compiling x_text_dsp.cc gives me an error of
>>>
>>> '../x_text_dsp_obj.h:560: error 'IPFUNC' does not name a type'
>>>
>>> I see the #include for ulBindings.h in the the file, but it still gives
>>> me
>>> an error.
>>>
>>> I don't see anything that should prevent it from compiling OK.
>>>
>>> David
>>>
>>>
>>>
>>> On Tue, Dec 16, 2008 at 11:26 AM, John Sinclair
>>> <[email protected]>wrote:
>>>
>>>> David,
>>>>
>>>> IPFUNC is defined in ulBindings.h
>>>>
>>>> John
>>>>
>>>> David Dudley wrote:
>>>>
>>>>> Been working with edm-1-11-1v, decided to move up to 1-11-1y to port
>>>>> the
>>>>> latest.
>>>>>  Having a problem with x_text_dsp_obj.h and x_text_dsp_obj_cc.
>>>>> Where is IPFUNC defined?  Can't find references to it here.  I assume
>>>>> from the notes on Dec. 1 that it was in reference to motif, but can't
>>>>> find
>>>>> that name defined in Xm include directory either.
>>>>>  David
>>>>>
>>>>> On Tue, Dec 16, 2008 at 8:58 AM, David Dudley
>>>>> <[email protected]<mailto:
>>>>> [email protected]>> wrote:
>>>>>
>>>>>    Looks like the problem may be internal to NetBSD.  There are no
>>>>>    references to the library it's asking for in any of the library
>>>>>    files, neither is there a reference to it in the edm file.
>>>>>        Problem I have with that however, is that edm is the only
>>>>> program
>>>>>    where this problem shows up.  medm, StripTool, probe, gateway,
>>>>>    alh,... they all seem to work fine, with no problem (well, I've got
>>>>>    a formatting problem in StripTool, the floating point format that is
>>>>>    used to display the mins and maxes on the Curves display isn't
>>>>>    supported apparently, but I'll get to that.
>>>>>        Still, everything else works fine.  edm is the only place where
>>>>> I
>>>>>    see this problem, and of course, it's the one I want running the
>>>>> most.
>>>>>        Found a few problems in some of the Make files, They don't seem
>>>>> to
>>>>>    have the right module name in them.
>>>>>        David
>>>>>    On Mon, Dec 15, 2008 at 2:47 PM, David Dudley <[email protected]
>>>>>    <mailto:[email protected]>> wrote:
>>>>>
>>>>>        There is a ldd that I have run, and couldn't find references to
>>>>>        the library when I ran it.
>>>>>                Turns out, the NetBSD implementation of nsdispatch
>>>>> dynamically
>>>>>        creates the name of the library it's going to load, based on the
>>>>>        contents of the nsswitch.conf file, and calls dload to load it.
>>>>>        I'm actively working on coming up with a solution, which I think
>>>>>        is going to be related to a linkage problem.
>>>>>                David
>>>>>        On Mon, Dec 15, 2008 at 2:43 PM, John Sinclair
>>>>>         <[email protected] <mailto:[email protected]>> wrote:
>>>>>
>>>>>            David,
>>>>>
>>>>>            It may be related to code in ../src/edm/util which contains
>>>>>            portable utility code, much of which may no longer be used
>>>>>            by edm. You might try running a small test program link
>>>>>            against that library. The name is
>>>>>            lib114135a4-6f6c-11d3-95bc-00104b8742df.so.
>>>>>
>>>>>            Is there no BSD equivalent of ldd? If so, you might run it
>>>>>            against edm and each .so library.
>>>>>
>>>>>            John Sinclair
>>>>>
>>>>>
>>>>>            David Dudley wrote:
>>>>>
>>>>>                I'm working on getting edm operational on NetBSD.  I've
>>>>>                got everything compiling correctly, however I'm having
>>>>>                problems when I try to run the system.
>>>>>                 For some reason, when I try to install libEpics.so, I
>>>>>                get an error that it can't find object "nss_dns.so.0".
>>>>>                 Also get the same error when I try to install
>>>>>                libLog.so.  Without installing those two files, edm
>>>>>                seems to run great, except, of course that parts of it
>>>>>                won't work.
>>>>>                 The errors are directly related to functions defined in
>>>>>                the nsdispatch() OS module.  I thought it was related to
>>>>>                the 'gethostbyname' calls used in edmMain/main.cc and
>>>>>                lib/pvs.cc (which are the only two functions used which
>>>>>                reference the library), however even with those
>>>>>                commented out (just for a test), it still fails when
>>>>>                trying to load the library.  This leads me to think that
>>>>>                it probably is related to something in base, however
>>>>>                everything else in base, and all the other extensions
>>>>>                I've got built work without error, so I'm still pointed
>>>>>                back to a problem with  the way edm links.
>>>>>                 Have any wild ideas?  This is the last program I need
>>>>>                to adapt to run on NetBSD.  I've got all of SDDS,
>>>>>                ChannelArchiver, StripTool, alh, gateway, medm, and
>>>>>                probe working fine.  The NetBSD group tells me that the
>>>>>                nisdispatch functions are all contained in libc, and
>>>>>                I've written small little test programs that link and
>>>>>                run with no problem.
>>>>>                 David
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
>

Navigate by Date:
Prev: IOC can write but no longer read?!? Bertrand H.J. Biritz
Next: Has anyone tested JCA/JNI with EPICS BASE R3.14.10? Ernest L. Williams Jr.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: IOC can write but no longer read?!? Bertrand H.J. Biritz
Next: Has anyone tested JCA/JNI with EPICS BASE R3.14.10? Ernest L. Williams Jr.
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  <20092010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 31 Jan 2014 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·