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

Build fails with -Dccflags='-DNO_LOCALE_NUMERIC' #16771

Closed
p5pRT opened this issue Nov 29, 2018 · 10 comments

Comments

@p5pRT
Copy link
Collaborator

@p5pRT p5pRT commented Nov 29, 2018

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

Searchable as RT133696$

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Nov 29, 2018

From andrew@afresh1.com

Created by andrew@afresh1.com

Perl 5.28.0 will not build with -Dccflags='-DNO_LOCALE_NUMERIC'

sv.c​:13333​:9​: error​: use of undeclared identifier 'lc_numeric_set'
  if (lc_numeric_set) {
  ^
1 error generated.

Even wrapping this error in an #ifdef USE_LOCALE_NUMERIC there are more things that don't work.

Perl Info

Flags:
    category=core
    severity=medium

Site configuration information for perl 5.24.3:

Configured by root at Thu Jan  1  0:00:00 UTC 1970.

Summary of my perl5 (revision 5 version 24 subversion 3) configuration:
   
  Platform:
    osname=openbsd, osvers=6.4, archname=amd64-openbsd
    uname='openbsd'
    config_args='-dsE -Dopenbsd_distribution=defined -Dccflags=-DNO_LOCALE_NUMERIC -DNO_LOCALE_COLLATE -Dmksymlinks'
    hint=recommended, useposix=true, d_sigaction=define
    useithreads=undef, usemultiplicity=undef
    use64bitint=define, use64bitall=define, uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
  Compiler:
    cc='cc', ccflags ='-DNO_LOCALE_NUMERIC -DNO_LOCALE_COLLATE -fno-strict-aliasing -pipe -fstack-protector-strong -D_FORTIFY_SOURCE=2 -I/usr/local/include',
    optimize='-O2',
    cppflags='-DNO_LOCALE_NUMERIC -DNO_LOCALE_COLLATE -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
    ccversion='', gccversion='4.2.1 Compatible OpenBSD Clang 6.0.0 (tags/RELEASE_600/final)', gccosandvers=''
    intsize=4, longsize=8, ptrsize=8, doublesize=8, byteorder=12345678, doublekind=3
    d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=16, longdblkind=3
    ivtype='long', ivsize=8, nvtype='double', nvsize=8, Off_t='off_t', lseeksize=8
    alignbytes=8, prototype=define
  Linker and Libraries:
    ld='cc', ldflags ='-Wl,-E  -fstack-protector-strong -L/usr/local/lib'
    libpth=/usr/lib /usr/lib
    libs=-lm -lc
    perllibs=-lm -lc
    libc=/usr/lib/libc.so.93.0, so=so, useshrplib=true, libperl=libperl.so.18.1
    gnulibc_version=''
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-R/usr/libdata/perl5/amd64-openbsd/CORE'
    cccdlflags='-DPIC -fPIC ', lddlflags='-shared -fPIC  -fstack-protector-strong -L/usr/local/lib'



@INC for perl 5.24.3:
    /usr/local/libdata/perl5/site_perl/amd64-openbsd
    /usr/local/libdata/perl5/site_perl
    /usr/libdata/perl5/amd64-openbsd
    /usr/libdata/perl5


Environment for perl 5.24.3:
    HOME=/home/afresh1
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PATH=/home/afresh1/.plenv/bin:/home/afresh1/bin:/home/afresh1/bin:/bin:/sbin:/usr/bin:/usr/sbin:/usr/X11R6/bin:/usr/local/bin:/usr/local/sbin:/usr/games:.:/usr/ports/infrastructure/bin
    PERL_BADLANG (unset)
    SHELL=/bin/ksh

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Nov 29, 2018

From andrew@afresh1.com

It turns out it doesn't work with -DNO_LOCALE_COLLATE either, probably
related.

locale.c​:3400​:19​: error​: use of undeclared identifier '_DUMMY_COLLATE'
  sl_result[LC_ALL_INDEX] = do_setlocale_c(LC_ALL, trial_locale);
  ^
locale.c​:385​:41​: note​: expanded from macro 'LC_ALL_INDEX'
# define LC_ALL_INDEX _DUMMY_TELEPHONE + 1
  ^
locale.c​:382​:41​: note​: expanded from macro '_DUMMY_TELEPHONE'
# define _DUMMY_TELEPHONE _DUMMY_PAPER
  ^
locale.c​:376​:41​: note​: expanded from macro '_DUMMY_PAPER'
# define _DUMMY_PAPER _DUMMY_MEASUREMENT
  ^
note​: (skipping 7 expansions in backtrace; use -fmacro-backtrace-limit=0 to see
  all)
locale.c​:338​:41​: note​: expanded from macro '_DUMMY_TIME'
# define _DUMMY_TIME LC_TIME_INDEX
  ^
locale.c​:337​:41​: note​: expanded from macro 'LC_TIME_INDEX'
# define LC_TIME_INDEX _DUMMY_COLLATE + 1
  ^
locale.c​:334​:41​: note​: expanded from macro '_DUMMY_COLLATE'
# define _DUMMY_COLLATE _DUMMY_COLLATE
  ^
locale.c​:3402​:25​: error​: use of undeclared identifier '_DUMMY_COLLATE'
  if (! sl_result[LC_ALL_INDEX]) {
  ^
locale.c​:385​:41​: note​: expanded from macro 'LC_ALL_INDEX'
# define LC_ALL_INDEX _DUMMY_TELEPHONE + 1
  ^
locale.c​:382​:41​: note​: expanded from macro '_DUMMY_TELEPHONE'
# define _DUMMY_TELEPHONE _DUMMY_PAPER
  ^
locale.c​:376​:41​: note​: expanded from macro '_DUMMY_PAPER'
# define _DUMMY_PAPER _DUMMY_MEASUREMENT
  ^
note​: (skipping 7 expansions in backtrace; use -fmacro-backtrace-limit=0 to see
  all)
locale.c​:338​:41​: note​: expanded from macro '_DUMMY_TIME'
# define _DUMMY_TIME LC_TIME_INDEX
  ^
locale.c​:337​:41​: note​: expanded from macro 'LC_TIME_INDEX'
# define LC_TIME_INDEX _DUMMY_COLLATE + 1
  ^
locale.c​:334​:41​: note​: expanded from macro '_DUMMY_COLLATE'
# define _DUMMY_COLLATE _DUMMY_COLLATE
  ^
2 errors generated.

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Nov 29, 2018

From @khwilliamson

Are you sure you don't want to use -Accflags= instead of -Dccflags= ?

Using, the -A version and applying the three patches​:
4d9252f
78f7c09
8203b3c

The final one should definitely fix the LC_COLLATE issue, which was a typo, and unrelated to the other.

Applying these patches causes it to compile and pass the test suite on my Linux box, with the options to Configure -Accflags='-DNO_LOCALE_NUMERIC' -Accflags='-DNO_LOCALE_COLLATE'

Please try these patches and report back.

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Nov 29, 2018

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

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Dec 1, 2018

From andrew@afresh1.com

On Thu, Nov 29, 2018 at 11​:08​:32AM -0800, Karl Williamson via RT wrote​:

Are you sure you don't want to use -Accflags= instead of -Dccflags= ?

Could be, that line with the -D has been in this file for a very long
time, so entirely possible it's wrong.

Using, the -A version and applying the three patches​:
4d9252f
78f7c09
8203b3c

The final one should definitely fix the LC_COLLATE issue, which was a typo, and unrelated to the other.

Applying these patches causes it to compile and pass the test suite on my Linux box, with the options to Configure -Accflags='-DNO_LOCALE_NUMERIC' -Accflags='-DNO_LOCALE_COLLATE'

Please try these patches and report back.

I applied these to perl-5.28.1 and still get this​:

  sv.c​:13333​:9​: error​: use of undeclared identifier 'lc_numeric_set'
  if (lc_numeric_set) {
  ^
  1 error generated.

However, blead does work so likely some other patch I need to hunt up.

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Dec 2, 2018

From andrew@afresh1.com

On Sat, Dec 01, 2018 at 04​:18​:24PM -0700, Andrew Hewus Fresh wrote​:

I applied these to perl-5.28.1 and still get this​:

sv\.c​:13333​:9​: error​: use of undeclared identifier 'lc\_numeric\_set'
    if \(lc\_numeric\_set\) \{
        ^
1 error generated\.

However, blead does work so likely some other patch I need to hunt up.

It seems I also need d36adde, which
reading the commit message is unsurprising. With that however, perl
builds and tests pass. Many thanks for your help!

https://perl5.git.perl.org/perl.git/commit/d36adde059ed1c4f7af210b4f9fc3a7bd2d7d343?f=sv.c

l8rZ,
--
andrew - http​://afresh1.com

At the source of every error which is blamed on the computer, you
will find at least two human errors, including the error of blaming
it on the computer.

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Dec 2, 2018

From @khwilliamson

OP agrees that has been fixed by the commits listed in this ticket
--
Karl Williamson

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented Dec 2, 2018

@khwilliamson - Status changed from 'open' to 'pending release'

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented May 22, 2019

From @khwilliamson

Thank you for filing this report. You have helped make Perl better.

With the release today of Perl 5.30.0, this and 160 other issues have been
resolved.

Perl 5.30.0 may be downloaded via​:
https://metacpan.org/release/XSAWYERX/perl-5.30.0

If you find that the problem persists, feel free to reopen this ticket.

@p5pRT

This comment has been minimized.

Copy link
Collaborator Author

@p5pRT p5pRT commented May 22, 2019

@khwilliamson - Status changed from 'pending release' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.