Phoenix: ImportError invalid ELF header

Hello,

I tried yesterday Phoenix the first time, the build r72745. I only imported wx into the interpreter and got an ImportError:

egon@Einzeln-Ubuntu:~$ cd wxPhoenix
egon@Einzeln-Ubuntu:~/wxPhoenix$ source bin/activate
(wxPhoenix)egon@Einzeln-Ubuntu:~/wxPhoenix$ export LD_LIBRARY_PATH='pwd' wx
(wxPhoenix)egon@Einzeln-Ubuntu:~/wxPhoenix$ python3
Python 3.2 (r32:88445, Oct 20 2012, 14:09:29)
[GCC 4.5.2] on linux2
Type "help", "copyright", "credits" or "license" for more information.

import wx

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/egon/wxPhoenix/lib/python3.2/site-packages/wx/__init__.py", line 17, in <module>
    from wx.core import *
  File "/home/egon/wxPhoenix/lib/python3.2/site-packages/wx/core.py", line 6, in <module>
    from ._core import *
ImportError: /home/egon/wxPhoenix/lib/python3.2/site-packages/wx/_core.so: invalid ELF header

Greetings,

Egon

The same with build 72964.

···

Am Donnerstag, 25. Oktober 2012 13:40:06 UTC+2 schrieb Egon Frerich:

Hello,

I tried yesterday Phoenix the first time, the build r72745. I only imported wx into the interpreter and got an ImportError:

egon@Einzeln-Ubuntu:~$ cd wxPhoenix

egon@Einzeln-Ubuntu:~/wxPhoenix$ source bin/activate

(wxPhoenix)egon@Einzeln-Ubuntu:~/wxPhoenix$ export LD_LIBRARY_PATH=‘pwd’ wx

(wxPhoenix)egon@Einzeln-Ubuntu:~/wxPhoenix$ python3

Python 3.2 (r32:88445, Oct 20 2012, 14:09:29)
[GCC 4.5.2] on linux2

Type “help”, “copyright”, “credits” or “license” for more information.

import wx

Traceback (most recent call last):

File “”, line 1, in

File “/home/egon/wxPhoenix/lib/python3.2/site-packages/wx/init.py”, line 17, in

from wx.core import *

File “/home/egon/wxPhoenix/lib/python3.2/site-packages/wx/core.py”, line 6, in

from ._core import *

ImportError: /home/egon/wxPhoenix/lib/python3.2/site-packages/wx/_core.so: invalid ELF header

Greetings,

Egon

Hello Robin Dunn,

please can you have a look at this problem?

Greetings,

Egon Frerich

···

Am Samstag, 17. November 2012 20:21:42 UTC+1 schrieb Egon Frerich:

The same with build 72964.

Am Donnerstag, 25. Oktober 2012 13:40:06 UTC+2 schrieb Egon Frerich:

Hello,

I tried yesterday Phoenix the first time, the build r72745. I only imported wx into the interpreter and got an ImportError:

egon@Einzeln-Ubuntu:~$ cd wxPhoenix

egon@Einzeln-Ubuntu:~/wxPhoenix$ source bin/activate

(wxPhoenix)egon@Einzeln-Ubuntu:~/wxPhoenix$ export LD_LIBRARY_PATH=‘pwd’ wx

(wxPhoenix)egon@Einzeln-Ubuntu:~/wxPhoenix$ python3

Python 3.2 (r32:88445, Oct 20 2012, 14:09:29)
[GCC 4.5.2] on linux2

Type “help”, “copyright”, “credits” or “license” for more information.

import wx

Traceback (most recent call last):

File “”, line 1, in

File “/home/egon/wxPhoenix/lib/python3.2/site-packages/wx/init.py”, line 17, in

from wx.core import *

File “/home/egon/wxPhoenix/lib/python3.2/site-packages/wx/core.py”, line 6, in

from ._core import *

ImportError: /home/egon/wxPhoenix/lib/python3.2/site-packages/wx/_core.so: invalid ELF header

Greetings,

Egon

I haven't been able to reproduce this, so I have some questions for you.

* What command(s) did you use to build?

* Did you intend to have the space and the normal quotes in the LD_LIBRARY_PATH setting or did you mean to use backticks and a slash, like `pwd`/wx ?

* Is that really where the wx shared object files you built are located?

* Are you sure that you are running with the same python that was used for the build?

