Create a gist now

Instantly share code, notes, and snippets.

cat mkmf.log
have_header: checking for mpg123.h... -------------------- yes
"/usr/bin/cc -o conftest -I/opt/boxen/rbenv/versions/2.0.0-p247/include/ruby-2.0.0/x86_64-darwin12.4.0 -I/opt/boxen/rbenv/versions/2.0.0-p247/include/ruby-2.0.0/ruby/backward -I/opt/boxen/rbenv/versions/2.0.0-p247/include/ruby-2.0.0 -I. -I'/opt/boxen/rbenv/versions/2.0.0-p247/include' -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I/opt/X11/include -O3 -Wno-error=shorten-64-to-32 -pipe conftest.c -L. -L/opt/boxen/rbenv/versions/2.0.0-p247/lib -L. -L'/opt/boxen/rbenv/versions/2.0.0-p247/lib' -L/usr/local/lib -lruby-static -lpthread -ldl -lobjc "
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: int main(int argc, char **argv)
4: {
5: return 0;
6: }
/* end */
"/usr/bin/cc -E -I/opt/boxen/rbenv/versions/2.0.0-p247/include/ruby-2.0.0/x86_64-darwin12.4.0 -I/opt/boxen/rbenv/versions/2.0.0-p247/include/ruby-2.0.0/ruby/backward -I/opt/boxen/rbenv/versions/2.0.0-p247/include/ruby-2.0.0 -I. -I'/opt/boxen/rbenv/versions/2.0.0-p247/include' -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I/opt/X11/include -O3 -Wno-error=shorten-64-to-32 -pipe conftest.c -o conftest.i"
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: #include <mpg123.h>
/* end */
--------------------
have_library: checking for main() in -lmpg123... -------------------- no
"/usr/bin/cc -o conftest -I/opt/boxen/rbenv/versions/2.0.0-p247/include/ruby-2.0.0/x86_64-darwin12.4.0 -I/opt/boxen/rbenv/versions/2.0.0-p247/include/ruby-2.0.0/ruby/backward -I/opt/boxen/rbenv/versions/2.0.0-p247/include/ruby-2.0.0 -I. -I'/opt/boxen/rbenv/versions/2.0.0-p247/include' -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I/opt/X11/include -O3 -Wno-error=shorten-64-to-32 -pipe conftest.c -L. -L/opt/boxen/rbenv/versions/2.0.0-p247/lib -L. -L'/opt/boxen/rbenv/versions/2.0.0-p247/lib' -L/usr/local/lib -lruby-static -lmpg123 -lpthread -ldl -lobjc "
conftest.c:5:57: error: use of undeclared identifier 'main'
int t(void) { void ((*volatile p)()); p = (void ((*)()))main; return 0; }
^
1 error generated.
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: extern int t(void);
5: int t(void) { void ((*volatile p)()); p = (void ((*)()))main; return 0; }
6: int main(int argc, char **argv)
7: {
8: if (argc > 1000000) {
9: printf("%p", &t);
10: }
11:
12: return 0;
13: }
/* end */
"/usr/bin/cc -o conftest -I/opt/boxen/rbenv/versions/2.0.0-p247/include/ruby-2.0.0/x86_64-darwin12.4.0 -I/opt/boxen/rbenv/versions/2.0.0-p247/include/ruby-2.0.0/ruby/backward -I/opt/boxen/rbenv/versions/2.0.0-p247/include/ruby-2.0.0 -I. -I'/opt/boxen/rbenv/versions/2.0.0-p247/include' -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT -I/opt/X11/include -O3 -Wno-error=shorten-64-to-32 -pipe conftest.c -L. -L/opt/boxen/rbenv/versions/2.0.0-p247/lib -L. -L'/opt/boxen/rbenv/versions/2.0.0-p247/lib' -L/usr/local/lib -lruby-static -lmpg123 -lpthread -ldl -lobjc "
conftest.c:5:15: warning: implicit declaration of function 'main' is invalid in C99 [-Wimplicit-function-declaration]
int t(void) { main(); return 0; }
^
1 warning generated.
ld: library not found for -lmpg123
clang: error: linker command failed with exit code 1 (use -v to see invocation)
checked program was:
/* begin */
1: #include "ruby.h"
2:
3: /*top*/
4: extern int t(void);
5: int t(void) { main(); return 0; }
6: int main(int argc, char **argv)
7: {
8: if (argc > 1000000) {
9: printf("%p", &t);
10: }
11:
12: return 0;
13: }
/* end */
--------------------
@slnovak
slnovak commented Feb 2, 2014

I'm having a similar issue as this. Were you able to resolve it?

@petems
Owner
petems commented Jul 3, 2014

I ended up formatting my machine a year later and it suddently worked, sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment