I am getting this link error, I am using mongoose web server with Linux, any idea?:
mongoose.c:3114 : Using 'dlopen' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
mongoose.c:3081 : Using 'getpwnam' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking
12 34360 RRick 463
Recognized Expert Contributor
I assume you are supplying a shared library to the server. This user supplied shared library might need other shared libraries. You have to make sure the server can access all of the shared libraries, including the compiler shared libraries like stdc++, and probably lib c.
The system variable LD_LIBRARY_PATH is the usual way to tell the server where to find all of the shared libraries. You directory add paths to it separated by semi-colons(;). You might have to restart the server.
I need to set LD_LIBRARY_PATH before I run the executable.
Right now I made all static libs instead shared libs, also I am supplying -static flag to create execubale, do I need to remove that -static flag, also I supply path /opt/lib where I kept all static libs.
finally executable creates, but I gets this "dlopen", if I takeout -static flag , then it goes away, these two messages not coming
RRick 463
Recognized Expert Contributor
I need to set LD_LIBRARY_PATH before I run the executable.
Yes, you do. LD_LIBRARY_PATH can also be used with the compiler for linking in shared libraries.
The -static flag says don't use the C/C++ shared libraries. I don't suggest anyone using the static flag for any application. I had similar crash and burns problems when using it.
In your case, some library is using a shared library that dlopen can't find. I suspect its either lib c or stdc++. Put these paths in your LD_LIBRARY_PATH and I suspect the problem will go away.
I just takeout -static flag and I rebuild again, then I did set LD_LIBRARY_PATH and then I run my app, I am getting "segmentati on fault",but if I use -static flag back and recompile again, in this case, I gets that "dlopen" warning, but my app runs without any segmentation fault, but still when compile without -static flag earlier, I am passing some static libs with -l optioon, since I made all my libs as static libs instead dynamic libs, except few system libs also I am linking here which are mentioned below, in your previous post, you mentioned -static is not a good option, right now if I use that option only, I can get my app running, otherwise seg. fault coming (in this case, after I set LD_LIB PATH, if I do "ldd my-own-app", then I can see beloe shared libs since I am linking these. but with -static option how big risk it is, if I release my app to customer?
these system shared libs I am linking:
-ldl -ltinyxml -lpthread -lm -lstdc++
RRick 463
Recognized Expert Contributor
With the static flag I had unexplained crash and burn problems with a program. Once we went back to the C++ shared library, these problems went away. That's as far as I went with it. Like you, I go with what works.
You have a couple of choices here. You can hunt down the dlopen problem. Using ldd on your executable should tell you where to look. strace might help too.
You can hunt down the seg fault. This looks like a separate issue from the dlopen and will probably have to be addressed anyway. My guess is that the dlopen problem occurs before the seg fault. The debugger is a good place to check for this problem.
RRick 463
Recognized Expert Contributor
With the static flag I had unexplained crash and burn problems with a program. Once we went back to the C++ shared library, these problems went away. That's as far as I went with it. Like you, I go with what works.
You have a couple of choices here. You can hunt down the dlopen problem. Using ldd on your executable should tell you where to look. strace might help too.
You can hunt down the seg fault. This looks like a separate issue from the dlopen and will probably have to be addressed anyway. My guess is that the dlopen problem occurs before the seg fault. The debugger is a good place to check for this problem.
right now I gets that dlopen message during linking only, with -static flag I am able to build executable on Linux, I am able to run that. but that image was built with static libs.
I just changed all static libs to shared libs, I build again on Linux, I tried to run that, I gets seg. fault as soon as I run, I think the other image built with static libs is much better, I can run, also I can communicate with peer, ultimately I don't want to use static libs, I need to use shared libs, but with shared libs, I gets this issue, I just started with gdb, I did backtrace, it doesn't show anything.
am I missing any standard shared libs, right now I am linking these:
-ldl -lpthread -lm -lstdc++
I have everything works with static libs, I converted all static libs to shared lib (-shared flag), I get segmentation fault. also I set LD_LIBRARY_PATH . It crashes immediately. backtrace shows only one line below. also ldd shows all shared libs.
(gdb) run
Starting program: ~/config/vmal
Program received signal SIGSEGV, Segmentation fault.
0x00000001 in ?? ()
(gdb) backtrace
#0 0x00000001 in ?? ()
(gdb)
Looklike stack is trashing, that is why backtrace not show anything, how can I hold stack?.
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: rwalker |
last post by:
Error number 429 - COM object with CLSID
{000209F0-0000-0000-C000-000000000046} is either not valid or not
registered.
Intermittent occurance of this error. Using Word.Global to run word
macro in vb .net application.
CODE:
Friend WordGlobal_definst As Object
|
by: satish |
last post by:
Hello all,
I have a python module generated by SWIG. When I try to import the moduleI
get the following error :
>>> import overturec
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "/home/world0/SWIGTEST/overturec.py", line 4, in ?
import _overturec
|
by: Ladvánszky Károly |
last post by:
I'm trying to use a statically linked C library. I've wrapped a .NET C++ DLL
around this lib and trying to drive the wrapper from a .NET VB testbed. The
whole build succeeds but I get the following error message at runtime:
An unhandled exception of type 'System.TypeLoadException' occurred in
TiffLibXTester.exe
Additional information: Could not load type tiff from assembly TiffLibX,
Version=1.0.1425.19884, Culture=neutral,...
|
by: ns2k |
last post by:
I add reference office.dll and Microsoft Office Excel Component to my
project and use :
---------------------------------------
Dim App As Excel.Application, BarName as String
...
Dim Bar As Microsoft.Office.Core.CommandBar =
App.CommandBars(BarName)
|
by: Steven |
last post by:
I'm having trouble using an arraylist of a custom object as an argument in a
webservice, everything is in VB.Net. Visual Studio
I can pass the custom object as an argument to other webmethods fine, and
can return it fine. I can have the webservice return an arraylist of the
objects and consume them with no dramas.
But whenever I call the method it gives this error, failing on the call,
before it actually goes 'into' the function.
"The...
| |
by: lecnac |
last post by:
Here's some details:
Server and workstation both in the same workgroup
Logged into server as local Administrator
Logged into workstation as a local user that is only in the Users group
The local user on the workstation is also defined with same name and
password on the server (and only in the Users group on the server)
Server is Windows Server 2003 running IIS 6.0
Workstation is Windows XP Professional
ASP.NET 2.0 (C#) web site
|
by: lecnac |
last post by:
Sorry for the repost. I must have done something wrong when I tried to post
my reply (I can't seem to find it).
Anyway, I'd really appreciate any help that anyone could provide. My issue
is quickly becoming more and more urgent.
I've tried the code below using the server's local Administrator user name
and password. This gets me past the Access denied error but gives me a User
|
by: Frankie |
last post by:
Hello:
New user here...first post to group.
I'm getting an SQL syntax error when I try to run the following query:
$query = sprintf("SELECT itemNumber, entryDate, modifyDate, thumbnailURL,
title, price FROM '%s' WHERE itemNumber = '%s'", $_POST,
$_POST);
|
by: sa6113 |
last post by:
I am using this code to connect to a windows machine using paramiko, I have
installed sshd on the machine and it works properly:
sock.connect((hostname, port))
t = paramiko.Transport(sock)
event = threading.Event()
t.start_client(event)
event.wait()
if not t.is_active():
print 'SSH negotiation failed.'
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |