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

Some Cygwin version do not support -lpthread which configures OCaml without native threads #7104

Closed
vicuna opened this issue Dec 22, 2015 · 2 comments
Assignees
Milestone

Comments

@vicuna
Copy link

vicuna commented Dec 22, 2015

Original bug ID: 7104
Reporter: @gasche
Assigned to: @damiendoligez
Status: resolved (set by @xavierleroy on 2017-02-17T15:38:09Z)
Resolution: not a bug
Priority: normal
Severity: minor
Version: 4.02.3
Target version: 4.05.0 +dev/beta1/beta2/beta3/rc1
Fixed in version: 4.05.0 +dev/beta1/beta2/beta3/rc1
Category: configure and build/install

Bug description

Sébastien Dailly on the ocaml-beginners mailing-list reports that his Cygwin setup does not support the -lpthread option (but supports the pthread library):
https://groups.yahoo.com/neo/groups/ocaml_beginners/conversations/messages/14494

This means that the configure should probably be changed to not test -pthread at configuration time.

According to Cygwin experts
https://cygwin.com/ml/cygwin/2006-07/msg00226.html
pthread is not required on Cygwin systems, and can be replaced with -lcygwin.

Additional information

Our Continuous Integration (CI) machines work fine under Cygwin, so this might still be a misconfiguration on Sébastien's part. He is using a more recent Cygwin version than the CI machines, though, his version is:

$ uname.exe -a
CYGWIN_NT-6.1 dailly-PC 2.3.1(0.291/5/3) 2015-11-14 12:42 i686 Cygwin

@vicuna
Copy link
Author

vicuna commented Apr 15, 2016

Comment author: @damiendoligez

I guess we should make a case in configure for cygwin, which does not need any argument in order to link with the posix thread library.

On the other hand, cygwin does explicitly include an empty libpthread.a to make sure that -lpthread works as expected.

So I don't know what happened on Sebastien's machine.

@vicuna
Copy link
Author

vicuna commented Feb 17, 2017

Comment author: @xavierleroy

As of today on my Cygwin 32 and 64 installations, there is a /usr/lib/libpthread.a and it is far from empty. OCaml's configure seems to be doing the right things. Closing this PR.

@vicuna vicuna closed this as completed Feb 17, 2017
@vicuna vicuna added this to the 4.05.0 milestone Mar 14, 2019
@vicuna vicuna added the bug label Mar 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants