* Re: [m4-1.4.19] make error on Solaris 11.3 x86 [not found] ` <293579489.1062338.1622244788446.JavaMail.yahoo@mail.yahoo.co.jp> @ 2021-05-29 12:14 ` Eric Blake 2021-05-29 17:22 ` Paul Eggert 0 siblings, 1 reply; 6+ messages in thread From: Eric Blake @ 2021-05-29 12:14 UTC (permalink / raw) To: Kiyoshi KANAZAWA, bug-gnulib; +Cc: bug-m4@gnu.org On Sat, May 29, 2021 at 08:33:08AM +0900, Kiyoshi KANAZAWA wrote: > Hello, > > Trying to install m4-1.4.19 on Solaris 11.3 x86. > > $ uname -a > SunOS hidden 5.11 11.3 i86pc i386 i86pc > > $ gcc --version > gcc (GCC) 10.3.0 > > $ ./configure CC=gcc > (it mean CC='gcc -m32') > > $ make > : > CC stackvma.o > In file included from stackvma.c:1476: > /usr/include/sys/procfs.h:42:2: error: #error "Cannot use procfs in the large file compilation environment" > 42 | #error "Cannot use procfs in the large file compilation environment" > > This did not occur in m4-1.4.18d. Thanks for the report; this is probably due to Bruno's work on making gnulib support stack overflow detection without GNU libsigsegv on more platforms, so I hope he'll be able to help. > > FYI: > /usr/include/sys/procfs.h: > 41 #if !defined(_LP64) && _FILE_OFFSET_BITS == 64 > 42 #error "Cannot use procfs in the large file compilation environment" > 43 #endif > > > Regards, > > --- Kiyoshi > > -- Eric Blake, Principal Software Engineer Red Hat, Inc. +1-919-301-3266 Virtualization: qemu.org | libvirt.org ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [m4-1.4.19] make error on Solaris 11.3 x86 2021-05-29 12:14 ` [m4-1.4.19] make error on Solaris 11.3 x86 Eric Blake @ 2021-05-29 17:22 ` Paul Eggert 2021-05-29 22:20 ` Kiyoshi KANAZAWA ` (2 more replies) 0 siblings, 3 replies; 6+ messages in thread From: Paul Eggert @ 2021-05-29 17:22 UTC (permalink / raw) To: Kiyoshi KANAZAWA; +Cc: bug-gnulib, Eric Blake, bug-m4@gnu.org [-- Attachment #1: Type: text/plain, Size: 394 bytes --] Thanks for reporting the bug. Please try the attached patch, which I installed into Gnulib. stackvma.c says it contains simplified copies of code in vma-iter.c, which didn't have this bug. Bruno, am I right in guessing that there are two files mainly because libsigsegv was separate from Gnulib? Should we be working to unify the two files, so that fixes to one also fix the other? [-- Attachment #2: 0001-sigsegv-Port-to-Solaris-11.patch --] [-- Type: text/x-patch, Size: 1893 bytes --] From 87981840ebe68c9239625e5133b9fb86495163ad Mon Sep 17 00:00:00 2001 From: Paul Eggert <eggert@cs.ucla.edu> Date: Sat, 29 May 2021 10:14:01 -0700 Subject: [PATCH] sigsegv: Port to Solaris 11 Problem reported by Kiyoshi KANAZAWA in: https://lists.gnu.org/r/bug-m4/2021-05/msg00020.html * lib/stackvma.c (_FILE_OFFSET_BITS): #undef on Solaris and Android. --- ChangeLog | 7 +++++++ lib/stackvma.c | 15 +++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/ChangeLog b/ChangeLog index 43056adcb..2f145fc02 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2021-05-29 Paul Eggert <eggert@cs.ucla.edu> + + sigsegv: Port to Solaris 11 + Problem reported by Kiyoshi KANAZAWA in: + https://lists.gnu.org/r/bug-m4/2021-05/msg00020.html + * lib/stackvma.c (_FILE_OFFSET_BITS): #undef on Solaris and Android. + 2021-05-24 Bruno Haible <bruno@clisp.org> c-stack: Document another restriction. diff --git a/lib/stackvma.c b/lib/stackvma.c index faa99238e..ba3c7d305 100644 --- a/lib/stackvma.c +++ b/lib/stackvma.c @@ -17,6 +17,21 @@ #include <config.h> +/* On Solaris in 32-bit mode, when gnulib module 'largefile' is in use, + prevent a compilation error + "Cannot use procfs in the large file compilation environment" + On Android, when targeting Android 4.4 or older with a GCC toolchain, + prevent a compilation error + "error: call to 'mmap' declared with attribute error: mmap is not + available with _FILE_OFFSET_BITS=64 when using GCC until android-21. + Either raise your minSdkVersion, disable _FILE_OFFSET_BITS=64, or + switch to Clang." + The files that we access in this compilation unit are less than 2 GB + large. */ +#if defined __sun || defined __ANDROID__ +# undef _FILE_OFFSET_BITS +#endif + /* Specification. */ #include "stackvma.h" -- 2.27.0 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [m4-1.4.19] make error on Solaris 11.3 x86 2021-05-29 17:22 ` Paul Eggert @ 2021-05-29 22:20 ` Kiyoshi KANAZAWA 2021-05-29 22:43 ` Paul Eggert 2021-05-29 22:36 ` Bruno Haible 2021-05-29 22:53 ` stackvma.c vs. vma-iter.c Bruno Haible 2 siblings, 1 reply; 6+ messages in thread From: Kiyoshi KANAZAWA @ 2021-05-29 22:20 UTC (permalink / raw) To: Paul Eggert; +Cc: bug-gnulib@gnu.org, Eric Blake, bug-m4@gnu.org Thank you, Paul. Everything good with your patch in 32 bit mode on Solaris. By the way, is this patch valid only in 32 bit mode (on Solaris) ? make & make check pass without the patch in 64 bit mode (./configure CC='gcc -m64'). --- Kiyoshi ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [m4-1.4.19] make error on Solaris 11.3 x86 2021-05-29 22:20 ` Kiyoshi KANAZAWA @ 2021-05-29 22:43 ` Paul Eggert 0 siblings, 0 replies; 6+ messages in thread From: Paul Eggert @ 2021-05-29 22:43 UTC (permalink / raw) To: Kiyoshi KANAZAWA; +Cc: bug-gnulib@gnu.org, Eric Blake, bug-m4@gnu.org On 5/29/21 3:20 PM, Kiyoshi KANAZAWA wrote: > Thank you, Paul. > > Everything good with your patch in 32 bit mode on Solaris. > > By the way, is this patch valid only in 32 bit mode (on Solaris) ? The patch should have no effect in 64-bit mode, which should work regardless of whether the patch is installed. ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [m4-1.4.19] make error on Solaris 11.3 x86 2021-05-29 17:22 ` Paul Eggert 2021-05-29 22:20 ` Kiyoshi KANAZAWA @ 2021-05-29 22:36 ` Bruno Haible 2021-05-29 22:53 ` stackvma.c vs. vma-iter.c Bruno Haible 2 siblings, 0 replies; 6+ messages in thread From: Bruno Haible @ 2021-05-29 22:36 UTC (permalink / raw) To: bug-gnulib; +Cc: Kiyoshi KANAZAWA, Paul Eggert, Eric Blake, bug-m4 Paul Eggert wrote: > Thanks for reporting the bug. Please try the attached patch, which I > installed into Gnulib. Thanks, Paul, that's the correct fix. Apologies: I had tested the 'sigsegv' module mostly on its own, and tested it together with GNU m4 only on 4 or 5 platforms. Bruno ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: stackvma.c vs. vma-iter.c 2021-05-29 17:22 ` Paul Eggert 2021-05-29 22:20 ` Kiyoshi KANAZAWA 2021-05-29 22:36 ` Bruno Haible @ 2021-05-29 22:53 ` Bruno Haible 2 siblings, 0 replies; 6+ messages in thread From: Bruno Haible @ 2021-05-29 22:53 UTC (permalink / raw) To: bug-gnulib; +Cc: Paul Eggert Hi Paul, > stackvma.c says it contains simplified copies of code in vma-iter.c, > which didn't have this bug. Bruno, am I right in guessing that there are > two files mainly because libsigsegv was separate from Gnulib? They are still two separate files because - They have different purposes: A generic iteration over VMAs, vs. a specific use of VMAs. - The code for reading the maps file is not present on some platforms (e.g. on Minix) in stackvma.c, because on Minix programs can't catch SIGSEGV anyway. > Should we > be working to unify the two files, so that fixes to one also fix the other? To me, that's hardly worth it, because the code compiles to only 1 KB of machine code on most platforms, therefore there's little incentive in removing the duplication. It's more important that stackvma.c remains in sync with libsigsegv/src/stackvma-*. But if there's obvious improvements that can be made, please say so, and I'll apply them to stackvma.c and libsigsegv in sync. Bruno ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-05-29 22:53 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <293579489.1062338.1622244788446.JavaMail.yahoo.ref@mail.yahoo.co.jp> [not found] ` <293579489.1062338.1622244788446.JavaMail.yahoo@mail.yahoo.co.jp> 2021-05-29 12:14 ` [m4-1.4.19] make error on Solaris 11.3 x86 Eric Blake 2021-05-29 17:22 ` Paul Eggert 2021-05-29 22:20 ` Kiyoshi KANAZAWA 2021-05-29 22:43 ` Paul Eggert 2021-05-29 22:36 ` Bruno Haible 2021-05-29 22:53 ` stackvma.c vs. vma-iter.c Bruno Haible
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).