shared-libraries

Does Tomcat load the same library file into memory twice if they are in two web apps?

≡放荡痞女 提交于 2019-11-26 13:02:13
I have two applications under tomcat/webapps folder. tomcat/webapps/App1 tomcat/webapps/App2 Both applications share the same libraries. Which are stored for example in tomcat/webapps/App1/WEB-INF/lib . Are both libraries loaded twice in memory? Should I put these shared libraries in tomcat/server/lib ? As you can see here , Tomcat creates one class-loader per webapp on your server. Thus, if you have webapp1 and webapp2 that share the same library, then this library will be indeed loaded twice. You can eventually place this library in the common directory (tomcat-dir/common/lib) if it is

How do I view the list of functions a Linux shared library is exporting?

风流意气都作罢 提交于 2019-11-26 12:34:49
问题 I want to view the exported functions of a shared library on Linux. What command allows me to do this? (On Windows I use the program depends) 回答1: What you need is nm and its -D option: $ nm -D /usr/lib/libopenal.so.1 . . . 00012ea0 T alcSetThreadContext 000140f0 T alcSuspendContext U atanf U calloc . . . Exported sumbols are indicated by a T . Required symbols that must be loaded from other shared objects have a U . Note that the symbol table does not include just functions, but exported

Importing from a relative path in Python

风流意气都作罢 提交于 2019-11-26 12:06:53
问题 I have a folder for my client code, a folder for my server code, and a folder for code that is shared between them Proj/ Client/ Client.py Server/ Server.py Common/ __init__.py Common.py How do I import Common.py from Server.py and Client.py? 回答1: EDIT Nov 2014 (3 years later): Python 2.6 and 3.x supports proper relative imports, where you can avoid doing anything hacky. With this method, you know you are getting a relative import rather than an absolute import. The '..' means, go to the

What are good practices regarding shared libraries on Linux?

醉酒当歌 提交于 2019-11-26 11:16:43
问题 I recently read a lot about shared libraries on Linux, and here is what I learnt: A shared library should embed a soname including its major version number. Something like: libfoo.so.1 Its real filename should also include a minor version number. Something like: libfoo.so.1.0 When the library file is copied to, say /usr/local/lib , if ldconfig is run, it will read the soname and create a symlink named libfoo.so.1 pointing to libfoo.so.1.0 . If one wants to use this library for its

How to link using GCC without -l nor hardcoding path for a library that does not follow the libNAME.so naming convention?

南楼画角 提交于 2019-11-26 10:30:59
问题 I have a shared library that I wish to link an executable against using GCC. The shared library has a nonstandard name not of the form libNAME.so, so I can not use the usual -l option. (It happens to also be a Python extension, and so has no \'lib\' prefix.) I am able to pass the path to the library file directly to the link command line, but this causes the library path to be hardcoded into the executable. For example: g++ -o build/bin/myapp build/bin/_mylib.so Is there a way to link to this

Easiest way to install Python dependencies on Spark executor nodes?

假如想象 提交于 2019-11-26 10:29:56
问题 I understand that you can send individual files as dependencies with Python Spark programs. But what about full-fledged libraries (e.g. numpy)? Does Spark have a way to use a provided package manager (e.g. pip) to install library dependencies? Or does this have to be done manually before Spark programs are executed? If the answer is manual, then what are the \"best practice\" approaches for synchronizing libraries (installation path, version, etc.) over a large number of distributed nodes?

Why are LIB files beasts of such a duplicitous nature?

你说的曾经没有我的故事 提交于 2019-11-26 10:27:39
问题 I\'m trying to understand this LIB file business on Microsoft Windows, and I\'ve just made a discovery that will - I hope - dispel the confusion that hitherto has prevented me from getting a clear grasp of the issue. To wit, LIB files are not the one kind of file that their file extension suggests they are. :: cd \"C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\Lib\" :: lib /nologo /list Ad1.Lib obj\\i386\\activdbgid.obj obj\\i386\\activscpid.obj obj\\i386\\ad1exid.obj obj\\i386\

“relocation R_X86_64_32S against ” linking Error

自作多情 提交于 2019-11-26 10:24:58
问题 I\'m Trying to Link a static Library to a shared library , I\'m Getting the Following error /usr/bin/ld: ../../../libraries/log4cplus/liblog4cplus.a(fileappender.o): relocation R_X86_64_32S against `a local symbol\' can not be used when making a shared object; recompile with -fPIC ../../../libraries/log4cplus/liblog4cplus.a: could not read symbols: Bad value collect2: ld returned 1 exit status But this worked on a 32bit machine without any such error. I tried adding The -fPIC flags manually

INSTALL_FAILED_MISSING_SHARED_LIBRARY error in Android

偶尔善良 提交于 2019-11-26 10:22:53
When I am trying to run an android application which uses Google API I get the following error [2009-07-11 11:46:43 - FirstMapView] Installation error: INSTALL_FAILED_MISSING_SHARED_LIBRARY [2009-07-11 11:46:43 - FirstMapView] Please check logcat output for more details. [2009-07-11 11:46:44 - FirstMapView] Launch canceled! Can anyone help me solve this error? Mirco Mage To get past INSTALL_FAILED_MISSING_SHARED_LIBRARY error with Google Maps for Android: Install Google map APIs. This can be done in Eclipse Windows/Android SDK and AVD Manager -> Available Packages -> Third Party Add-ons ->

How to specify non-default shared-library path in GCC Linux? Getting “error while loading shared libraries” when running

妖精的绣舞 提交于 2019-11-26 10:14:44
问题 There is a laptop on which I have no root privilege. onto the machine I have a library installed using configure --prefix=$HOME/.usr . after that, I got these files in ~/.usr/lib : libXX.so.16.0.0 libXX.so.16 libXX.so libXX.la libXX.a when I compile a program that invokes one of function provided by the library with this command : gcc XXX.c -o xxx.out -L$HOME/.usr/lib -lXX xxx.out was generated without warning, but when I run it error like this was thrown: ./xxx.out: error while loading