* Is it possible that you've built on a 32-bit system and are trying to run it on a 64-bit one which doesn't have the ia32 compatibility libraries installed?

···

On 12/11/12 1:40 AM, Egon Frerich wrote:

Hello Robin Dunn,

please can you have a look at this problem?

Greetings,

Egon Frerich

Am Samstag, 17. November 2012 20:21:42 UTC+1 schrieb Egon Frerich:

    The same with build 72964.

    Am Donnerstag, 25. Oktober 2012 13:40:06 UTC+2 schrieb Egon Frerich:

        Hello,

        I tried yesterday Phoenix the first time, the build r72745. I
        only imported wx into the interpreter and got an ImportError:

        egon@Einzeln-Ubuntu:~$ cd wxPhoenix
        egon@Einzeln-Ubuntu:~/wxPhoenix$ source bin/activate
        (wxPhoenix)egon@Einzeln-Ubuntu:~/wxPhoenix$ export
        LD_LIBRARY_PATH='pwd' wx
        (wxPhoenix)egon@Einzeln-Ubuntu:~/wxPhoenix$ python3
        Python 3.2 (r32:88445, Oct 20 2012, 14:09:29)
        [GCC 4.5.2] on linux2
        Type "help", "copyright", "credits" or "license" for more
        information.
         >>> import wx
        Traceback (most recent call last):
           File "<stdin>", line 1, in <module>
           File
        "/home/egon/wxPhoenix/lib/python3.2/site-packages/wx/__init__.py",
        line 17, in <module>
             from wx.core import *
           File
        "/home/egon/wxPhoenix/lib/python3.2/site-packages/wx/core.py",
        line 6, in <module>
             from ._core import *
        ImportError:
        /home/egon/wxPhoenix/lib/python3.2/site-packages/wx/_core.so:
        invalid ELF header
         >>>

--
Robin Dunn
Software Craftsman

Hello Robin Dunn,

please can you have a look at this problem?

Greetings,

Egon Frerich

The same with build 72964.
    Hello,
    I tried yesterday Phoenix the first time, the build r72745. I
    only imported wx into the interpreter and got an ImportError:
    egon@Einzeln-Ubuntu:~$ cd wxPhoenix
    egon@Einzeln-Ubuntu:~/wxPhoenix$ source bin/activate
    (wxPhoenix)egon@Einzeln-Ubuntu:~/wxPhoenix$ export
    LD_LIBRARY_PATH='pwd' wx
    (wxPhoenix)egon@Einzeln-Ubuntu:~/wxPhoenix$ python3
    Python 3.2 (r32:88445, Oct 20 2012, 14:09:29)
    [GCC 4.5.2] on linux2
    Type "help", "copyright", "credits" or "license" for more
    information.
     >>> import wx
    Traceback (most recent call last):
       File "<stdin>", line 1, in <module>
       File
    "/home/egon/wxPhoenix/lib/python3.2/site-packages/wx/__init__.py",
    line 17, in <module>
         from wx.core import *
       File
    "/home/egon/wxPhoenix/lib/python3.2/site-packages/wx/core.py",
    line 6, in <module>
         from ._core import *
    ImportError:
    /home/egon/wxPhoenix/lib/python3.2/site-packages/wx/_core.so:
    invalid ELF header
     >>>

I haven’t been able to reproduce this, so I have some questions for you.

  • What command(s) did you use to build?

  • Did you intend to have the space and the normal quotes in the
    LD_LIBRARY_PATH setting or did you mean to use backticks and a slash,
    like pwd/wx ?

  • Is that really where the wx shared object files you built are located?

  • Are you sure that you are running with the same python that was used
    for the build?

  • Is it possible that you’ve built on a 32-bit system and are trying to
    run it on a 64-bit one which doesn’t have the ia32 compatibility
    libraries installed?


Robin Dunn

Software Craftsman

http://wxPython.org

···

Am Freitag, 14. Dezember 2012 19:06:14 UTC+1 schrieb Robin Dunn:

On 12/11/12 1:40 AM, Egon Frerich wrote:

Am Samstag, 17. November 2012 20:21:42 UTC+1 schrieb Egon Frerich:
Am Donnerstag, 25. Oktober 2012 13:40:06 UTC+2 schrieb Egon Frerich:

Yes - there was a misunderstanding so I had a wrong wx in my tries.

So I began to have my own build (Ubuntu 12.4, 64 bit).

The command sip ended with “failed with exit code 127.”, all messages are in the file,

