Symbol lookup error undefined symbol linux

Содержание
  1. Benohead’s Software Blog
  2. Linux: C++ lookup error – undefined symbol
  3. question
  4. How to resolve «symbol lookup error» on .NET Core on Linux
  5. Arch Linux
  6. #1 2011-07-18 17:25:02
  7. [SOLVED] Symbol lookup error after update
  8. #2 2011-07-18 17:54:57
  9. Re: [SOLVED] Symbol lookup error after update
  10. #3 2011-07-18 18:12:52
  11. Re: [SOLVED] Symbol lookup error after update
  12. #4 2011-07-18 18:21:09
  13. Re: [SOLVED] Symbol lookup error after update
  14. #5 2011-07-18 18:26:53
  15. Re: [SOLVED] Symbol lookup error after update
  16. #6 2011-07-18 18:40:14
  17. Re: [SOLVED] Symbol lookup error after update
  18. #7 2011-07-18 18:46:46
  19. Re: [SOLVED] Symbol lookup error after update
  20. #8 2011-07-18 18:50:58
  21. Re: [SOLVED] Symbol lookup error after update
  22. #9 2011-07-18 19:31:44
  23. Re: [SOLVED] Symbol lookup error after update
  24. #10 2011-07-19 05:04:15
  25. Re: [SOLVED] Symbol lookup error after update
  26. #11 2011-07-19 05:19:54
  27. Re: [SOLVED] Symbol lookup error after update
  28. #12 2011-07-19 06:43:41
  29. Re: [SOLVED] Symbol lookup error after update
  30. #13 2011-07-19 08:12:29
  31. Re: [SOLVED] Symbol lookup error after update
  32. #14 2011-07-19 18:40:37
  33. Re: [SOLVED] Symbol lookup error after update
  34. #15 2011-07-19 19:40:43
  35. Re: [SOLVED] Symbol lookup error after update
  36. Thread: Fixing QT symbol lookup error
  37. Fixing QT symbol lookup error
  38. Arch Linux
  39. #1 2018-10-02 05:58:07
  40. [Solved]symbol lookup error: /usr/lib/libcurl.so.4 [. ] after upgrade
  41. #2 2018-10-02 06:04:29
  42. Re: [Solved]symbol lookup error: /usr/lib/libcurl.so.4 [. ] after upgrade
  43. #3 2018-10-02 06:07:57
  44. Re: [Solved]symbol lookup error: /usr/lib/libcurl.so.4 [. ] after upgrade
  45. #4 2018-10-02 08:28:39
  46. Re: [Solved]symbol lookup error: /usr/lib/libcurl.so.4 [. ] after upgrade
  47. #5 2018-10-05 17:47:28
  48. Re: [Solved]symbol lookup error: /usr/lib/libcurl.so.4 [. ] after upgrade
  49. #6 2018-10-05 17:51:25
  50. Re: [Solved]symbol lookup error: /usr/lib/libcurl.so.4 [. ] after upgrade
  51. #7 2018-11-05 15:14:41
  52. Re: [Solved]symbol lookup error: /usr/lib/libcurl.so.4 [. ] after upgrade
  53. #8 2018-11-05 15:46:18
  54. Re: [Solved]symbol lookup error: /usr/lib/libcurl.so.4 [. ] after upgrade

Benohead’s Software Blog

Linux: C++ lookup error – undefined symbol

At a customer site, we had a C++ program (renamed for the purpose of this blog to myprogram) which was failing after running for some time. It’s a program processing messages from an external system and seemed to fail only when the processing of the message triggered some given operations. The error message was:

The first thought was to use ldd to check whether everything was fine:

So many not found ! Ok I must have forgotten something… Of course, LD_LIBRARY_PATH is probably not set in my shell:

  • pidof return the id of the process running the specified program
  • /proc/10132/environ contains the whole environment of the specified process
  • strings is required to convert the 0x00 separated strings of /proc/xxx/environ
  • The rest just gets the line LD_LIBRARY_PATH=… and uses export to set it in my shell as well

Now I have the same LD_LIBRARY_PATH as the process running myprogram and can rerun ldd:

Everything looks OK. So it’s not that a library is missing. Also the paths to the libraries are OK.

Executing ldd -r -d myprogram basically just shows me the same plus an error with the missing symbol.

Finally, comparing the size of the library files on this system and at another customer site with the exact same version of the software gave us the answer: somehow a different version of one of our library landed there and didn’t contain the missing symbol.

So the search ended there. Otherwise we’d have had to use the following:

Use c++filt to find out the method behind the mangled symbol name:

Use nm to list the symbols in the libraries shown by ldd:

This will show the mangled symbol names. For demangled symbols, use the -C option:

Источник

question

How to resolve «symbol lookup error» on .NET Core on Linux

Using Visual Studio, created .NET Core 3.1 C# DLL for use on Linux.
Upon «dotnet MyApplication.dll», trigger System.DllNotFoundException, but the problem appears to be six «symbol lookup errors»:

Читайте также:  Linux search process by port

3139: /usr/lib64/libicuuc.so.60: error: symbol lookup error: undefined symbol: u_strlen (fatal)
3139: /usr/lib64/dotnet/shared/Microsoft.NETCore.App/3.1.11/System.Globalization.Native.so: error: symbol lookup error: undefined symbol: GlobalizationNative_CompareStringW (fatal)
3139: /usr/lib64/dotnet/shared/Microsoft.NETCore.App/3.1.11/System.Globalization.Native.so: error: symbol lookup error: undefined symbol: GlobalizationNative_GetDefaultLocaleNameW (fatal)
3139: /usr/lib64/dotnet/shared/Microsoft.NETCore.App/3.1.11/System.Globalization.Native.so: error: symbol lookup error: undefined symbol: GlobalizationNative_GetLocaleNameW (fatal)
3139: /usr/lib64/dotnet/shared/Microsoft.NETCore.App/3.1.11/System.Globalization.Native.so: error: symbol lookup error: undefined symbol: GlobalizationNative_GetLocaleInfoStringW (fatal)
3139: /usr/lib64/libplmwdm-c.so: error: symbol lookup error: undefined symbol: protobuf_c_empty_string (fatal)

How can I resolve these «symbol lookup errors»?
Four are .NET Core related.
u_strlen (Unicode strlen) is libicuuc.so.60 related, but libicuuc.so.60 is loaded successfully.
protobuf_c_empty string is related to one of more protobuf RPMs that I installed, all available in the local direction.
Thanks.

What is the Linux distribution you are using? And its version?

Centos8.
«uname —all» returns:
Linux localhost.localdomain 4.18.0-240.15.1.el8_3.x86_64 #1 SMP

«dotnet —info» returns:
.NET Core SDK (reflecting any global.json):
Version: 3.1.111
Commit: a9538e031d
Runtime Environment:
OS Name: centos
OS Version: 8
OS Platform: Linux
RID: centos.8-x64
Base Path: /usr/lib64/dotnet/sdk/3.1.111/
Host (useful for support):
Version: 3.1.11
Commit: f5eceb8105
.NET Core SDKs installed:
2.1.520
3.0.103
3.1.111
.NET Core runtimes installed:
Microsoft.AspNetCore.app 3.0.3
Microsoft.AspNetCore.App 3.1.11
Microsoft.NETCore.App 2.1.24
Microsoft.NETCore.App 3.0.3
Microsoft.NETCore.App 3.1.11

Thanks for your time.

Using «readelf -a» I’ve been able to ascertain that one of the «undefined symbols», i.e., «u_strlen», is implemented in libicuuc.so.
Yet the LD_DEBUG=all output clearly shows that libicuuc.so was found and loaded without error.
So why is loader unable to resolve «u_strlen»?
I suspect I would find the same for the other five symbols.

You probably need to open a GitHub issue on dotnet/runtime to work more closely with Microsoft guys. Similar issues like this happened in the past.

Источник

Arch Linux

You are not logged in.

#1 2011-07-18 17:25:02

[SOLVED] Symbol lookup error after update

I have recently updated a 32-bit Arch system and right after update certain apps stopped working:

What can I do to solve these errors?

Last edited by Tsynique (2011-07-26 09:31:36)

#2 2011-07-18 17:54:57

Re: [SOLVED] Symbol lookup error after update

can you paste the output of pacman -Q kdelibs kdebase-dolphin?

#3 2011-07-18 18:12:52

