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

Tests fail to build on powerpc and the build test segfault. #65

Closed
BertrandDekoninck opened this issue Mar 24, 2018 · 1 comment
Closed

Comments

@BertrandDekoninck
Copy link

System : debian-8.5 powerpc (32 bits), with libdispatch build from debian source (referenced as libdispatch-0~svn197 from http://libdispatch.macosforge.org/).

some test don't build with this log :
"
[ 78%] Linking C executable objc_msgSend_optimised
CMakeFiles/objc_msgSend_optimised.dir/objc_msgSend.m.o: dans la fonction « main »:
/home/bertrand/Install_GNUstep/libobjc2/Test/objc_msgSend.m:(.text+0xb54): référence indéfinie vers « objc_msgSend »
/home/bertrand/Install_GNUstep/libobjc2/Test/objc_msgSend.m:(.text+0xb90): référence indéfinie vers « objc_msgSend »
/home/bertrand/Install_GNUstep/libobjc2/Test/objc_msgSend.m:(.text+0xbac): référence indéfinie vers « objc_msgSend »
/home/bertrand/Install_GNUstep/libobjc2/Test/objc_msgSend.m:(.text+0xbbc): référence indéfinie vers « objc_msgSend »
/home/bertrand/Install_GNUstep/libobjc2/Test/objc_msgSend.m:(.text+0xbe4): référence indéfinie vers « objc_msgSend »
CMakeFiles/objc_msgSend_optimised.dir/objc_msgSend.m.o:/home/bertrand/Install_GNUstep/libobjc2/Test/objc_msgSend.m:(.text+0xc04): encore plus de références indéfinies suivent vers « objc_msgSend »
CMakeFiles/objc_msgSend_optimised.dir/objc_msgSend.m.o: dans la fonction « main »:
/home/bertrand/Install_GNUstep/libobjc2/Test/objc_msgSend.m:(.text+0xc80): référence indéfinie vers « objc_msgSend_stret »
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Test/CMakeFiles/objc_msgSend_optimised.dir/build.make:96: recipe for target 'Test/objc_msgSend_optimised' failed

The failing test are :

  • ManyManySelectors.m
  • NestedExceptions.m
  • objc_msgSend.m

Moreover, all build tests segfault with the following error in gdb :
Using host libthread_db library "/lib/powerpc-linux-gnu/libthread_db.so.1".

Program received signal SIGSEGV, Segmentation fault.
__GI___pthread_mutex_init (mutex=0xffd7bc8, mutexattr=)
at pthread_mutex_init.c:84
84 pthread_mutex_init.c: No such file or directory.

Abd the backtrace is the following :
#0 __GI___pthread_mutex_init (mutex=0xffd7bc8, mutexattr=)
at pthread_mutex_init.c:84
#1 0x0fede398 in pthread_mutex_init (mutex=,
mutexattr=) at forward.c:188
#2 0x0ffc1638 in init_recursive_mutex ()
from /home/bertrand/Install_GNUstep/libobjc2/build/libobjc.so.4.6
#3 0x0ffc1274 in __objc_exec_class ()
from /home/bertrand/Install_GNUstep/libobjc2/build/libobjc.so.4.6
#4 0x0ffcd318 in .objc_load_function ()
from /home/bertrand/Install_GNUstep/libobjc2/build/libobjc.so.4.6
#5 0xb7fdc19c in call_init (l=, argc=argc@entry=1,
argv=argv@entry=0xbffff404, env=env@entry=0xbffff40c) at dl-init.c:78
#6 0xb7fdc304 in call_init (env=, argv=,
argc=, l=) at dl-init.c:36
#7 _dl_init (main_map=0xb7fff908, argc=1, argv=0xbffff404, env=0xbffff40c)
at dl-init.c:126
#8 0xb7fe5224 in got_label () at ../sysdeps/powerpc/powerpc32/dl-start.S:66
Backtrace stopped: frame did not save the PC

@davidchisnall
Copy link
Member

So, there are two problems here:

The first is simple. We don't have the assembly paths for PowerPC, and we will not get them until someone with an interest in maintaining PowerPC support volunteers. Given the lack of available PowerPC hardware, I'm not inclined to learn PowerPC assembly to implement this, but I'm happy to accept patches. This explains why your binary does not include objc_msgSend: it is not possible to implement this function in C and so we need an assembly version.

The second problem is more surprising and looks like a problem with your system. Initialising a mutex during library load is failing. This sounds like a bug in your pthreads library.

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

No branches or pull requests

2 participants