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

can't compile on OSX, missing libpthread #49

Closed
dseguy opened this issue Nov 21, 2018 · 4 comments
Closed

can't compile on OSX, missing libpthread #49

dseguy opened this issue Nov 21, 2018 · 4 comments

Comments

@dseguy
Copy link

dseguy commented Nov 21, 2018

With a freshly updated repo, I try to make phpspy :

phpspy$ make
Makefile:22: *** Need libpthread.  Stop.

libpthread is installed, available in /usr/lib/libpthread.dylib
$LDFLAGS is empty

a direct call to ld gives this (based on the Makefile that leads to the failure) :

$ ld -lpthread 
ld: warning: No version-min specified on command line
ld: warning: -arch not specified
ld: warning: -macosx_version_min not specified, assuming 10.11
Undefined symbols for architecture x86_64:
  "_main", referenced from:
     implicit entry/start for main executable
ld: symbol(s) not found for inferred architecture x86_64

How can I fix this ?

@adsr
Copy link
Owner

adsr commented Nov 21, 2018

Hi, unfortunately phpspy is Linux only right now. I filed issues for macOS (#50) and Windows support (#51).

@adsr adsr closed this as completed Nov 21, 2018
@paslandau
Copy link

Hey @adsr ,

I got the same error Makefile:22: *** Need libpthread. Stop. using a docker container based on https://github.com/phusion/baseimage-docker

After "blindly" installing everything mentioned in #45 it works (at least I can run make without errors). Would still be good to understand what exactly I was missing since googling for libpthread doesn't provide much help.

Cheers
Pascal

@adsr
Copy link
Owner

adsr commented Mar 23, 2019

Hi @paslandau, libpthread (POSIX threads) should be provided by the libc package. I am not sure why it can't be found on your setup. I tried reproducing with the steps below but could not.

docker run --rm -t -i phusion/baseimage /sbin/my_init -- bash -l
apt update
apt install -y git # for git clone
apt install -y build-essential # for gcc and make
apt install -y python # for compiling termbox with waf (python)
git clone --recursive https://github.com/adsr/phpspy.git
cd phpspy
make

fsodano added a commit to fsodano/phpspy that referenced this issue Sep 23, 2019
MacOS and Windows developers are not able to build phpspy locally. See
adsr#49.

This commit provides an interim solution by allowing developers to run
phpspy in a container.
fsodano added a commit to fsodano/phpspy that referenced this issue Sep 23, 2019
MacOS and Windows developers are not able to build phpspy locally. See
adsr#49.

This commit provides an interim solution by allowing developers to run
phpspy in a container.
@DanielRuf
Copy link

After "blindly" installing everything mentioned in #45 it works (at least I can run make without errors)

For me this did not work as some of them are also not available in homebrew/core.

adsr pushed a commit that referenced this issue Apr 28, 2020
MacOS and Windows developers are not able to build phpspy locally. See
#49.

This commit provides an interim solution by allowing developers to run
phpspy in a container.
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

4 participants