Wednesday, 23 September 2009

GWT on 64Bit Ubuntu Karmic 9.10

Lately I've been testing Ubuntu Karmic 9.10 64Bit due out next month, when I came across an annoying bug with Google Web toolkit's hosted mode.

libstdc++.so.5 cannot open shared object file no such file or directory

After searching around it seems the libstdc++5 package has been removed in Karmic.
If you are running 32Bit Karmic you can download and install the version from Jaunty libstdc++5

If your running 64Bit Karmic then you need the ia32-libs package, it contains alot more than libstdc++5 so I just extracted libstdc++.so.5.0.7 from the package and copied it to /usr/lib32/ and created a link to /usr/lib32/libstdc++.so.5

12 comments:

dannyft said...

Thanks for the help :D

Rick said...

Thanks for the info.

Unfortunately, I am not clear on what you are saying. I have 64-bit Karmic. I have libstdc++ 5 and 6 installed. When I try to run my app, I get the error you mentioned. I then tried setting LD_LIBRARY_PATH=/usr/lib which forced a ELF problem (error while loading shared libraries: libstdc++.so.5: wrong ELF class: ELFCLASS64) error.

So, I thought your advice was to install the lib32stdc++ package. However, in synaptic, there are only debug packages for lib32stdc++. Are they in a different repository? If they were there, were you implying that I install lib32stdc++5?

Thanks again

Dale Jefferson said...

Hi Rick,

You need to install the 32Bit libstdc++.so.5
Its not in the Ubuntu Karmic repository but can be found in the ia32-libs package in Jaunty. ia32-libs contains a lot more things than just libstdc++.so.5 so I downloaded ia32-libs from
http://packages.ubuntu.com/jaunty/ia32-libs and manually extracted libstdc++.so.5 to /usr/lib32/

Rick said...

Hmmmmm.

I already had ia32-libs installed. So, I went in /usr/lib32/ and saw that there was a libstdc++.so.6 there, but no libstdc++.so.5. I tried creating a symlink for 5 to 6, but that really did not help as that created a ton of other dependencies that did not get resolved.

I also went to the url you had included and it also has only version 6.

Do you know if there is an older ia32-libs that still contains version 5?

Thanks!

Rafael said...

Do I have to download the entire source package? Thing is half a gig. Anywhere else I can find just libstdc++.so.5 from ia32-libs?

Ho Ahau said...

hello...
-- first : Rafael
.. sorry man, but it look to me that You don't respect all the steps...

I do what Dale wrote...
.. and I have the same sistem like you
(4core amd 64bit, ubuntu koala, eclipse 3.5, and gwt)
and I get this error

libstdc++.so.5 not found

.. and the link was correct..
so.. i aks to friend...

and I have to put the path in to
/etc/ld.so.conf.d/libc.conf

add
/usr/lib32
/urs/lib

save as root

then run

ldconfig

as root to

and that it...
my eclipse run wgt

i hope work for U 2.

Eckxso Eckxso said...

Worked like a charm, thanks!

JacobSteelsmith said...

Excellent...thank you.

Dmitry said...

Thanks, Dale

Great post. Worked perfectly on my just updated Karmic/64 bit

Fanny said...

Works great. Thanks

Laurent Grégoire said...

You can directly extract the symlink libstdc++.so.5 -> libstdc++.s0.5.0.7 from the ia32 compatibility package, it's already there...
On my system no need to update /etc/ld.so.conf.d/libc.conf; don't do it if not needed as putting /usr/lib32 before /usr/lib will impact loading preferences for ALL applications on the system and could be quite dangerous/silly, you may end-up having all application on your system using 32 bits libs, which is a shame on a 64 bits system...

Prefer using LD_LIBRARY_PATH environment variable for the offending processes.

Ra On Tune said...

I still have problem as Rick described.

error while loading shared libraries: libstdc++.so.5: wrong ELF class: ELFCLASS32

even though I set the LD_LIBRARY_PATH=/usr/lib32 ...

In /usr/lib32, I have libstdc++.so.5.0.7 file and linked to libstdc++.so.5. Any clue?

Post a Comment