LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-16-2011, 12:07 AM   #16
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174

looking at the debian bug (not tried it myself) seems like they're just warnings.
 
1 members found this post helpful.
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 02-16-2011, 12:09 AM   #17
T3slider
Senior Member
 
Registered: Jul 2007
Distribution: Slackware64-14.1
Posts: 2,367

Rep: Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843Reputation: 843
Well if it is fixed in 0.9.9.9 despite being a non-issue perhaps a version bump is in order...
 
1 members found this post helpful.
Old 02-16-2011, 03:00 AM   #18
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,176

Original Poster
Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by T3slider View Post
I'm not convinced that this is actually a problem...at the end of the bug report it is stated that the original report was incorrect. 'aide' (which has a SlackBuild from slackbuilds.org) uses autoconf and includes mhash.h. Other than posting a bug report from 2008, do you have any actual evidence that this is a problem? Do you have any code that isn't compiling?

Even issuing `autoreconf --force` in the source directory for aide and then running `./configure && make` still works...so unless you can provide a real world scenario, I don't see this as a problem.

[edit]config.log for the above process has this:
Code:
## ----------------- ##
## Output variables. ##
## ----------------- ##

...

PACKAGE='aide'
PACKAGE_BUGREPORT=''
PACKAGE_NAME='aide'
PACKAGE_STRING='aide 0.15.1'
PACKAGE_TARNAME='aide'
PACKAGE_URL=''
PACKAGE_VERSION='0.15.1'

...

## ----------- ##
## confdefs.h. ##
## ----------- ##

/* confdefs.h */
#define PACKAGE_NAME "aide"
#define PACKAGE_TARNAME "aide"
#define PACKAGE_VERSION "0.15.1"
#define PACKAGE_STRING "aide 0.15.1"
#define PACKAGE_BUGREPORT ""
#define PACKAGE_URL ""
#define PACKAGE "aide"
#define VERSION "0.15.1"
Still looks fine to me...
The file "mhash_config.h" defines various "HAVE_*" macros which can shadow the autoconf ones if included after autoconf-generated "config.h".
 
Old 02-16-2011, 03:03 AM   #19
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,176

Original Poster
Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by ponce View Post
looking at the debian bug (not tried it myself) seems like they're just warnings.
Too insensitive to compiler warnings? This one is also a warning:
Code:
int main()
{
    int *i;
    return *i;
}
 
Old 02-16-2011, 03:10 AM   #20
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,097

Rep: Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174Reputation: 4174
no, I just realized that asking to the guy that maintain alone a whole distribution to fix auto* warnings of unmaintaned sources maybe is not too fair (I've done myself too and now I ask forgiveness, sorry Pat).
 
2 members found this post helpful.
Old 02-16-2011, 05:32 AM   #21
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018
Quote:
Originally Posted by T3slider View Post
Well if it is fixed in 0.9.9.9 despite being a non-issue perhaps a version bump is in order...
Which as far as current goes, appears to have already been bumped. 0.9.9.9 installed here.


edit:
Ok, now I'm completely confused.

Changelog this morning:
Quote:
l/mhash-0.9.9.9-x86_64-2.txz: Rebuilt.
Do not #define MUTILS_USE_MHASH_CONFIG in mhash.h. Thanks to guanx.
Now, if the bug was originally found in 0.9.9 back in Oct 2008 and according to sourceforge 0.9.9.9 was released december 2008 and the debian bug report is correct when it suggests that fixed it, then haven't we just applied a patch that shouldn't be necessary? And if so, isn't it possible that there could be side effects?

I haven't looked into any of this in detail, but this is looking a little messy.

Last edited by GazL; 02-16-2011 at 05:42 AM.
 
Old 02-16-2011, 06:07 AM   #22
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,661

Rep: Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784
Fixed in -Current
Quote:
l/mhash-0.9.9.9-i486-2.txz: Rebuilt.
Do not #define MUTILS_USE_MHASH_CONFIG in mhash.h. Thanks to guanx.
 
Old 02-16-2011, 02:02 PM   #23
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,503

Rep: Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461
Quote:
Originally Posted by GazL View Post
Ok, now I'm completely confused.

Changelog this morning:


Now, if the bug was originally found in 0.9.9 back in Oct 2008 and according to sourceforge 0.9.9.9 was released december 2008 and the debian bug report is correct when it suggests that fixed it, then haven't we just applied a patch that shouldn't be necessary? And if so, isn't it possible that there could be side effects?

I haven't looked into any of this in detail, but this is looking a little messy.
It's possible. Pretty much I was duped on this one into thinking it was more than just warnings. The usual policy is to not fix warnings at this level, especially ones related to autoconf.

But, it does seem correct to me anyway, and I doubt there will be any side effects. There might have been if the patch were applied right in the sources prior to compilation (as someone said would "probably be OK" or something in one of those bugs reports), but it's fixed up with sed after the "make install". I plan to leave it, but if it does cause problems let us know.
 
2 members found this post helpful.
Old 02-16-2011, 02:26 PM   #24
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018
Ooops, Aide 0.15.1 no longer compiles on my current-64 box when "#define MUTILS_USE_MHASH_CONFIG" is commented out of /usr/include/mhash.h
Code:
In file included from /usr/include/limits.h:153:0,
                 from /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/include-fixed/limits.h:169,
                 from /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/include-fixed/syslimits.h:7,
                 from /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/include-fixed/limits.h:34,
                 from /usr/include/sys/param.h:26,
                 from commandconf.c:28:
/usr/include/bits/xopen_lim.h:95:6: error: missing binary operator before token "("
/usr/include/bits/xopen_lim.h:98:7: error: missing binary operator before token "("
make[3]: *** [commandconf.o] Error 1
make[3]: Leaving directory `/tmp/aide-0.15.1/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/aide-0.15.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/aide-0.15.1'
make: *** [all] Error 2
Add it back in and it compiles fine again.

Last edited by GazL; 02-16-2011 at 02:29 PM.
 
1 members found this post helpful.
Old 02-16-2011, 03:27 PM   #25
volkerdi
Slackware Maintainer
 
Registered: Dec 2002
Location: Minnesota
Distribution: Slackware! :-)
Posts: 2,503

Rep: Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461Reputation: 8461
Quote:
Originally Posted by GazL View Post
Ooops, Aide 0.15.1 no longer compiles on my current-64 box when "#define MUTILS_USE_MHASH_CONFIG" is commented out of /usr/include/mhash.h

Add it back in and it compiles fine again.
It figures. Reverting this one, and please folks, double check bug reports, and test compile (at least) update requests. Retweeting someone else's bugzilla is generally not helpful without independent verification. :/
 
1 members found this post helpful.
Old 02-17-2011, 12:58 AM   #26
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,176

Original Poster
Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by GazL View Post
Ooops, Aide 0.15.1 no longer compiles on my current-64 box when "#define MUTILS_USE_MHASH_CONFIG" is commented out of /usr/include/mhash.h
Code:
In file included from /usr/include/limits.h:153:0,
                 from /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/include-fixed/limits.h:169,
                 from /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/include-fixed/syslimits.h:7,
                 from /usr/lib64/gcc/x86_64-slackware-linux/4.5.2/include-fixed/limits.h:34,
                 from /usr/include/sys/param.h:26,
                 from commandconf.c:28:
/usr/include/bits/xopen_lim.h:95:6: error: missing binary operator before token "("
/usr/include/bits/xopen_lim.h:98:7: error: missing binary operator before token "("
make[3]: *** [commandconf.o] Error 1
make[3]: Leaving directory `/tmp/aide-0.15.1/src'
make[2]: *** [all] Error 2
make[2]: Leaving directory `/tmp/aide-0.15.1/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/tmp/aide-0.15.1'
make: *** [all] Error 2
Add it back in and it compiles fine again.
What not compiling is
Code:
#if ((int) (~0U >> 1)) == 32767
This is because the preprocessor does not do type conversions. It's the compiler's task. Therefore the stupid "INT_MAX" macro, if really wanted by mhash internally, should be elsewhere (e.g. in "mutils/mhash_config.h") rather than in "mutils/mincludes.h".

There is another reason to not have this INT_MAX macro -- The preprocessor integer does not necessarily have the same size as the compiler's. For example, in slackware-current, the preprocessor (~0U >> 1) is 2^63-1 and the compiler (~0U >> 1) is 2^31-1. So simply removing the "(int)" shoule not work.

Because this INT_MAX macro, as well as many other "#define"s, are only used internally in mhash and not in the mhash interface, they should not be exposed to the outside. I think THIS is the proper solution for your problem.

It depends on his coding philosophy if one should correct the wrong code, or should introduce more wrong code and let only some specific source compile. The "MUTILS_USE_MHASH_CONFIG" problem is such an example.

Last edited by guanx; 02-17-2011 at 02:12 AM.
 
Old 02-17-2011, 06:54 AM   #27
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018
Thanks for the diagnosis guanx, and yes, I agree that the existing headers are ugly. and removing the brain-dead INT_MAX/MIN macro definitions from /usr/include/mutils/mincludes.h does indeed solve the build issue seen in AIDE, which seems to suggest that (at least in the case of AIDE) they're not a required part of the public interface to the library, and I suspect that they won't be used internally either as HAVE_LIMITS_H or HAVE_STDINT_H should have resulted in those values already being defined on linux.


Clearly, patching out MUTILS_USE_MHASH_CONFIG on its own isn't sufficient. So, the options seem to be:

1) Leave it as shipped by upstream

2) Patch out both MUTILS_USE_MHASH_CONFIG from mhash.h and INT_MAX/MIN from mutils/mincludes.h
(plus deal with any other issues that could show up in future)


The question then is: is this re-engineering of header files something within Pat's remit as a distro maintainer and something he should be doing? Though I'm a bit of a 'correctness freak' myself, in this case I tend to think that unless the headers as shipped by upstream are seen to be causing specific issues with builds then it's probably best to leave them as shipped, and that is in keeping with my understanding of Slackware's mimimal patching policy on this sort of thing.

Do you have any examples of the original upstream headers causing an actual problem?

Last edited by GazL; 02-17-2011 at 06:55 AM.
 
Old 02-18-2011, 08:57 AM   #28
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,176

Original Poster
Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by GazL View Post
Thanks for the diagnosis guanx, and yes, I agree that the existing headers are ugly. and removing the brain-dead INT_MAX/MIN macro definitions from /usr/include/mutils/mincludes.h does indeed solve the build issue seen in AIDE, which seems to suggest that (at least in the case of AIDE) they're not a required part of the public interface to the library, and I suspect that they won't be used internally either as HAVE_LIMITS_H or HAVE_STDINT_H should have resulted in those values already being defined on linux.


Clearly, patching out MUTILS_USE_MHASH_CONFIG on its own isn't sufficient. So, the options seem to be:

1) Leave it as shipped by upstream

2) Patch out both MUTILS_USE_MHASH_CONFIG from mhash.h and INT_MAX/MIN from mutils/mincludes.h
(plus deal with any other issues that could show up in future)


The question then is: is this re-engineering of header files something within Pat's remit as a distro maintainer and something he should be doing? Though I'm a bit of a 'correctness freak' myself, in this case I tend to think that unless the headers as shipped by upstream are seen to be causing specific issues with builds then it's probably best to leave them as shipped, and that is in keeping with my understanding of Slackware's mimimal patching policy on this sort of thing.

Do you have any examples of the original upstream headers causing an actual problem?
Hi GazL, Yes. Recently I've been using mhash. My program should be compatible with various compiler/libc's so the autoconf results of the "HAVE_*" macros are not always the same as those in "mhash_config.h". I saw no clean way to get rid of these conflictions. Including the aotuconf "config.h" after "mhash.h" doesn't work because the "HAVE_*" macros which shouldn't appear are not "#undef"ed, but simply commented out in the autoconf "config.h".

I do have a way to solve this problem: In a separate ".c" file, include only "mhash.h" and wrap the mhash functions, then export to other units with a separate ".h" file. But I think this solution looks funny.

Last edited by guanx; 02-18-2011 at 09:01 AM.
 
Old 02-19-2011, 03:31 AM   #29
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,176

Original Poster
Rep: Reputation: 233Reputation: 233Reputation: 233
An mhash developer said in the mhash-dev mailing list that he will remove the INT_MAX #define and write a better test for the maximum integer.
Quote:
I'll remove the define and have a better check for it.
 
1 members found this post helpful.
Old 02-19-2011, 06:29 AM   #30
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,897

Rep: Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018Reputation: 5018
Excellent. Nice to see the mhash guys care about this sort of thing.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
"bad tty" & "file descriptor error" while building RPM on F13 gosssamer Linux - Software 7 12-28-2010 05:02 PM
"bad interpreter : no such file or directory" when configure "flex" acer_peri Linux - Software 10 11-10-2010 01:19 AM
"Mount: wrong file system type, bad option, bad superblock" User Name. Linux - Newbie 9 09-03-2008 03:40 PM
Bad mount of .mdf - "wrong fs type, bad option, bad superblock, on /dev/loop0" Maybe-not Linux - General 2 02-29-2008 01:30 PM
USB stick won't mount ("wrong fs type, bad option, bad superblock ...") Arla Linux - Hardware 4 06-01-2007 07:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration