(Ubuntu) Add logic to verify presence of packages: python-dev, libxml2-dev,libxslt-dev

Bug #1225395 reported by Conte on 2013-09-14
This bug affects 4 people
Affects Status Importance Assigned to Milestone

Bug Description

Summary: (Ubuntu) Add logic to verify presence of packages: python-dev, libxml2-dev,libxslt-dev
Priority: Low
OS: Ubuntu 12.04 LTS
On clean machine (ubuntu 12.04 LTS) perform:
git clone https://github.com/openstack-dev/devstack.git
cd devstack && ./stack.sh

Encounter issue when pip installs test requirements:
In file included from src/lxml/lxml.etree.c:314:0:
/opt/stack/tempest/.venv/build/lxml/src/lxml/includes/etree_defs.h:9:31: fatal error: libxml/xmlversion.h: No such file or directory
compilation terminated.
error: command 'gcc' failed with exit status 1

Check presence of:
python-dev (i found it also is not installed automatically on machines without openstack)

As the script in many cases is used by novice users, it would be great to add this functionality.
And terminate the script with graceful message offering to install the packages.

Conte (vd-fallout) wrote :
Matthew Treinish (treinish) wrote :

This bug belongs in devstack it's independent of tempest.

Changed in tempest:
status: New → Invalid
DennyZhang (denny-6) wrote :

Agree with Conte, this bug is annoying. Every fresh install will encounter this problem.

Shall we document this, if it's not so difficult to fix?

I also file another bug, which is marked as duplicated with this bug: https://bugs.launchpad.net/tempest/+bug/1224155

Sean M. Collins (scollins) wrote :

Just hit this too when building another compute node.

Sean M. Collins (scollins) wrote :


building 'greenlet' extension

creating build

creating build/temp.linux-x86_64-2.7

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -fno-tree-dominator-opts -I/usr/include/python2.7 -c greenlet.c -o build/temp.linux-x86_64-2.7/greenlet.o

In file included from greenlet.c:5:0:

greenlet.h:8:20: fatal error: Python.h: No such file or directory

compilation terminated.

error: command 'gcc' failed with exit status 1

Sean M. Collins (scollins) wrote :

Further info - you'll see this error inside the screen that devstack creates, when it tries to start n-cpu

cd /opt/stack/nova && sg libvirtd '/usr/local/bin/nova-compute --config-file /etc/nova/nova.conf' || echo "n-cpu failed to start" | tee "/opt/stack/status/stack/n-cpu.failure"
sh: /usr/local/bin/nova-compute: No such file or directory
n-cpu failed to start

Raseel (raseel) wrote :

Wouldn't it make more sense to not bother with the verification, rather add these as general pre-requisites before installation starts.
It seems python-dev is already added as a pre-requisite and gets duly installed.
In my case, libxml2-dev and libxslt1-dev also got installed, but I wan't using my bo solely for devstack so it might have got installed due to some other dependency.
I have sent a patch with this fix for reivew :

Changed in devstack:
assignee: nobody → Raseel (raseel)
status: New → In Progress
Raseel (raseel) wrote :

This being my first time submitting code to a Project as big as OpenStack, I've screwed up a bit.
In trying to update my patch as per comments from Jordan Pittier, I have created a new review instance at :

Reviewed: https://review.openstack.org/171138
Committed: https://git.openstack.org/cgit/openstack-dev/devstack/commit/?id=8c6276ea0a2332f5210fc1f16399281c083520cd
Submitter: Jenkins
Branch: master

commit 8c6276ea0a2332f5210fc1f16399281c083520cd
Author: Raseel Bhagat <email address hidden>
Date: Tue Apr 7 03:15:45 2015 +0530

    Added libxml2-dev package as a pre-requisite when installing tempest.
    This is required so that devstack can be installed on vanilla Ubuntu systems.

    Closes-Bug: 1225395

    Change-Id: Id9116e00e18c23e8e6391d8aa652c04d8bdb86c3

Changed in devstack:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Bug attachments