LISTSERV mailing list manager LISTSERV 16.5

Help for QSERV-L Archives


QSERV-L Archives

QSERV-L Archives


QSERV-L@LISTSERV.SLAC.STANFORD.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Proportional Font

LISTSERV Archives

LISTSERV Archives

QSERV-L Home

QSERV-L Home

QSERV-L  February 2014

QSERV-L February 2014

Subject:

Re: log4cxx and swig

From:

"Daniel L. Wang" <[log in to unmask]>

Reply-To:

General discussion for qserv (LSST prototype baseline catalog)

Date:

Wed, 12 Feb 2014 12:59:42 -0800

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (91 lines)

Hi Bill,

My first instinct is just as you said: the log4cxx library isn't being 
linked to.  Perhaps you forgot to specify the appropriate library when 
linking the .so?

When python tries to import it as a module, it won't try to link with 
anything it wasn't told to, so it will try to resolve all the symbols 
against the libraries it knows about, which are the ones already linked 
in the python process and the ones that the .so claims it needs. Note 
that in this case, ld won't give you an error when creating a shared 
object (.so) that can't be dynamically loaded by the process (e.g., 
python) you have in mind--for all it knows, the unresolved symbols might 
exist in the host process.

Hope this helps,
-Daniel

(dynamic linking/loading is actually quite complex--I have a book to 
recommend if you're curious)

On 02/12/2014 01:49 AM, Bill Chickering wrote:
> Greetings -
>
> I'm experimenting with log4cxx and qserv but have run into 
> swig-related difficulties. After locally installing log4cxx within a 
> qserv instance, I am able to use it without trouble in stand-alone 
> programs. When I include calls to log4cxx within qserv, however, I 
> receive the following error when attempting to start qserv_master:
>
> Traceback (most recent call last):
>   File "/u1/bchick/sandbox2/mystuff/qserv/master/dist/startQserv.py", 
> line 36, in <module>
>     from lsst.qserv.master.appTest import TestAppFunctions
>   File 
> "/u1/bchick/src/mystuff/master/dist/lsst/qserv/master/__init__.py", 
> line 26, in <module>
>     from masterLib import *
>   File 
> "/u1/bchick/src/mystuff/master/dist/lsst/qserv/master/masterLib.py", 
> line 25, in <module>
>     _masterLib = swig_import_helper()
>   File 
> "/u1/bchick/src/mystuff/master/dist/lsst/qserv/master/masterLib.py", 
> line 21, in swig_import_helper
>     _mod = imp.load_module('_masterLib', fp, pathname, description)
> ImportError: 
> /u1/bchick/src/mystuff/master/dist/lsst/qserv/master/_masterLib.so: 
> undefined symbol: _ZTIN7log4cxx7helpers13ObjectPtrBaseE
>
> For context, I made the following code changes (note: this version of 
> qserv is pre- new modular layout). I added the following includes to 
> the top of AsyncQueryManager.cc <http://AsyncQueryManager.cc>:
>
> #include <log4cxx/logger.h>
> #include <log4cxx/consoleappender.h>
> #include <log4cxx/simplelayout.h>
> #include <log4cxx/logmanager.h>
>
> And added the following lines to the AsyncQueryManager::add() function:
>
> log4cxx::LoggerPtr logger(log4cxx::Logger::getLogger("Qserv"));
> LOG4CXX_INFO(logger, "EXECUTING AsyncQueryManager::add()")
>
> And that's it. I believe the correctness of this code is beside the 
> point. The problem appears to be that the log4cxx library, located 
> within %QSERV_BASE_DIR%/lib is not being linked to.
>
> I seem to be missing one or more steps in my attempt to incorporate a 
> new library into qserv.
>
> Any clues?
>
> Thanks in advance,
> Bill
>
>
> ------------------------------------------------------------------------
>
> Use REPLY-ALL to reply to list
>
> To unsubscribe from the QSERV-L list, click the following link:
> https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=QSERV-L&A=1
>

########################################################################
Use REPLY-ALL to reply to list

To unsubscribe from the QSERV-L list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=QSERV-L&A=1

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

March 2018
February 2018
January 2018
December 2017
August 2017
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
December 2012

ATOM RSS1 RSS2



LISTSERV.SLAC.STANFORD.EDU

Secured by F-Secure Anti-Virus CataList Email List Search Powered by the LISTSERV Email List Manager

Privacy Notice, Security Notice and Terms of Use