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

Undefined references in thread lib. #19

Open
cbakgly opened this issue Aug 20, 2013 · 2 comments
Open

Undefined references in thread lib. #19

cbakgly opened this issue Aug 20, 2013 · 2 comments
Labels

Comments

@cbakgly
Copy link
Contributor

cbakgly commented Aug 20, 2013

After upgrading to Freebsd 9.1 libs, libthr now needs extra APIs to work.

/Users/yeli/repos/cb-futures/sdk/usr/bin/../../usr/lib//stdlibs_abc/libthr.a: error: undefined reference to '___sys_setcontext'
/Users/yeli/repos/cb-futures/sdk/usr/bin/../../usr/lib//stdlibs_abc/libthr.a: error: undefined reference to '___sys_swapcontext'
/Users/yeli/repos/cb-futures/sdk/usr/bin/../../usr/lib//stdlibs_abc/libthr.a: error: undefined reference to '___sys_sigreturn'
/Users/yeli/repos/cb-futures/sdk/usr/bin/../../usr/lib//stdlibs_abc/libthr.a: error: undefined reference to '_getcontext'
/Users/yeli/repos/cb-futures/sdk/usr/bin/../../usr/lib//stdlibs_abc/libthr.a: error: undefined reference to '_check_suspend'

These APIs seem newly involved in thread lib in Freebsd 9.1 and yet to be implemented (mock?) in crossbridge.

Anyone who would like to give a try is appreciated!

Steps:
1 get the newest code base
2 make all (dmalloc and libsdl now will fail)
3 build the hello world sample with option -pthread
[opt] for a better investigation, download Freebsd 9.1
4 svn co http://svn.freebsd.org/base/release/9.1.0/ freebsd-9.1

@jorgenhs
Copy link

Just finished building on cygwin, 32-bit (some patching is needed). The last stage of the build (submittests) fails with

/cygdrive/e/crossbridge/crossbridge/sdk/usr/bin/../../usr/lib/libthr.a: error: undefined reference to '___sys_swapcontext'
/cygdrive/e/crossbridge/crossbridge/sdk/usr/bin/../../usr/lib/libthr.a: error: undefined reference to '_check_suspend'

This appears similar, but I am too new to the crossbridge codebase to determine if it is indeed the same issue.

@cbakgly
Copy link
Contributor Author

cbakgly commented Nov 15, 2013

Should be the same issue. Because pthread in freebsd 9 depends on some new OS APIs (could be different names on different OSes), a simple workaround for linking is define those two functions in posix/libchack.cpp.
For a workable pthread, those may need to be written via AS.

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

2 participants