Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make compiler failed #374

Open
liumingc opened this issue Mar 18, 2019 · 3 comments
Open

make compiler failed #374

liumingc opened this issue Mar 18, 2019 · 3 comments

Comments

@liumingc
Copy link

When make compiler, it failed with the following error message:

Making compiler1
time -f "%E %Mk"        java -Dfrege.javac=internal -Xss4m -Xmx2222m -cp build -jar fregec.jar -d build -hints -ascii -nocp -prefix a -sp "shadow:."  -target 1.7  -make frege.compiler.Main
E ./frege/control/Concurrent.fr:37: overloaded `poll´ is ambiguous at type 
    MutableIO (BlockingQueue t7694)->t7693
    It could mean one of 
    BlockingQueue.pollα  ::  forall e.MutableIO (BlockingQueue e) -> IO (Maybe e)
    BlockingQueue.pollβ  ::  forall e.MutableIO (BlockingQueue e) -> Int -> TimeUnit -> IO (Maybe e)
W ./frege/control/Concurrent.fr:37: application of
    MVar.poll will diverge.
Control.Concurrent: build failed because of compilation errors.
Compiler.Main: build failed because module `Control.Concurrent` not built.
Build failed.
Command exited with non-zero status 1
0:06.89 588204k
make: *** [Makefile:217: compiler1] Error 1

And my compiler version is

javac -version
javac 1.8.0_201
@Ingo60
Copy link
Member

Ingo60 commented Mar 18, 2019

Yeah, we had some improvements in Resolution of overloaded native functions a year ago.
You seem to use a Compiler that doesn't incorporate those yet.

(It's probably time to upload a more recent fregec.jar, I guess.)

Anyway, if you don't want to wait until then, you can do the following:

  • check out the frege compiler up to the changes on Feb 17

  • make a Compiler

  • check out the last two commits after Feb 17

  • make the compiler using the intermediate one

By the way, you'll not succeed with java 1.8, the javac is broken. You should do something like

make JAVA=java9 fregec.jar # where java9 is some Java > 1.8

make JAVA=java8 dist # include the repl, needs Java FX libraries and jline

Note that you can run the result with java8 and most probably compile your own projects using java8. It's just this one compiler source file the java8 compiler is unable to handle.

@Ingo60
Copy link
Member

Ingo60 commented Mar 18, 2019

You can download the latest compiler here: https://github.com/Frege/frege/releases/tag/3.25alpha

@liumingc
Copy link
Author

OK, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants