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
POSIX.pm does not guard against ctermid() being unavailable (as it is on Android 5+) #14715
Comments
From @CorionCreated by @CorionThis is a bug report for perl from corion@cpan.org, ----------------------------------------------------------------- The Configure script probes for termios.h being available and This leads to perl building but failing all tests that directly The long term fix (5.23+) would be to add compile guards The short term fix for 5.22 is to add a compile-time $cat > try.c << 'EOM' -max Perl Info
|
From @CorionHi all, attached is the patch that I tested on Android 5 (Cyanogenmod 12) and I submit this patch for consideration for 5.22.0 - it marks termios.h as If this patch doesn't make it into 5.22.0, it should go into the section I'll look at patching POSIX.xs for 5.23 so it can use the detection -max |
From @Corion0001-Detect-in-Metaconfig-whether-termios.h-implements-a-.patchFrom e8e24eca58d314c3701630ff85443d5fb01f4262 Mon Sep 17 00:00:00 2001
From: Max Maischein <corion@corion.net>
Date: Tue, 26 May 2015 21:28:43 +0200
Subject: [PATCH] Detect in Metaconfig whether termios.h implements a workable
ctermid()
This is a stopgap measure to get POSIX.xs to work on Android 5, which
provides a termios.h file, but does not implement the ctermid()
function in its C library.
Without this patch, loading POSIX.so fails because the symbol ctermid()
cannot be resolved.
The longterm fix will be to have POSIX.xs check the functions
one by one instead of assuming they are all there if termios.h is there.
---
hints/linux-android.sh | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/hints/linux-android.sh b/hints/linux-android.sh
index 6a59cb7..034f4fa 100644
--- a/hints/linux-android.sh
+++ b/hints/linux-android.sh
@@ -60,6 +60,25 @@ $cat > UU/archname.cbu <<'EOCBU'
android_stub='FIX|Android'
$cat > try.c << 'EOM'
+#include <termios.h>
+int main() { (void) ctermid(0); return(0); }
+EOM
+$cc $ccflags try.c -o try
+android_warn=`$run ./try 2>&1 | $egrep "$android_stub"`
+if test "X$?" != X0; then
+ # This should be respected by POSIX.xs, but isn't
+ d_ctermid="$undef"
+ # So we disable the whole of termios.h
+ i_termios="$undef"
+fi
+if test "X$android_warn" != X; then
+ # This should be respected by POSIX.xs, but isn't
+ d_ctermid="$undef"
+ # So we disable the whole of termios.h
+ i_termios="$undef"
+fi
+
+$cat > try.c << 'EOM'
#include <netdb.h>
int main() { (void) getnetbyname("foo"); return(0); }
EOM
--
1.8.1.msysgit.1
|
From @TuxOn Tue, 26 May 2015 21:50:54 +0200, Max Maischein <corion@cpan.org>
+1 for inclusion in 5.22
-- |
The RT System itself - Status changed from 'new' to 'open' |
From @khwilliamsonOn Tue May 26 13:24:31 2015, hmbrand wrote:
What should be done now about this ticket? |
From @CorionHello Karl, thank you for keeping track of the tickets!
I have talked to Merijn and I'm slowly (slowly!) getting my feel around I've since found that there are many more idiosyncrasies between Android -max |
Migrated from rt.perl.org#125240 (status was 'open')
Searchable as RT125240$
The text was updated successfully, but these errors were encountered: