[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Freeipmi-devel] Re: freeipmi 0.8.0b2 on netbsd
From: |
Al Chu |
Subject: |
[Freeipmi-devel] Re: freeipmi 0.8.0b2 on netbsd |
Date: |
Thu, 22 Oct 2009 13:20:55 -0700 |
Hey John,
Thanks for the input. Everything should be fixed in beta3. I'll try to
release it today or tomorrow.
Al
On Wed, 2009-10-21 at 12:47 -0700, john heasley wrote:
> gcc -g -O0 -DHAVE_CONFIG_H -I. -I. -I../../../config
> -I../../../common/src/debugutil -I../../../common/src/miscutil
> -I../../../common/src/portability -I../../../libfreeipmi/include
> -I../../../libfreeipmi/src -D_GNU_SOURCE -D_REENTRANT -I/usr/pkg/include -MT
> libapi_la-ipmi-api-util.lo -MD -MP -MF .deps/libapi_la-ipmi-api-util.Tpo -c
> ipmi-api-util.c -fPIC -DPIC -o .libs/libapi_la-ipmi-api-util.o
> In file included from ipmi-api-util.c:39:
> ipmi-api-defs.h:119: error: field 'last_send' has incomplete type
> ipmi-api-defs.h:120: error: field 'last_received' has incomplete type
> *** [libapi_la-ipmi-api-util.lo] Error code 1
>
> ipmi-api-defs.h needs sys/time.h
>
>
> gcc -g -O0 -DHAVE_CONFIG_H -I. -I. -I../../../config
> -I../../../libfreeipmi/include -I../../../libfreeipmi/src
> -I../../../common/src/portability
> -DIPMI_IPCKEY=\"/usr/local/var/lib/freeipmi/ipckey\"
> -DIPMI_DEBUG_IPCKEY=\"../../../libfreeipmi/src/ipmi-semaphores.h\"
> -D_GNU_SOURCE -D_REENTRANT -I/usr/pkg/include -MT
> libdriver_la-ipmi-kcs-driver.lo -MD -MP -MF
> .deps/libdriver_la-ipmi-kcs-driver.Tpo -c ipmi-kcs-driver.c -fPIC -DPIC -o
> .libs/libdriver_la-ipmi-kcs-driver.o
> ipmi-kcs-driver.c: In function '_set_kcs_ctx_errnum_by_errno':
> ipmi-kcs-driver.c:208: error: called object '__errno' is not a function
> ipmi-kcs-driver.c:210: error: called object '__errno' is not a function
> ipmi-kcs-driver.c:212: error: called object '__errno' is not a function
> ipmi-kcs-driver.c:214: error: called object '__errno' is not a function
> ipmi-kcs-driver.c:216: error: called object '__errno' is not a function
> ipmi-kcs-driver.c:218: error: called object '__errno' is not a function
> ipmi-kcs-driver.c:220: error: called object '__errno' is not a function
> ipmi-kcs-driver.c:222: error: called object '__errno' is not a function
> ipmi-kcs-driver.c:224: error: called object '__errno' is not a function
> *** Error code 1
>
> its customary for the __ prefix to be reserved for o/s includes and
> libs. the _ prefix or __ postfix would correct this problem, which
> occurs in several places in the code.
>
> and, libfreeipmi/src/driver/ipmi-ssif-driver.c and
> libfreeipmi/src/interface/ipmi-lan-interface.c need limits.h.
>
> KCS_ERR_SYSTEM_ERROR() is not defined; I think this is the intended
> code:
>
> --- freeipmi-0.8.0.beta2.orig/libfreeipmi/src/driver/ipmi-kcs-driver.c
> 2009-10-
> 02 17:26:25.000000000 +0000
> +++ freeipmi-0.8.0.beta2/libfreeipmi/src/driver/ipmi-kcs-driver.c
> 2009-10-
> 19 22:40:54.000000000 +0000
> @@ -200,7 +200,7 @@
> };
>
> static void
> -_set_kcs_ctx_errnum_by_errno (ipmi_kcs_ctx_t ctx, int __errno)
> +_set_kcs_ctx_errnum_by_errno (ipmi_kcs_ctx_t ctx, int _errno)
> {
> if (!ctx || ctx->magic != IPMI_KCS_CTX_MAGIC)
> return;
> @@ -507,7 +507,8 @@
> }
> #else /* !HAVE_IOPL */
> /* otherwise, we always return a system error */
> - KCS_ERR_SYSTEM_ERROR (0);
> + ctx->errnum = IPMI_KCS_ERR_SYSTEM_ERROR;
> + return (-1);
> #endif /* !HAVE_IOPL */
> #endif /* !__FreeBSD__ */
>
>
> and, there is a mutex locking error in ipmi-kcs-driver.c, unlocking an
> unlocked mutex. a possible fix is:
>
> diff -du
> freeipmi-0.8.0.beta2.orig/ipmiconsole/src/libipmiconsole/ipmiconsole_en
> gine.c
> freeipmi-0.8.0.beta2/ipmiconsole/src/libipmiconsole/ipmiconsole_engine.c
> ---
> freeipmi-0.8.0.beta2.orig/ipmiconsole/src/libipmiconsole/ipmiconsole_engine.
> c 2009-10-02 17:26:23.000000000 +0000
> +++ freeipmi-0.8.0.beta2/ipmiconsole/src/libipmiconsole/ipmiconsole_engine.c
>
> 2009-10-19 22:53:26.000000000 +0000
> @@ -1153,7 +1153,7 @@
> {
> IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr)));
> errno = perr;
> - goto cleanup;
> + return(-1);
> }
>
> if ((perr = pthread_attr_init (&attr)))
> @@ -1193,12 +1193,14 @@
> rv = 0;
> cleanup:
>
> +#if 0
> if ((perr = pthread_mutex_unlock (&console_engine_thread_count_mutex)))
> {
> IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr)));
> errno = perr;
> return (-1);
> }
> +#endif
>
> return (rv);
> }
>
> there are a few more mutex errors in the code, such as destroying locked
> mutexes, I haven't tried to fix those.
>
> thanks for the free tool.
>
> Cheers
--
Albert Chu
address@hidden
Computer Scientist
High Performance Systems Division
Lawrence Livermore National Laboratory
- [Freeipmi-devel] Re: freeipmi 0.8.0b2 on netbsd,
Al Chu <=