Building a Dynamic Library (libpython.so) for Python 2.4.3 Final

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dean

    #1

    Building a Dynamic Library (libpython.so) for Python 2.4.3 Final

    I've been trying to make python a dynamic library. I downloaded Python
    2.4.3 Final from the Python web site and I cannot get it to create the
    library.

    I've tried using the directive:

    --enable-shared

    and

    --enable-shared=yes

    and both of them had the same effect of creating a bunch of parts of
    the python interpreter in .so format but not in creating a single
    libpython2.4.so .X.Y file. I could probably hack something together
    using ar but I would prefer to do it "correctly" by setting some
    options. I'm compiling under OpenBSD 3.5.

    Thanks for any advice.

  • Andrew MacIntyre

    #2
    Re: Building a Dynamic Library (libpython.so) for Python 2.4.3 Final

    Dean wrote:[color=blue]
    > I've been trying to make python a dynamic library. I downloaded Python
    > 2.4.3 Final from the Python web site and I cannot get it to create the
    > library.
    >
    > I've tried using the directive:
    >
    > --enable-shared
    >
    > and
    >
    > --enable-shared=yes
    >
    > and both of them had the same effect of creating a bunch of parts of
    > the python interpreter in .so format but not in creating a single
    > libpython2.4.so .X.Y file. I could probably hack something together
    > using ar but I would prefer to do it "correctly" by setting some
    > options. I'm compiling under OpenBSD 3.5.[/color]

    Well, I just confirmed that

    ../configure --enable-shared

    results in a libpython2.4.so .1 (and a libpython2.4.so ) on FreeBSD 4.x.
    The result runs the regression test suite without significant problems
    (the test box didn't have a 2.4 installation).

    A quick look at the configure script suggests that --enable-shared should
    work on OpenBSD. While I believe that there's actually an OpenBSD based
    Python buildbot (though OpenBSD 3.[89] I think) running, I doubt that
    this configuration is tested there.

    If you don't get any other responses, send me a copy of the full make log
    (ie "make >make.log 2>&1") and I'll compare it to the log from my test
    build.

    -------------------------------------------------------------------------
    Andrew I MacIntyre "These thoughts are mine alone..."
    E-mail: andymac@bullsey e.apana.org.au (pref) | Snail: PO Box 370
    andymac@pcug.or g.au (alt) | Belconnen ACT 2616
    Web: http://www.andymac.org/ | Australia

    Comment

    • Bo Gus

      #3
      Re: Building a Dynamic Library (libpython.so) for Python 2.4.3 Final

      In article <mailman.5012.1 146057004.27775 .python-list@python.org >,
      Andrew MacIntyre <andymac@bullse ye.apana.org.au > wrote:
      [color=blue]
      > Dean wrote:[color=green]
      > > I've been trying to make python a dynamic library. I downloaded Python
      > > 2.4.3 Final from the Python web site and I cannot get it to create the
      > > library.
      > >
      > > I've tried using the directive:
      > >
      > > --enable-shared
      > >
      > > and
      > >
      > > --enable-shared=yes
      > >
      > > and both of them had the same effect of creating a bunch of parts of
      > > the python interpreter in .so format but not in creating a single
      > > libpython2.4.so .X.Y file. I could probably hack something together
      > > using ar but I would prefer to do it "correctly" by setting some
      > > options. I'm compiling under OpenBSD 3.5.[/color]
      >
      > Well, I just confirmed that
      >
      > ./configure --enable-shared
      >
      > results in a libpython2.4.so .1 (and a libpython2.4.so ) on FreeBSD 4.x.
      > The result runs the regression test suite without significant problems
      > (the test box didn't have a 2.4 installation).
      >
      > A quick look at the configure script suggests that --enable-shared should
      > work on OpenBSD. While I believe that there's actually an OpenBSD based
      > Python buildbot (though OpenBSD 3.[89] I think) running, I doubt that
      > this configuration is tested there.
      >
      > If you don't get any other responses, send me a copy of the full make log
      > (ie "make >make.log 2>&1") and I'll compare it to the log from my test
      > build.[/color]
      Thanks for the help. It didn't build the shared library on its own but I
      did manage to find where it is built and a simple

      make libpython2.4.so

      Got it built for me. Thanks for the idea!

      Dean

      Comment

      Working...