Bug 132308 - hddtemp uclibc issues
|
Bug#:
132308
|
Product: Gentoo Linux
|
Version: unspecified
|
Platform: All
|
|
OS/Version: Linux
|
Status: RESOLVED
|
Severity: normal
|
Priority: P2
|
|
Resolution: FIXED
|
Assigned To: spock@gentoo.org
|
Reported By: aurelien.francillon@inrialpes.fr
|
|
Component: Ebuilds
|
|
|
URL:
|
|
Summary: hddtemp uclibc issues
|
|
Keywords:
|
|
Status Whiteboard:
|
|
Opened: 2006-05-04 19:52 0000
|
Hi,
hddtemp fails to build on a uclibc/hardened host, the issues are relevant to
uclibc / nls /iconv
there is thre bugs:
1)
backtrace.c:24:22: execinfo.h: No such file or directory
backtrace.c: In function `backtrace_handler':
backtrace.c:114: warning: implicit declaration of function `backtrace'
backtrace.c:117: warning: implicit declaration of function `backtrace_symbols'
backtrace.c:117: warning: assignment makes pointer from integer without a cast
backtrace.c:46: warning: unused variable `old_eip'
backtrace.c:46: warning: unused variable `old_ebp'
2)
utf8.c:27:19: iconv.h: No such file or directory
utf8.c: In function `iconv_from_utf8_to_locale':
utf8.c:40: error: `iconv_t' undeclared (first use in this function)
utf8.c:40: error: (Each undeclared identifier is reported only once
utf8.c:40: error: for each function it appears in.)
utf8.c:40: error: syntax error before "cd"
utf8.c:58: error: `cd' undeclared (first use in this function)
utf8.c:58: warning: implicit declaration of function `iconv_open'
utf8.c:71: warning: implicit declaration of function `iconv'
utf8.c:87: warning: implicit declaration of function `iconv_close'
3)
hddtemp.c:254: warning: implicit declaration of function `bindtextdomain'
hddtemp.c:255: warning: implicit declaration of function `textdomain'
hddtemp-hddtemp.o: In function `main':
hddtemp.c:(.text+0x3d2): undefined reference to `bindtextdomain'
hddtemp.c:(.text+0x3da): undefined reference to `textdomain'
collect2: ld returned 1 exit status
I will provides the patches. I can't test it fully as my hd doesn't have a
temperature sensor :(
But as far as i can test, it's ok, however some more testing might be good ..
thanks
Aur
Hi,
hddtemp fails to build on a uclibc/hardened host, the issues are relevant to
uclibc / nls /iconv
there is thre bugs:
1)
backtrace.c:24:22: execinfo.h: No such file or directory
backtrace.c: In function `backtrace_handler':
backtrace.c:114: warning: implicit declaration of function `backtrace'
backtrace.c:117: warning: implicit declaration of function `backtrace_symbols'
backtrace.c:117: warning: assignment makes pointer from integer without a cast
backtrace.c:46: warning: unused variable `old_eip'
backtrace.c:46: warning: unused variable `old_ebp'
2)
utf8.c:27:19: iconv.h: No such file or directory
utf8.c: In function `iconv_from_utf8_to_locale':
utf8.c:40: error: `iconv_t' undeclared (first use in this function)
utf8.c:40: error: (Each undeclared identifier is reported only once
utf8.c:40: error: for each function it appears in.)
utf8.c:40: error: syntax error before "cd"
utf8.c:58: error: `cd' undeclared (first use in this function)
utf8.c:58: warning: implicit declaration of function `iconv_open'
utf8.c:71: warning: implicit declaration of function `iconv'
utf8.c:87: warning: implicit declaration of function `iconv_close'
3)
hddtemp.c:254: warning: implicit declaration of function `bindtextdomain'
hddtemp.c:255: warning: implicit declaration of function `textdomain'
hddtemp-hddtemp.o: In function `main':
hddtemp.c:(.text+0x3d2): undefined reference to `bindtextdomain'
hddtemp.c:(.text+0x3da): undefined reference to `textdomain'
collect2: ld returned 1 exit status
I will provides the patches. I can't test it fully as my hd doesn't have a
temperature sensor :(
But as far as i can test, it's ok, however some more testing might be good ..
thanks
Aurélien
+#if !defined(HAVE_CONFIG_H) || defined(HAVE_ICONV)
I don't understand the your logic used here. (otherwise thanks for the patches.
it's exactly the right way to handle these problems)
The setlocale() should really be wrapped in the ENABLE_NLS or the stub defs
should
be used.
(In reply to comment #5)
> +#if !defined(HAVE_CONFIG_H) || defined(HAVE_ICONV)
> I don't understand the your logic used here.
My point is that if there is no config.h (i.e. compiling the code without
configure ... ) i don't want to drop the iconv support ...
Ok this is maybe not relevant ...
Do you want me to update the patch witout this ?
Cheers
Aur
(In reply to comment #5)
> +#if !defined(HAVE_CONFIG_H) || defined(HAVE_ICONV)
> I don't understand the your logic used here.
My point is that if there is no config.h (i.e. compiling the code without
configure ... ) i don't want to drop the iconv support ...
Ok this is maybe not relevant ...
Do you want me to update the patch witout this ?
Cheers
Aurélien
These patches look good to me.
Hi,
I sent a mail to the developer of hddtemp about one month ago, didn't receive
any answer. Would you consider pushing these patches to portage?
Thanks
Aur
Hi,
I sent a mail to the developer of hddtemp about one month ago, didn't receive
any answer. Would you consider pushing these patches to portage?
Thanks
Aurélien
the patch for src/backtrace.c should be a proper configure check ... only add
support for that if the toolchain has the execinfo.h header
Created an attachment (id=103817) [details]
hddtemp-0.3-beta15_execinfo.patch
Hi,
I (finally) updated the patch according to your comments about execinfo.h
as it includes a patch of configure.in, autoconf needs to be executed after
patching.
But it fails if launched with ./autogen.sh because aclocal can't find
AM_GNU_GETTEXT* macros. The script should use aclocal-1.9, previous ones
returns the error code 1. Ok may not really matter...
thanks
Aur
Created an attachment (id=103817) [details]
hddtemp-0.3-beta15_execinfo.patch
Hi,
I (finally) updated the patch according to your comments about execinfo.h
as it includes a patch of configure.in, autoconf needs to be executed after
patching.
But it fails if launched with ./autogen.sh because aclocal can't find
AM_GNU_GETTEXT* macros. The script should use aclocal-1.9, previous ones
returns the error code 1. Ok may not really matter...
thanks
Aurélien
thanks, that's something that should be sent upstream too :)
i think the HAVE_CONFIG_H check is pointless as rarely should the code be
compiled outside of configure
also, the iconv one is a little extensive ... that last hunk could simply read:
free(src_buffer); // free string
+#endif
+
return strdup(fallback_string); // and return fallback string
Thanks for the patches! They are included in hddtemp-0.3_beta15-r2.