[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [Fwd: [Xen-users] errors with make tools and make docs]


  • To: xen-devel@xxxxxxxxxxxxxxxxxxx
  • From: Ricardo <djrico@xxxxxxx>
  • Date: Thu, 09 Nov 2006 02:20:20 -0500
  • Delivery-date: Wed, 08 Nov 2006 23:45:09 -0800
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

Hey,

  I really need help on the "make tools."  Otherwise I'm stuck without
being able to use Xen.  In this post I've included the two header files
that exist in /usr/include/dal as well as reisermodule.c

  Someone, please, help me out!

-Ricardo-

Ricardo wrote:
> Hey guys,
>
>   I posted this error on xen-users and got no reply, so I figure I'd
> have better luck here.  It turns out that on my machine (Gentoo), the
> directory /usr/include/dal exists and has the files dal.h and file.h
>
> I tried simply changing the reference from dal/file_dal.h to dal/file.h
> but there were continued problems.  Apparently some of the variables
> referenced and such do not exist.  I'm appending that set of errors here:
>
> building 'grub.fsys.reiser._pyreiser' extension
> i686-pc-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -O2
> -fomit-frame-pointer -DNDEBUG -m32 -march=i686 -Wall -Wstrict-prototypes
> -Wdeclaration-after-statement -D__XEN_TOOLS__ -fPIC
> -I/usr/include/python2.4 -c src/fsys/reiser/reisermodule.c -o
> build/temp.linux-i686-2.4/src/fsys/reiser/reisermodule.o
> -fno-strict-aliasing -Wall -Werror
> src/fsys/reiser/reisermodule.c: In function 'file_dal_close':
> src/fsys/reiser/reisermodule.c:49: error: 'dal_t' has no member named 'dev'
> cc1: warnings being treated as errors
> src/fsys/reiser/reisermodule.c:50: warning: implicit declaration of
> function 'dal_free'
> src/fsys/reiser/reisermodule.c: In function 'reiser_fs_open':
> src/fsys/reiser/reisermodule.c:221: warning: implicit declaration of
> function 'file_dal_open'
> src/fsys/reiser/reisermodule.c:221: warning: assignment makes pointer
> from integer without a cast
> error: command 'i686-pc-linux-gnu-gcc' failed with exit status 1
> make[2]: *** [build] Error 1
> make[2]: Leaving directory `/usr/src/xen-3.0.3-testing.hg/tools/pygrub'
> make[1]: *** [install] Error 2
> make[1]: Leaving directory `/usr/src/xen-3.0.3-testing.hg/tools'
> make: *** [install-tools] Error 2
>
> Any ideas?
>
> -Ricardo-
>   
>
> ------------------------------------------------------------------------
>
> Subject:
> [Xen-users] errors with make tools and make docs
> From:
> Ricardo <djrico@xxxxxxx>
> Date:
> Sun, 05 Nov 2006 13:22:20 -0500
> To:
> xen-users@xxxxxxxxxxxxxxxxxxx
>
> To:
> xen-users@xxxxxxxxxxxxxxxxxxx
>
> Return-Path:
> <xen-users-bounces@xxxxxxxxxxxxxxxxxxx>
> Received:
> from po12.mit.edu ([unix socket]) by po12.mit.edu (Cyrus v2.1.5) with
> LMTP; Sun, 05 Nov 2006 12:45:15 -0500
> X-Sieve:
> CMU Sieve 2.2
> Received:
> from fort-point-station.mit.edu by po12.mit.edu (8.13.6/4.7) id
> kA5HjBBw019131; Sun, 5 Nov 2006 12:45:14 -0500 (EST)
> Received:
> from mit.edu (W92-130-BARRACUDA-2.MIT.EDU [18.7.21.223]) by
> fort-point-station.mit.edu (8.13.6/8.9.2) with ESMTP id kA5HihCu015575
> for <djrico@xxxxxxx>; Sun, 5 Nov 2006 12:44:43 -0500 (EST)
> Received:
> from lists.xensource.com (vm04-bcn-london.deploy.xenoserver.org
> [217.147.82.229]) by mit.edu (Spam Firewall) with ESMTP id 98137293785
> for <djrico@xxxxxxx>; Sun, 5 Nov 2006 12:44:40 -0500 (EST)
> Received:
> from localhost ([127.0.0.1] helo=lists.xensource.com) by
> host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id
> 1Ggm34-0003Q8-C4; Sun, 05 Nov 2006 17:44:46 +0000
> Received:
> from [192.168.0.10] (helo=lists.xensource.com) by
> host-192-168-0-1-bcn-london with esmtp (Exim 4.50) id 1Ggm32-0003Q0-3H
> for xen-users@xxxxxxxxxxxxxxxxxxx; Sun, 05 Nov 2006 17:44:44 +0000
> Received:
> from biscayne-one-station.mit.edu ([18.7.7.80]) by lists.xensource.com
> with esmtp (Exim 4.50) id 1Ggm2x-0008Vj-Bd for
> xen-users@xxxxxxxxxxxxxxxxxxx; Sun, 05 Nov 2006 17:44:42 +0000
> Received:
> from outgoing.mit.edu (OUTGOING-AUTH.MIT.EDU [18.7.22.103]) by
> biscayne-one-station.mit.edu (8.13.6/8.9.2) with ESMTP id
> kA5HiCib000439 for <xen-users@xxxxxxxxxxxxxxxxxxx>; Sun, 5 Nov 2006
> 12:44:12 -0500 (EST)
> Received:
> from [18.252.6.215] (EDGERTON-FOUR-SEVENTY.MIT.EDU [18.252.6.215])
> (authenticated bits=0) (User authenticated as djrico@xxxxxxxxxxxxxx)
> by outgoing.mit.edu (8.13.6/8.12.4) with ESMTP id kA5Hi3L0025748
> (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT)
> for <xen-users@xxxxxxxxxxxxxxxxxxx>; Sun, 5 Nov 2006 12:44:10 -0500 (EST)
> Message-ID:
> <454E2BDC.4020102@xxxxxxx>
> User-Agent:
> Thunderbird 1.5.0.7 (X11/20061028)
> MIME-Version:
> 1.0
> Content-Type:
> text/plain; charset=ISO-8859-1
> X-Scanned-By:
> MIMEDefang 2.42
> X-SA-Exim-Connect-IP:
> 18.7.7.80
> X-SA-Exim-Mail-From:
> djrico@xxxxxxx
> X-Spam-Checker-Version:
> SpamAssassin 3.1.0 (2005-09-13) on (none)
> X-Spam-Status:
> No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.1.0
> X-SA-Exim-Version:
> 4.2.1 (built Mon, 27 Mar 2006 13:42:28 +0200)
> X-SA-Exim-Scanned:
> Yes (on lists.xensource.com)
> X-BeenThere:
> xen-users@xxxxxxxxxxxxxxxxxxx
> X-Mailman-Version:
> 2.1.5
> Precedence:
> list
> List-Id:
> Xen user discussion <xen-users.lists.xensource.com>
> List-Unsubscribe:
> <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>,
> <mailto:xen-users-request@xxxxxxxxxxxxxxxxxxx?subject=unsubscribe>
> List-Post:
> <mailto:xen-users@xxxxxxxxxxxxxxxxxxx>
> List-Help:
> <mailto:xen-users-request@xxxxxxxxxxxxxxxxxxx?subject=help>
> List-Subscribe:
> <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-users>,
> <mailto:xen-users-request@xxxxxxxxxxxxxxxxxxx?subject=subscribe>
> Sender:
> xen-users-bounces@xxxxxxxxxxxxxxxxxxx
> Errors-To:
> xen-users-bounces@xxxxxxxxxxxxxxxxxxx
> X-Spam-Score:
> 0.12
> X-Spam-Flag:
> NO
> Content-Transfer-Encoding:
> 7bit
>
>
> Two errors have come up, one while attempting make tools and another
> while attempting make docs.
>
> 1) make tools fails while trying to compile pygrub
>
>   This is the error that I get, plus some information that comes beforehand:
>
> make[2]: Entering directory `/usr/src/xen-3.0.3-testing.hg/tools/pygrub'
> CFLAGS="-O2 -fomit-frame-pointer -DNDEBUG -m32 -march=i686 -Wall
> -Wstrict-proto
> ypes -Wdeclaration-after-statement  -D__XEN_TOOLS__" python setup.py build
> running build
> running build_py
> running build_ext
> building 'grub.fsys.reiser._pyreiser' extension
> i686-pc-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -O2
> -fomit-frame-p
> inter -DNDEBUG -m32 -march=i686 -Wall -Wstrict-prototypes
> -Wdeclaration-after-s
> atement -D__XEN_TOOLS__ -fPIC -I/usr/include/python2.4 -c
> src/fsys/reiser/reise
> module.c -o build/temp.linux-i686-2.4/src/fsys/reiser/reisermodule.o
> -fno-stric
> -aliasing -Wall -Werror
> src/fsys/reiser/reisermodule.c:20:26: error: dal/file_dal.h: No such
> file or di
> ectory
> src/fsys/reiser/reisermodule.c: In function 'file_dal_close':
> src/fsys/reiser/reisermodule.c:49: error: 'dal_t' has no member named 'dev'
> cc1: warnings being treated as errors
> src/fsys/reiser/reisermodule.c:50: warning: implicit declaration of
> function 'd
> l_free'
> src/fsys/reiser/reisermodule.c: In function 'reiser_fs_open':
> src/fsys/reiser/reisermodule.c:221: warning: implicit declaration of
> function '
> ile_dal_open'
> src/fsys/reiser/reisermodule.c:221: warning: assignment makes pointer
> from inte
> er without a cast
> error: command 'i686-pc-linux-gnu-gcc' failed with exit status 1
> make[2]: *** [build] Error 1
> make[2]: Leaving directory `/usr/src/xen-3.0.3-testing.hg/tools/pygrub'
> make[1]: *** [install] Error 2
> make[1]: Leaving directory `/usr/src/xen-3.0.3-testing.hg/tools'
> make: *** [install-tools] Error 2
>
>   I have read the README in the tools/pygrub directory, and have the
> package progsreiserfs installed, as I'm running a Gentoo system and my
> rootfs is formatted as reiserfs.  I re-emerged progsreiserfs with no
> improvement in behavior.
>
> 2) make docs fails when converting latex to html
>
>   Here's the error:
>
> make[2]: Entering directory `/usr/src/xen-3.0.3-testing.hg/docs'
> install -d -m0755 html/user
> latex2html -split 0 -show_section_numbers -toc_depth 3 -nonavigation \
>         -numbered_footnotes -local_icons -noinfo -math -dir html/user \
>         src/user.tex 1>/dev/null 2>/dev/null
> make[2]: *** [html/user/index.html] Error 2
> make[2]: Leaving directory `/usr/src/xen-3.0.3-testing.hg/docs'
> make[1]: *** [html] Error 2
> rm user.dvi interface.dvi
> make[1]: Leaving directory `/usr/src/xen-3.0.3-testing.hg/docs'
>
>   Now I have latex2html and all other packages listed as required by Xen
> for documentation installed.
>
>   The second issue really isn't as important; I can get pdf and
> man-pages and such built and installed without a problem.  I do,
> however, want and need the tools installed properly.  Any help would be
> appreciated.
>
> -Ricardo-
>
> _______________________________________________
> Xen-users mailing list
> Xen-users@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-users
>
>   
> ------------------------------------------------------------------------
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
>   

/*
    dal.h -- device independent interface.
    Copyright (C) 2001, 2002 Yury Umanets.
*/

#ifndef DAL_H
#define DAL_H

#include <sys/types.h>

typedef unsigned long blk_t;
typedef unsigned long count_t;

struct dal_ops;

struct dal {
    int flags;
    void *data;
    void *entity;
    unsigned blocksize;
    struct dal_ops *ops;
    char name[256], error[256];
};

typedef struct dal dal_t;

struct dal_ops {
    int (*read)(dal_t *, void *, blk_t, count_t);
    int (*write)(dal_t *, void *, blk_t, count_t);
    int (*sync)(dal_t *);
    int (*flags)(dal_t *);
    int (*equals)(dal_t *, dal_t *);
    unsigned int (*stat)(dal_t *);
    count_t (*len)(dal_t *);
};

extern void *libdal_malloc(size_t size);
extern void *libdal_calloc(size_t size, char c);
extern int libdal_realloc(void **old, size_t size);
extern void libdal_free(void* ptr);

extern dal_t *dal_open(struct dal_ops *ops, unsigned blocksize, 
    int flags, void *data);

extern void dal_close(dal_t *dal);

extern int dal_set_blocksize(dal_t *dal, unsigned blocksize);
extern unsigned dal_get_blocksize(dal_t *dal);

