LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 01-22-2013, 11:42 AM   #1
zoox
LQ Newbie
 
Registered: Jan 2013
Distribution: Slackware 14
Posts: 1

Rep: Reputation: Disabled
XEN problem with libelf-tools.c during compilation


Hi,
I am trying install XEN 4.2.1 on Slackware 14, I am getting an error message during compilation. I have already installed libelf.

Code:
 In function 'elf_access_unsigned':
../../xen/common/libelf/libelf-tools.c:45:28: error: '__w.__l[1]' may be used uninitialized in this function [-Werror=uninitialized]
../../xen/common/libelf/libelf-tools.c: In function 'elf_access_signed':
../../xen/common/libelf/libelf-tools.c:73:28: error: '__w.__l[1]' may be used uninitialized in this function [-Werror=uninitialized]
cc1: all warnings being treated as errors
make[5]: *** [libelf-tools.o] Error 1
make[5]: Leaving directory `/home/download/App/xen-4.2.1/tools/libxc'
make[4]: *** [build] Error 2
make[4]: Leaving directory `/home/download/App/xen-4.2.1/tools/libxc'
make[3]: *** [subdir-install-libxc] Error 2
make[3]: Leaving directory `/home/download/App/xen-4.2.1/tools'
make[2]: *** [subdirs-install] Error 2
make[2]: Leaving directory `/home/download/App/xen-4.2.1/tools'
make[1]: *** [install-tools] Error 2
make[1]: Leaving directory `/home/download/App/xen-4.2.1'
make: *** [world] Error 2
part of libelf-tools.c (line 45 and 73 are underlined)
Code:
uint64_t elf_access_unsigned(struct elf_binary * elf, const void *ptr,
                             uint64_t offset, size_t size)
{
    int need_swap = elf_swap(elf);
    const uint8_t *u8;
    const uint16_t *u16;
    const uint32_t *u32;
    const uint64_t *u64;

    switch ( size )
    {
    case 1:
        u8 = ptr + offset;
        return *u8;
    case 2:
        u16 = ptr + offset;
        return need_swap ? bswap_16(*u16) : *u16;
    case 4:
        u32 = ptr + offset;
        return need_swap ? bswap_32(*u32) : *u32;
    case 8:
        u64 = ptr + offset;
        return need_swap ? bswap_64(*u64) : *u64;  
    default:
        return 0;
    }
}

int64_t elf_access_signed(struct elf_binary *elf, const void *ptr,
                          uint64_t offset, size_t size)
{
    int need_swap = elf_swap(elf);
    const int8_t *s8;
    const int16_t *s16;
    const int32_t *s32;
    const int64_t *s64;

    switch ( size )
    {
    case 1:
        s8 = ptr + offset;
        return *s8;
    case 2:
        s16 = ptr + offset;
        return need_swap ? bswap_16(*s16) : *s16;
    case 4:
        s32 = ptr + offset;
        return need_swap ? bswap_32(*s32) : *s32;
    case 8:
        s64 = ptr + offset;
        return need_swap ? bswap_64(*s64) : *s64;  
    default:
        return 0;
    }
Does someone know how to solve this problem?
Thank you

Last edited by zoox; 01-23-2013 at 04:43 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Management tools for Xen, KVM ThomasRonshof Linux - Virtualization and Cloud 4 05-22-2012 06:57 AM
Xen-tools compile error in Xen shadowers Linux - Server 2 07-12-2011 06:21 AM
xen-tools shows conffiles when I do dpkg -s xen-tools is it an error tkmsr Debian 2 04-09-2010 04:27 AM
LXer: Managing Xen With Xen-Tools, Xen-Shell, And Argo LXer Syndicated Linux News 0 11-05-2006 12:21 PM
LXer: Managing Xen With Xen-Tools, Xen-Shell, And Argo LXer Syndicated Linux News 0 10-21-2006 11:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 04:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration