Discussion:
[uml-devel] [PATCH v2] um: Avoid longjmp/setjmp symbol clashes with libpthread.a
Richard Weinberger
2017-05-24 07:02:29 UTC
Permalink
Florian,
Building a statically linked UML kernel on a Centos 6.9 host resulted in
(.text+0x8490): multiple definition of `longjmp'
first defined here
(.text+0x77cd): warning: the use of `mktemp' is dangerous, better use
`mkstemp'
collect2: ld returned 1 exit status
make[4]: *** [vmlinux] Error 1
Adopt a solution similar to the one done for vmap where we define
longjmp/setjmp to be kernel_longjmp/setjmp. In the process, make sure we
do rename the functions in arch/x86/um/setjmp_*.S accordingly.
What is not so clear to me, why are you facing this build issue and other users, including me,
not?

Thanks,
//richard
Richard Weinberger
2017-06-01 20:11:05 UTC
Permalink
Florian,
Presumably because we are not using the same glibc version? The one I
have installed on this machine is glibc-2.12, do you want me to attach a
copy of it?
Richard, what do we do with this?
I'd like to see the issues that Thomas sees also get addressed.

Thanks,
//richard
Richard Weinberger
2017-06-01 20:17:45 UTC
Permalink
Post by Richard Weinberger
Florian,
Presumably because we are not using the same glibc version? The one I
have installed on this machine is glibc-2.12, do you want me to attach a
copy of it?
Richard, what do we do with this?
I'd like to see the issues that Thomas sees also get addressed.
Sure, but that seems orthogonal? In the absence of an answer from Eli,
either you could take my patch or just send reverts of Eli's two
commits, whichever you prefer.
Or you and Thomas could investigate. :-)

Thanks,
//richard
Richard Weinberger
2017-06-05 19:34:40 UTC
Permalink
Florian,
Building a statically linked UML kernel on a Centos 6.9 host resulted in
(.text+0x8490): multiple definition of `longjmp'
first defined here
(.text+0x77cd): warning: the use of `mktemp' is dangerous, better use
`mkstemp'
collect2: ld returned 1 exit status
make[4]: *** [vmlinux] Error 1
Adopt a solution similar to the one done for vmap where we define
longjmp/setjmp to be kernel_longjmp/setjmp. In the process, make sure we
do rename the functions in arch/x86/um/setjmp_*.S accordingly.
Fixes: a7df4716d195 ("um: link with -lpthread")
Richard, we are kind of hijacking this thread now that was originally
about statically linking UML, is this particular patch okay?
Hehe, yes.
This patch is good, I like it. :)
It will part of the next pull request.

Thanks,
//richard
Richard Weinberger
2017-06-29 07:25:18 UTC
Permalink
Florian,
Post by Richard Weinberger
Hehe, yes.
This patch is good, I like it. :)
It will part of the next pull request.
Humm okay, did you apply the patch in one of your kernel trees on
git.kernel.org or somewhere else?
Will happen soon since the merge window is near where I will post
a pull request...

Thanks,
//richard

Loading...