Skip to content
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

hints/gnu.sh: Mis-detected prototypes on GNU/Hurd #15375

Closed
p5pRT opened this issue May 28, 2016 · 8 comments
Closed

hints/gnu.sh: Mis-detected prototypes on GNU/Hurd #15375

p5pRT opened this issue May 28, 2016 · 8 comments

Comments

@p5pRT
Copy link

p5pRT commented May 28, 2016

Migrated from rt.perl.org#128279 (status was 'resolved')

Searchable as RT128279$

@p5pRT
Copy link
Author

p5pRT commented May 28, 2016

From @jmdh

As per Debian report <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=825020> it looks like <http​://perl5.git.perl.org/perl.git/commit/41d73075f0801c26794dadb1ff690f305d7e53a7> broke error string handling on GNU/Hurd. The attached patch from Samuel Thibault fixes this.

@p5pRT
Copy link
Author

p5pRT commented May 28, 2016

From @jmdh

gnu-hints-prototype.patch
--- hints/gnu.sh.original	2016-05-27 23:26:25.000000000 +0000
+++ hints/gnu.sh	2016-05-27 23:27:40.000000000 +0000
@@ -30,8 +30,34 @@
 # Flags needed by programs that use dynamic linking.
 ccdlflags='-Wl,-E'
 
-# Debian bug #258618
-ccflags="-D_GNU_SOURCE $ccflags"
+# This script UU/usethreads.cbu will get 'called-back' by Configure
+# after it has prompted the user for whether to use threads.
+cat > UU/usethreads.cbu <<'EOCBU'
+case "$usethreads" in
+$define|true|[yY]*)
+        ccflags="-D_REENTRANT -D_GNU_SOURCE $ccflags"
+        if echo $libswanted | grep -v pthread >/dev/null
+        then
+            set `echo X "$libswanted "| sed -e 's/ c / pthread c /'`
+            shift
+            libswanted="$*"
+        fi
+
+	# Somehow at least in Debian 2.2 these manage to escape
+	# the #define forest of <features.h> and <time.h> so that
+	# the hasproto macro of Configure doesn't see these protos,
+	# even with the -D_GNU_SOURCE.
+
+	d_asctime_r_proto="$define"
+	d_crypt_r_proto="$define"
+	d_ctime_r_proto="$define"
+	d_gmtime_r_proto="$define"
+	d_localtime_r_proto="$define"
+	d_random_r_proto="$define"
+
+	;;
+esac
+EOCBU
 
 cat > UU/uselargefiles.cbu <<'EOCBU'
 # This script UU/uselargefiles.cbu will get 'called-back' by Configure

@p5pRT
Copy link
Author

p5pRT commented May 28, 2016

From @ntyni

On Sat, May 28, 2016 at 06​:48​:40AM -0700, Dominic Hargreaves wrote​:

# New Ticket Created by Dominic Hargreaves
# Please include the string​: [perl #128279]
# in the subject line of all future correspondence about this issue.
# <URL​: https://rt-archive.perl.org/perl5/Ticket/Display.html?id=128279 >

As per Debian report <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=825020> it looks like <http​://perl5.git.perl.org/perl.git/commit/41d73075f0801c26794dadb1ff690f305d7e53a7> broke error string handling on GNU/Hurd. The attached patch from Samuel Thibault fixes this.

To clarify, the ccflags setting in hints/gnu.sh adding _GNU_SOURCE is
no longer effective when ccflags are specified on the command line.
The UU/usethreads.cbu version in hints/linux.sh still works, so
the proposed patch just copies that to the hurd hints.
--
Niko Tyni ntyni@​debian.org

@p5pRT
Copy link
Author

p5pRT commented May 28, 2016

The RT System itself - Status changed from 'new' to 'open'

@p5pRT
Copy link
Author

p5pRT commented May 30, 2016

From @jkeenan

On Sat May 28 06​:48​:39 2016, dom wrote​:

As per Debian report <https://bugs.debian.org/cgi-
bin/bugreport.cgi?bug=825020> it looks like
<http​://perl5.git.perl.org/perl.git/commit/41d73075f0801c26794dadb1ff690f305d7e53a7>
broke error string handling on GNU/Hurd. The attached patch from
Samuel Thibault fixes this.

Taken. Will apply to blead once I hear which email address author would prefer.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented May 30, 2016

From [Unknown Contact. See original ticket]

On Sat May 28 06​:48​:39 2016, dom wrote​:

As per Debian report <https://bugs.debian.org/cgi-
bin/bugreport.cgi?bug=825020> it looks like
<http​://perl5.git.perl.org/perl.git/commit/41d73075f0801c26794dadb1ff690f305d7e53a7>
broke error string handling on GNU/Hurd. The attached patch from
Samuel Thibault fixes this.

Taken. Will apply to blead once I hear which email address author would prefer.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented May 30, 2016

From @jkeenan

On Mon May 30 08​:09​:20 2016, jkeenan wrote​:

On Sat May 28 06​:48​:39 2016, dom wrote​:

As per Debian report <https://bugs.debian.org/cgi-
bin/bugreport.cgi?bug=825020> it looks like
<http​://perl5.git.perl.org/perl.git/commit/41d73075f0801c26794dadb1ff690f305d7e53a7>
broke error string handling on GNU/Hurd. The attached patch from
Samuel Thibault fixes this.

Taken. Will apply to blead once I hear which email address author
would prefer.

Patch author is already listed in AUTHORS, so applying directly. commit​: 4694301.

Thank you very much.

--
James E Keenan (jkeenan@​cpan.org)

@p5pRT
Copy link
Author

p5pRT commented May 30, 2016

@jkeenan - Status changed from 'open' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant