PDA

View Full Version : problem compiling python2.7



albumns
21-Jan-2013, 15:53
hello:

I am trying to compile python2.7 in SLED SP2 but it always failed with messages:



Python build finished, but the necessary bits to build these modules were not found:
_bsddb _tkinter bsddb185
dl imageop linuxaudiodev
ossaudiodev sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.


Failed to build these modules:
_curses_panel



Since my another software highly depend how well the python it compiled, it always failed with messages:


/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld: cannot find -lpython2.7
collect2: ld returned 1 exit status
scons: *** [objs/Linux/x86_64/gcc-4.6/Release/lib/libDesmond.so] Error 1


So I am just wondering how should I compile my python 2.7 correctly?

thank you very much
best
Albert

malcolmlewis
21-Jan-2013, 17:46
On Mon 21 Jan 2013 02:54:01 PM CST, albumns wrote:


hello:

I am trying to compile python2.7 in SLED SP2 but it always failed with
messages:


Code:
--------------------

Python build finished, but the necessary bits to build these modules
were not found: _bsddb _tkinter bsddb185
dl imageop linuxaudiodev
ossaudiodev sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for
the module's name.

Failed to build these modules:
_curses_panel


--------------------


Since my another software highly depend how well the python it
compiled, it always failed with messages:


Code:
--------------------
/usr/lib64/gcc/x86_64-suse-linux/4.6/../../../../x86_64-suse-linux/bin/ld:
cannot find -lpython2.7 collect2: ld returned 1 exit status
scons: *** [objs/Linux/x86_64/gcc-4.6/Release/lib/libDesmond.so]
Error 1 --------------------



So I am just wondering how should I compile my python 2.7 correctly?

thank you very much
best
Albert




Hi
Do you have an OBS account? Just branch and build (you can build
locally with the osc command)
https://build.opensuse.org/package/show?package=python&project=devel%3Alanguages%3Apython%3AFactory

--
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
up 4 days 19:25, 3 users, load average: 0.17, 0.22, 0.22
CPU Intel® i5 CPU M520@2.40GHz | GPU Intel® Ironlake Mobile

albumns
21-Jan-2013, 20:29
thank you for kind reply.
I never use OBS before. And I am reading the manual, here I use command:

osc co Base:build python-base

It download all related file as listed in the link you gave.

what I should do next, so that it can start to compile?

thank you very much

malcolmlewis
21-Jan-2013, 21:49
On Mon 21 Jan 2013 07:34:01 PM CST, albumns wrote:


thank you for kind reply.
I never use OBS before. And I am reading the manual, here I use
command:

osc co Base:build python-base

It download all related file as listed in the link you gave.

what I should do next, so that it can start to compile?

thank you very much




Hi
Have you added a SLE build target via the Web interface? When you do
that it should build automatically, from the command line it would be;



osc repos
osc build <your target from above output eg SLE_11_SP2> python-base



--
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
up 0:14, 3 users, load average: 0.20, 0.17, 0.11
CPU Intel® i5 CPU M520@2.40GHz | GPU Intel® Ironlake Mobile

albumns
23-Jan-2013, 15:28
thank you for kind helps. But I don't know how to add the build target from web interface...... I am sorry I am not famililar with osc in SUSE.

Or, do you have any idea how to solve the issue claimed during the configuration so that I can compile it from source code?


Failed to find the necessary bits to build these modules:
_bsddb bsddb185 dl
imageop linuxaudiodev ossaudiodev
sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for the module's name.


Failed to build these modules:
_curses_panel

THX a lot

malcolmlewis
23-Jan-2013, 18:23
On Wed 23 Jan 2013 02:34:02 PM CST, albumns wrote:


thank you for kind helps. But I don't know how to add the build target
from web interface...... I am sorry I am not famililar with osc in
SUSE.

Or, do you have any idea how to solve the issue claimed during the
configuration so that I can compile it from source code?


Code:
--------------------
Failed to find the necessary bits to build these modules:
_bsddb bsddb185 dl
imageop linuxaudiodev ossaudiodev
sunaudiodev
To find the necessary bits, look in setup.py in detect_modules() for
the module's name.

Failed to build these modules:
_curses_panel
--------------------


THX a lot




Hi
Do you actually need those modules? If not, as indicated in the setup.py
as rem'ing them out....

I have branched python-base and see the same sort of errors..except it
fails some of the tests.

--
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
up 21:09, 4 users, load average: 0.01, 0.04, 0.14
CPU Intel® i5 CPU M520@2.40GHz | GPU Intel® Ironlake Mobile

albumns
23-Jan-2013, 18:34
Probably I don't need those modules, but when I skipped the warning and invoke this compiled python for compiling my other softwares, it always have the same issues which claimed:

Python-2.7.3/./Modules/posixmodule.c:7432: warning: the use of `tmpnam_r' is dangerous, better use `mkstemp'
Stride.o: In function `ss_from_stride(DrawMolecule*)':
Stride.C:(.text+0x41): warning: the use of `tempnam' is dangerous, better use `mkstemp'
collect2: ld returned 1 exit status

So, this problem should comes from the issue when I compiling Python.

thank you very much

malcolmlewis
23-Jan-2013, 19:28
On Wed 23 Jan 2013 05:35:01 PM CST, albumns wrote:


Probably I don't need those modules, but when I skipped the warning and
invoke this compiled python for compiling my other softwares, it always
have the same issues which claimed:

Python-2.7.3/./Modules/posixmodule.c:7432: warning: the use of
`tmpnam_r' is dangerous, better use `mkstemp'
Stride.o: In function `ss_from_stride(DrawMolecule*)':
Stride.C:(.text+0x41): warning: the use of `tempnam' is dangerous,
better use `mkstemp'
collect2: ld returned 1 exit status

So, this problem should comes from the issue when I compiling Python.

thank you very much




Hi
Those are only warnings which should not stop compiling, there must be
an 'error' further back in the log file.

Or try to disable them with --disable-werror when you configure...

--
Cheers Malcolm °¿° (Linux Counter #276890)
openSUSE 12.2 (x86_64) Kernel 3.4.11-2.16-desktop
up 22:12, 3 users, load average: 0.21, 0.18, 0.14
CPU Intel® i5 CPU M520@2.40GHz | GPU Intel® Ironlake Mobile