extern int dal_read(dal_t *dal, void *buff, blk_t block, count_t count);
extern int dal_write(dal_t *dal, void *buff, blk_t block, count_t count);
extern int dal_sync(dal_t *dal);
extern int dal_flags(dal_t *dal);
extern int dal_equals(dal_t *dal1, dal_t *dal2);

extern unsigned int dal_stat(dal_t *dal);
extern count_t dal_len(dal_t *dal);

extern char *dal_name(dal_t *dal);
extern char *dal_error(dal_t *dal);

#endif
/*
    file.h -- standard file device that works via device interface.
    Copyright (C) 2001, 2002 Yury Umanets.
*/

#ifndef FILE_DAL_H
#define FILE_DAL_H

#include <dal/dal.h>

extern dal_t *file_open(const char *file, unsigned blocksize, int flags);
extern int file_reopen(dal_t *dal, int flags);
extern void file_close(dal_t *dal);

#endif

/*
 * reisermodule.c - simple python binding for libreiserfs{2,3}
 *
 * Copyright (C) 2005 Nguyen Anh Quynh <aquynh@xxxxxxxxx>
 *
 * This software may be freely redistributed under the terms of the GNU
 * general public license.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */

#include <Python.h>

#include <fcntl.h>
#include <stdlib.h>
#include <stdio.h>

#include <dal/file.h>
#include <reiserfs/reiserfs.h>

#if (PYTHON_API_VERSION >= 1011)
#define PY_PAD 
0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L,0L
#else
#define PY_PAD 0L,0L,0L,0L
#endif


/* global error object */
PyObject *ReiserError;

typedef struct {
    PyObject_HEAD
    reiserfs_fs_t *fs;
        dal_t *dal;
} ReiserFs;

typedef struct _ReiserFile ReiserFile;
struct _ReiserFile {
    PyObject_HEAD
    reiserfs_file_t *file;
};

void file_dal_close(dal_t *dal) {

        if (!dal) return;

        close((int)(unsigned long)dal->dev);
        dal_free(dal);
}

/* reiser file object */

static PyObject *
reiser_file_close (ReiserFile *file, PyObject *args)
{
    if (file->file != NULL)
        {
        reiserfs_file_close(file->file);
                file->file = NULL;
        }
    Py_INCREF(Py_None);
    return Py_None;
}

static PyObject *
reiser_file_read (ReiserFile *file, PyObject *args)
{
    int size = 0;
    size_t n, total = 0;
    PyObject * buffer = NULL;

    if (file->file == NULL) {
        PyErr_SetString(PyExc_ValueError, "Cannot read from closed file");
        return NULL;
    }

    if (!PyArg_ParseTuple(args, "|i", &size))
        return NULL;

    buffer = PyString_FromStringAndSize((char *) NULL, (size) ? size : 4096);
    if (buffer == NULL)
        return buffer;
 
    while (1) {
        n = reiserfs_file_read(file->file, PyString_AS_STRING(buffer) + total, 
                               (size) ? size : 4096);
        if (n == 0)
            break;

        total += n;

        if (size && size == total)
            break;

        if (!size) {
            _PyString_Resize(&buffer, total + 4096);
        }
    }

    _PyString_Resize(&buffer, total);
    return buffer;
}

