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

Cannot build exampls/simple.c #3

Closed
marioguerriero opened this issue Jul 16, 2013 · 6 comments
Closed

Cannot build exampls/simple.c #3

marioguerriero opened this issue Jul 16, 2013 · 6 comments

Comments

@marioguerriero
Copy link

Running "make simple" I got the following error:

gcc -o sprec_simple examples/simple.o -lsprec
/usr/bin/ld: examples/simple.o: undefined reference to symbol 'pthread_join@@GLIBC_2.0'
/usr/bin/ld: note: 'pthread_join@@GLIBC_2.0' is defined in DSO /lib/i386-linux-gnu/libpthread.so.0 so try adding it to the linker command line
/lib/i386-linux-gnu/libpthread.so.0: could not read symbols: Invalid operation
collect2: error: ld returned 1 exit status
make: *** [sprec_simple] Error 1

@H2CO3
Copy link
Owner

H2CO3 commented Jul 16, 2013

Oh yes, that's a difference between Linux and OS X (what this library is being developed on). What happens when you add -lpthread to the end of the linker flags?

@marioguerriero
Copy link
Author

I get the following error:

gcc -o sprec_simple examples/simple.o -lsprec -lpthread
/usr/lib/gcc/i686-linux-gnu/4.7/../../../../lib/libsprec.so: undefined reference to `alloca'
collect2: error: ld returned 1 exit status
make: *** [sprec_simple] Error 1

it's the same error I get while running "make tool"

@H2CO3
Copy link
Owner

H2CO3 commented Jul 16, 2013

Now that is weird. The code doesn't even use alloca(). Are you sure your installation of GCC and the C development libraries is correct?

@marioguerriero
Copy link
Author

I installed gcc from Ubuntu 13.04 repo. I think C development libraries are correct. Can you mentaion what packages do I have to install?

@marioguerriero
Copy link
Author

I just tried to reinstall libsprec and not it works fine. Thank you for the help.

@H2CO3
Copy link
Owner

H2CO3 commented Jul 17, 2013

You are welcome, I'm glad it worked out.

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

2 participants