undefined reference to `sigsetjmp' when building mksh for x86

507 views
Skip to first unread message

Marcus Better

unread,
Nov 22, 2010, 7:24:13 AM11/22/10
to android-porting
Hi,

trying to build Android (current git) for generic_x86, it fails to
link mksh:

$ make
============================================
PLATFORM_VERSION_CODENAME=AOSP
PLATFORM_VERSION=AOSP
TARGET_PRODUCT=generic_x86
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=false
TARGET_BUILD_TYPE=debug
TARGET_BUILD_APPS=
TARGET_ARCH=x86
TARGET_ARCH_VARIANT=x86
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=OPENMASTER
============================================
Install: out/debug/target/product/generic_x86/system/app/Mms.apk
target Executable: mksh (out/debug/target/product/generic_x86/obj/
EXECUTABLES/mksh_intermediates/LINKED/mksh)
out/debug/target/product/generic_x86/obj/EXECUTABLES/
mksh_intermediates/src/exec.o: In function `herein':
system/core/mksh/src/exec.c:1283: undefined reference to `sigsetjmp'
out/debug/target/product/generic_x86/obj/EXECUTABLES/
mksh_intermediates/src/exec.o: In function `execute':
system/core/mksh/src/exec.c:312: undefined reference to `sigsetjmp'
system/core/mksh/src/exec.c:179: undefined reference to `sigsetjmp'
system/core/mksh/src/exec.c:276: undefined reference to `sigsetjmp'
out/debug/target/product/generic_x86/obj/EXECUTABLES/
mksh_intermediates/src/exec.o: In function `comexec':
system/core/mksh/src/exec.c:620: undefined reference to `sigsetjmp'
out/debug/target/product/generic_x86/obj/EXECUTABLES/
mksh_intermediates/src/expr.o:system/core/mksh/src/expr.c:207: more
undefined references to `sigsetjmp' follow
out/debug/target/product/generic_x86/obj/EXECUTABLES/
mksh_intermediates/src/main.o: In function `unwind':
system/core/mksh/src/main.c:685: undefined reference to `siglongjmp'
out/debug/target/product/generic_x86/obj/EXECUTABLES/
mksh_intermediates/src/main.o: In function `shell':
system/core/mksh/src/main.c:578: undefined reference to `sigsetjmp'
out/debug/target/product/generic_x86/obj/EXECUTABLES/
mksh_intermediates/src/main.o: In function `include':
system/core/mksh/src/main.c:504: undefined reference to `sigsetjmp'
collect2: ld returned 1 exit status
make: *** [out/debug/target/product/generic_x86/obj/EXECUTABLES/
mksh_intermediates/LINKED/mksh] Error 1


Is this a known problem? The build machine is Debian x86_64.

Cheers,

Marcus

Hamilton Vera

unread,
Nov 22, 2010, 11:38:02 AM11/22/10
to mar...@better.se, android-porting
What java version are you using?

java -version
java version "1.5.0_19"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_19-b02)
Java HotSpot(TM) Server VM (build 1.5.0_19-b02, mixed mode)


[]'s

Hamilton Vera

> --
> unsubscribe: android-porti...@googlegroups.com
> website: http://groups.google.com/group/android-porting
>

--
Hamilton Vera
int Administrator (char Network[],char ComputationalSystems[])
http://hvera.wordpress.com

Hamilton Vera

unread,
Nov 22, 2010, 2:42:01 PM11/22/10
to Marcus Better, android-porting
Here I am using JDK 5 :

http://java.sun.com/javase/downloads/index_jdk5.jsp

[]'s

Hamilton Vera

On Mon, Nov 22, 2010 at 5:02 PM, Marcus Better <mar...@better.se> wrote:


> On 2010-11-22 17:38, Hamilton Vera wrote:
>>
>> What java version are you using?
>

> Tried OpenJDK 6 and Sun JDK 6, no difference. The error does not seem
> Java-related though.
>
> Cheers,
>
> Marcus

Marcus Better

unread,
Nov 22, 2010, 2:24:21 PM11/22/10
to android-porting
On 22 Nov, 13:24, Marcus Better <mar...@better.se> wrote:

> target Executable: mksh (out/debug/target/product/generic_x86/obj/
> EXECUTABLES/mksh_intermediates/LINKED/mksh)
> out/debug/target/product/generic_x86/obj/EXECUTABLES/
> mksh_intermediates/src/exec.o: In function `herein':
> system/core/mksh/src/exec.c:1283: undefined reference to `sigsetjmp'

Actually there is no implementation of sigsetjmp in bionic/libc/arch-
x86 (but there is one in arch-arm).

Marcus

mirabilos

unread,
Nov 25, 2010, 12:44:08 PM11/25/10
to android-porting, Chih-Wei Huang
Marcus Better wrote:

> Actually there is no implementation of sigsetjmp in bionic/libc/arch-
> x86 (but there is one in arch-arm).

I fear you’ll need one. (Question to Chih-Wei, how did this ever build
on
Android-x86 when you added it in ¹ only?)

http://git.android-x86.org/?p=platform/bionic.git;a=commit;h=f058dc4838298c183cf78536d6695d68994c4440

bye,
//mirabilos (via Google alerts… if you want fast help on mksh, Cc
tg@mirbsd.{de,org} in the future

Chih-Wei

unread,
Nov 25, 2010, 8:21:41 PM11/25/10
to android-porting
Hmm, we (Android-x86.org) added sigsetjmp to bionic
long time ago. If I remember it correctly,
it's needed by the bluetooth modules.
I didn't notice mksh also uses it.

I tried to push it into AOSP, but
Google rejected it due to its unclear license.

On 11月26日, 上午1時44分, mirabilos <tg+m...@mirbsd.org> wrote:
> Marcus Better wrote:
> > Actually there is no implementation of sigsetjmp in bionic/libc/arch-
> > x86 (but there is one in arch-arm).
>
> I fear you’ll need one. (Question to Chih-Wei, how did this ever build
> on
> Android-x86 when you added it in ¹ only?)
>
> ①http://git.android-x86.org/?p=platform/bionic.git;a=commit;h=f058dc48...

mirabilos

unread,
Nov 26, 2010, 8:45:41 AM11/26/10
to android-porting
On Nov 26, 2:21 am, Chih-Wei <cwhu...@linux.org.tw> wrote:

> I tried to push it into AOSP, but
> Google rejected it due to its unclear license.

Ouch. Would this one work on Linux?

https://www.mirbsd.org/cvs.cgi/src/lib/libc/arch/i386/gen/sigsetjmp.S?rev=HEAD

It doesn’t seem too BSD specific for me, and the macros ENTRY and so
are
trivial (if not building PIC, PIC_{PLT,{PRO,EPI}LOGUE} are empty,
_C_LABEL
is empty on ELF).

HTH & HAND,
//mirabilos

Chih-Wei

unread,
Dec 16, 2010, 3:09:17 AM12/16/10
to android-porting
Thank you, mirabilos.

I didn't notice your post until now.
I independently found the sigsetjmp.S from OpenBSD code
and submit a new patch.

https://review.source.android.com/19486

On 11月26日, 下午9時45分, mirabilos <tg+m...@mirbsd.org> wrote:
> On Nov 26, 2:21 am, Chih-Wei <cwhu...@linux.org.tw> wrote:
>
> > I tried to push it into AOSP, but
> > Google rejected it due to its unclear license.
>
> Ouch. Would this one work on Linux?
>
> https://www.mirbsd.org/cvs.cgi/src/lib/libc/arch/i386/gen/sigsetjmp.S...
Reply all
Reply to author
Forward
0 new messages