LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Gmail notifier gives error: "wrong ELF class: ELFCLASS32" (https://www.linuxquestions.org/questions/linux-newbie-8/gmail-notifier-gives-error-wrong-elf-class-elfclass32-531491/)

aero_b 02-22-2007 06:17 PM

Gmail notifier gives error: "wrong ELF class: ELFCLASS32"
 
Good day,

I've been trying to install Gmail Notifier as my first "project" with Linux. I gave myself a week to do it, which I thought was a reasonable amount of time to get to learn enough to at least be able to install a program. Little did I know...

Anyway, here are some details:

- Gmail Notifier requires a bunch of libraries that require other libraries that require others. I think I got them all off my CDs.
- I'm running Mandriva 2007 x86_64
- AMD Athlon 64 X2 Dual-core processor
- ATI Radeon X1300 PCIexpress graphics card

I've configured what needed to be configured but now I get this:

Code:

[afcouture@localhost gmail-notify]$ ./notifier.py
Traceback (most recent call last):
  File "./notifier.py", line 9, in ?
    import pytrayicon
ImportError: /home/afcouture/Download/gmail-notify/pytrayicon.so: wrong ELF class: ELFCLASS32
[afcouture@localhost gmail-notify]$

What's weird is that I had it working before, although only through the Konsole and not through the GUI like I used to with good ol' Windows XP. Now it doesn't work at all.

I've got more questions for later, but if I could get Gmail Notifier working, that would be a good start!

Thanks!

Dark_Helmet 02-22-2007 11:04 PM

If I'm not mistaken, the problem is this:

The program is trying to use a library (pytrayicon.so) that was compiled on a 32-bit machine, whereas you're trying to use it on a 64-bit machine.

If that's true, then I'm assuming you've installed all of the dependencies and things with a package manager--in other words, you did not manually compile and install all the dependencies from source code.

If that's the case, then I'd suggest checking all the packages you installed and see if there are 64-bit versions of that package available. If not, then your only recourse would be to compile the library yourself from the source code.

aero_b 02-23-2007 09:54 AM

Thanks! I guess I'll have to peruse the tutorials to figure out how to compile from source.

I remember reading a forum where one guy was asking someone to include the 64-bit package that I would need and the reply was "Tell me how and I will" and that was the end of the conversation...

IndyGunFreak 02-23-2007 02:13 PM

This is another reason I don't mess with the 64bit distros... Yet.

If you install a 64bit OS, but you're constantly working to make 32bit apps work(browsers, etc..) then whats the use?

I'll be with 32bit for the forseeable future.

Edit: Can you just use the normal mail notifier for Ubuntu? Thats what I use and it works fine. I imagine if its in the repos for your 64bit OS, it should work. I never particularly cared for the Gmail notifier.

IGF

aero_b 02-23-2007 07:48 PM

Good point on the 32-bit story... I'll consider switching if I keep having these problems.

Right now I'm just testing the water. I was "born and raised" on Windows and it was starting to get on my nerves, but now I see that Linux is a lot harder to use... although from what I understand, everything can be modified by me, which will be awesome once I'm more used to how things work! I'd like to be able to tell my computer what to do, not the other way around.

Now if only I had more time to learn...

Now about the Ubuntu question, I'm using Mandriva and I'm not sure if I can use the mail notifier you were referring to. Perhaps Mandriva has one that I haven't discovered yet...

Dark_Helmet 02-24-2007 12:42 AM

If you decide to try and compile the dependencies, let me know. I can try to help guide you through it. It shouldn't be too difficult <fingers crossed>.

Usually the worst part is finding all the dependencies (pkg A requires B & C, pkg B requires D & E, pkg C requires F, G, H, & I, etc.)

IndyGunFreak 02-24-2007 09:19 AM

Quote:

Originally Posted by aero_b
Now about the Ubuntu question, I'm using Mandriva and I'm not sure if I can use the mail notifier you were referring to. Perhaps Mandriva has one that I haven't discovered yet...

Sorry about that, for some reason I looked at your profile and thought it said Kubuntu... Been drugged up on pain pills here recently due to an ankle injury.. ;)


Good luck..

IGF

aero_b 02-27-2007 04:00 PM

Quote:

Originally Posted by Dark_Helmet
If you decide to try and compile the dependencies, let me know. I can try to help guide you through it. It shouldn't be too difficult <fingers crossed>.

Usually the worst part is finding all the dependencies (pkg A requires B & C, pkg B requires D & E, pkg C requires F, G, H, & I, etc.)

Alright Dark_Helmet, I'll take you up on that offer. I'm pretty sure I've got most of the dependencies covered from the Mandriva CDs, it seems only this pytrayicon issue is left. From what I understand, if I compile it myself from source, then there won't be any "32-bit" problem right?And then I could use this method whenever the "wrong ELFCLASS" problem comes up?

Here's what's in notifier.py:

import pygtk; gtk; time; os; pytrayicon; sys; warnings; ConfigParser; xmllangs; GmailConfig; GmailPopupMenu; gmailatom

