Syntax error: Unterminated quoted string
duanmeng opened this issue · comments
Error Log
duanmeng@ubuntu:~/work/rDSN/tutorial$ ../bin/dsn.cg.sh counter.thrift counter
exec: /home/duanmeng/work/rDSN/bin/Linux/thrift --gen rdsn -out counter counter.thrift
/home/duanmeng/work/rDSN/bin/Linux/thrift: 4: /home/duanmeng/work/rDSN/bin/Linux/thrift: Syntax error: Unterminated quoted string
Reproduce Steps
- Following the step 1.2 in tutorial::SingleNode
- Execute
../bin/dsn.cg.sh counter.thrift counter
in $RDSN/tutorial
It works fine in os x after copy Linux as Darwin in $RDSN/bin and grant execute permission in them
I usually did this after installation as the cmake install process will grant the permission appropriately. I'll check the issue when back to office tomorrow.
Sent from my Windows Phone
发件人: duanmengmailto:notifications@github.com
发送时间: 2015/6/3 20:30
收件人: Microsoft/rDSNmailto:rDSN@noreply.github.com
主题: [rDSN] Syntax error: Unterminated quoted string (#11)
#Error Log
duanmeng@ubuntu:~/work/rDSN/tutorial$ ../bin/dsn.cg.sh counter.thrift counter
exec: /home/duanmeng/work/rDSN/bin/Linux/thrift --gen rdsn -out counter counter.thrift
/home/duanmeng/work/rDSN/bin/Linux/thrift: 4: /home/duanmeng/work/rDSN/bin/Linux/thrift: Syntax error: Unterminated quoted string
#Reproduce Steps
- Following the step 1.2 in tutorial::SingleNode
- Execute
../bin/dsn.cg.sh counter.thrift counter
in $RDSN/tutorial
It works fine in os x after copy Linux as Darwin in $RDSN/bin and grant execute permission in them
Reply to this email directly or view it on GitHub:
#11
This is also caused by using the wrong dsn.cg.sh
. Our tutorial does not tell it clearly, so I just add a sentence to emphasize this in the tutorial step 1.2.. Hope it helps.
Thanks it helps a lot.
And I suggest to add Darwin support for %os-name%(e.g., Linux) would be Darwin in os x yosemite.
I've reinstall rdsn and use the right dsn.cg.sh but failed again in ubuntu.
Log
duanmeng@ubuntu:/work/rDSN/tutorial$ which dsn.cg.sh/work/rDSN/tutorial$ pwd
/usr/local/rdsn/bin/dsn.cg.sh
duanmeng@ubuntu:
/home/duanmeng/work/rDSN/tutorial
duanmeng@ubuntu:/work/rDSN/tutorial$ history | grep [c]make | tail -2/work/rDSN/tutorial$ dsn.cg.sh counter.thrift counter
971: 2246 cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/rdsn
987: 2262 history | grep cmake | grep PREFIX
duanmeng@ubuntu:
exec: /usr/local/rdsn/bin/Linux/thrift --gen rdsn -out counter counter.thrift
/usr/local/rdsn/bin/Linux/thrift: 4: /usr/local/rdsn/bin/Linux/thrift: Syntax error: Unterminated quoted string
failed invoke thrift tool to generate 'counter/counter.php'
duanmeng@ubuntu:/work/rDSN/tutorial$ uname -a/work/rDSN/tutorial$ ls /usr/local/rdsn/
Linux ubuntu 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:08:14 UTC 2014 i686 i686 i686 GNU/Linux
duanmeng@ubuntu:
bin include lib
duanmeng@ubuntu:~/work/rDSN/tutorial$ ls /usr/local/rdsn/bin/Linux/
protoc thrift
We've tried the same configuration with the same command, and everything seems ok.
~/projects/rDSN/tutorial$ /usr/local/rdsn/bin/dsn.cg.sh counter.thrift src
output directory 'src' created.
exec: /usr/local/rdsn/bin/Linux/thrift --gen rdsn -out src counter.thrift
generate 'src/counter.code.definition.h' successfully!
generate 'src/counter.types.h' successfully!
generate 'src/CMakeLists.txt' successfully!
generate 'src/counter.app.example.h' successfully!
generate 'src/counter.client.h' successfully!
generate 'src/config.ini' successfully!
generate 'src/counter.main.cpp' successfully!
generate 'src/counter.server.h' successfully!
We suggest running thrift binary directly to see whether it works to see what we can do next.
The root cause is my ubuntu is 32bit but the /usr/local/rdsn/bin/thrift is 64bit.
But it is odd that I make && make install rdsn in my ubuntu 32bit.
Anyway if no support for 32bit ubuntu I can learn it rDSN in mac.
Log
duanmeng@ubuntu:/work/rDSN/tutorial$ uname -a/work/rDSN/tutorial$ /usr/local/rdsn/bin/Linux/thrift --gen rdsn -out counter counter.thrift
Linux ubuntu 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:08:14 UTC 2014 i686 i686 i686 GNU/Linux
duanmeng@ubuntu:
-bash: /usr/local/rdsn/bin/Linux/thrift: cannot execute binary file: Exec format error
duanmeng@ubuntu:~/work/rDSN/tutorial$ readelf -h /usr/local/rdsn/bin/Linux/thrift | head -n5
ELF Header:
Magic: 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00
Class: ELF64
Data: 2's complement, little endian
Version: 1 (current)
Thanks. Sorry for your inconvenience as we did not make it clear in our installation guide. Now it is.