Thread: [Log4cplus-devel] log4cplus SO file - forcing the SONAME header field
Logging Framework for C++
Brought to you by:
wilx
From: Brice C. <Bri...@ce...> - 2013-05-23 13:25:29
|
Hello, I am compiling log4cplus from source on Red Hat enterprise 5 (CERN scientific linux) 32 and 64 bits. The point is to package Log4cplus in my Java webstart project (to enable logging in a native C++ library). The problem is that when I use the configure and make scripts, it produces a liblog4cplus-1.1.so.5 library file. I really need the library file that ends with ".so" - or Java webstart will not unpack it from the native library JAR package and add it to the library path. Renaming the file to liblog4cplus-1.1.so does not work, because I link my own native library to log4cplus, and the liblog4cplus-1.1.so.5 file contains the SONAME set to "liblog4cplus-1.1.so.5" (so the linker will link to liblog4cplus-1.1.so but my own library expects liblog4cplus-1.1.so.5 to be present on the path). Is there a "configure" option I can use to force the SONAME to liblog4cplus-1.1.so ? Or can I strip the SONAME from the final library, thereby forcing the linker to link to the library file name liblog4cplus-1.1.so ? Thanks, Brice |
From: Marcel L. <mar...@zo...> - 2013-05-23 17:47:42
|
Op 23-05-13 15:25, Brice Copy schreef: > > Hello, > > I am compiling log4cplus from source on Red Hat enterprise 5 (CERN > scientific linux) 32 and 64 bits. > > The point is to package Log4cplus in my Java webstart project (to > enable logging in a native C++ library). > > The problem is that when I use the configure and make scripts, it > produces a liblog4cplus-1.1.so.5 library file. > > I really need the library file that ends with ".so" - or Java > webstart will not unpack it from the native library JAR package and > add it to the library path. > > Renaming the file to liblog4cplus-1.1.so does not work, because I link > my own native library to log4cplus, and the liblog4cplus-1.1.so.5 file > contains the SONAME set to "liblog4cplus-1.1.so.5" (so the linker will > link to liblog4cplus-1.1.so but my own library expects > liblog4cplus-1.1.so.5 to be present on the path). > > Is there a "configure" option I can use to force the SONAME to > liblog4cplus-1.1.so ? > > Or can I strip the SONAME from the final library, thereby forcing the > linker to link to the library file name liblog4cplus-1.1.so ? > > Thanks, > > Brice > > > > ------------------------------------------------------------------------------ > Try New Relic Now & We'll Send You this Cool Shirt > New Relic is the only SaaS-based application performance monitoring service > that delivers powerful full stack analytics. Optimize and monitor your > browser, app, & servers with just a few lines of code. Try New Relic > and get this awesome Nerd Life shirt! http://p.sf.net/sfu/newrelic_d2d_may > > > _______________________________________________ > Log4cplus-devel mailing list > Log...@li... > https://lists.sourceforge.net/lists/listinfo/log4cplus-devel Hi Brice, I may be wrong, but isn't the Linux way of handling this to create a symbolic link. Usually, the SONAME contains the full library name (or at least the part containing the major version number). Cheers, Marcel Loose. |
From: Václav Z. <vha...@gm...> - 2013-05-23 22:00:56
Attachments:
signature.asc
log4cplus-1.1.1-disable-so-version.diff
|
On 05/23/2013 03:25 PM, Brice Copy wrote: > Hello, Hi. > > > > I am compiling log4cplus from source on Red Hat enterprise 5 (CERN > scientific linux) 32 and 64 bits. > > > > The point is to package Log4cplus in my Java webstart project (to enable > logging in a native C++ library). > > > > The problem is that when I use the configure and make scripts, it > produces a liblog4cplus-1.1.so.5 library file. > > > > I really need the library file that ends with “.so” - or Java webstart > will not unpack it from the native library JAR package and add it to the > library path. > > > > Renaming the file to liblog4cplus-1.1.so does not work, because I link > my own native library to log4cplus, and the liblog4cplus-1.1.so.5 file > contains the SONAME set to “liblog4cplus-1.1.so.5” (so the linker will > link to liblog4cplus-1.1.so but my own library expects > liblog4cplus-1.1.so.5 to be present on the path). > > > > Is there a “configure” option I can use to force the SONAME to > liblog4cplus-1.1.so ? > > Or can I strip the SONAME from the final library, thereby forcing the > linker to link to the library file name liblog4cplus-1.1.so ? I am attaching a patch (now part of both trunk and 1.1.x branch) that should allow you to configure log4cplus with --disable-so-version and --disable-release-version flags. The produces shared library is liblog4cplus.so (on Ubuntu). HTH. -- VZ |
From: Brice C. <Bri...@ce...> - 2013-05-24 12:58:14
|
Hello, >> I am attaching a patch (now part of both trunk and 1.1.x branch) that should allow you to >> configure log4cplus with --disable-so-version and --disable-release-version flags. >> The produces shared library is liblog4cplus.so (on Ubuntu). HTH. Thanks very much for your fast action, I have tested the 1.1.x branch on Ubuntu, Red Hat EL5 32 bits and 64 bits and it works fine. Just for info, we're looking into using log4cplus to perform logging inside the CERN middleware protocol (DIP) that allows the Large Hadron Collider (LHC) and the 4 major CERN experiments to exchange information and trigger particle observation data taking. Once we go to production, we would gladly join the list of satisfied Log4cplus users ! Cheers, Brice |
From: Václav H. <vha...@gm...> - 2015-04-06 09:07:24
Attachments:
signature.asc
|
On 24.5.2013 14:58, Brice Copy wrote: > Hello, > >>> I am attaching a patch (now part of both trunk and 1.1.x branch) >>> that should allow you to configure log4cplus with >>> --disable-so-version and --disable-release-version flags. The >>> produces shared library is liblog4cplus.so (on Ubuntu). HTH. > > Thanks very much for your fast action, I have tested the 1.1.x branch > on Ubuntu, Red Hat EL5 32 bits and 64 bits and it works fine. > > Just for info, we're looking into using log4cplus to perform logging > inside the CERN middleware protocol (DIP) that allows the Large > Hadron Collider (LHC) and the 4 major CERN experiments to exchange > information and trigger particle observation data taking. Once we go > to production, we would gladly join the list of satisfied Log4cplus > users ! I wonder how this worked out for you. Is log4cplus being used in CERN for LHC related software now? :) > > > Cheers, > > Brice > > -- VH |