If I understand correctly, these are programs or libraries of functions?

I have pygtk and gtk from the CDs. I'd assume "time", "os", "sys", "warnings" are all installed by default because they sound pretty generic. How can I check if they're installed?

xmllangs, GmailConfig, Gmailatom and GmailPopupMenu are included in the folder for the notifier, but may need compiling... (side note: what's the extension .pyc? how about .so?)

Before I continue (perhaps wrongfully) assuming I know what's going on, I'll let you answer these questions (in bold for your convenience) and guide me to the next step...

Dark_Helmet 02-27-2007 04:57 PM

Quote:

if I compile it myself from source, then there won't be any "32-bit" problem right?And then I could use this method whenever the "wrong ELFCLASS" problem comes up?
I believe that statement to be accurate, yes.

Quote:

If I understand correctly, these are programs or libraries of functions?
They are libraries of functions--collections of task-related support routines to "plug in" and use.

Quote:

How can I check if they're installed?
Their location will depend on how you python installation was setup, or rather, how the package maintainers decided to set it up. If I understand it correctly, they should all be in a "lib/python-<version>" directory. For example:
/lib/python-2.4
/usr/lib/python-2.4
/usr/local/lib/python-2.4

Quote:

what's the extension .pyc? how about .so?
That's a good question. As an educated guess, .pyc might be a C-code version of the package to import. On my system, just about everything has three files. For instance: os.py, os.pyc, and os.pyo. Again, this is an educated guess, but os.py is probably what's actually included when you import. os.pyc is probably the C-code version in case a developer needs to compile a new plugin that needs access to that libraries code (?), and os.pyo is likely object code (a middle-step between source code and a compiled binary file -- if you're not familiar with the compiling process already).

As for the .so, that is most definitely a traditional Linux/Unix shared library - again, another collection of utilities that other programs can access.

I'm having trouble locating the source code for pytrayicon. That leads me to believe it comes bundled with a larger package (perhaps pygtk or gtk). However, while I was searching for it, I came across a couple sites that have 64-bit versions of pytrayicon available. I'll add those links in a sec and continue looking for the pytrayicon source.

aero_b 02-27-2007 09:54 PM

Quote:

Originally Posted by Dark_Helmet
As an educated guess, .pyc might be a C-code version of the package to import.

Yeah, that makes sense: when I pass my cursor over the .pyc it says "Python bytecode".

My pytrayicon.so came with the Gmail notifier, but as you said, it was probably part of another package. I'm assuming this based on the fact that it's the only one that came "pre-compiled" with the gmail notifier, I have the .pyc for all the other ones.

I really appreciate your help with this. I'm glad Linux forums are around and people such as you are so helpful!

Dark_Helmet 02-28-2007 12:18 AM

First off, I need to get my bearings. is this what you're referring to (a firefox extension)? Or is the Gmail notifier you're referring to something else?

There's a "source code" link on that page, but it's broken (or was when I last tried it).

I'm happy to help, but we need to find the source code, or at least something that will point to where the source code is, before we can get off the ground.

If you've got a project homepage url or anything, that would be useful. I'll keep looking in the meantime.

aero_b 02-28-2007 02:00 PM

The one I am trying to install is from: http://gmail-notify.sourceforge.net/download.php .

I tried getting a 64-bit version of pytrayicon which seems to come in a couple of rpm packages. One of these, called Straw, is relatively light (around 360kB) so I thought I'd install it but it gives me a "unsatisfied python-adns" error. This could be because it's looking for a "python 2.3" folder to install in but I have 2.4, but again, what do I know?

I tried finding it elsewhere, but there's no source code in sight...

I also just noticed that Straw is for the GNOME environment and I'm using KDE, but I'm not sure that would be a problem if I'm just interested in the one file...

Dark_Helmet 02-28-2007 02:24 PM

You can actually snag the source code from the page you linked to.
Quote:

Download standard Linux source package here
The problem is, that source tarball includes pytrayicon.so as a compiled shared library--no source code to produce pytrayicon.so. I'll look around some more, and maybe send the developer of gmail-notify an email asking where/how they acquired the pytrayicon library.

It's not usually this difficult to find the source. It may turn out that pytrayicon.so is produced from closed-source and provided only as a compiled library. In that case, you'd need to request the provider make a 64-bit version available.

But that's just speculation (about the closed-source nature).

aero_b 03-01-2007 07:47 PM

Good to know. You're probably right about it being closed-source because it is really hard to find when it really shouldn't be.

Like I said, I found a few 64-bit versions of the pytrayicon library, but only included in two or three packages. And I'm getting that "unsatisfied python-adns" error when I try to install the "Straw" one. Well, if I don't have much more luck with this I guess I'll move on to trying to get my ATI drivers working, I know there's A LOT of forum topics on that but I also know that it'll probably be a lot of work to get everything installed. Hopefully it's easier than this Gmail notifier issue.

Thanks for your help so far!


All times are GMT -5. The time now is 02:36 AM.