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

threads Makefile #38

Open
twood02 opened this issue Feb 1, 2015 · 4 comments
Open

threads Makefile #38

twood02 opened this issue Feb 1, 2015 · 4 comments
Assignees
Labels

Comments

@twood02
Copy link
Member

twood02 commented Feb 1, 2015

The position of -lpthread matters, so it is better to use -pthread instead in the makefiles.

Currently make server-tcp does not work because of the order. You could put the flag at the end, but it's better to just use -pthread.

@twood02 twood02 added the bug label Feb 1, 2015
@twood02
Copy link
Member Author

twood02 commented Feb 1, 2015

seems to be linux specific (works correctly on Mac)

@pradeep-k
Copy link
Member

Please let me know which linux OS and version is being used?

I am able to compile it on my centos. However, I will change the -lpthread to -pthread and will just test it on centos.

Please assign it to me.

@phil-lopreiato
Copy link
Member

For another data point, I can run make server-tcp in the threads directory with no linking errors.

➜  phil@fedora threads git:(master) uname -a
Linux fedora.think 3.18.3-201.fc21.x86_64 #1 SMP Mon Jan 19 15:59:31 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux
➜  phil@fedora ~  gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/4.9.2/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --enable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-linker-hash-style=gnu --enable-languages=c,c++,objc,obj-c++,fortran,ada,go,lto --enable-plugin --enable-initfini-array --disable-libgcj --with-isl=/builddir/build/BUILD/gcc-4.9.2-20141101/obj-x86_64-redhat-linux/isl-install --with-cloog=/builddir/build/BUILD/gcc-4.9.2-20141101/obj-x86_64-redhat-linux/cloog-install --enable-gnu-indirect-function --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.9.2 20141101 (Red Hat 4.9.2-1) (GCC)

@twood02
Copy link
Member Author

twood02 commented Feb 15, 2015

I'm not sure if this is already fixed or not, but I was using an ubuntu distro.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants