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

mac os: rockspec fails to install #20

Open
osch opened this issue Feb 19, 2022 · 3 comments
Open

mac os: rockspec fails to install #20

osch opened this issue Feb 19, 2022 · 3 comments

Comments

@osch
Copy link
Contributor

osch commented Feb 19, 2022

Rockspec fails to install on Mac OS 11 because luarocks does not find pthread:

$ luarocks install lua-llthreads2-0.1.6-1.rockspec 

Error: Could not find library file for PTHREAD
  No file libpthread.a in /usr/local/lib
  No file libpthread.dylib in /usr/local/lib
  No file matching libpthread.so.* in /usr/local/lib
  No file libpthread.a in /usr/lib
  No file libpthread.dylib in /usr/lib
  No file matching libpthread.so.* in /usr/lib
  No file libpthread.a in /lib
  No file libpthread.dylib in /lib
  No file matching libpthread.so.* in /lib
You may have to install PTHREAD in your system and/or pass PTHREAD_DIR or PTHREAD_LIBDIR to the luarocks command.
Example: luarocks install lua-llthreads2 PTHREAD_DIR=/usr/local

One workaround could be avoid specifying pthread for mac os, e.g. to replace

  platforms = {
    unix = {
      modules = {
        llthreads2 = {
          libraries = {"pthread"},
        }
      }
    },

with

  platforms = {
    linux = {
      modules = {
        llthreads2 = {
          libraries = {"pthread"},
        }
      }
    },

See also osch/lua-mtmsg@669812d

@moteus
Copy link
Owner

moteus commented Feb 19, 2022

Do you know why it passes uild/test on osx CI?

@osch
Copy link
Contributor Author

osch commented Feb 19, 2022

Do you know why it passes uild/test on osx CI?

No I don't know.

It also passed my Mac OS CI integration tests in the past 3 months ago, see https://github.com/osch/lua-mtmsg/actions/workflows/test.yml but now it doesn't :-(

Perhaps something changed in Mac OS?

@sakkeerhussain
Copy link

Any solution for this?

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

3 participants