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

spkg-configure.m4 for pcre #27284

Closed
dimpase opened this issue Feb 14, 2019 · 19 comments
Closed

spkg-configure.m4 for pcre #27284

dimpase opened this issue Feb 14, 2019 · 19 comments

Comments

@dimpase
Copy link
Member

dimpase commented Feb 14, 2019

its only dependency is bzip2, so this should be a breeze - and it's one of deps of R.

CC: @embray @kiwifb @mkoeppe

Component: build: configure

Author: Dima Pasechnik

Branch: 285de31

Reviewer: François Bissey

Issue created by migration from https://trac.sagemath.org/ticket/27284

@dimpase dimpase added this to the sage-8.7 milestone Feb 14, 2019
@embray
Copy link
Contributor

embray commented Mar 25, 2019

comment:1

Ticket retargeted after milestone closed (if you don't believe this ticket is appropriate for the Sage 8.8 release please retarget manually)

@embray embray modified the milestones: sage-8.7, sage-8.8 Mar 25, 2019
@dimpase
Copy link
Member Author

dimpase commented May 7, 2019

Author: Dima Pasechnik

@dimpase
Copy link
Member Author

dimpase commented May 7, 2019

Branch: u/dimpase/packages/pcre-config

@dimpase
Copy link
Member Author

dimpase commented May 7, 2019

Commit: 285de31

@dimpase
Copy link
Member Author

dimpase commented May 7, 2019

New commits:

285de31spkg-config for pcre

@kiwifb
Copy link
Member

kiwifb commented May 7, 2019

Reviewer: François Bissey

@kiwifb
Copy link
Member

kiwifb commented May 7, 2019

comment:3

LGTM

@dimpase
Copy link
Member Author

dimpase commented May 7, 2019

comment:4

Thanks!

@vbraun
Copy link
Member

vbraun commented May 12, 2019

Changed branch from u/dimpase/packages/pcre-config to 285de31

@jhpalmieri
Copy link
Member

comment:6

I just installed pcre on my Mac with ./configure; make; make install, and I get a doctest failure with stats/r.py. If I instead emulate the installation of the Sage pcre package and use ./configure --enable-utf --enable-unicode-properties --enable-jit followed by make; make install, everything works. Should the .m4 file test for the appropriate feature of the system's pcre rather than just the presence of the library?

The doctest failure:

sage -t src/sage/stats/r.py
**********************************************************************
File "src/sage/stats/r.py", line 42, in sage.stats.r.ttest
Failed example:
    a, b = ttest([1,2,3,4,5],[1,2,3,3.5,5.121]); a # abs tol 1e-12
Exception raised:
    Traceback (most recent call last):
      File "/Users/palmieri/Desktop/Sage_stuff/sage_builds/TESTING/sage-8.8.beta7/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 681, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/Users/palmieri/Desktop/Sage_stuff/sage_builds/TESTING/sage-8.8.beta7/local/lib/python2.7/site-packages/sage/doctest/forker.py", line 1105, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.stats.r.ttest[0]>", line 1, in <module>
        a, b = ttest([Integer(1),Integer(2),Integer(3),Integer(4),Integer(5)],[Integer(1),Integer(2),Integer(3),RealNumber('3.5'),RealNumber('5.121')]); a # abs tol 1e-12
      File "/Users/palmieri/Desktop/Sage_stuff/sage_builds/TESTING/sage-8.8.beta7/local/lib/python2.7/site-packages/sage/stats/r.py", line 48, in ttest
        test = myR.t_test(x,y,conf_level = conf_level, **kw)._sage_()
      File "/Users/palmieri/Desktop/Sage_stuff/sage_builds/TESTING/sage-8.8.beta7/local/lib/python2.7/site-packages/sage/interfaces/r.py", line 1985, in __call__
        return self._parent.function_call(self._name, args=list(args), kwds=kwds)
      File "/Users/palmieri/Desktop/Sage_stuff/sage_builds/TESTING/sage-8.8.beta7/local/lib/python2.7/site-packages/sage/interfaces/r.py", line 1062, in function_call
        [self._sage_to_r_name(key)+'='+kwds[key].name() for key in kwds ] )))
      File "/Users/palmieri/Desktop/Sage_stuff/sage_builds/TESTING/sage-8.8.beta7/local/lib/python2.7/site-packages/sage/interfaces/interface.py", line 353, in new
        return self(code)
      File "/Users/palmieri/Desktop/Sage_stuff/sage_builds/TESTING/sage-8.8.beta7/local/lib/python2.7/site-packages/sage/interfaces/interface.py", line 288, in __call__
        return cls(self, x, name=name)
      File "/Users/palmieri/Desktop/Sage_stuff/sage_builds/TESTING/sage-8.8.beta7/local/lib/python2.7/site-packages/sage/interfaces/interface.py", line 701, in __init__
        self._name = parent._create(value, name=name)
      File "/Users/palmieri/Desktop/Sage_stuff/sage_builds/TESTING/sage-8.8.beta7/local/lib/python2.7/site-packages/sage/interfaces/interface.py", line 484, in _create
        self.set(name, value)
      File "/Users/palmieri/Desktop/Sage_stuff/sage_builds/TESTING/sage-8.8.beta7/local/lib/python2.7/site-packages/sage/interfaces/r.py", line 1108, in set
        out = self.eval(cmd)
      File "/Users/palmieri/Desktop/Sage_stuff/sage_builds/TESTING/sage-8.8.beta7/local/lib/python2.7/site-packages/sage/interfaces/r.py", line 1321, in eval
        return str(robjects.r(code)).rstrip()
      File "/Users/palmieri/Desktop/Sage_stuff/sage_builds/TESTING/sage-8.8.beta7/local/lib/python2.7/site-packages/rpy2/robjects/robject.py", line 108, in __str__
        self.__show(self)
    RRuntimeError: Error in strsplit(x, "\n[ \t\n]*\n", perl = TRUE) : 
      invalid split pattern '
    [ 	
    ]*
    '

**********************************************************************
1 item had failures:
   1 of   2 in sage.stats.r.ttest
    [2 tests, 1 failure, 0.50 s]

@jhpalmieri
Copy link
Member

Changed commit from 285de31 to none

@jhpalmieri
Copy link
Member

comment:7

It looks like ./configure --enable-utf is good enough, but not plain ./configure.

@dimpase
Copy link
Member Author

dimpase commented Jun 5, 2019

comment:8

Do you mean to say that in 2019 the newest MacOS ships a library without UTF support? Indeed, it seems they do, according to https://opensource.apple.com/source/pcre/pcre-9/Makefile.auto.html

(There is no pcre in Xcode on my OSX 10.13 for some reason)

Thanks Apple, you are the torch of progress... :-)

Well yes, sure, we can add a test for this.

Care to submit a bug report to Apple, as it's really silly of them...

@dimpase
Copy link
Member Author

dimpase commented Jun 5, 2019

comment:9

what is confusing to me that there is no UTF in the pattern it errors on.
Perhaps it's the string that's encoded in UTF that is passed to it...

@dimpase dimpase removed the c: build label Jun 5, 2019
@dimpase
Copy link
Member Author

dimpase commented Jun 5, 2019

comment:10

a typical installation of pcre(2) comes with pcretest and/or pcre2test. Does MacOS have them?

If so, what's the output of pcretest -C and pcre2test -C ?

Also, what is the output of pkg-config --modversion libpcre ? (if any)

@jhpalmieri
Copy link
Member

comment:11

Replying to @dimpase:

Do you mean to say that in 2019 the newest MacOS ships a library without UTF support?

No, I mean to say that I downloaded a tarball for pcre and ran ./configure; make; make install, expecting that the default settings for ./configure would be sensible, but instead they lead to the doctest failure I mentioned.

Indeed, it seems they do, according to https://opensource.apple.com/source/pcre/pcre-9/Makefile.auto.html

I wasn't using this.

(There is no pcre in Xcode on my OSX 10.13 for some reason)

Thanks Apple, you are the torch of progress... :-)

Well yes, sure, we can add a test for this.

Care to submit a bug report to Apple, as it's really silly of them...

@dimpase
Copy link
Member Author

dimpase commented Jun 5, 2019

comment:12

Ah, I see. It installed, in /usr/local, I gather? Does it install pcre(2)test too by default?

Cause I don't want to write C code to test for UTF, you know :-)

@dimpase
Copy link
Member Author

dimpase commented Jun 5, 2019

comment:13

I've opened #27936 to provide these extra tests.

@jhpalmieri
Copy link
Member

comment:14

Replying to @dimpase:

Ah, I see. It installed, in /usr/local, I gather? Does it install pcre(2)test too by default?

Yes, in /usr/local. It installs pcretest by default.

Cause I don't want to write C code to test for UTF, you know :-)

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

No branches or pull requests

5 participants