Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006617OCaml~DO NOT USE (was: OCaml general)public2014-10-18 09:402016-12-07 11:47
Reporterwhitequark 
Assigned Togasche 
PrioritynormalSeverityminorReproducibilityhave not tried
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version4.02.1 
Target VersionFixed in Version4.03.0+dev / +beta1 
Summary0006617: Since revision 10c, Android NDK includes proper struct ucontext_t
DescriptionIn asmrun/signals_osdep.h we have this code:

  #if defined(__ANDROID__)
    // The Android NDK does not have sys/ucontext.h yet.
    typedef struct ucontext {
      uint32_t uc_flags;
      struct ucontext *uc_link;
      stack_t uc_stack;
      struct sigcontext uc_mcontext;
      // Other fields omitted...
    } ucontext_t;
  #else
    #include <sys/ucontext.h>
  #endif

There probably should be an s.h HAVE_ macro for this, as since r10c NDK includes ucontext_t, which is included from signal.h, and it clashes with this definition.
TagsNo tags attached.
Attached Filespatch file icon 0003-Since-r10c-Android-NDK-includes-sys-ucontext.h.patch [^] (1,080 bytes) 2014-10-20 17:02 [Show Content]

- Relationships
related to 0005886closedmeurer Small changes to compile for Android 
has duplicate 0006830closedgasche sys/ucontext.h present in current Android NDK 

-  Notes
(0012390)
gasche (administrator)
2014-10-18 09:55

The fastest way for this to be fixed would probably be that you write a patch yourself. I don't know if other frequent contributors compile OCaml on Android -- the code you want to improve was contributed by Jérôme Vouillon in PR#5886.
(0012391)
whitequark (developer)
2014-10-18 09:58

The problem is that I don't do native builds on Android (only cross builds) and thus cannot verify the changes to ./configure script.
(0012398)
vouillon (reporter)
2014-10-20 11:57

I'm not sure anyone has ever done an Android native build...

A simple option is to just remove this Android specific code. I don't think we need to support older versions of the Android NDK.

Otherwise, one could refine the conditional:

    #if defined(__ANDROID__) && !defined(_SYS_UCONTEXT_H_)
(0012399)
whitequark (developer)
2014-10-20 11:59

I'm in favor of removing the conditional altogether. 10c supports all Android versions anyway. Could someone commit this?
(0012800)
gasche (administrator)
2014-12-13 23:36

Merged in trunk.
(0013286)
gasche (administrator)
2015-02-15 19:15

This is also included in branch 4.02 as commit 15707.

- Issue History
Date Modified Username Field Change
2014-10-18 09:40 whitequark New Issue
2014-10-18 09:55 gasche Note Added: 0012390
2014-10-18 09:55 gasche Relationship added related to 0005886
2014-10-18 09:58 whitequark Note Added: 0012391
2014-10-20 11:57 vouillon Note Added: 0012398
2014-10-20 11:59 whitequark Note Added: 0012399
2014-10-20 17:02 vouillon File Added: 0003-Since-r10c-Android-NDK-includes-sys-ucontext.h.patch
2014-12-13 23:36 gasche Note Added: 0012800
2014-12-13 23:36 gasche Status new => resolved
2014-12-13 23:36 gasche Fixed in Version => 4.03.0+dev / +beta1
2014-12-13 23:36 gasche Resolution open => fixed
2014-12-13 23:36 gasche Assigned To => gasche
2015-02-15 19:15 gasche Note Added: 0013286
2015-04-04 09:25 gasche Relationship added has duplicate 0006830
2016-12-07 11:47 xleroy Status resolved => closed
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker