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: corentin.labbe
Subject: Re: [Freeipmi-users] sparc64 compilation errors
Date: Wed, 14 Mar 2007 22:58:03 +0100
User-agent: Thunderbird 1.5.0.10 (X11/20070304)

Al Chu a écrit :
On Wed, 2007-03-14 at 21:36 +0100, corentin.labbe wrote:
./asm-sparc64/types.h:typedef unsigned int u32;

This looks as promising as anything else.  Could you try adding:

#include <asm-sparc64/types.h>

into

libfreeipmi/src/ipmi-inband.h like this
#elif defined(HAVE_ASM_IO_H)
/* PPC */
+ # include <asm-sparc64/types.h>
# include <asm/io.h>
#endif

and see if it compiles?
Also, do you have a asm/types.h file?  Does it load asm-sparc/types.h or
asm-sparce64/types.h depending on what architecture you are on?

Al



Yes i have a asm/types.h which loads the types.h depending of the architectures

With just this modification i have this 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/types.h:4,
                 from /usr/include/linux/types.h:15,
                 from /usr/include/asm-sparc/io.h:8,
                 from /usr/include/asm/io.h:4,
                 from ipmi-inband.h:47,
                 from ipmi-kcs-api.c:45:
/usr/include/asm-sparc/types.h:31: error: conflicting types for '__s64'
/usr/include/asm-sparc64/types.h:31: error: previous declaration of '__s64' was 
here
/usr/include/asm-sparc/types.h:32: error: conflicting types for '__u64'
/usr/include/asm-sparc64/types.h:32: error: previous declaration of '__u64' was 
here
In file included from /usr/include/asm/io.h:4,
                 from ipmi-inband.h:47,
                 from ipmi-kcs-api.c:45:
/usr/include/asm-sparc/io.h:16: error: syntax error before "flip_dword"
etc...

If i just put <asm/types.h> i have the error of my first posting
Strange, like not detecting 64bit platform.


After some tests it compiles with:
/* Linux, _AXP_ */
# include <sys/io.h>
#elif defined(HAVE_ASM_IO_H)
/* PPC */
typedef unsigned int u32;
typedef unsigned char u8;
typedef unsigned short u16;
#include <asm/types.h>
# include <asm/io.h>
#endif

but at the end if fails with
*** Warning: Linking the executable udm-test against the loadable module
*** libfreeipmi.so is not portable!
gcc -Wall -g -O2 -o .libs/udm-test udm-test.o  
../../libfreeipmi/src/.libs/libfreeipmi.so /usr/lib/libgcrypt.so 
/usr/lib/libgpg-error.so -lnsl -lm
../../libfreeipmi/src/.libs/libfreeipmi.so: undefined reference to `iopl'
collect2: ld returned 1 exit status

When i detected the strange 64bit detection i test with
/* Linux, _AXP_ */
# include <sys/io.h>
#elif defined(HAVE_ASM_IO_H)
/* PPC */
typedef unsigned int u32;
typedef unsigned char u8;
typedef unsigned short u16;
#define __arch64__
#include <asm/types.h>
# include <asm/io.h>
#endif
but it fails with

/usr/include/asm-sparc64/types.h:31: error: conflicting types for '__s64'
/usr/include/asm-sparc/types.h:31: error: previous declaration of '__s64' was 
here
/usr/include/asm-sparc64/types.h:32: error: conflicting types for '__u64'
/usr/include/asm-sparc/types.h:32: error: previous declaration of '__u64' was 
here

It's late:)
I will test more tomorow.




reply via email to

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