On 17/12/2015 9:06 AM, Michael Felt wrote:> More experimenting with calling commands: > > tools:::foobar() > Error: Line starting 'Package: tools ...' is malformed! > > tools::foobar() > Error: Line starting 'Package: tools ...' is malformed!These both do a loadNamespace("tools").> > Tools:::foobar() > Error in loadNamespace(name) : there is no package called 'Tools' > > loadNamespace(tools) > Error in loadNamespace(tools) : object 'tools' not foundThose are expected, and unrelated.> > loadNamespace("tools") > Error: Line starting 'Package: tools ...' is malformed!This shouldn't happen. In a previous post you listed a long list of warnings about packages not being loaded; that's likely a serious problem, but I don't know if it is the cause or a consequence of this one. Something is seriously wrong with the startup. You could try debugging setup_Rmainloop in <src/main/main.c>. to see if any warnings are being generated there. There shouldn't be any. Duncan Murdoch> > > > > On 17-Dec-15 18:02, Michael Felt wrote: >> I have been struggling with this error message - and think I finally >> understand it's context. >> >> Start >> >> Line by line debugging shows me the function works: >> >> ... >>> saveRDS(val, mapfile) >>> val >> $variables >> $variables$IANA_HTTP_status_code_db >> [1] 0 1256 >> >> $variables$IANA_URI_scheme_db >> [1] 1256 3458 >> >> $variables$table_of_HTTP_status_codes >> [1] 4714 830 >> >> >> $references >> named list() >> >> $compressed >> [1] TRUE >> >>> mapfile >> [1] "./library/tools/R/sysdata.rdx" >>> [1] + Stopped (SIGTSTP) R_DEFAULT_PACKAGES=NULL LC_ALL=C >> ./bin/R --vanilla >> root at x065:[/data/prj/cran/64/R-3.2.3]ls -l ./library/tools/R/sysdata.rdx >> -rw-r--r-- 1 root 33 193 Dec 17 16:49 >> ./library/tools/R/sysdata.rdx >> root at x065:[/data/prj/cran/64/R-3.2.3]cat ./library/tools/R/sysdata.rdx >> ?b```b`fbf" SH0#h^?<??@?Al?&_( >> ??(R????? ?Y?sS >> C7?PG3@??j/D ?aA >> OG??x??????????$??X>4?3?89#5IF?$1)'5>? >> ?00F??,?(dA1T?(5-?(5/![PZ\2?$?<root at x065:[/data/prj/cran/64/R-3.2.3] >> root at x065:[/data/prj/cran/64/R-3.2.3] >> root at x065:[/data/prj/cran/64/R-3.2.3]gzip -dc >> ./library/tools/R/sysdata.rdx >> X >> j> names IANA_HTTP_status_code_db IANA_URI_scheme_db >> table_of_HTTP_status_codes??? >> ? variables >> references >> compressed?root at x065:[/data/prj/cran/64/R-3.2.3]fg >> R_DEFAULT_PACKAGES=NULL LC_ALL=C ./bin/R --vanilla >> >>> >>> e >> <environment: 110dbf620> >>> destDir >> [1] "./library/tools/R" >>> compress >> [1] TRUE >>> debug(tools:::makeLazyLoadDB(e, file.path(destDir, "sysdata"), >> compress = compress)) >> Error: Line starting 'Package: tools ...' is malformed! >>> tools:::makeLazyLoadDB(e, file.path(destDir, "sysdata"), compress >> compress) >> Error: Line starting 'Package: tools ...' is malformed! >>> >> >> So, at the end - my gut-feeling is that the error messages is not >> about the arguments, but us related to the "tools:::foo". >> >> Where should I look next? It goes a bit beyond me to know where in R >> "tools:::foo" is being parsed. >> Guessing here - but might be related to the switch from 32-bit to >> 64-bit AND that PowerPC is BigEndian rather than LittleEndian? Could >> also be absolutely wrong, way off base, etc. --> shoot me down! >> >> Thanks, >> Michael > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel >
Presumably the file in question is one of Peter-Dalgaards-MacBook-Air:BUILD pd$ grep -r "^Package: tools" * library/tools/DESCRIPTION:Package: tools src/library/tools/DESCRIPTION:Package: tools so the first thing I'd do is to have a good look at those files and see if they got somehow corrupted. If they look sane, presumably the bit of code that checks it isn't... So that would be my next thing to check. -pd> On 17 Dec 2015, at 18:56 , Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > > On 17/12/2015 9:06 AM, Michael Felt wrote: >> More experimenting with calling commands: >> > tools:::foobar() >> Error: Line starting 'Package: tools ...' is malformed! >> > tools::foobar() >> Error: Line starting 'Package: tools ...' is malformed! > > These both do a loadNamespace("tools"). > >> > Tools:::foobar() >> Error in loadNamespace(name) : there is no package called 'Tools' >> > loadNamespace(tools) >> Error in loadNamespace(tools) : object 'tools' not found > > Those are expected, and unrelated. > >> > loadNamespace("tools") >> Error: Line starting 'Package: tools ...' is malformed! > > This shouldn't happen. In a previous post you listed a long list of warnings about packages not being loaded; that's likely a serious problem, but I don't know if it is the cause or a consequence of this one. Something is seriously wrong with the startup. You could try debugging setup_Rmainloop in <src/main/main.c>. to see if any warnings are being generated there. There shouldn't be any. > > Duncan Murdoch > >> > >> >> >> On 17-Dec-15 18:02, Michael Felt wrote: >>> I have been struggling with this error message - and think I finally >>> understand it's context. >>> >>> Start >>> >>> Line by line debugging shows me the function works: >>> >>> ... >>>> saveRDS(val, mapfile) >>>> val >>> $variables >>> $variables$IANA_HTTP_status_code_db >>> [1] 0 1256 >>> >>> $variables$IANA_URI_scheme_db >>> [1] 1256 3458 >>> >>> $variables$table_of_HTTP_status_codes >>> [1] 4714 830 >>> >>> >>> $references >>> named list() >>> >>> $compressed >>> [1] TRUE >>> >>>> mapfile >>> [1] "./library/tools/R/sysdata.rdx" >>>> [1] + Stopped (SIGTSTP) R_DEFAULT_PACKAGES=NULL LC_ALL=C >>> ./bin/R --vanilla >>> root at x065:[/data/prj/cran/64/R-3.2.3]ls -l ./library/tools/R/sysdata.rdx >>> -rw-r--r-- 1 root 33 193 Dec 17 16:49 >>> ./library/tools/R/sysdata.rdx >>> root at x065:[/data/prj/cran/64/R-3.2.3]cat ./library/tools/R/sysdata.rdx >>> ?b```b`fbf" SH0#h^?<??@?Al?&_( >>> ??(R????? ?Y?sS >>> C7?PG3@??j/D ?aA >>> OG??x??????????$??X>4?3?89#5IF?$1)'5>? >>> ?00F??,?(dA1T?(5-?(5/![PZ\2?$?<root at x065:[/data/prj/cran/64/R-3.2.3] >>> root at x065:[/data/prj/cran/64/R-3.2.3] >>> root at x065:[/data/prj/cran/64/R-3.2.3]gzip -dc >>> ./library/tools/R/sysdata.rdx >>> X >>> j> names IANA_HTTP_status_code_db IANA_URI_scheme_db >>> table_of_HTTP_status_codes??? >>> ? variables >>> references >>> compressed?root at x065:[/data/prj/cran/64/R-3.2.3]fg >>> R_DEFAULT_PACKAGES=NULL LC_ALL=C ./bin/R --vanilla >>> >>>> >>>> e >>> <environment: 110dbf620> >>>> destDir >>> [1] "./library/tools/R" >>>> compress >>> [1] TRUE >>>> debug(tools:::makeLazyLoadDB(e, file.path(destDir, "sysdata"), >>> compress = compress)) >>> Error: Line starting 'Package: tools ...' is malformed! >>>> tools:::makeLazyLoadDB(e, file.path(destDir, "sysdata"), compress >>> compress) >>> Error: Line starting 'Package: tools ...' is malformed! >>>> >>> >>> So, at the end - my gut-feeling is that the error messages is not >>> about the arguments, but us related to the "tools:::foo". >>> >>> Where should I look next? It goes a bit beyond me to know where in R >>> "tools:::foo" is being parsed. >>> Guessing here - but might be related to the switch from 32-bit to >>> 64-bit AND that PowerPC is BigEndian rather than LittleEndian? Could >>> also be absolutely wrong, way off base, etc. --> shoot me down! >>> >>> Thanks, >>> Michael >> >> ______________________________________________ >> R-devel at r-project.org mailing list >> https://stat.ethz.ch/mailman/listinfo/r-devel >> > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel-- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email: pd.mes at cbs.dk Priv: PDalgd at gmail.com
On 2015-12-17 18:56, Duncan Murdoch wrote:>> Error: Line starting 'Package: tools ...' is malformed! > > These both do a loadNamespace("tools"). > >> > Tools:::foobar() >> Error in loadNamespace(name) : there is no package called 'Tools' >> > loadNamespace(tools) >> Error in loadNamespace(tools) : object 'tools' not found > > Those are expected, and unrelated.Actually, it is what helped me realize that the problem was with the parsing of the call, rather than the arguments.> >> > loadNamespace("tools") >> Error: Line starting 'Package: tools ...' is malformed! > > This shouldn't happen. In a previous post you listed a long list of > warnings about packages not being loaded; that's likely a serious > problem, but I don't know if it is the cause or a consequence of this > one. Something is seriously wrong with the startup. You could try > debugging setup_Rmainloop in <src/main/main.c>. to see if any > warnings are being generated there. There shouldn't be any. > > Duncan Murdoch >This is during make - so there is very little - and the messages was because I was forgetting to set LC_ALL=CC before starting ./bin/R The file I am looking at is src/main/dcf.c (where the message is generated) - your file suggestion may be better - skipping over a few bread crumbs so to speak. More in my reply to Peter's comments.>> >
On 2015-12-17 19:30, peter dalgaard wrote:> Presumably the file in question is one of > > Peter-Dalgaards-MacBook-Air:BUILD pd$ grep -r "^Package: tools" * > library/tools/DESCRIPTION:Package: tools > src/library/tools/DESCRIPTION:Package: tools > > so the first thing I'd do is to have a good look at those files and see if they got somehow corrupted. > > If they look sane, presumably the bit of code that checks it isn't... So that would be my next thing to check. > > -pdI had just gotten here, and tried comparing them with the 32-bit build (as I do not know what sane is yet). Sources are in: /data/prj/cran/R-3.2.3 Builds are in: /data/prj/cran/32/R-3.2.3 and /data/prj/cran/64/R-3.2.3 The files, in the build directories look "sane", at least comparable root at x065:[/data/prj/cran/R-3.2.3]sdiff -w 132 /data/prj/cran/??/R-3.2.3/library/tools/DESCRIPTION Package: tools Package: tools Version: 3.2.3 Version: 3.2.3 Priority: base Priority: base Title: Tools for Package Development Title: Tools for Package Development Author: R Core Team Author: R Core Team Maintainer: R Core Team <R-core at r-project.org> Maintainer: R Core Team <R-core at r-project.org> Description: Tools for package development, administration and Description: Tools for package development, administration and License: Part of R 3.2.3 License: Part of R 3.2.3 Suggests: XML, codetools, methods Suggests: XML, codetools, methods Built: R 3.2.3; powerpc-ibm-aix5.3.7.0; 2015-12-17 12:02:34 UTC | Built: R 3.2.3; ; Thu Dec 17 17:39:55 UTC 2015; unix As the 32-bit build completes, while the 64-bit stops at "tools" there is a difference in what they have available: root at x065:[/data/prj/cran/R-3.2.3]ls -l /data/prj/cran/??/R-3.2.3/library/tools /data/prj/cran/32/R-3.2.3/library/tools: total 72 -rw-r--r-- 1 root 33 356 Dec 17 12:02 DESCRIPTION -rw-r--r-- 1 root 33 3665 Dec 16 11:37 INDEX drwxr-sr-x 2 root 33 4096 Dec 17 08:45 Meta -rw-r--r-- 1 root 33 7112 Dec 17 12:02 NAMESPACE drwxr-sr-x 2 root 33 4096 Dec 17 12:02 R drwxr-sr-x 2 root 33 4096 Dec 16 11:37 help drwxr-sr-x 2 root 33 4096 Dec 16 11:37 html drwxr-sr-x 2 root 33 4096 Dec 16 11:34 libs /data/prj/cran/64/R-3.2.3/library/tools: total 40 -rw-r--r-- 1 root 33 339 Dec 17 17:40 DESCRIPTION -rw-r--r-- 1 root 33 7112 Dec 17 17:40 NAMESPACE drwxr-sr-x 2 root 33 4096 Dec 17 17:19 R drwxr-sr-x 2 root 33 4096 Dec 17 05:58 libs So, is dcf.c, or main.c the better place to check. dcf.c does not look like "fun" - all those lexical arguments at the start: SEXP attribute_hidden do_readDCF(SEXP call, SEXP op, SEXP args, SEXP env) { .... man many lines .... } else { /* Must be a regular line with no tag ... */ line[20] = '\0'; error(_("Line starting '%s ...' is malformed!"), line); } } } } ... more lines to go... Thanks for the assistance! Michael