Comments (13)
Are you able to share the contents of wow.clj
?
from flk.
Are you able to share the contents of wow.clj?
I just used the simple example from README too, put it in file called "wow.clj"
(println "Hello world!") (println "Hostname:" (sh* "hostname")))
from flk.
Very strange. I note there is a typo in what you have pasted - an extra brace at the end.
However, I think that's not what is causing this error. In fact it should not be possible for the error to occur as you've pasted it. You're saying that the invocation of make
threw an error like ./flk: line 1510: warning:
however the Makefile does not ever call flk directly so I don't see how that error has arisen.
In order to replicate this can you please paste the exact sequence of what you ran and the contents of the relevant files.
from flk.
Meh, I'll just close. I tried compiling any of the examples and get the same thing. No clue.
from flk.
@Shinoa-Fores can you tell me the exact output of the following commands when run inside the Fleck checkout?
git status -s
git rev-parse HEAD
make DEST=hello INSERT=examples/hello.clj NOREPL=1
./hello
My output for these commands is as follows:
$ git status -s
[no output]
$ git rev-parse HEAD
3ca21987b456eac18f9eeb4d3e9cc57761508028
$ make DEST=hello INSERT=examples/hello.clj NOREPL=1
cat mal/bash/mal | sed '/then exit/,$d' > hello
cat src/extras.sh >> hello
echo 'read -d "" _REPCAPTURE <<INLINEMALFILE' >> hello
cat mal/lib/alias-hacks.mal mal/lib/trivial.mal src/math.clj src/reducers.clj >> hello
[ "examples/hello.clj" = "" ] || cat examples/hello.clj >> hello
echo 'INLINEMALFILE\nREP "(do ${_REPCAPTURE})";\n' >> hello
if [ "1" = "" ]; then cat src/file-repl.sh; fi >> hello
chmod 755 hello
$ ./hello
Hello world!
This is diziet
Uptime is 06:14:44 up 20 days, 22:09, 4 users, load average: 0.26, 0.36, 0.51
from flk.
@Shinoa-Fores oh, I think I have figured out what is going on.
Can you run git submodule init; git submodule update
and then try again?
from flk.
If this is what is failing I'll add a note to the docs.
from flk.
My output for the above commands:
$ git submodule init; git submodule update
Submodule 'mal' (https://github.com/chr15m/mal.git) registered for path 'mal'
Cloning into '/home/shinohai/devel/lisp/flk/mal'...
Submodule path 'mal': checked out '45eb7ae0c2d7359dce95da06b14df211179c75ee'
$ git status -s
[no output]
$ git rev-parse HEAD
3ca21987b456eac18f9eeb4d3e9cc57761508028
$ make DEST=hello INSERT=examples/hello.clj NOREPL=1
cd mal/bash && make mal
make[1]: Entering directory '/home/shinohai/devel/lisp/flk/mal/bash'
cat types.sh reader.sh printer.sh env.sh core.sh stepA_mal.sh | grep -v "^source " > mal.sh
echo "#!/usr/bin/env bash" > mal
cat mal.sh >> mal
chmod +x mal
make[1]: Leaving directory '/home/shinohai/devel/lisp/flk/mal/bash'
cat mal/bash/mal | sed '/then exit/,$d' > hello
cat src/extras.sh >> hello
echo 'read -d "" _REPCAPTURE <<INLINEMALFILE' >> hello
cat mal/lib/alias-hacks.mal mal/lib/trivial.mal src/math.clj src/reducers.clj >> hello
[ "examples/hello.clj" = "" ] || cat examples/hello.clj >> hello
echo 'INLINEMALFILE\nREP "(do ${_REPCAPTURE})";\n' >> hello
if [ "1" = "" ]; then cat src/file-repl.sh; fi >> hello
chmod 755 hello
$ ./hello
./hello: line 1531: warning: here-document at line 1470 delimited by end-of-file (wanted `INLINEMALFILE')
So appears I'm still getting same error :/
Other info:
$ bash --version
GNU bash, version 4.4.23(1)-release (x86_64-pc-linux-gnu)
$gcc -v
gcc version 9.2.0 (Gentoo Hardened 9.2.0-r1 p2)
from flk.
Just to check, also switched my compiler to gcc-7.3.0 but experience the same result.
from flk.
Fleck does not use the gcc
compiler so that shouldn't be an issue.
This is a very interesting puzzle. Can you send me the last 10 lines of the hello
script that is produced?
from flk.
Or if you have time to email me the whole thing, even better.
from flk.
It seems this error is related to Bash being sensitive to any characters before and after the here-document terminator.
- https://stackoverflow.com/questions/27201004/line-54-warning-here-document-at-line-42-delimited-by-end-of-file-wanted-eof
- https://www.krenger.ch/blog/bash-here-document-at-line-n-delimited-by-end-of-file-wanted-eof/
- https://stackoverflow.com/questions/12503581/bash-warning-here-document-at-line-delimited-by-end-of-file-wanted-eof
We'll get to the bottom of this.
from flk.
@Shinoa-Fores tested and reported this as fixed!
Solution was here: https://stackoverflow.com/questions/8467424/echo-newline-in-bash-prints-literal-n
from flk.
Related Issues (20)
- Makefile rule to create a sourceable version so that internals can be re-used. HOT 5
- Add tests for Fleck specific functions, re-using mal's test infrastructure.
- A way to get the return code from an sh* function interop call HOT 8
- How do I get CLI args? HOT 1
- stdin doesnt read to EOF. only till end of first form HOT 2
- Piping examples/ip-addresses.clj into flk hangs
- Keyword as a function seems broken HOT 1
- Are you using Fleck? I would love to hear about it. HOT 1
- str-pos should return the position of string a in string b
- quasiquote symbol "`" break when it is merged in __FLECK__REPCAPTURE
- Help request serialize HOT 3
- What is the license? HOT 6
- env does not work on mac os HOT 15
- doc should say flk requires bash 4 or greater HOT 2
- range should be better supported HOT 1
- Carriage returns from sh* are incorrectly escaped HOT 1
- Some suggestions HOT 2
- Which versions of bash does this support? HOT 3
- Create and maintain a GitHub release instead of versioning the output file. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flk.