Requires pthread linker but is not present in Makefile [w/ fix]
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
ttyMIDI |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
Simple problem but people who don't know better may not be able to fix it so easily.
Seems you're using pthreads but the Makefile doesn't contain the -lpthreads
After doing a make on a download/untar I got this:
gcc src/ttymidi.c -o ttymidi -lasound
/usr/bin/ld: /tmp/cc1Eaxfg.o: undefined reference to symbol 'pthread_
/usr/bin/ld: note: 'pthread_
/usr/lib/
collect2: error: ld returned 1 exit status
make: *** [all] Error 1
Simply added "-lpthread" to Makefile fixed it.
--- Makefile 2012-02-01 21:56:20.000000000 +0200
+++ fixed/Makefile 2012-11-15 16:27:32.000000000 +0200
@@ -1,5 +1,5 @@
all:
- gcc src/ttymidi.c -o ttymidi -lasound
+ gcc src/ttymidi.c -o ttymidi -lasound -lpthread
clean:
rm ttymidi
install:
Changed in ttymidi: | |
status: | New → Confirmed |
Changed in ttymidi: | |
status: | Confirmed → Fix Released |
Thanks a lot Bryan, I was one of those that don't know better, and it took me some time to figure this out!