From: SourceForge.net <no...@so...> - 2006-12-22 03:20:06
|
Bugs item #744637, was opened at 2003-05-27 17:39 Message generated for change (Comment added) made by sf-robot You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=744637&group_id=12694 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: configure Group: openBSD >Status: Closed Resolution: Fixed Priority: 5 Private: No Submitted By: Robert Story (rstory) Assigned to: Nobody/Anonymous (nobody) Summary: CONFIGURE_OPTIONS missing '\' on openbsd Initial Comment: IRC user, building net-snmp-5.0.8 from source Host: OpenBSD 3.2 i386 Syska: its running now: ./configure --with-perl-modules --with-mib-modules=host Syska: still look likethis in net-snmp-config.h Syska: #define CONFIGURE_OPTIONS "" --with-perl-modules --with-mib-modules=host"" This causes ucd-snmp/versioninfo.c fail to compile.. ucd-snmp/versioninfo.c: In function `var_extensible_version': ucd-snmp/versioninfo.c:97: wrong type argument to decrement ucd-snmp/versioninfo.c:97: syntax error before `with' *** Error code 1 ---------------------------------------------------------------------- >Comment By: SourceForge Robot (sf-robot) Date: 2006-12-21 19:20 Message: Logged In: YES user_id=1312539 Originator: NO This Tracker item was closed automatically by the system. It was previously set to a Pending status, and the original submitter did not respond within 180 days (the time period specified by the administrator of this Tracker). ---------------------------------------------------------------------- Comment By: Thomas Anders (tanders) Date: 2006-06-24 04:58 Message: Logged In: YES user_id=848638 This is believed to be fixed in (at least) 5.2.2 and later. ---------------------------------------------------------------------- Comment By: Brian A. Seklecki (bseklecki) Date: 2003-08-10 06:06 Message: Logged In: YES user_id=500741 ...I traced it from the back to the front. From defs.sed, we see that it's wrong in the conftest.defines and confdef.undefines. So if it's bad at that point, then it must be bad in confdefs.h. ...and so, it turns out not to be a sed(1) but a cat(1) or possibly an sh(1) problem: NetBSD conftest.defines (correct) ${ac_dA}CONFIGURE_OPTIONS${ac_dB}CONFIGURE_OPTIONS${ac_dC}"\\\\"'--with-defaults' '--prefix=/usr/local' '--with-logfile=/var/log/snmpd' '--with-sys-contact=bofh@precursor' '--with-sys-location=Arlington\\, VA Datacenter 1'\\\\""${ac_dD} OpenBSD conftest.defines (incorrect): ${ac_dA}CONFIGURE_OPTIONS${ac_dB}CONFIGURE_OPTIONS${ac_dC}""'--with-defaults' '--prefix=/usr/local' '--with-logfile=/v ar/log/snmpd' '--with-sys-contact=bofh@precursor' '--with-sys-location=Arlington\\, VA Datacenter 1'""${ac_dD} -------------------- NetBSD confdefs.h (correct) #define CONFIGURE_OPTIONS "\"'--with-defaults' '--prefix=/usr/local' '--with-logfile=/var/log/snmpd' '--with-sys-contact=bofh@precursor' '--with-sys-location=Arlington, VA Datacenter 1'\"" OpenBSD confdefs.h (incorrect) #define CONFIGURE_OPTIONS ""'--with-defaults' '--prefix=/usr/local' '--with-logfile=/var/log/snmpd' '--with-sys-contact=bofh@precursor' '--with-sys-location=Arlington, VA atacenter 1'"" $ac_configure_args gets set early on, it's value is identical on both systems: So at some point, the double quotes people use at the command line to pass strings to --with-sys-location, etc, are removed and the whole flag is encapsulated in a single quote as seen here: '--with-defaults' '--prefix=/usr/local' '--with-logfile=/var/log/snmpd' '--with-sys-contact=bofh@precursor' '--with-sys-location=Arlington, VA Datacenter 1' (I know both systems are identical at this point as well) *** So the variable is right at this point, *BUT*, when it gets appended to confdefs.h, it becomes corrupted on OpenBSD? Why, well, for starters's it's cat(1)'d intead of echo(1)'d for some reason (performance issue? I'm not a autoconf hacker, but they always taught us to use echo(1) or echo builtins over cat(1) if at all possible) Anyway the line is: ---------------------------------------------------------- # # save the configure arguments # cat >>confdefs.h <<_ACEOF #define CONFIGURE_OPTIONS "\"$ac_configure_args\"" _ACEOF ---------------------------------------------------------- Now my interpretation of this is: #define CONFIGURE_OPTIONS "'--switch1' '--switch2' '--switch3'" ...but i guess that's from all those years of echo(1) over cat(1). However since this IS cat(1), I would be more inclined to think along an OpenBSD state of mind #define CONFIGURE_OPTIONS ""'--switch1' '--switch2' '--switch3'"" But apparently that's incorrect, so I'm in the minority, as Linux and NetBSD versions parse this correctly. I suppose this could also be a sh(1) problem with the way control characters are escaped *BEFORE* they're handed to cat(1); but, I don't see any major differences in the man pages for NetBSD and OpenBSD cat(1) or sh(1), and I'm not prepared to sift through five+ years of CVS commits to find out when this behavior changed. "you bring new meaning to the terms slackass. I will have to invent a new term." -- theo de raadt Anyway, a thousand regex's later, it's still screwed up when this all get applied to include/net-snmp/net-snmp-config.h.in and then of course the breakage during the build. This has certainly been exhilarating ride. I think I'm in danger of breaking a sweat over here. I am, however, not inclined to propose a fix -- that's far beyond me. I vote for re-writing the whole thing in LISP or MONO, but that argument won't fly in the lists, I'm sure. -lava ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=112694&aid=744637&group_id=12694 |