linking miniruby cont.o: In function `fiber_setcontext': cont.c:(.text+0x1bbc): undefined reference to `swapcontext' cc: error: linker command failed with exit code 1 (use -v to see invocation) *** [miniruby] Error code 1 (ignored) ... so I tried this: [x.c] main() { swapcontext(); }; [x.o] > cc -c -o x.o x.c x.c:1:1: warning: type specifier missing, defaults to 'int' [-Wimplicit-int] main() { swapcontext(); }; ^~~~ x.c:1:10: warning: implicit declaration of function 'swapcontext' is invalid in C99 [-Wimplicit-function-declaration] main() { swapcontext(); }; ^ 2 warnings generated. [x] > cc -o x x.o x.o: In function `main': x.c:(.text+0xb): undefined reference to `swapcontext' cc: error: linker command failed with exit code 1 (use -v to see invocation)
> uname -a FreeBSD weasel 10.2-BETA2 FreeBSD 10.2-BETA2 #5 r285668M: Sat Jul 18 05:28:45 EDT 2015 root@weasel:/usr/obj/usr/src/sys/WEASEL amd64
[10.1-STABLE #6 r283530: Mon May 25] > nm -aD /lib/libc.so.7 | grep swapcontext 00000000000dab60 T __sys_swapcontext 00000000000dab60 W _swapcontext 00000000000455b0 W swapcontext 00000000000455b0 W swapcontext [10.2-BETA2 #5 r285668M: Sat Jul 18] > nm -aD /lib/libc.so.7 | grep swapcontext 00000000000dab80 T __sys_swapcontext 00000000000dab80 W _swapcontext
(In reply to hostmaster from comment #2) There were no changes in this area starting from April. re just checked the BETA2 images, libc is right, the swapcontext symbol is exported as FBSD_1.0 and 1.2 versions. You should have some local issue.
I'm not sure how to understand what "local issues" might refer to I made svn update from 10-stable and compiled & installed that - i made no changes to userland code, all is "vanilla" I will try to get more recent svn update to see what might change, if anything
it would seem that svn had not deleted files it was supposed to for some reason I'm not a svn expert by any means, although i expected the "svn update" output to mean "deleted" when it shows a "D" in the first column - however none of such files were actually deleted, arrgh original source was rev 275972 on 2014/12/20 first update (the one in question above) was rev 279382 which showed an unresolved conflict at the end, so is it possible that it never finished? perhaps i should start from scratch with a fresh usr/src ...
[10.2-BETA2 #6 r285724M: Mon Jul 20] > nm -aD /lib/libc.so.7 | grep swapcontext 00000000000dab80 T __sys_swapcontext 00000000000dab80 W _swapcontext 00000000000455f0 W swapcontext 00000000000455f0 W swapcontext ... so indeed the culprit was my inadequate understanding of how subversion works thanks for your assistance! :)