lua-llthreads2 icon indicating copy to clipboard operation
lua-llthreads2 copied to clipboard

mac os: rockspec fails to install

Open osch opened this issue 3 years ago • 3 comments

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 https://github.com/osch/lua-mtmsg/commit/669812de24f6be5782a12ee7415bf890c5d1b7e1

osch avatar Feb 19 '22 14:02 osch

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

moteus avatar Feb 19 '22 14:02 moteus

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?

osch avatar Feb 19 '22 15:02 osch

Any solution for this?

sakkeerhussain avatar Sep 20 '22 08:09 sakkeerhussain