josepablocam / aquery

A scala rewrite of the AQuery system
10 stars 6 forks source link

Fail to have q in my Ubuntu's PATH #2

Closed chelseaisgood closed 7 years ago

chelseaisgood commented 7 years ago

Hi all,

I try to add q to my path like this in this article.

Once you install q, make sure you add its installation location to your path. export PATH=$PATH:/my/q/installation/location/ Calling which q should echo back the appropriate location, if added succesfully.

I try to export like the command says. But after, I type "which q" and then type "echo $?", it returns 1 which indicates that q is not added to my path.

Then I try to do what this article tells me to do in the linux part. It says as follows: Edit your profile In the File Manager, find .bashrc in your home folder. Open it with a text editor and append the following line alias q='QHOME=~/q rlwrap -r ~/q/l32/q' and save it. Tell Bash to use the revised profile: source .bashrc

However, after that q still cannot be added to my path.

Can anyone help me on this problem? Thanks.

Sincerely, Frank

josepablocam commented 7 years ago

Can you run q when you specify the full path directly in the command line? If not, then I suggest fixing that install issue first.

chelseaisgood commented 7 years ago

Like q followed by a .q file? Yes. I can run it.

i.e. I can run "q make_data.q" under the directory of /aquery2q/src/demo.

But after I type make when I try to run the demo in aquery2q/src/demo/.

Here is the error info: q make_data.q;\ q data_to_q.q -csv /home/frank/Downloads/aquery2q/src/demo/data -save /home/frank/Downloads/aquery2q/src/demo/data; /bin/sh: 1: q: not found /bin/sh: 2: q: not found make: *** [qdata] Error 127

After checking the makefile , I am sure I am stuck in the qdata: part between line 32 and 34.

josepablocam commented 7 years ago

@chelseaisgood you seem to be trying to run something from the old repository of the project. As noted in that github site, that repository is deprecated. There may be things there that don't work. In general, I will only be supporting the new project going forward. Is your issue reproducible in the new repository (note that there is no demo there)?

chelseaisgood commented 7 years ago

@josepablocam For the new repository, after running "sbt assembly", a lot of tests failed. Here I copy a fragment which contains some info concerning q:

[info] KdbGeneratorTestSuite: [info] - simple expressions/UDF FAILED [info] java.io.IOException: Cannot run program "q": error=2, No such file or directory [info] at java.lang.ProcessBuilder.start(ProcessBuilder.java:1047) ... [info] Run completed in 15 seconds, 407 milliseconds. [info] Total number of tests run: 52 [info] Suites: completed 6, aborted 0 [info] Tests: succeeded 41, failed 11, canceled 0, ignored 0, pending 0 [info] 11 TESTS FAILED [error] Failed tests: [error] KdbGeneratorTestSuite [error] (test:test) sbt.TestsFailedException: Tests unsuccessful [error] Total time: 121 s, completed Nov 20, 2016 8:00:59 PM

I think it is probably because I am not able add q to the path.

josepablocam commented 7 years ago

Yes, it fails out because it cannot call q (which it needs to test the result equivalence of various unit tests).

Are you sure the issue is adding q to your PATH? Have you actually tried running q directly and pulling up the interpreter? Does that work? Or do you get no such file error? If the latter, then I suspect the issue is that your ubuntu install is 64bit, but the q executable is 32bit. You can solve this by following the advice here.

I'm closing this issue for now, as in any case it doesn't seem to be a problem with aquery (I had no problem running and building on a a fresh Ubuntu install).