3

I'm trying to build omniORB 4.1.6 under Arch Linux. When I type make, here is the message:

../../../../../src/tool/omniidl/cxx/idlpython.cc:188:26: fatal error:  python3.3/Python.h: No such file or directory
#  include PYTHON_INCLUDE

I'm sure both python3 and python2 were installed, and I can remember last time I was tring to do the same thing under Linux Mint I met the same problem. That time, I used this command to solve the problem:

sudo apt-get install python-dev

However, it seems Arch doesn't separate python-dev with python. I checked my /usr and found Python.h under /usr/include/python3.3m, so what should I do now?

3
  • Did you run ./configure before running make? That header file is there on Ubuntu 12.04 as well. You can try to make a link in /usr/include from python3.3 to python3.3m
    – Anthon
    Jun 2, 2013 at 10:20
  • I did run './configure' before running make. In addition, after making the link from python3.3 to python3.3m, it seems this question was sloved, however I'm facing farther problem thus the building failed again...Thanks to @don_crissti, I decided to download it from repos directly, I just realized this method...
    – Elderry
    Jun 2, 2013 at 11:07
  • it is python-devel in some distributions, like redhat, fedora, centos etc
    – easl
    Jul 28, 2013 at 12:32

2 Answers 2

3

Normally running

./configure

before running make should set up things correctly, but in this fall that seems not to be the case.

Python 3.3.X puts its header files in .../include/Python3.3m, whereas 2.7.x uses .../include/python2.7 (without any suffix), maybe omniORB is not aware (yet) of that suffix m.

You can make a link from python3.3m to python3.3 using:

cd /usr/include
ln -s python3.3m python3.3

and retry the build process ( this assumes python3.3 was configured using --prefix=/usr, adapt the cd as necessary).

1
  • I had a same problem on Arch. This was really helpfull.
    – 71GA
    Jan 5, 2015 at 13:05
0

For those who have installed the python-dev package and are still getting errors;

I thought the PYTHON parameter on the configure command line was the directory of the Python.h file ... nope, use the path to the interpreter.

I created and used a "build" directory in omniORB;

cd "omniORB install loc"; mkdir build; cd build; ...

You can give the location of Python as part of the configure command line.

../configure ... PYTHON=/usr/bin/python3

In my case, with OmniORB installed in /opt and going to be using /opt as its home:

../configure --prefix=/opt/omniORB.build.4.3.0 --with-omniORB-config=/opt/omniORB.build.4.3.0/omniORB.cfg --with-omniNames-logdir=$HOME/logs PYTHON=/usr/bin/python3

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .