Home | Docs | Forums | Lists | Bugs | Planet | Store | GMN | Get Gentoo!
Not eligible to see or edit group visibility for this bug.
View Bug Activity | Format For Printing | XML | Clone This Bug
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
Created an attachment (id=86177) [details] iconv.h patch
Created an attachment (id=86178) [details] nls patch
Created an attachment (id=86179) [details] uclibc patch
bug-wranglers@gentoo.org
+#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
Created an attachment (id=86475) [details] updated nls patch now includes setlocale inside the ENABLE_NLS thanks for the comment Aur
Created an attachment (id=86475) [details] updated nls patch now includes setlocale inside the ENABLE_NLS thanks for the comment 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 :)
Created an attachment (id=114465) [details] hddtemp-0.3_beta15-iconv.patch updated iconv patch to hddtemp-0.3_beta15
Created an attachment (id=114502) [details] hddtemp-0.3_beta15-nls.patch updated nls patch to hddtemp-0.3_beta15
Created an attachment (id=114504) [details] hddtemp-0.3_beta15-r1.ebuild.patch Patch for the ebuild in order to apply previous patches and rerun autotools.
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
Created an attachment (id=114578) [details] hddtemp-0.3_beta15-iconv.patch thanks for your comments spanky, updated patch, i have sent patches to hddtemp-dev mailing list
Thanks for the patches! They are included in hddtemp-0.3_beta15-r2.