[C++-sig] import problems with Boost.Python on Cygwin

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[C++-sig] import problems with Boost.Python on Cygwin

Rafael M. Frongillo
Hi,

I have been trying for some time now to install Boost.Python for Cygwin
1.5.19 and Python 2.4.1.  I followed the instructions given on
http://www.boost.org/libs/python/doc/building.html and
http://www.boost.org/more/getting_started.html .  As no bjam executable was
posted on sourceforge for Cygwin (that I could see), I built it from source
successfully.  I then jammed Boost, and then Boost.Python.  After a
seemingly successful compilation, I tried making the example hello.cpp in
the libs\python\example\tutorial directory.  The hello.dll was jammed
successfully, but when I ran python in a directory containing both
boost_python.dll and hello.dll, I got an error:

bash-3.00$ python
Python 2.4.1 (#1, May 27 2005, 18:02:40)
[GCC 3.3.3 (cygwin special)] on cygwin
Type "help", "copyright", "credits" or "license" for more information.
 >>> import hello
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
ImportError: No such file or directory

After trying various other things, I also got python to crash after the
import statement.  I reluctantly tried SWIG instead when I got these
errors, but I had similar problems (with SWIG, the examples worked, but the
application I was trying to expose to python crashed python upon
import).  I would much prefer to use Boost.Python, however.

Does anyone know what could be going on here?  I'd be interested to hear of
similar experiences on Cygwin.  Thanks very much,

Rafael


_______________________________________________
C++-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/c++-sig
Reply | Threaded
Open this post in threaded view
|

Re: [C++-sig] import problems with Boost.Python on Cygwin

Koen Van Herck
I've got a Boost.Python project working fine on cygwin 1.5.18, python 2.4.1
(cygwin binary install), gcc 3.4.4. When I recently ran the cygwin setup.exe
it automatically upgraded cygwin to 1.5.19, and now my project still
compiles fine but when I import my module in Python's interactive shell,
python silently returns to the shell prompt. No error, just exits. I rebuilt
Boost.Python from source, but no difference.
I reverted cygwin to 1.5.18, and it works fine again.
 
Regards,
Koen.


_______________________________________________
C++-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/c++-sig
Reply | Threaded
Open this post in threaded view
|

Re: [C++-sig] import problems with Boost.Python on Cygwin

David Abrahams
Koen Van Herck <[hidden email]> writes:

> I've got a Boost.Python project working fine on cygwin 1.5.18, python 2.4.1
> (cygwin binary install), gcc 3.4.4. When I recently ran the cygwin setup.exe
> it automatically upgraded cygwin to 1.5.19, and now my project still
> compiles fine but when I import my module in Python's interactive shell,
> python silently returns to the shell prompt. No error, just exits. I rebuilt
> Boost.Python from source, but no difference.
> I reverted cygwin to 1.5.18, and it works fine again.

You probably need to rebuild your libboost_python and all related
extension modules.

--
Dave Abrahams
Boost Consulting
www.boost-consulting.com

_______________________________________________
C++-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/c++-sig
Reply | Threaded
Open this post in threaded view
|

Re: [C++-sig] import problems with Boost.Python on Cygwin

Koen Van Herck
Yes, I did rebuild everything (libboost_python, my extension module, and
every library that it uses) from source.
I did not rebuild Python. I used the binary Python install from cygwin,
which I did not update. Could that be the problem?

Regards,
Koen.

-----Original Message-----
From: [hidden email] [mailto:[hidden email]]On
Behalf Of David Abrahams
Sent: woensdag 8 maart 2006 20:59
To: [hidden email]
Subject: Re: [C++-sig] import problems with Boost.Python on Cygwin


Koen Van Herck <[hidden email]> writes:

> I've got a Boost.Python project working fine on cygwin 1.5.18, python
2.4.1
> (cygwin binary install), gcc 3.4.4. When I recently ran the cygwin
setup.exe
> it automatically upgraded cygwin to 1.5.19, and now my project still
> compiles fine but when I import my module in Python's interactive shell,
> python silently returns to the shell prompt. No error, just exits. I
rebuilt
> Boost.Python from source, but no difference.
> I reverted cygwin to 1.5.18, and it works fine again.

You probably need to rebuild your libboost_python and all related
extension modules.

--
Dave Abrahams
Boost Consulting
www.boost-consulting.com

_______________________________________________
C++-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/c++-sig

_______________________________________________
C++-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/c++-sig
Reply | Threaded
Open this post in threaded view
|

Re: [C++-sig] import problems with Boost.Python on Cygwin

David Abrahams
"Koen Van Herck" <[hidden email]> writes:

> Yes, I did rebuild everything (libboost_python, my extension module, and
> every library that it uses) from source.
> I did not rebuild Python. I used the binary Python install from cygwin,
> which I did not update. Could that be the problem?

Conceivably, but it seems unlikely.  I have no immediate ideas.  I
suggest GDB'ing your Python, which might require creating a debug
build.

--
Dave Abrahams
Boost Consulting
www.boost-consulting.com

_______________________________________________
C++-sig mailing list
[hidden email]
http://mail.python.org/mailman/listinfo/c++-sig