Broken Inode on shared library, what do I do?

Hi, I just installed

zypper in GraphicsMagick GraphicsMagick-devel libGraphicsMagick3

But the linker complains on compilation that it can’t find -lGraphicsMagickWand.

This is in the properties of the file:

Name:
libGraphicsMagickWand.so

Type:
link (broken) (inode/symlink)

Link target:
libGraphicsMagickWand.so.2.2.0

Size:
30 bytes

Location: 
/usr/lib64

What I don’t understand is, why zypper needed to install “libGraphicsMagick3”. This is

> rpm -ql libGraphicsMagick3

/usr/lib64/libGraphicsMagick.so.3
/usr/lib64/libGraphicsMagick.so.3.6.0

This is

> rpm -ql GraphicsMagick-devel

/usr/lib64/libGraphicsMagick.so
/usr/lib64/libGraphicsMagickWand.so

I don’t get it :frowning:

Ok I deleted the broken link and made one myself:

ln -s -T libGraphicsMagick.so.3.6.0 libGraphicsMagickWand.so

but now I’m getting a weird error:

/usr/lib64/gcc/x86_64-suse-linux/4.5/…/…/…/…/lib64/crt1.o: In function _start': /usr/src/packages/BUILD/glibc-2.11.3/csu/../sysdeps/x86_64/elf/start.S:109: undefined reference to main’

Maxxi12 wrote:

>
> Ok I deleted the broken link and made one myself:
> Code:
> --------------------
> ln -s -T libGraphicsMagick.so.3.6.0 libGraphicsMagickWand.so
>
> --------------------
>
>
> but now I’m getting a weird error:
>
>>
>> /usr/lib64/gcc/x86_64-suse-linux/4.5/…/…/…/…/lib64/crt1.o: In
>> function `_start’:

/usr/src/packages/BUILD/glibc-2.11.3/csu/…/sysdeps/x86_64/elf/start.S:109:

undefined reference to `main’
>>
>
Sorry but you created a link to the completely wrong file!
This is what the link has to look like and how it is created by the rpm
package
/usr/lib64/libGraphicsMagickWand.so -> libGraphicsMagickWand.so.2.2.0
The link is a stub as long as you do not install the package
libGraphicsMagickWand2.
Restore the link to what it originally was and install the package mentioned
above and everything should be fine.


PC: oS 11.4 64 bit | Intel Core i7-2600@3.40GHz | KDE 4.6.0 | GeForce GT 420
| 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.7.2 | nVidia
ION | 3GB Ram

That’s how the link was set up before. How do you know that I need “libGraphicsMagickWand2”? I just did it, and it doesn’t work.

Installing: libGraphicsMagickWand2-1.3.12-9.1 [done]

/usr/lib64/gcc/x86_64-suse-linux/4.5/…/…/…/…/x86_64-suse-linux/bin/ld: cannot find -lGraphicsMagickWand

I restored the link to libGraphicsMagick.so.2.2.0, but it still says it’s broken even though I installed what you said. (however the broken link has 26 bytes, and before it had 30 bytes)
Whatever that means!

The name of the library is different not only the version, this are two
completely different libraries
libGraphicsMagickWand != libGraphicsMagick
got it?
And how did I find the package? There is a package with exactly
libGraphicsMagickWand in its name and only one.


PC: oS 11.4 64 bit | Intel Core i7-2600@3.40GHz | KDE 4.6.0 | GeForce GT 420
| 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.7.2 | nVidia
ION | 3GB Ram

Well I’m sorry, but what you are saying is simply wrong. The repository names are completely different. But I had all the correct library names installed on my system without having had installed libGraphicsMagickWand2 yet. So there was no way for me to know that I needed libGraphicsMagickWand2. I only knew that something was wrong because the link was broken, and for some reason it pointed to libGraphicsMagickWand.so.2.2.0 instead of the one I had installed. I guess the guy who maintains the GraphicsMagick-devel repository forgot to add libGraphicsMagickWand2 as a dependency.

Still - thanks, I just reinstalled everything including libGraphicsMagickWand2 and now it works.

Maxxi12 wrote:

>
> Well I’m sorry, but what you are saying is simply wrong. The
> repository names are completely different.

Can you show me a single word I wrote which was wrong?

PS:
I also guess the dependency should be there.


PC: oS 11.4 64 bit | Intel Core i7-2600@3.40GHz | KDE 4.6.0 | GeForce GT 420
| 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.7.2 | nVidia
ION | 3GB Ram

You said

The name of the library is different not only the version, this are two
completely different libraries
libGraphicsMagickWand != libGraphicsMagick

…which was never even up for debate. Clearly I know that there are two different libraries. That wasn’t what I was confused about. I was confused about that “libGraphicsMagick.so.3” and “libGraphicsMagick.so” only differ in version numbers. Why would two different rpms install libraries with the exact same name, but only with different version number?

That’s why I asked in my first post:

What I don’t understand is, why zypper needed to install “libGraphicsMagick3”

That I was missing libGraphicsMagickWand2 is true, but my question still stands.

Maxxi12 wrote:

>
> You said
>
>> The name of the library is different not only the version, this are two
>> completely different libraries
>> libGraphicsMagickWand != libGraphicsMagick
>
> .which was never even up for debate.
It was since you linked one to the other, check again what you did with your
manual link you created, so I had to guess it is (or was) not clear to you.
You cannot link libxyz.so to libabc.so and expect it works and that was what
you did.

> confused about that “libGraphicsMagick.so.3” and “libGraphicsMagick.so”
> only differ in version numbers. Why would two different rpms install
> libraries with the exact same name, but only with different version
> number?

Why do you think this are two libraries, why do you think they have
different versions?
This are both symbolic links to exactly one library
libGraphicsMagick.so.3.6.0
This is the usual way such things are handled on linux (not openSUSE but
linux in general).
In most cases you have a generic .so which is just a link to a .so.X which
in turn is a link to the exact versioned .so.X.Y.Z library.
In thsi case both directkly link directly to the same lib which is also ok.


PC: oS 11.4 64 bit | Intel Core i7-2600@3.40GHz | KDE 4.6.0 | GeForce GT 420
| 16GB Ram
Eee PC 1201n: oS 11.4 64 bit | Intel Atom 330@1.60GHz | KDE 4.7.2 | nVidia
ION | 3GB Ram

Okay, thanks for the explanation!