Re: [SOLVED] Symbol lookup error after update

#4 2011-07-18 18:21:09

Re: [SOLVED] Symbol lookup error after update

the symbol is there, backup your .kde4, .config, .local, and try with a clean configuration.
or login with a new user.

#5 2011-07-18 18:26:53

Re: [SOLVED] Symbol lookup error after update

Nothing changed (except for some configs defaulting) :\

#6 2011-07-18 18:40:14

Re: [SOLVED] Symbol lookup error after update

Can you paste the ouput of pacman -Qm? Did you try with a new user?

#7 2011-07-18 18:46:46

Re: [SOLVED] Symbol lookup error after update

Created a new blank user and still the same.

#8 2011-07-18 18:50:58

Re: [SOLVED] Symbol lookup error after update

could be related to strigi-git, try with strigi from [extra], also remove phonon-xine and switch to phonon-(gstreamer or vlc)

#9 2011-07-18 19:31:44

Re: [SOLVED] Symbol lookup error after update

Didn’t help

#10 2011-07-19 05:04:15

Re: [SOLVED] Symbol lookup error after update

I see you have powerpill installed. How did you update the system? By using powerpill and building from source, or just pacman -Syu?

#11 2011-07-19 05:19:54

Re: [SOLVED] Symbol lookup error after update

You are not fully up to date. I can tell as you have cloog-ppl 0.15.10-2 installed.

#12 2011-07-19 06:43:41

Re: [SOLVED] Symbol lookup error after update

Can you paste somewhere the output of tail -n 100 /var/log/pacman.log?

#13 2011-07-19 08:12:29

Re: [SOLVED] Symbol lookup error after update

@Allan I don’t know when and why I installed cloog-ppl, probably was a dependancy of some other package. I just removed it, it seemed to be an orphan anyway.

Читайте также:  Топ самых популярных дистрибутивов linux

@JGC I just did pacman -Syu.

@bash I am pasting a snip of pacman.log. From what I can recall, something happened before the day 2011-07-16 because that day I turned off the computer and had it on only on Sunday when I noticed that things are not working.

#14 2011-07-19 18:40:37

Re: [SOLVED] Symbol lookup error after update

Get a new mirror list from the Arch Mirrors list (sorry I don’t have the link handy) and re-sync the system is what Allan is hinting at (I think).

I’m torn apart between worlds. Basically, using vim in a highly visual environment with a lot of mouse features feels like soldering a lose wire to a motherboard with a Zippo and a needle, while working with ANY TEXT AT ALL with a «modern GUI» text editor feels like joining the London Philharmonic Orchestra with a Fisher-Price Laugh and Learn Magical Musical Mirror. —Awebb

#15 2011-07-19 19:40:43

Re: [SOLVED] Symbol lookup error after update

I have tested earlier today (and re-tested now) about 10 most recently sync’ed mirrors. I do that all the time if there’s any glitch after an update and I update at least five times a day (provided there are any new packages). What I’m trying to say is that this can’t be a problem with my system being not up to date. There must be something with some particular configuration concerning a recent kdelibs update or something.

Last night I tried downgrading kdelibs to 4.6.3 and building qt-static package from AUR. It didn’t help. KDE itself doesn’t start as well because there is a symbol missing in one of the QT libs.

My guess, but just a guess is that KDE has some problems with QT because the only apps that don’t work are either KDE (Kmix, Kate, Kmines, etc) or QT (transmission-qt, qtemu, qtconfig). BTW transmission-gtk and other GTK apps work fine.

Also, I should probably mention that I even though I have KDE installed I don’t use it, I just use some of it’s apps while running Openbox.

I guess that is all I can say to describe the situation better at the moment. Thanks for the help so far guys and more suggestions for attempts to solve this are more than welcome, I’m willing to experiment.

Last edited by Tsynique (2011-07-19 19:41:18)

Источник

Thread: Fixing QT symbol lookup error

Thread Tools
Display

Fixing QT symbol lookup error

When you have tried to run skype or other QT applications, like VLC, you might have encountered this error message:

might solve that problem.

Well, bad luck, it doesn’t.

You might then have searched google, and found that this is because of a missing 32-bit library on 64-bit systems.

So the installation of the missing 32-bit library might then solve your problem.

