Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

"Support post-3.13 kthread_create() semantics." breaks 3.13.7 builds on Gentoo with GCC 4.8.2 #346

Closed
ryao opened this issue Apr 9, 2014 · 8 comments
Milestone

Comments

@ryao
Copy link
Contributor

ryao commented Apr 9, 2014

The recently merged 17a527c breaks building on Gentoo with GCC 4.8.2:

In file included from /var/tmp/portage/sys-kernel/spl-9999/work/spl-9999/module/spl/../../module/spl/spl-thread.c:27:0:
/var/tmp/portage/sys-kernel/spl-9999/work/spl-9999/module/spl/../../module/spl/spl-thread.c: In function ‘spl_kthread_create’:
/var/tmp/portage/sys-kernel/spl-9999/work/spl-9999/include/sys/thread.h:69:1: error: function ‘spl_kthread_create’ can never be inlined because it uses variable argument lists
 spl_kthread_create(int (*func)(void *), void *data, const char namefmt[], ...)
@DeHackEd
Copy link
Contributor

DeHackEd commented Apr 9, 2014

Also affects RHEL 6 builds

# gcc -v
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap --enable-shared --enable-threads=posix --enable-checking=release --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-languages=c,c++,objc,obj-c++,java,fortran,ada --enable-java-awt=gtk --disable-dssi --with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre --enable-libgcj-multifile --enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar --disable-libjava-multilib --with-ppl --with-cloog --with-tune=generic --with-arch_32=i686 --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC) 

@behlendorf
Copy link
Contributor

I'll get this fixed right away or revert the offending patch until we can rework it.

@dweeezil
Copy link
Contributor

dweeezil commented Apr 9, 2014

Strangely enough, it does build under CentOS 6.4 with gcc 4.4.7.

I suppose this wrapper should be a regular function.

@dweeezil
Copy link
Contributor

dweeezil commented Apr 9, 2014

Converted it into a regular function in dweeezil/spl@31e5b58. Still wondering why I don't get errors on my CentOS 6.4 system even with --enable-debug.

@ryao
Copy link
Contributor Author

ryao commented Apr 9, 2014

@dweeezil I suspect that the regression is compiler specific.

@behlendorf
Copy link
Contributor

Thanks for the updated patch. I am able to reproduce the error with CentOS 6.5.

@dweeezil
Copy link
Contributor

@behlendorf I presume the de-inlined version does build properly?

I guess I need to rig up a newer CentOS test system.

@behlendorf
Copy link
Contributor

@dweeezil Yes the updated patched worked fine under CentOS 6.5 and I've merged it. I wasn't able to verify the fix on Gentoo but this should have fixed it. @ryao please let us know if that somehow is not the case.

@behlendorf behlendorf added this to the 0.6.3 milestone Apr 10, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants