Closed daneshvar-amrollahi closed 1 year ago
Thanks for the report! Can you provide some info about your OS
and happy
and alex
versions? GHC is 9.4.2, as I can see.
Thanks for the report! Can you provide some info about your
OS
andhappy
andalex
versions? GHC is 9.4.2, as I can see.
The OS is Ubuntu 20.04.4 LTS
. Here is the info on alex
and happy
:
$ alex --version
Alex version 3.2.7.1, (c) 2003 Chris Dornan and Simon Marlow
$ happy --version
Happy Version 1.20.0 Copyright (c) 1993-1996 Andy Gill, Simon Marlow (c) 1997-2005 Simon Marlow
Happy is a Yacc for Haskell, and comes with ABSOLUTELY NO WARRANTY.
This program is free software; you can redistribute it and/or modify
it under the terms given in the file 'LICENSE' distributed with
the Happy sources.
These are the latest version of happy
and alex
.
On my system (macOS Mojave) no special flag -lpthread
is needed, but it also does not harm.
I'd like some more evidence though that the addition is portable (Windows and other common OSs).
Note that one can always pass in extra flags via:
make GHC_OPTS='-lpthread'...
These are old issues I found on the topic, but this was GHC 8.2:
There is an open GHC issue but this displays different symptoms:
These are the latest version of
happy
andalex
. On my system (macOS Mojave) no special flag-lpthread
is needed, but it also does not harm. I'd like some more evidence though that the addition is portable (Windows and other common OSs). Note that one can always pass in extra flags via:make GHC_OPTS='-lpthread'...
In Windows, Makefiles are usually setup using tools like MinGw and Cygwin, which allows users to install a bunch of unix-based programs. I guess it should be compatible with the makefiles working on Linux.
Thanks, @daneshvar-amrollahi for your report and efforts. I still remain unconvinced that this is a general problem (rather than something on your machine, maybe). If this was a common problem, one of my students in my course using BNFC would have had it and alerted me, I suppose. Also, having to pass extra -l
flags to GHC is something you usually don't have to do.
Thus, I am closing this issue for now, waiting for more evidence. Please use the workaround I describe.
Hi,
I was executing the Mini tutorial in the README and I faced a linking error related to pthread as followed:
The error is raising from this line of the Makefile:
${GHC} ${GHC_OPTS} $@
It needs a
-lpthread
to be fixed. I will soon open a pull request to fix this.