The I installed sip (4.14.2) and executed sip:

egon@Ubuntu12:~/Entwicklung/buildPhoenix/sip-4.14.2/eigenerTest$ sip -w -o -T -g -c ergebnis6 -I /home/egon/Entwicklung/testbuild/Phoenix/src -I /home/egon/Entwicklung/testbuild/Phoenix/sip/gen -b sip2/cpp/_core.sbf -X pycode_core:wx/core.py _core.sip

and core.py was created.

What is the problem with build.py?

Egon

phoenixbuild.txt (11.3 KB)

···

Am Donnerstag, 25. Oktober 2012 13:40:06 UTC+2 schrieb Egon Frerich:

Hello,

I tried yesterday Phoenix the first time, the build r72745. I only imported wx into the interpreter and got an ImportError:

egon@Einzeln-Ubuntu:~$ cd wxPhoenix

egon@Einzeln-Ubuntu:~/wxPhoenix$ source bin/activate

(wxPhoenix)egon@Einzeln-Ubuntu:~/wxPhoenix$ export LD_LIBRARY_PATH=‘pwd’ wx

(wxPhoenix)egon@Einzeln-Ubuntu:~/wxPhoenix$ python3

Python 3.2 (r32:88445, Oct 20 2012, 14:09:29)
[GCC 4.5.2] on linux2

Type “help”, “copyright”, “credits” or “license” for more information.

import wx

Traceback (most recent call last):

File “”, line 1, in

File “/home/egon/wxPhoenix/lib/python3.2/site-packages/wx/init.py”, line 17, in

from wx.core import *

File “/home/egon/wxPhoenix/lib/python3.2/site-packages/wx/core.py”, line 6, in

from ._core import *

ImportError: /home/egon/wxPhoenix/lib/python3.2/site-packages/wx/_core.so: invalid ELF header

Greetings,

Egon

Build.py attempts to download binaries for the tools it will use so we can be sure that the same version is used on all platforms for all builds, and so it requires very little effort to keep the buildbot slaves updated. The linux binary for sip was built on an older 32-bit ubuntu, so if you don't have the ia32 compatibility libraries installed then that could be the sources of the problem. You may also want to try running ldd on the sip-* binary in Phoenix/bin to see if there are any library dependencies that are missing. If all else fails then you should be able to set SIP in the environment to the full path of the sip binary you built and build.py will use that one instead.

···

On 12/16/12 2:58 AM, Egon Frerich wrote:

Yes - there was a misunderstanding so I had a wrong wx in my tries.

So I began to have my own build (Ubuntu 12.4, 64 bit).

The command sip ended with "failed with exit code 127.", all messages
are in the file,

The I installed sip (4.14.2) and executed sip:

egon@Ubuntu12:~/Entwicklung/buildPhoenix/sip-4.14.2/eigenerTest$ sip -w
-o -T -g -c ergebnis6 -I /home/egon/Entwicklung/testbuild/Phoenix/src -I
/home/egon/Entwicklung/testbuild/Phoenix/sip/gen -b sip2/cpp/_core.sbf
-X pycode_core:wx/core.py _core.sip

and core.py was created.

What is the problem with build.py?

--
Robin Dunn
Software Craftsman

After installing ia32 and some other packages build.py finished in an orderly way. The last lines at the terminal are:

