Giter VIP home page Giter VIP logo

Comments (13)

chr15m avatar chr15m commented on July 28, 2024

Are you able to share the contents of wow.clj?

from flk.

Shinoa-Fores avatar Shinoa-Fores commented on July 28, 2024

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.

chr15m avatar chr15m commented on July 28, 2024

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.

Shinoa-Fores avatar Shinoa-Fores commented on July 28, 2024

Meh, I'll just close. I tried compiling any of the examples and get the same thing. No clue.

from flk.

chr15m avatar chr15m commented on July 28, 2024

@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.

chr15m avatar chr15m commented on July 28, 2024

@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.

chr15m avatar chr15m commented on July 28, 2024

If this is what is failing I'll add a note to the docs.

from flk.

Shinoa-Fores avatar Shinoa-Fores commented on July 28, 2024

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.

Shinoa-Fores avatar Shinoa-Fores commented on July 28, 2024

Just to check, also switched my compiler to gcc-7.3.0 but experience the same result.

from flk.

chr15m avatar chr15m commented on July 28, 2024

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.

chr15m avatar chr15m commented on July 28, 2024

Or if you have time to email me the whole thing, even better.

from flk.

chr15m avatar chr15m commented on July 28, 2024

It seems this error is related to Bash being sensitive to any characters before and after the here-document terminator.

We'll get to the bottom of this.

from flk.

chr15m avatar chr15m commented on July 28, 2024

@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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.