If you’re on a 64-bit system, that’s most likely the case.

But that’s just too bad if you’re on a 32 bit system, and you hence can’t be missing a 32-bit library.

So you might then have done

And discovered that the entire qt package is broken.
Well, without you doing anything (well almost).

Here’s how to find and fix that kind of bugs:

First, make sure qt4config is installed:

The first one looks OK, but the second one is strange, since this is not google-earth, it should use libQtCore from /usr/lib, and not from /opt/google.

One can only follow that the google installer has done something stupid.

So now, in order to fix the problem, you move to
/opt/google/earth

Читайте также:  Touch мышь для windows

and rename folder «free» to «freeZZZ»

Now you can re-run ldd and you will see that the problem is now fixed (apart from the fact that google-earth doesn’t run anymore.

You will notice that now, Skype and VLC work.
And if you need google-earth again, just rename
/opt/google/earth/freeZZZ
back to its original name
/opt/google/earth/freeZZZ

and google-earth will run again (but VLC and skype will then again be broken until you rename the folder again).

Источник

Arch Linux

You are not logged in.

#1 2018-10-02 05:58:07

[Solved]symbol lookup error: /usr/lib/libcurl.so.4 [. ] after upgrade

I did a full upgrade yesterday after

10 days stable and right after the upgrade (or more precisely, during the end of the upgrade) I’ve started getting errors like:

I thought maybe a reboot could put everything back to normal but it didn’t.

Then I thought — of course — that it was because I added one package too many to the

section in pacman.conf but I only had ruby and NetworkManager. Not really related to the issue here IMHO.

So I booted the latest LiveCD, ran a

which upgraded a few packages this morning and tried immediately to use pacman from the

environment. But not luck.

Now my system is fully upgraded (or so pacman tells), but pacman is still broken and so some other critical applications like NetworkManager (which needs curl also).

Is anyone having any similar issue at the moment?

Last edited by nanawel (2018-10-02 08:29:19)

#2 2018-10-02 06:04:29

Re: [Solved]symbol lookup error: /usr/lib/libcurl.so.4 [. ] after upgrade

Ah! Found it.
I had an old libssh2 in my /usr/local/lib for an obscure reason (but probabbly related to the need of php-ssh when PHP7 just came out and was not totally supported).

Still, it might help others. So look at your /usr/local/lib!

#3 2018-10-02 06:07:57

Re: [Solved]symbol lookup error: /usr/lib/libcurl.so.4 [. ] after upgrade

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.

Registered Linux User #482438

#4 2018-10-02 08:28:39

Re: [Solved]symbol lookup error: /usr/lib/libcurl.so.4 [. ] after upgrade

Please remember to mark your thread as [Solved] by editing your first post and prepending it to the title.

#5 2018-10-05 17:47:28

Re: [Solved]symbol lookup error: /usr/lib/libcurl.so.4 [. ] after upgrade

Thanks, had the same issue since a few days and this was also the problem for me.

#6 2018-10-05 17:51:25

Re: [Solved]symbol lookup error: /usr/lib/libcurl.so.4 [. ] after upgrade

Welcome to the forums mksplg

Please take the time to read our forum code of conduct — especially the following section.
https://wiki.archlinux.org/index.php/Co … mpty_posts

No, it didn’t «fix» anything. It just shifted the brokeness one space to the right. — jasonwryan
Closing — for deletion; Banning — for muppetry. — jasonwryan

#7 2018-11-05 15:14:41

Re: [Solved]symbol lookup error: /usr/lib/libcurl.so.4 [. ] after upgrade

Same issue on my arch-based manjaro-linux distro.

Here’s a quick fix that worked for me.

I renamed the symbol & problem was fixed (thanks to following blog post). Here’s the command for renaming the troubled symbol:

#8 2018-11-05 15:46:18

Re: [Solved]symbol lookup error: /usr/lib/libcurl.so.4 [. ] after upgrade

That’s a just band aid fix to a problem that should be better defined. Why do you have any such library in your /usr/local/lib in the first place and if you have no valid reason you better remove all related libraries that might be there as well, and if you have a valid reason you just broke your valid reason (though these kind of reasons should really be an exception).

Either way the thread as such is [SOLVED] and there’s not much additional value to it.

Источник

Оцените статью