AI Zone Admin Forum Add your forum

NEWS: Chatbots.org survey on 3000 US and UK consumers shows it is time for chatbot integration in customer service!read more..

Errors building Harry
 
 

Hi.
I’m running the latest version cloned from https://github.com/bwilcox-1234/ChatScript.git on Mac OS Sierra.

After testing chatting with Harry I tried to build it and I’m getting errors related with json:

>:build Harry
ChatScript Version 6.91 compiled Dec 14 2016 23:03:25

>>Reading folder RAWDATA/HARRY/

——Reading file childhood.top
Reading topic ~childhood

——Reading file introductions.top
Reading topic ~introductions

——Reading file keywordless.top
Reading topic ~keywordless
*** Error- line 18 of keywordless.top:
  in keywordless.top at 18:  $$tmp = ^jsonopen(GET $$url “” $$user_agent)
 
OUTPUT-5 Apparent call to ^jsonopen is not yet defined*** Error- line 27 of keywordless.top:
  in keywordless.top at 27:  $$tmp = ^jsonopen(GET $$url “” $$user_agent)
 
OUTPUT-5 Apparent call to ^jsonopen is not yet defined*** Error- line 36 of keywordless.top:
  in keywordless.top at 36:  $$tmp = ^jsonopen(GET $$url “” $$user_agent)
 
OUTPUT-5 Apparent call to ^jsonopen is not yet defined
——Reading file simplecontrol.top
Reading outputmacro: ^harry
Reading table tbl:defaultbot
  Locals: ^name,
Reading topic ~control
*** Warning- line 26 of simplecontrol.top: loopback is not a known word. Is it misspelled?
Reading topic ~xpostprocess

<<end folder RAWDATA/HARRY

>>Reading folder RAWDATA/QUIBBLE/

——Reading file eliza_because.top
Reading topic ~quibble_because

——Reading file eliza_can.top
Reading topic ~quibble_will
Reading topic ~quibble_can

——Reading file eliza_do.top
Reading topic ~quibble_do

——Reading file eliza_how.top
Reading topic ~quibble_howmuch
Reading topic ~quibble_how

——Reading file eliza_misc.top
Reading topic ~quibble_misc
*** Warning- line 400 of eliza_misc.top: shoulds is not a known word. Is it misspelled?

——Reading file eliza_not.top
Reading topic ~quibble_not

——Reading file eliza_or.top
Reading topic ~quibble_or

——Reading file eliza_what.top
Reading topic ~quibble_what

——Reading file eliza_when.top
Reading topic ~quibble_when

——Reading file eliza_where.top
Reading topic ~quibble_where

——Reading file eliza_who.top
Reading topic ~quibble_who

——Reading file eliza_why.top
Reading topic ~quibble_why

——Reading file honest.top
Reading topic ~intent
Reading topic ~honest_response

——Reading file quibble.top
Reading topic ~quibble_all

<<end folder RAWDATA/QUIBBLE

ERROR SUMMARY:
  line 18 of keywordless.top:
OUTPUT-5 Apparent call to ^jsonopen is not yet defined
  line 27 of keywordless.top:
OUTPUT-5 Apparent call to ^jsonopen is not yet defined
  line 36 of keywordless.top:
OUTPUT-5 Apparent call to ^jsonopen is not yet defined
r
3 errors - press Enter to quit. Then fix and try again.

when I run MacChatScript local I’m getting these:
  Dictionary building disabled.
  JSON access disabled.

do I need to compile enabling Dictionary and JSON?, I don’t know where to look exactly for that, also I’m not sure if I should compile with the make script or using the Xcode project. Thank you in advance for your help.

 

 
  [ # 1 ]

Mac build is a LINUX build, which does not by default build with JSON data, since you have to have the curl library installed.  But harry uses it. So there is a conflict.  I will for future remove the #define DISCARD_JSON in common.h that is tied to mac. In the meantime you can remove it yourself and insure you have curl library installed

 

 
  [ # 2 ]

Actually, I misspoke. Ios and Android have discard turned on. Normal files do not have it turned on for Mach/unix.
How did you you build the mac version?

 

 
  [ # 3 ]

I first tried building the version dowloaded from sourceforge site, but had different errors. Then I moved to the GitHub repo and used the BINARIES as they came.

When building the Xcode project, it outputs MacChatScript in the root folder, I manually move it to the BINARIES to replace the previous one and run it, but results from console are the same. Am I missing some steps?

 

 
  [ # 4 ]

I just found a few preprocessor macros in the Build Settings of the Xcode proj, one was DISCARDJSON=1, I removed it and now I’m getting errors with _curl_ functions, I do have curl but the project is not reaching these functions, I’m looking into that.

 

 
  [ # 5 ]

Ok. Added -lcurl in the Build Settings->Other Linker Flags on Xcode, now is compiling. Harry is also building smile

I still have “Dictionary building disabled…”.

I don’t know in what ways is that limiting me yet…
Thanks Bruce for your quick replies.

 

 
  [ # 6 ]

You cant build a dictionary, only I can. It does not limit you as you lack all the data necessary to build a dictionary

 

 
  [ # 7 ]

Hey Alexander.  I maintain the Xcode project for chatscript and help out with providing the mac binary.  yes, I had JSON turned off, but ran into the same issue last build.  If you grab the Xcode project from GitHub head it should have the same changes you made plus a mac binary with json enabled. 

Enjoy!

 

 
  [ # 8 ]

Thanks Todd.
Mac client is running fine with the predefined bots, and some tests I’ve been doing as well.
My next step is to use postgresql to store the data, as it eventually will connect to another web service and possibly used from outside CS.

Can I generate the server on the mac environment + postgresql? I noticed the DISCARDPOSTGRES=1, if I remove it will it create another executable? also would like your guidance on other config or build change that I need to get this.

At the end the server will be a Linux instance over some service provider but I would like to have this setup because I’m locally developing on a mac.

Regards!

 

 
  [ # 9 ]

While (generally speaking) a Mac can these days be considered by some to be a *nix box, there are enough subtle differences to warrant installing a true Linux OS within the confines of a VM, in order to be able to have an “apples to apples” environment to work with. As a developer who works on several cross-platform projects, I’ve learned the value of virtual machines the hard way, and now don’t develop software without them. I think it’s worth considering.

 

 
  [ # 10 ]

Hey Alexander - Postgres library is not included in the default mac library set so I’m not going to add it to the base Xcode build set.  You should be able to install postgres yourself, add the library into the compile time libraries in Xcode and be good to go.  I can take a look later today and do the same myself and post instructions if you need them.

Dave - I’m generating a library for use in Unity3D game development ( and windows/linux as well eventually when publishing ) so mac compilation and execution is required.  That’s why I work on the mac compilation/xcode stuff.  smile  I use VMs a lot for just what you mention, and will test my unity linux and windows builds on one.

 

 
  [ # 11 ]

Yup, I just built it with postgres support by using brew to install postgress.  The only tricky part is adding the library that’s in /usr, which the finder hides, I just have a symlink to /usr/local in my home directory so I can browse into the brew /usr/local/lib/postgres location in Xcode and add the lib ( haven’t figured out how to make /usr visible in the finder in Sierra yet. )  Then remove the define and voila.

Haven’t tried connecting to postgres yet in chatscript, although I do use it for other stuff.  My current chatscript project is likely to be using mongo and I’m guessing instructions for getting that to compile against chatscript are identical to postgres.  Let me know how it goes.

 

 
  [ # 12 ]

Turns out Mongo support was a bit more complex but not too bad.  Essentially you have to brew install mongo and mongo-c-library, then add both the library and the header paths in /usr/local/Cellar/mongo-c-driver/1.5.1 to Xcode build settings.

I got it to build with full Mongo, Postgres and JSON support.  smile

I’ll test them later and probably post up step by step instructions.

 

 
  login or register to react