freeipmi-users
[Top][All Lists]
Advanced

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

Re: [Freeipmi-users] sparc64 compilation errors


From: Albert Chu
Subject: Re: [Freeipmi-users] sparc64 compilation errors
Date: Sun, 11 Mar 2007 16:12:32 -0700 (PDT)
User-agent: SquirrelMail/1.4.6

Hi Corentin,

Can you confirm that u16, u32, etc are typedef/defined in
/usr/include/linux/types.h on your machine?

I'm a little perplexed right now.  Since the definition of u16/u32 should
be handled.

Could you also send the config.log output from configure.  Maybe configure
can give us additional information.

Thanks,
Al

> hello
>
> Strange, i send it.
> I resend both as attachment and "in mail".
>
> Cordially
>
> LABBE C.
>
> Albert Chu a écrit :
>> Hi Corentin,
>>
>>
>> I don't see an attachment.  Did you forget to attach?
>>
>> Al
>>
>>> Hello
>>>
>>> This is the io.h requested.
>>> Apparently it's the u32 and u16 typedef who isn't used.
>>>
>>> Cordially
>>>
>>> LABBE C.
>>>
>>> Secondly in configure script, i saw this:
>>> Perhaps it's relevant for you
>>>
>>> checking asm/io.h usability... no
>>> checking asm/io.h presence... yes
>>> configure: WARNING: asm/io.h: present but cannot be compiled
>>> configure: WARNING: asm/io.h:     check for missing prerequisite
>>> headers?
>>> configure: WARNING: asm/io.h: see the Autoconf documentation
>>> configure: WARNING: asm/io.h:     section "Present But Cannot Be
>>> Compiled"
>>> configure: WARNING: asm/io.h: proceeding with the preprocessor's result
>>> configure: WARNING: asm/io.h: in the future, the compiler will take
>>> precedence
>>> configure: WARNING:     ## ------------------------------------- ##
>>> configure: WARNING:     ## Report this to address@hidden ##
>>> configure: WARNING:     ## ------------------------------------- ##
>>> checking for asm/io.h... yes
>>>
>>>
>>> Albert Chu a écrit :
>>>> Hi Corentin,
>>>>
>>>> Don't know about the issue off the top of my head.  From the error
>>>> messages, below it seems like it's a minor typedef/header file porting
>>>> issue.
>>>>
>>>>> /usr/include/asm-sparc/io.h:16: error: syntax error before
>>>>> "flip_dword"
>>>>> /usr/include/asm-sparc/io.h:16: error: syntax error before "l"
>>>> Could you send me this io.h file?  Maybe I can figure it out from
>>>> that.
>>>>
>>>> Al
>>>>
>>>>> Hello
>>>>>
>>>>> I want to use freeipmi on a sun blade100 (sparc64 platform).
>>>>> But freeipmi won't compile.
>>>>>
>>>>> The distribution used is gentoo.
>>>>> I first tried with the "gentoo stable version" of freeipmi 0.2.3
>>>>> It failed with:
>>>>> sys/io.h: No such file or directory
>>>>> I saw that this error is corriged, so i tried lastest version 0.3.1
>>>>> but
>>>>> it
>>>>> also failed
>>>>> This is the error:
>>>>>
>>>>>   gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I./../include
>>>>> -I./../../common/src
>>>>> -DIPMI_IPCKEY=\"/usr/local/var/lib/freeipmi/ipckey\"
>>>>> -DIPMI_DEBUG_IPCKEY=\"../../libfreeipmi/src/ipmi-semaphores.h\"
>>>>> -D_GNU_SOURCE -D_REENTRANT -Wall -g -O2 -MT
>>>>> libfreeipmi_la-ipmi-kcs-api.lo -MD -MP -MF
>>>>> .deps/libfreeipmi_la-ipmi-kcs-api.Tpo -c ipmi-kcs-api.c  -fPIC -DPIC
>>>>> -o
>>>>> .libs/libfreeipmi_la-ipmi-kcs-api.o
>>>>> In file included from /usr/include/asm/io.h:4,
>>>>>                   from ipmi-inband.h:43,
>>>>>                   from ipmi-kcs-api.c:45:
>>>>> /usr/include/asm-sparc/io.h:16: error: syntax error before
>>>>> "flip_dword"
>>>>> /usr/include/asm-sparc/io.h:16: error: syntax error before "l"
>>>>> /usr/include/asm-sparc/io.h: In function `flip_dword':
>>>>> /usr/include/asm-sparc/io.h:18: error: `l' undeclared (first use in
>>>>> this
>>>>> function)
>>>>> /usr/include/asm-sparc/io.h:18: error: (Each undeclared identifier is
>>>>> reported only once
>>>>> /usr/include/asm-sparc/io.h:18: error: for each function it appears
>>>>> in.)
>>>>> /usr/include/asm-sparc/io.h: At top level:
>>>>> /usr/include/asm-sparc/io.h:21: error: syntax error before
>>>>> "flip_word"
>>>>> /usr/include/asm-sparc/io.h:21: error: syntax error before "w"
>>>>> /usr/include/asm-sparc/io.h: In function `flip_word':
>>>>> /usr/include/asm-sparc/io.h:23: error: `w' undeclared (first use in
>>>>> this
>>>>> function)
>>>>> /usr/include/asm-sparc/io.h: At top level:
>>>>> /usr/include/asm-sparc/io.h:32: error: syntax error before
>>>>> "__raw_readb"
>>>>> /usr/include/asm-sparc/io.h: In function `__raw_readb':
>>>>> /usr/include/asm-sparc/io.h:34: error: syntax error before "u8"
>>>>> /usr/include/asm-sparc/io.h: At top level:
>>>>> /usr/include/asm-sparc/io.h:37: error: syntax error before
>>>>> "__raw_readw"
>>>>> /usr/include/asm-sparc/io.h: In function `__raw_readw':
>>>>> /usr/include/asm-sparc/io.h:39: error: syntax error before "u16"
>>>>> /usr/include/asm-sparc/io.h: At top level:
>>>>> /usr/include/asm-sparc/io.h:42: error: syntax error before
>>>>> "__raw_readl"
>>>>> /usr/include/asm-sparc/io.h: In function `__raw_readl':
>>>>> /usr/include/asm-sparc/io.h:44: error: syntax error before "u32"
>>>>> /usr/include/asm-sparc/io.h: At top level:
>>>>> /usr/include/asm-sparc/io.h:47: error: syntax error before "b"
>>>>> /usr/include/asm-sparc/io.h: In function `__raw_writeb':
>>>>> /usr/include/asm-sparc/io.h:49: error: syntax error before "u8"
>>>>> /usr/include/asm-sparc/io.h: At top level:
>>>>> /usr/include/asm-sparc/io.h:52: error: syntax error before "w"
>>>>> /usr/include/asm-sparc/io.h: In function `__raw_writew':
>>>>> /usr/include/asm-sparc/io.h:54: error: syntax error before "u16"
>>>>> /usr/include/asm-sparc/io.h: At top level:
>>>>> /usr/include/asm-sparc/io.h:57: error: syntax error before "l"
>>>>> /usr/include/asm-sparc/io.h: In function `__raw_writel':
>>>>> /usr/include/asm-sparc/io.h:59: error: syntax error before "u32"
>>>>> /usr/include/asm-sparc/io.h: At top level:
>>>>> /usr/include/asm-sparc/io.h:62: error: syntax error before "__readb"
>>>>> /usr/include/asm-sparc/io.h: In function `__readb':
>>>>> /usr/include/asm-sparc/io.h:64: error: syntax error before "u8"
>>>>> /usr/include/asm-sparc/io.h: At top level:
>>>>> /usr/include/asm-sparc/io.h:67: error: syntax error before "__readw"
>>>>> /usr/include/asm-sparc/io.h: In function `__readw':
>>>>> /usr/include/asm-sparc/io.h:69: error: syntax error before "u16"
>>>>> /usr/include/asm-sparc/io.h: At top level:
>>>>> /usr/include/asm-sparc/io.h:72: error: syntax error before "__readl"
>>>>> /usr/include/asm-sparc/io.h: In function `__readl':
>>>>> /usr/include/asm-sparc/io.h:74: error: syntax error before "u32"
>>>>> /usr/include/asm-sparc/io.h: At top level:
>>>>> /usr/include/asm-sparc/io.h:77: error: syntax error before "b"
>>>>> /usr/include/asm-sparc/io.h: In function `__writeb':
>>>>> /usr/include/asm-sparc/io.h:79: error: syntax error before "u8"
>>>>> /usr/include/asm-sparc/io.h: At top level:
>>>>> /usr/include/asm-sparc/io.h:82: error: syntax error before "w"
>>>>> /usr/include/asm-sparc/io.h: In function `__writew':
>>>>> /usr/include/asm-sparc/io.h:84: error: syntax error before "u16"
>>>>> /usr/include/asm-sparc/io.h: At top level:
>>>>> /usr/include/asm-sparc/io.h:87: error: syntax error before "l"
>>>>> /usr/include/asm-sparc/io.h: In function `__writel':
>>>>> /usr/include/asm-sparc/io.h:89: error: syntax error before "u32"
>>>>> /usr/include/asm-sparc/io.h: At top level:
>>>>> /usr/include/asm-sparc/io.h:152: error: syntax error before
>>>>> "_sbus_readb"
>>>>> /usr/include/asm-sparc/io.h: In function `_sbus_readb':
>>>>> /usr/include/asm-sparc/io.h:154: error: syntax error before "u8"
>>>>> /usr/include/asm-sparc/io.h: At top level:
>>>>> /usr/include/asm-sparc/io.h:157: error: syntax error before
>>>>> "_sbus_readw"
>>>>> /usr/include/asm-sparc/io.h: In function `_sbus_readw':
>>>>> /usr/include/asm-sparc/io.h:159: error: syntax error before "u16"
>>>>> /usr/include/asm-sparc/io.h: At top level:
>>>>> /usr/include/asm-sparc/io.h:162: error: syntax error before
>>>>> "_sbus_readl"
>>>>> /usr/include/asm-sparc/io.h: In function `_sbus_readl':
>>>>> /usr/include/asm-sparc/io.h:164: error: syntax error before "u32"
>>>>> /usr/include/asm-sparc/io.h: At top level:
>>>>> /usr/include/asm-sparc/io.h:167: error: syntax error before "b"
>>>>> /usr/include/asm-sparc/io.h: In function `_sbus_writeb':
>>>>> /usr/include/asm-sparc/io.h:169: error: syntax error before "u8"
>>>>> /usr/include/asm-sparc/io.h: At top level:
>>>>> /usr/include/asm-sparc/io.h:172: error: syntax error before "w"
>>>>> /usr/include/asm-sparc/io.h: In function `_sbus_writew':
>>>>> /usr/include/asm-sparc/io.h:174: error: syntax error before "u16"
>>>>> /usr/include/asm-sparc/io.h: At top level:
>>>>> /usr/include/asm-sparc/io.h:177: error: syntax error before "l"
>>>>> /usr/include/asm-sparc/io.h: In function `_sbus_writel':
>>>>> /usr/include/asm-sparc/io.h:179: error: syntax error before "u32"
>>>>> ipmi-kcs-api.c: In function `ipmi_kcs_ctx_io_init':
>>>>> ipmi-kcs-api.c:374: warning: implicit declaration of function `iopl'
>>>>> make[4]: *** [libfreeipmi_la-ipmi-kcs-api.lo] Error 1
>>>>> make[4]: Leaving directory `/root/freeipmi-0.3.1/libfreeipmi/src'
>>>>> make[3]: *** [../../libfreeipmi/src/libfreeipmi.la] Error 2
>>>>> make[3]: Leaving directory `/root/freeipmi-0.3.1/doc/examples'
>>>>> make[2]: *** [all-recursive] Error 1
>>>>> make[2]: Leaving directory `/root/freeipmi-0.3.1/doc'
>>>>> make[1]: *** [all-recursive] Error 1
>>>>> make[1]: Leaving directory `/root/freeipmi-0.3.1'
>>>>> make: *** [all] Error 2
>>>>>
>>>>>
>>>>> If you have any idea to fix that.
>>>>> I am ready to help you, if you need more info.
>>>>> Thanks in advance.
>>>>>
>>>>> Cordialy
>>>>>
>>>>> LABBE C.
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Freeipmi-users mailing list
>>>>> address@hidden
>>>>> http://lists.gnu.org/mailman/listinfo/freeipmi-users
>>>>>
>>>>
>>> _______________________________________________
>>> Freeipmi-users mailing list
>>> address@hidden
>>> http://lists.gnu.org/mailman/listinfo/freeipmi-users
>>>
>>
>>
>
> /*
>   * $Id: io.h,v 1.30 2001/12/21 01:23:21 davem Exp $
>   */
> #ifndef __SPARC_IO_H
> #define __SPARC_IO_H
>
> #include <linux/kernel.h>
> #include <linux/types.h>
> #include <linux/ioport.h>  /* struct resource */
>
> #include <asm/page.h>      /* IO address mapping routines need this */
> #include <asm/system.h>
>
> #define page_to_phys(page)      (((page) - mem_map) << PAGE_SHIFT)
>
> static inline u32 flip_dword (u32 l)
> {
>          return ((l&0xff)<<24) | (((l>>8)&0xff)<<16) |
> (((l>>16)&0xff)<<8)| ((l>>24)&0xff);
> }
>
> static inline u16 flip_word (u16 w)
> {
>          return ((w&0xff) << 8) | ((w>>8)&0xff);
> }
>
> #define mmiowb()
>
> /*
>   * Memory mapped I/O to PCI
>   */
>
> static inline u8 __raw_readb(const volatile void __iomem *addr)
> {
>          return *(__force volatile u8 *)addr;
> }
>
> static inline u16 __raw_readw(const volatile void __iomem *addr)
> {
>          return *(__force volatile u16 *)addr;
> }
>
> static inline u32 __raw_readl(const volatile void __iomem *addr)
> {
>          return *(__force volatile u32 *)addr;
> }
>
> static inline void __raw_writeb(u8 b, volatile void __iomem *addr)
> {
>          *(__force volatile u8 *)addr = b;
> }
>
> static inline void __raw_writew(u16 w, volatile void __iomem *addr)
> {
>          *(__force volatile u16 *)addr = w;
> }
>
> static inline void __raw_writel(u32 l, volatile void __iomem *addr)
> {
>          *(__force volatile u32 *)addr = l;
> }
>
> static inline u8 __readb(const volatile void __iomem *addr)
> {
>          return *(__force volatile u8 *)addr;
> }
>
> static inline u16 __readw(const volatile void __iomem *addr)
> {
>          return flip_word(*(__force volatile u16 *)addr);
> }
>
> static inline u32 __readl(const volatile void __iomem *addr)
> {
>          return flip_dword(*(__force volatile u32 *)addr);
> }
>
> static inline void __writeb(u8 b, volatile void __iomem *addr)
> {
>          *(__force volatile u8 *)addr = b;
> }
>
> static inline void __writew(u16 w, volatile void __iomem *addr)
> {
>          *(__force volatile u16 *)addr = flip_word(w);
> }
>
> static inline void __writel(u32 l, volatile void __iomem *addr)
> {
>          *(__force volatile u32 *)addr = flip_dword(l);
> }
>
> #define readb(__addr)           __readb(__addr)
> #define readw(__addr)           __readw(__addr)
> #define readl(__addr)           __readl(__addr)
> #define readb_relaxed(__addr)   readb(__addr)
> #define readw_relaxed(__addr)   readw(__addr)
> #define readl_relaxed(__addr)   readl(__addr)
>
> #define writeb(__b, __addr)     __writeb((__b),(__addr))
> #define writew(__w, __addr)     __writew((__w),(__addr))
> #define writel(__l, __addr)     __writel((__l),(__addr))
>
> /*
>   * I/O space operations
>   *
>   * Arrangement on a Sun is somewhat complicated.
>   *
>   * First of all, we want to use standard Linux drivers
>   * for keyboard, PC serial, etc. These drivers think
>   * they access I/O space and use inb/outb.
>   * On the other hand, EBus bridge accepts PCI *memory*
>   * cycles and converts them into ISA *I/O* cycles.
>   * Ergo, we want inb & outb to generate PCI memory cycles.
>   *
>   * If we want to issue PCI *I/O* cycles, we do this
>   * with a low 64K fixed window in PCIC. This window gets
>   * mapped somewhere into virtual kernel space and we
>   * can use inb/outb again.
>   */
> #define inb_local(__addr)       __readb((void __iomem *)(unsigned
> long)(__addr))
> #define inb(__addr)             __readb((void __iomem *)(unsigned
> long)(__addr))
> #define inw(__addr)             __readw((void __iomem *)(unsigned
> long)(__addr))
> #define inl(__addr)             __readl((void __iomem *)(unsigned
> long)(__addr))
>
> #define outb_local(__b, __addr) __writeb(__b, (void __iomem *)(unsigned
> long)(__addr))
> #define outb(__b, __addr)       __writeb(__b, (void __iomem *)(unsigned
> long)(__addr))
> #define outw(__w, __addr)       __writew(__w, (void __iomem *)(unsigned
> long)(__addr))
> #define outl(__l, __addr)       __writel(__l, (void __iomem *)(unsigned
> long)(__addr))
>
> #define inb_p(__addr)           inb(__addr)
> #define outb_p(__b, __addr)     outb(__b, __addr)
> #define inw_p(__addr)           inw(__addr)
> #define outw_p(__w, __addr)     outw(__w, __addr)
> #define inl_p(__addr)           inl(__addr)
> #define outl_p(__l, __addr)     outl(__l, __addr)
>
> void outsb(unsigned long addr, const void *src, unsigned long cnt);
> void outsw(unsigned long addr, const void *src, unsigned long cnt);
> void outsl(unsigned long addr, const void *src, unsigned long cnt);
> void insb(unsigned long addr, void *dst, unsigned long count);
> void insw(unsigned long addr, void *dst, unsigned long count);
> void insl(unsigned long addr, void *dst, unsigned long count);
>
> #define IO_SPACE_LIMIT 0xffffffff
>
> /*
>   * SBus accessors.
>   *
>   * SBus has only one, memory mapped, I/O space.
>   * We do not need to flip bytes for SBus of course.
>   */
> static inline u8 _sbus_readb(const volatile void __iomem *addr)
> {
>          return *(__force volatile u8 *)addr;
> }
>
> static inline u16 _sbus_readw(const volatile void __iomem *addr)
> {
>          return *(__force volatile u16 *)addr;
> }
>
> static inline u32 _sbus_readl(const volatile void __iomem *addr)
> {
>          return *(__force volatile u32 *)addr;
> }
>
> static inline void _sbus_writeb(u8 b, volatile void __iomem *addr)
> {
>          *(__force volatile u8 *)addr = b;
> }
>
> static inline void _sbus_writew(u16 w, volatile void __iomem *addr)
> {
>          *(__force volatile u16 *)addr = w;
> }
>
> static inline void _sbus_writel(u32 l, volatile void __iomem *addr)
> {
>          *(__force volatile u32 *)addr = l;
> }
>
> /*
>   * The only reason for #define's is to hide casts to unsigned long.
>   */
> #define sbus_readb(__addr)              _sbus_readb(__addr)
> #define sbus_readw(__addr)              _sbus_readw(__addr)
> #define sbus_readl(__addr)              _sbus_readl(__addr)
> #define sbus_writeb(__b, __addr)        _sbus_writeb(__b, __addr)
> #define sbus_writew(__w, __addr)        _sbus_writew(__w, __addr)
> #define sbus_writel(__l, __addr)        _sbus_writel(__l, __addr)
>
> static inline void sbus_memset_io(volatile void __iomem *__dst, int c,
> __kernel_size_t n)
> {
>          while(n--) {
>                  sbus_writeb(c, __dst);
>                  __dst++;
>          }
> }
>
> static inline void
> _memset_io(volatile void __iomem *dst, int c, __kernel_size_t n)
> {
>          volatile void __iomem *d = dst;
>
>          while (n--) {
>                  writeb(c, d);
>                  d++;
>          }
> }
>
> #define memset_io(d,c,sz)       _memset_io(d,c,sz)
>
> static inline void
> _memcpy_fromio(void *dst, const volatile void __iomem *src,
> __kernel_size_t n)
> {
>          char *d = dst;
>
>          while (n--) {
>                  char tmp = readb(src);
>                  *d++ = tmp;
>                  src++;
>          }
> }
>
> #define memcpy_fromio(d,s,sz)   _memcpy_fromio(d,s,sz)
>
> static inline void
> _memcpy_toio(volatile void __iomem *dst, const void *src, __kernel_size_t
> n)
> {
>          const char *s = src;
>          volatile void __iomem *d = dst;
>
>          while (n--) {
>                  char tmp = *s++;
>                  writeb(tmp, d);
>                  d++;
>          }
> }
>
> #define memcpy_toio(d,s,sz)     _memcpy_toio(d,s,sz)
>
> #ifdef __KERNEL__
>
> /*
>   * Bus number may be embedded in the higher bits of the physical address.
>   * This is why we have no bus number argument to ioremap().
>   */
> extern void __iomem *ioremap(unsigned long offset, unsigned long size);
> #define ioremap_nocache(X,Y)    ioremap((X),(Y))
> extern void iounmap(volatile void __iomem *addr);
>
> /*
>   * Bus number may be in res->flags... somewhere.
>   */
> extern void __iomem *sbus_ioremap(struct resource *res, unsigned long
> offset,
>      unsigned long size, char *name);
> extern void sbus_iounmap(volatile void __iomem *vaddr, unsigned long
> size);
>
>
> /*
>   * At the moment, we do not use CMOS_READ anywhere outside of rtc.c,
>   * so rtc_port is static in it. This should not change unless a new
>   * hardware pops up.
>   */
> #define RTC_PORT(x)   (rtc_port + (x))
> #define RTC_ALWAYS_BCD  0
>
> /* Nothing to do */
> /* P3: Only IDE DMA may need these. XXX Verify that it still does... */
>
> #define dma_cache_inv(_start,_size)             do { } while (0)
> #define dma_cache_wback(_start,_size)           do { } while (0)
> #define dma_cache_wback_inv(_start,_size)       do { } while (0)
>
> #endif
>
> #endif /* !(__SPARC_IO_H) */
>
>
> _______________________________________________
> Freeipmi-users mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/freeipmi-users
>


-- 
Albert Chu
address@hidden
925-422-5311
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory





reply via email to

[Prev in Thread] Current Thread [Next in Thread]