static void
reiser_file_dealloc (ReiserFile * file)
{
    if (file->file != NULL) {
        reiserfs_file_close(file->file);
                file->file = NULL;
        }
        PyObject_DEL(file);
}

static struct PyMethodDef ReiserFileMethods[] = {
        { "close", (PyCFunction) reiser_file_close, METH_VARARGS, NULL },
        { "read", (PyCFunction) reiser_file_read, METH_VARARGS, NULL },
        { NULL, NULL, 0, NULL } 
};

static PyObject *
reiser_file_getattr (ReiserFile * file, char * name)
{
        return Py_FindMethod (ReiserFileMethods, (PyObject *) file, name);
}

static char ReiserFileType__doc__[] = "This is the reiser filesystem object";
PyTypeObject ReiserFileType = {
        PyObject_HEAD_INIT(&PyType_Type)
        0,                              /* ob_size */
        "ReiserFile",                   /* tp_name */
        sizeof(ReiserFile),             /* tp_size */
        0,                              /* tp_itemsize */
        (destructor) reiser_file_dealloc,       /* tp_dealloc */
        0,                              /* tp_print */
        (getattrfunc) reiser_file_getattr,      /* tp_getattr */
        0,                              /* tp_setattr */
        0,                              /* tp_compare */
        0,                              /* tp_repr */
        0,                              /* tp_as_number */
        0,                              /* tp_as_sequence */
        0,                              /* tp_as_mapping */
        0,              /* tp_hash */
        0,              /* tp_call */
        0,              /* tp_str */
        0,                              /* tp_getattro */
        0,                              /* tp_setattro */
        0,                              /* tp_as_buffer */
        Py_TPFLAGS_DEFAULT,                     /* tp_flags */
        ReiserFileType__doc__,
        PY_PAD
};

static PyObject *
reiser_file_open (ReiserFs *fs, char *name, int flags)
{
    ReiserFile *file;
    reiserfs_file_t *f;

    file = (ReiserFile *) PyObject_NEW(ReiserFile, &ReiserFileType);

    f = reiserfs_file_open(fs->fs, name, flags);
    file->file = f;
    
    if (!f) {
        PyErr_SetString(PyExc_ValueError, "unable to open file");
        return NULL;
    }

    return (PyObject *) file;
}

static PyObject *
reiser_file_exist (ReiserFs *fs, char *name)
{
    reiserfs_file_t *f;

    f = reiserfs_file_open(fs->fs, name, O_RDONLY);

        if (!f) {
                Py_INCREF(Py_False);
                return Py_False;
        }
        reiserfs_file_close(f);
    Py_INCREF(Py_True);
    return Py_True;
}

/* reiserfs object */

static PyObject *
reiser_fs_close (ReiserFs *fs, PyObject *args)
{
    if (fs->fs != NULL)
    {
        reiserfs_fs_close(fs->fs);
        file_dal_close(fs->dal);
                fs->fs = NULL;
    }
    Py_INCREF(Py_None);
    return Py_None;
}

static PyObject *
reiser_fs_open (ReiserFs *fs, PyObject *args)
{
    char *name;
        size_t block_size = DEFAULT_BLOCK_SIZE;
    dal_t *dal;
    reiserfs_fs_t *rfs;

    if (!PyArg_ParseTuple(args, "s|i", &name, &block_size))
        return NULL;

    if (fs->fs != NULL) {
        PyErr_SetString(PyExc_ValueError, "already have an fs object");
        return NULL;
    }

    if (!(dal = file_dal_open(name, block_size, O_RDONLY))) {
        PyErr_SetString(PyExc_ValueError, "Couldn't create device abstraction");
        return NULL;    
    }
    
    if (!(rfs = reiserfs_fs_open_fast(dal, dal))) {
                file_dal_close(dal);
        PyErr_SetString(PyExc_ValueError, "unable to open file");
        return NULL;
    }
    
    fs->fs = rfs;
        fs->dal = dal;

    Py_INCREF(Py_None);
    return Py_None;
}

static PyObject *
reiser_fs_open_file (ReiserFs *fs, PyObject *args)
{
    char *name;
    int flags = 0;

    if (!PyArg_ParseTuple(args, "s|i", &name, &flags))
                return NULL;

    return reiser_file_open(fs, name, flags);
}

static PyObject *
reiser_fs_file_exist (ReiserFs *fs, PyObject *args)
{
    char * name;

    if (!PyArg_ParseTuple(args, "s", &name))
        return NULL;

    return reiser_file_exist(fs, name);
}

static void
reiser_fs_dealloc (ReiserFs * fs)
{
    if (fs->fs != NULL)
        {
        reiserfs_fs_close(fs->fs);
                file_dal_close(fs->dal);
                fs->fs = NULL;
        }
        PyObject_DEL(fs);
}

static struct PyMethodDef ReiserFsMethods[] = {
        { "close", (PyCFunction) reiser_fs_close, METH_VARARGS, NULL },
        { "open", (PyCFunction) reiser_fs_open, METH_VARARGS, NULL },
        { "open_file", (PyCFunction) reiser_fs_open_file, METH_VARARGS, NULL },
        { "file_exist", (PyCFunction) reiser_fs_file_exist, METH_VARARGS, NULL 
},
        { NULL, NULL, 0, NULL } 
};

static PyObject *
reiser_fs_getattr (ReiserFs * fs, char * name)
{
        return Py_FindMethod (ReiserFsMethods, (PyObject *) fs, name);
}

static char ReiserFsType__doc__[] = "This is the reiser filesystem object";

PyTypeObject ReiserFsType = {
        PyObject_HEAD_INIT(&PyType_Type)
        0,                              /* ob_size */
        "ReiserFs",             /* tp_name */
        sizeof(ReiserFs),               /* tp_size */
        0,                              /* tp_itemsize */
        (destructor) reiser_fs_dealloc,         /* tp_dealloc */
        0,                              /* tp_print */
        (getattrfunc) reiser_fs_getattr,        /* tp_getattr */
        0,                              /* tp_setattr */
        0,                              /* tp_compare */
        0,                              /* tp_repr */
        0,                              /* tp_as_number */
        0,                              /* tp_as_sequence */
        0,                              /* tp_as_mapping */
        0,              /* tp_hash */
        0,              /* tp_call */
        0,              /* tp_str */
        0,                              /* tp_getattro */
        0,                              /* tp_setattro */
        0,                              /* tp_as_buffer */
        Py_TPFLAGS_DEFAULT,                     /* tp_flags */
        ReiserFsType__doc__,
        PY_PAD
};

static PyObject *
reiser_fs_new(PyObject *o, PyObject *args) 
{
    char *name;
        size_t block_size = DEFAULT_BLOCK_SIZE;
    ReiserFs *pfs;
    
    if (!PyArg_ParseTuple(args, "s|i", &name, &block_size))
        return NULL;
    
    pfs = (ReiserFs *) PyObject_NEW(ReiserFs, &ReiserFsType);
    if (pfs == NULL)
        return NULL;

    pfs->fs = NULL;
    
    if (!reiser_fs_open(pfs, Py_BuildValue("si", name, block_size)))
        return NULL;
    
    return (PyObject *)pfs;
}

static struct PyMethodDef ReiserModuleMethods[] = {
    { "ReiserFs", (PyCFunction) reiser_fs_new, METH_VARARGS},
    { NULL, NULL, 0}
};

void init_pyreiser(void) {
    Py_InitModule("_pyreiser", ReiserModuleMethods);
}
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.