[577/579] cxx: sip/cpp/sip_xrcwxXmlSubclassFactory.cpp → build_waf/2.7/sip/cpp/sip_xrcwxXmlSubclassFactory.cpp.19.o
[578/579] cxxshlib: build_waf/2.7/sip/cpp/sip_xrccmodule.cpp.19.o build_waf/2.7/sip/cpp/sip_xrcwxXmlResource.cpp.19.o build_waf/2.7/sip/cpp/sip_xrcwxXmlResourceHandler.cpp.19.o build_waf/2.7/sip/cpp/sip_xrcwxXmlSubclassFactory.cpp.19.o → build_waf/2.7/_xrc.so
[579/579] pkg._xrc: build_waf/2.7/_xrc.so → build_waf/2.7/pkg._xrc
Waf: Leaving directory `/home/egon/Entwicklung/testbuild2/Phoenix/build_waf/2.7’
‘build’ finished successfully (1h58m23.838s)

The last lines in my output file are:

Checking for /home/egon/Entwicklung/testbuild2/Phoenix/bin/waf-1.6.11…
/usr/bin/python2.7 /home/egon/Entwicklung/testbuild2/Phoenix/bin/waf-1.6.11 --prefix=/usr/local --wx_config=/home/egon/Entwicklung/testbuild2/Phoenix/bld/wx-config --python=/usr/bin/python2.7 --out=build_waf/2.7 configure build

------------ BUILD FINISHED ------------
To run the wxPython demo:

  • Set your PYTHONPATH variable to /home/egon/Entwicklung/testbuild2/Phoenix.
  • Set your (DY)LD_LIBRARY_PATH to /home/egon/Entwicklung/testbuild2/Phoenix/bld/lib
  • Run python demo/demo.py

Finished command: waf_py (118m31.842s)
Finished command: build_py (118m31.846s)
Finished command: build (186m48.248s)
Done!

In the directory Phoenix is not a directory demo.

But in the directory Phoenix/bld I found a directory demos with subdirectories. But there are only 'Makefile’s.

What have I to do?

Egon

···

Am Sonntag, 16. Dezember 2012 11:42:51 UTC+1 schrieb Egon Frerich:

Am Freitag, 14. Dezember 2012 19:06:14 UTC+1 schrieb Robin Dunn:

On 12/11/12 1:40 AM, Egon Frerich wrote:

Hello Robin Dunn,

please can you have a look at this problem?

Greetings,

Egon Frerich

Am Samstag, 17. November 2012 20:21:42 UTC+1 schrieb Egon Frerich:

The same with build 72964.
Am Donnerstag, 25. Oktober 2012 13:40:06 UTC+2 schrieb Egon Frerich:
    Hello,
    I tried yesterday Phoenix the first time, the build r72745. I
    only imported wx into the interpreter and got an ImportError:
    egon@Einzeln-Ubuntu:~$ cd wxPhoenix
    egon@Einzeln-Ubuntu:~/wxPhoenix$ source bin/activate
    (wxPhoenix)egon@Einzeln-Ubuntu:~/wxPhoenix$ export
    LD_LIBRARY_PATH='pwd' wx
    (wxPhoenix)egon@Einzeln-Ubuntu:~/wxPhoenix$ python3
    Python 3.2 (r32:88445, Oct 20 2012, 14:09:29)
    [GCC 4.5.2] on linux2
    Type "help", "copyright", "credits" or "license" for more
    information.
     >>> import wx
    Traceback (most recent call last):
       File "<stdin>", line 1, in <module>
       File
    "/home/egon/wxPhoenix/lib/python3.2/site-packages/wx/__init__.py",
    line 17, in <module>
         from wx.core import *
       File
    "/home/egon/wxPhoenix/lib/python3.2/site-packages/wx/core.py",
    line 6, in <module>
         from ._core import *
    ImportError:
    /home/egon/wxPhoenix/lib/python3.2/site-packages/wx/_core.so:
    invalid ELF header
     >>>

I haven’t been able to reproduce this, so I have some questions for you.

  • What command(s) did you use to build?

  • Did you intend to have the space and the normal quotes in the
    LD_LIBRARY_PATH setting or did you mean to use backticks and a slash,
    like pwd/wx ?

  • Is that really where the wx shared object files you built are located?

  • Are you sure that you are running with the same python that was used
    for the build?

  • Is it possible that you’ve built on a 32-bit system and are trying to
    run it on a 64-bit one which doesn’t have the ia32 compatibility
    libraries installed?


Robin Dunn

Software Craftsman

http://wxPython.org

------------ BUILD FINISHED ------------
To run the wxPython demo:
  - Set your PYTHONPATH variable to
/home/egon/Entwicklung/testbuild2/Phoenix.
  - Set your (DY)LD_LIBRARY_PATH to
/home/egon/Entwicklung/testbuild2/Phoenix/bld/lib
  - Run python demo/demo.py

Finished command: waf_py (118m31.842s)
Finished command: build_py (118m31.846s)
Finished command: build (186m48.248s)
Done!

In the directory Phoenix is not a directory demo.

Those messages are left over from porting that part of the build script from Classic. There eventually will be a demo folder again, but it is currently still not present in Phoenix.

But in the directory Phoenix/bld I found a directory demos with
subdirectories. But there are only 'Makefile's.

What have I to do?

There are a few samples in the Phoenix/samples folder that you can use to test your build with. A good one to start with would be samples/simple/hello.py.

···

On 12/18/12 6:13 AM, Egon Frerich wrote:

--
Robin Dunn
Software Craftsman