Warning: Task "python_packages" not found. Use --force to continue - node.js

I am trying to manually setup this project.
When I run grunt command, I am getting below error.
C:\myworkspace\NASA\worldview>grunt
Warning: Task "python_packages" not found. Use --force to continue.
Aborted due to warnings.
Tried with grunt --force. But not worked.
How could I solve this?

Use --force to continue.
Try to run grunt --force.
If it's only a warning, it should pass.

Try making these changes in Gruntfile.js
Change line #321 to
command: 'virtualenv python && "python/Scripts/pip" install xmltodict isodate'
Change line #717 to
grunt.registerTask("default", ["exec:python_packages", "update", "build", "config", "site"]);

Delete python_packages from line no. 717 of the Gruntfile.js and replace it with exec:python_packages. So it reads:
grunt.registerTask("default", ["exec:python_packages", "update", "build", "config", "site"]);
Then run $ grunt via the CLI again.
When the tasks have completed you'll find the .tar files in the dist folder.
EDIT:
As per #Ryuu Agamaki answer you need to also:
Change line #321 to
command: 'virtualenv python && "python/Scripts/pip" install xmltodict isodate'
python/bin/ doesn't exist on Windows.
Extracting the tar.bz2 files
This done 99% without errors. But stuck at last minute. Here is the log file
The issue is now related to extracting the tar.bz2 files. So the commands on line no.s 330, 335, 340, 345, 350 of the Gruntfile.js will all fail on your system. Your log on line #103 reports:
tar: invalid option -- j
What are those commands doing?
As documented here, the cjCf arguments in the command(s) are:
-c : Create a new archive (or truncate an old one) and write the named files to it.
-j : filter the archive through bzip2
-C : change to directory DIR
-f : use archive file or device ARCHIVE
As per your error log it indicates that your system cannot handle the arguments, particularly the j argument (bzip2).
What next?
I would consider replacing those commands in the Gruntfile.js with an equivalent tar command that you know works on your system (Windows).
Some tools for handling tar.bz2 are listed here - assuming you don't already have the necessary tool. Whether these offer equivalent commands to handle the cjCf arguments I'm not sure. There's also node-uncompress which has command-line commands - which may be worth trying, however, I'm unsure whether it supports cross platform..
The worst case scenario is you may find you have to and omit the calls to the commands, (i.e. those calls to the lines of code previously mentioned, "exec:python_packages" etc, etc), from the Gruntfile.js completely. Then manually extract the tar.bz2 files yourself (using something like 7-zip or WinRAR), and move the resultant files into the appropriate folder.
Clearly non Nix systems weren't considered/tested when developing the tooling for this project.

Related

Building Parsec dedup workload with parsecmgmt fails

I am trying to build Parsec_3.0 dedup workload on skylake server with gcc (Debian 6.3.0-18+deb9u1) 6.3.0. I managed to build streamcluster and canneal successfully without issues, however with dedup I get the error, when using same command: parsecmgmt -a build -p dedup
ERROR:
installing man1/smime.1
smime.pod around line 272: Expected text after =item, not a number
same with lines: 276, 280, 285, 289
POD document had syntax errors at /usr/bin/pod2man line 70.
make: *** [install_docs] Error 255
Makefile:680: recipe for target 'install_docs' failed
[PARSEC] Error: env PATH=/usr/bin:/home/akhorguani/parsec/parsec-3.0/bin:/usr/lo
cal/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/usr/sbin:/opt/dell/srvadmin/b
in:/usr/local/cuda/bin:/grid5000/code/bin:/home/akhorguani/parsec/parsec-3.0/bin
/usr/bin/make install failed.
In /usr/bin/pod2man line 70 is " print " $files[1]\n" if $verbose; ". But it's predefined file from the host machine so I don't think it would contain errors, most likely I might need to change something in parsec files.
So maybe anyone had faced the same problem and can help to fix it?
As jww mentioned, the error is due to some syntax errors on POD files from the SSL library that parsec uses. I had the same error and managed to build by replacing all instances of =item followed by a number with =item C<Number> in the POD files.
The files you need to modify are on the following folders:
$ folder-where-you-installed-parsec/pkgs/libs/ssl/src/doc/apps
$ folder-where-you-installed-parsec/pkgs/libs/ssl/src/doc/ssl
You can see the changes you need to do in this github gist.
I did the changes by hand but you can probably make a script that reads the files and fixes it for you.
I believe that the issue is platform specific because my colleague built it without any problems with Manjaro linux, while I'm using Ubuntu 18.04.
Eduardo's answer worked for me!
It seems the gist is out of date as ome of pod files have changed in the newer PARSEC version.
sed -i.bak 's/item \([0-9]\+\)/item C<\1>/g' *
The script above carries out needed transformation. Run it from apps and ssl folders

Node "No such file or directory" with certain packages

I installed two packages via npm:
alsatian#1.0.0-alpha.7
gulp#3.9.1
As I am using nvm to manage my node versions, the CLI files for the two packages were installed at the following paths:
/home/james/.nvm/versions/node/v6.3.1/lib/alsatian/cli/alsatian-cli.js
/home/james/.nvm/versions/node/v6.3.1/lib/gulp/bin/gulp.js
When I run the command gulp, the command runs correctly. However when I run the command alsatian I get the following output:
: No such file or directory
I replaced both CLI files with the following code:
#!/usr/bin/env node
"use strict";
console.log("If you see this, it worked!");
When I typed the command gulp, I get the message If you see this, it worked!. However, when I type the command alsatian I get the same No such file or directory message as before.
Using the which command I am certain that the files I have modified are the correct files for the packages, and by using the stat command I can see that I have the same permissions for the package files.
This was caused by the CLI file for alsatian containing carriage return characters. Enforcing LF line endings solved the issue.

How to specify different feedback for different platforms if AC_CHECK_HEADER fails in autoconf/configure.ac?

I have a check for a header file in configure.ac in the source root
AC_CHECK_HEADER(log4c.h,
[],
[AC_MSG_ERROR([Couldn't find or include log4c.h])])
and I'd like to give different feedback on different platform to reflect different most straight forward ways of providing the header:
on Debian it should error with the message Couldn't find or include log4c.h. Install log4c using 'sudo apt-get install liblog4c-dev'
on OpenSUSE it should error with ... Install log4c using 'sudo yum install log4c-devel' (didn't research the package name, but you catch my drift)
on other systems (where I'm too lazy to research the package name) it should error with ... Install log4c by fetching ftp://.../log4c.tar.gz and installing with './configure && make && make install' in the source root
I
checked the AM_CONDITIONAL macro, but I don't get how to use it in configure.ac rather than in Makefile.am (as described in autoconf/automake: conditional compilation based on presence of library?)
found the tip to run esyscmd in stackoverflow.com/questions/4627900/m4-executing-a-shell-command, but adding esyscmd (/bin/echo abc) to configure.ac doesn't print anything when I run autoreconf --install --verbose --force.
Both answers describing the usage of conditional macros without the shell commands for the mentioned OS and links to predefined macros (like AC_CHECK_HEADER_DEBIAN, AC_CHECK_HEADER_SUSE, etc.) are appreciated.
The following configure.ac doesn't work:
AC_INIT([cndrvcups-common], [2.90], [krichter722#aol.de])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign -Wall subdir-objects])
AC_PROG_CC
AM_PROG_AR
AM_PROG_CC_C_O
AC_MSG_NOTICE([Hello, world.])
AC_INCLUDES_DEFAULT
AC_CHECK_HEADER(check.h,
[],
[
AS_IF (test "$(lsb_release -cs)" = "vivid", [echo aaaaaa], [echo bbbbbb])
])
LT_INIT # needs to be after AM_PROGS_AR
AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
because ./configure fails with
checking check.h usability... no
checking check.h presence... no
checking for check.h... no
./configure: line 4433: syntax error near unexpected token `;'
./configure: line 4433: ` if ; then :'
There's also ./configure: line 4427: #include: command not found which happens no matter whether AC_CHECK_HEADER is specified.
Your configure.ac is almost ok. The only problem is space between AS_IF and the parenthesis. No whitespace is allowed between a macro name and the opening parenthesis in m4 scripts. This is correct syntax:
AC_CHECK_HEADER(check.h,
[],
[
AS_IF(test "$(lsb_release -cs)" = "vivid", [echo aaaaaa], [echo bbbbbb])
])
If you are looking for a way to detect different distros look for example at configure.ac of cgmanager.
Update
I noticed one more problem in your configure.ac.
AC_INCLUDES_DEFAULT macro expands to a set of default includes and can't be used here. It is not needed also. It will be used by default in your AC_CHECK_HEADER macro, as you omit last parameter.
This is the cause of line 4427: #include: command not found error you mention.
Update to your comment
First of all, running a system command itself, like lsb_release is not portable. You should first check, for example with AC_CHECK_PROG, for its presence.
Regarding the syntax I would first get the output of the command using backticks: result=`lsb_release -cs` and later test resulting output: test "x$result" = "xvivid". x is needed to avoid problems with empty value in some shells.
At last, I have doubts whether configure script is a proper place for all this distro specific messages. You may consider placing it in the README file.
Avoid those system specific messages.
Print one message which allows people to figure out what package to install on their respective system, but avoid naming the system specific package names and system specific installation tools.
You will never be able to add messages for all systems, so it is better to go the part of the way which you know and let your users go the rest of the way because they know their systems better than you can.
The proper way would be to write a software package outside but called from your configure which, given a header filename, foo.pc filename, library name, etc. figures out how to install that on the respective system. Then let system specific maintainers fix that package, and call it from configure if it is installed, and issue a generic error message otherwise.
A portable shell script local to your software package might do the same job to some extent. You still have to maintain all the system specific parts for all possible systems, though.
Hmm... now that I am thinking about that, the idea appears not that bad. I might add such a script to some of the projects I maintain and see how it turns out in practical use.
I would still try to keep most of that logic outside configure, though.

Getting SublimeText2 to compile Typescript

Really excited about using Typescript on the Mac however, even after a full day of troubleshooting, unable to get it to compile in SublimeText. Followed these directions (the first at the top) to install nodes and npm>
https://gist.github.com/isaacs/579814
Installed Typescript
sudo npm install -g typescript
Installed the syntax highlighting package for sublime
http://msopentech.com/blog/2012/10/01/sublime-text-vi-emacs-typescript-enabled/
Created a build file 'typescript.sublime-build as follows
{
"selector": "source.ts",
"cmd": ["tsc", "$file"],
"path": "/usr/local/bin",
"file_regex": "^(.+?) \\((\\d+),(\\d+)\\): (.+)$"
}
When I type $which node I get
/usr/local/bin/node
When I type $which tsc I get
/Users/<username>/local/bin/tsc
BUT, whenever I try to compile even the simplest .ts file in SublimeText the first effort message I get is
[Errno 2] No such file or directory
Can anyone suggest further troubleshooting steps?
I struggled with a little too. It seems the PATH is quite different when trying to run commands directly from the build system than the terminal, and this is a cause of problems.
What I did as a simple workaround was just set my command to run a Bash script, i.e. in the sublime.project file have the command as..
"cmd": ["./build.sh"]
.. and then in the build.sh script in my project folder simply run the compiler, i.e..
#! /bin/bash
tsc --target ES5 foo.ts
Obviously this assumes foo.ts pulls in all the other project files so they get compiled (or you could glob for the files on the command-line seeing as you're running a Bash command).
This might be a quick and simple solution for you.
You could do what my team mates do. Use Sublime Text for text editing with a grunt watch in the background compiling any files that change : https://github.com/basarat/grunt-ts

CPAN giving all sorts of errors on ubuntu

I am just trying to run a simple perl program to import data from xml and export it to database.
Use Mysql; did not work, so I used DBD::mysql instead after failing to get Mysql.pm from cpan.
However, I am unable to install anything. I am trying to install xml parser module, but cpan gives these errors no matter what module you try to install.
install xml::parser
CPAN: Storable loaded ok (v2.20)
Going to read '/root/.cpan/sources/authors/01mailrc.txt.gz'
CPAN: Compress::Zlib loaded ok (v2.02)
............................................................................DONE
Going to read '/root/.cpan/sources/modules/02packages.details.txt.gz'
Warning: Your /root/.cpan/sources/modules/02packages.details.txt.gz does not contain a Line-Count header.
Please check the validity of the index file by comparing it to more
than one CPAN mirror. I'll continue but problems seem likely to
happen.
CPAN: Time::HiRes loaded ok (v1.9719)
Warning: Your /root/.cpan/sources/modules/02packages.details.txt.gz does not contain a Last-Updated header.
Please check the validity of the index file by comparing it to more
than one CPAN mirror. I'll continue but problems seem likely to
happen.
DONE
Going to read '/root/.cpan/sources/modules/03modlist.data.gz'
Catching error: "Can't locate object method \"data\" via package \"CPAN::Modulelist\" (perhaps you forgot to load \"CPAN::Modulelist\"?) at (eval 29) line 1.\cJ at /usr/share/perl/5.10/CPAN/Index.pm line 518\cJ\cICPAN::Index::rd_modlist('CPAN::Index', '/root/.cpan/sources/modules/03modlist.data.gz') called at /usr/share/perl/5.10/CPAN/Index.pm line 85\cJ\cICPAN::Index::reload('CPAN::Index') called at /usr/share/perl/5.10/CPAN.pm line 955\cJ\cICPAN::exists('CPAN=HASH(0xa225610)', 'CPAN::Module', 'xml::parser') called at /usr/share/perl/5.10/CPAN/Shell.pm line 1243\cJ\cICPAN::Shell::expandany('CPAN::Shell', 'xml::parser') called at /usr/share/perl/5.10/CPAN/Shell.pm line 1639\cJ\cICPAN::Shell::rematein('CPAN::Shell', 'install', 'xml::parser') called at /usr/share/perl/5.10/CPAN/Shell.pm line 1935\cJ\cICPAN::Shell::__ANON__('CPAN::Shell', 'xml::parser') called at /usr/share/perl/5.10/CPAN.pm line 375\cJ\cIeval {...} called at /usr/share/perl/5.10/CPAN.pm line 372\cJ\cICPAN::shell() called at /usr/bin/cpan line 198\cJ" at /usr/share/perl/5.10/CPAN.pm line 391
CPAN::shell() called at /usr/bin/cpan line 198
Going to read '/root/.cpan/sources/authors/01mailrc.txt.gz'
............................................................................DONE
Going to read '/root/.cpan/sources/modules/02packages.details.txt.gz'
Warning: Your /root/.cpan/sources/modules/02packages.details.txt.gz does not contain a Line-Count header.
Please check the validity of the index file by comparing it to more
than one CPAN mirror. I'll continue but problems seem likely to
happen.
Warning: Your /root/.cpan/sources/modules/02packages.details.txt.gz does not contain a Last-Updated header.
Please check the validity of the index file by comparing it to more
than one CPAN mirror. I'll continue but problems seem likely to
happen.
cpanDONE
Going to read '/root/.cpan/sources/modules/03modlist.data.gz'
No history written (no histfile specified).
Lockfile removed.
Can't locate object method "data" via package "CPAN::Modulelist" (perhaps you forgot to load "CPAN::Modulelist"?) at (eval 31) line 1.
at /usr/share/perl/5.10/CPAN/Index.pm line 518
CPAN::Index::rd_modlist('CPAN::Index', '/root/.cpan/sources/modules/03modlist.data.gz') called at /usr/share/perl/5.10/CPAN/Index.pm line 85
CPAN::Index::reload('CPAN::Index') called at /usr/share/perl/5.10/CPAN.pm line 692
CPAN::all_objects('CPAN=HASH(0xa225610)', 'CPAN::Distribution') called at /usr/share/perl/5.10/CPAN/Shell.pm line 1046
CPAN::Shell::failed('CPAN::Shell', 2, 1) called at /usr/share/perl/5.10/CPAN.pm line 413
eval {...} called at /usr/share/perl/5.10/CPAN.pm line 413
CPAN::shell() called at /usr/bin/cpan line 198
Am I doing something wrong? I tried searching for these errors, but no one has a right solution. Is there some setting in the config I should change?
If nobody has an answer for your particular problem I would probably just try with a new cpan, something like:
cd && mv .cpan .cpan-bak
and then trying to install the module again.
Hope this helps.
I had a similar problem.
Situation:
trying to install Catalyst::Plugin::AutoCRUD
using perl version: perlbrew-5.14.2
solution:
problem was the sudo i was prefacing to the cpan install command like this:
DIDNT WORK:
sudo cpan Catalyst::Plugin::AutoCRUD
WORKS:
chown -R myusername:myusergroup ~/.cpan
cpan Catalyst::Plugin::AutoCRUD
Reason: because i had perlbrew + cpan installed under my user account, NOT as root, all subsequent cpan module installs must be made with same user.
I had the same problem when my connection to the perl site timed out. The /root/.cpan/sources/modules/02packages.details.txt.gz contained only the information that the network timed out, and the /root/.cpan/sources/modules/03modlist.data.gz was also junk.
By removing just these files and trying again when the network was less busy, the files were then fetched correctly and everything worked fine again.
Check that your version of "cpan" (your installation program) matches your "perl" version...
Check this by doing: cpan --version and perl -v
I came across this same error while trying to install another module and it turned out that the version of "cpan" that I was using was compiled as part of the 5.8.8 perl package but the version of "perl" that is set as default here at work is version 5.8.5, so cpan was compiling the C code using references to the wrong 5.8.8 perl base library that was not compatible when implemented by the 5.8.5 perl base.
The simple solution was to call the proper "cpan" program using the full path "/usr/.../perl/5.8.5/bin/cpan module_name".
This little inconsistency of having different binaries of different version packages being default is a an oversight by our administrators and has really caused a lot of grief.
To resolve this issue I had to install cpanm on Centos7.
Steps:
yum install perl-devel
yum install perl-CPAN
curl -L http://cpanmin.us | perl - --sudo App::cpanminus
Add local bin (/usr/local/bin) to PATH using:
PATH=$PATH:/usr/local/bin
Links
http://www.canfield.com/on-error-do/install-cpanminus-in-centos-6-aka-cpanm
http://www.cpan.org/modules/INSTALL.html
In my case, I needed to run cpan with sudo -H to get my local network setitngs (like proxies). So:
cd && mv .cpan .cpan-bak
Then:
sudo -H cpan
Default answered to cpan configs (this time the errors didn't appear).
Then I was able to install any module.

Resources