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

more system package checks #26286

Closed
dimpase opened this issue Sep 15, 2018 · 56 comments
Closed

more system package checks #26286

dimpase opened this issue Sep 15, 2018 · 56 comments

Comments

@dimpase
Copy link
Member

dimpase commented Sep 15, 2018

This is a follow-up to #24919

Some leftovers from there:

  • add amd64 to yasm check
  • simplify some more pre-existing spkg-configure.m4

Already on the branch:

  • xz (+lzma)
  • zlib
  • zeromq

Depends on #24919
Depends on #26660

CC: @embray

Component: build

Author: Erik Bray, Dima Pasechnik

Branch: 1d7b12e

Reviewer: Erik Bray, Dima Pasechnik

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

@dimpase dimpase added this to the sage-8.4 milestone Sep 15, 2018
@dimpase

This comment has been minimized.

@dimpase
Copy link
Member Author

dimpase commented Oct 31, 2018

Commit: c00a92c

@dimpase
Copy link
Member Author

dimpase commented Oct 31, 2018

Branch: u/dimpase/build/t26286

@dimpase

This comment has been minimized.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 31, 2018

Branch pushed to git repo; I updated commit sha1. New commits:

1a66f9brecongnize amd64 as a "good" yasm arch

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 31, 2018

Changed commit from c00a92c to 1a66f9b

@dimpase
Copy link
Member Author

dimpase commented Oct 31, 2018

Dependencies: #24919

@dimpase dimpase modified the milestones: sage-8.4, sage-8.5 Oct 31, 2018
@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 31, 2018

Changed commit from 1a66f9b to 7d9548b

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Oct 31, 2018

Branch pushed to git repo; I updated commit sha1. New commits:

7d9548ballow system's zeromq of version at least 4.2.5

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 8, 2018

Branch pushed to git repo; I updated commit sha1. Last 10 new commits:

b4cc8ebUse m4_sinclude instead--this prevents problems when switching between branches where one of these listed files no longer exists
8d01c6eMove these comments inside the macro call to ensure they are actually expanded as part of the macro
cf6367aChanged a bit how SAGE_SPKG_CONFIGURE works:
16c22deImplement an spkg-configure.m4 for patch, demonstrating use of the new system
6526868this check should be handled in gfortran's spkg-configure.m4
a5f783eadd a diagnostic message that is occasionally helpful for understanding the configure output
3bedcd6added better reporting for yasm program+feature check
79de3bdBSD find puts in extra slashes if you leave a trailing slash in the argument
2fc36f0Merge branch 'u/embray/build/autoconf-macros' of trac.sagemath.org:sage into t26660
73d84c8Merge branch 'u/dimpase/build/t26286' of trac.sagemath.org:sage into t26660

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 8, 2018

Changed commit from 7d9548b to 73d84c8

@dimpase
Copy link
Member Author

dimpase commented Nov 8, 2018

Changed dependencies from #24919 to #24919, #26660

@dimpase

This comment has been minimized.

@dimpase
Copy link
Member Author

dimpase commented Nov 21, 2018

comment:10

to be fixed:

--- a/m4/ax_check_liblzma.m4
+++ b/m4/ax_check_liblzma.m4
@@ -111,7 +111,7 @@ then
         CPPFLAGS="$CPPFLAGS -I${LZMA_HOME}/include"
   fi
   AC_LANG_PUSH([C])
-  AC_CHECK_LIB([lzma], [inflateEnd], [lzma_cv_liblzma=yes], [lzma_cv_liblzma=no])
+  AC_CHECK_LIB([lzma], [lzma_raw_decoder], [lzma_cv_liblzma=yes], [lzma_cv_liblzma=no])
   AC_CHECK_HEADER([lzma.h], [lzma_cv_lzma_h=yes], [lzma_cv_lzma_h=no])
   AC_LANG_POP([C])
   if test "$lzma_cv_liblzma" = "yes" && test "$lzma_cv_lzma_h" = "yes"

also, if xz test breaks at lzma linking test (but finds its headers), ./configure stops, but it should not...

@dimpase
Copy link
Member Author

dimpase commented Nov 22, 2018

comment:11

pyzmq's spkg-install needs removal of the line echo "zmq = $SAGE_LOCAL" >> src/setup.cfg, otherwise only Sage's copy of libzmq can be used.


in fact, whenever a package gets spkg-configure.m4, one has to inspect all packages that have it in dependencies for this kind of hardcoded SAGE_LOCAL-only bits in spkg-install etc.

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 26, 2018

Changed commit from 73d84c8 to 36559cf

@sagetrac-git
Copy link
Mannequin

sagetrac-git mannequin commented Nov 26, 2018

Branch pushed to git repo; I updated commit sha1. New commits:

e85c0adMerge branch 'u/dimpase/build/t26286' of trac.sagemath.org:sage into t26286
36559cfadjust pyzmq to use 0mq from outside too, fix lzma check

@embray
Copy link
Contributor

embray commented Nov 27, 2018

comment:13

Thank you for working on these. I'm excited to try it on Cygwin

Regarding your comments about zmq that's an interesting point I hadn't thought about. For something like pyzmq I generally assumed that if a system libzmq were used then likely there would be a system pyzmq as well. But it's true that that doesn't have to be the case.

So the question is what to do if some package has as a dependency another package (like libzmq) that was detected at configure-time. If the dependent package can just automatically detect the right location for its dependency, then there is no problem, as I assume is the case for your pyzmq change.

For other packages we might not be so lucky. So we may have to have the configure script output, in some cases, some variables related to dependencies detected at configure-time. For example, if some package really needed to know the correct prefix for libzmq (as opposed to just assuming it's $SAGE_LOCAL) we ought to output some LIBZMQ_PREFIX=... variable to a file that can be sourced by spkg-install. I don't have a precise plan for this, but it is a thought I've had before. This could also be useful for sagelib itself, as we want to be able to tell it exactly where it can find certain runtime dependencies.

@embray
Copy link
Contributor

embray commented Nov 27, 2018

comment:14

Relatedly, I've thought of adding a configure script just for sagelib that repurposes this machinery, but just detects the direct build- and runtime dependencies for Sage itself: This would be useful for packaging and installing just sagelib on systems where all other indirect dependencies are already assumed satisfied. That is, outside the context of sage-the-distribution.

@dimpase
Copy link
Member Author

dimpase commented Nov 27, 2018

comment:15

Replying to @embray:

Thank you for working on these. I'm excited to try it on Cygwin

I'm trying this on Cygwin atm myself - I've managed to get Cygwin running on a Google's cloud Windows 2016 Server. Not sure how close this is to real down to your living room Windows, but still...

Regarding your comments about zmq that's an interesting point I hadn't thought about. For something like pyzmq I generally assumed that if a system libzmq were used then likely there would be a system pyzmq as well. But it's true that that doesn't have to be the case.

This would be OK, sort of, once we can use system's Python, but not now...

So the question is what to do if some package has as a dependency another package (like libzmq) that was detected at configure-time. If the dependent package can just automatically detect the right location for its dependency, then there is no problem, as I assume is the case for your pyzmq change.

For other packages we might not be so lucky. So we may have to have the configure script output, in some cases, some variables related to dependencies detected at configure-time. For example, if some package really needed to know the correct prefix for libzmq (as opposed to just assuming it's $SAGE_LOCAL) we ought to output some LIBZMQ_PREFIX=... variable to a file that can be sourced by spkg-install. I don't have a precise plan for this, but it is a thought I've had before. This could also be useful for sagelib itself, as we want to be able to tell it exactly where it can find certain runtime dependencies.

As we are at that, what's your take on presence of pkg-config on the system? That's of course brings up the question of OSX, where is there no native pkg-config, but with OSX it seems to me that we really must switch over to using Homebrew there, and stop doing the monolithic mega-thing, which is increasingly difficult, cf. e.g. #26713.

@embray
Copy link
Contributor

embray commented Nov 27, 2018

comment:16

Obviously what I'm describing is something like a limited pkg-config. I don't know what the issues are with relying on pkg-config on macos, but I don't think it should be a requirement. There are certainly Python packages that use pkg-config where available to check for dependencies, but there usually end up being fallbacks for mac and windows when pkg-config isn't available.

Whether dependency checks are written in Python, or balled up in a configure script generated by autoconf, those checks would also probably use pkg-config where available, and provide fallbacks where not. Inconvenient and annoying, but a fact of life I suppose :(

@embray
Copy link
Contributor

embray commented Nov 27, 2018

comment:17

Perhaps some of our spkg_configure.m4 scripts could even output their own .pc files somewhere in cases where they don't already exist. We would want to have some kind of helper macro for doing that. I'm not sure how much trouble that would be.

@dimpase
Copy link
Member Author

dimpase commented Nov 27, 2018

comment:18

Replying to @embray:

Perhaps some of our spkg_configure.m4 scripts could even output their own .pc files somewhere in cases where they don't already exist. We would want to have some kind of helper macro for doing that. I'm not sure how much trouble that would be.

seems that it's been already something people designed:

https://www.gnu.org/software/autoconf-archive/ax_create_pkgconfig_info.html#ax_create_pkgconfig_info

@embray
Copy link
Contributor

embray commented Nov 27, 2018

comment:19

There appears to be a bug in build/pkgs/xz/spkg-configure.m4. On my Linux machine I'm getting:

configure: === checking whether to install the xz SPKG ===
checking if lzma is wanted... yes
checking for inflateEnd in -llzma... no
checking lzma.h usability... yes
checking lzma.h presence... yes
checking for lzma.h... yes
configure: error: either specify a valid lzma installation with --with-lzma=DIR or disable lzma usage with --without-lzma

It appears that my xz version is too low (do we really need it to be a specific version for any known reason)?

Then, it looks like there might be some improper nesting or something, or not fully handling every possible failure case, because I shouldn't get that error.

@embray
Copy link
Contributor

embray commented Nov 29, 2018

comment:30

The libpng requirement for ZLIB_1.2.9 does appear to be quite strict. I haven't checked, but I'm betting that might be way a zlib package was added to Sage in the first place (or possibly the converse if an older zlib was added to Sage first, and later had bad interactions with the system's libpng).

The attached fix works for me but it would be good to get some osx verification.


New commits:

1d7b12eensure that our zlib has inflateValidate

@dimpase
Copy link
Member Author

dimpase commented Dec 4, 2018

comment:31

Replying to @embray:

The libpng requirement for ZLIB_1.2.9 does appear to be quite strict. I haven't checked, but I'm betting that might be way a zlib package was added to Sage in the first place (or possibly the converse if an older zlib was added to Sage first, and later had bad interactions with the system's libpng).

The attached fix works for me but it would be good to get some osx verification.


New commits:

1d7b12eensure that our zlib has inflateValidate

this does work on OSX, at least on 10.13 (which does supply zlib 1.2.11)

@jhpalmieri
Copy link
Member

comment:32

What about bzip2 as another candidate? I don't have time to work on it myself, but it might be easy to add.

@dimpase
Copy link
Member Author

dimpase commented Dec 4, 2018

comment:33

yes, this should do doable.

But, as well, the more I think about it the more it looks to me that we should seriously consider using Homebrew on OSX, with this sort of approach we won't be having library clashes one sometimes sees with Homebrew...

@embray
Copy link
Contributor

embray commented Dec 5, 2018

comment:34

Replying to @jhpalmieri:

What about bzip2 as another candidate? I don't have time to work on it myself, but it might be easy to add.

It's definitely on the list. For the sake of keeping this ticket tractable I don't think I want to add too many additional package checks on this one ticket, but we should definitely have a followup for bz2, and many other packages (ncurses is high on my list because it takes forever to compile on Cygwin for some reason).

@dimpase
Copy link
Member Author

dimpase commented Dec 5, 2018

comment:35

I'm now trying this branch on OSX/Homebrew, with everything for which we have spkg-configure.m4 coming from either the Xcode or Homebrew; looks promising.

@dimpase
Copy link
Member Author

dimpase commented Dec 5, 2018

comment:36

OK, here are OSX results of make ptest: two segfaults (not reproducible at sage prompt, must be some weird testing framework problem):

$ ./sage -t --long src/sage/combinat/designs/ext_rep.py
Running doctests with ID 2018-12-05-10-31-31-f39a55d8.
Git branch: pkgcheck
Using --optional=dochtml,mpir,python2,sage
Doctesting 1 file.
sage -t --long --warn-long 113.9 src/sage/combinat/designs/ext_rep.py
    Killed due to abort
**********************************************************************
Tests run before process (pid=24472) failed:
sage: from sage.combinat.designs import ext_rep ## line 478 ##
sage: file_loc = ext_rep.dump_to_tmpfile("boo") ## line 479 ##
sage: os.remove(file_loc) ## line 480 ##
sage: sig_on_count() # check sig_on/off pairings (virtual doctest) ## line 481 ##
0
sage: from sage.combinat.designs import ext_rep ## line 497 ##
sage: ext_rep.check_dtrs_protocols('source', '2.0') ## line 498 ##
sage: ext_rep.check_dtrs_protocols('source', '3.0') ## line 499 ##
sage: sig_on_count() # check sig_on/off pairings (virtual doctest) ## line 503 ##
0
sage: from sage.combinat.designs import ext_rep ## line 519 ##
sage: file_loc = ext_rep.dump_to_tmpfile(ext_rep.v2_b2_k2_icgsa) ## line 520 ##
sage: proc = ext_rep.XTreeProcessor() ## line 521 ##
sage: f = ext_rep.open_extrep_file(file_loc) ## line 522 ##
sage: proc.parse(f) ## line 523 ##
sage: f.close() ## line 524 ##
sage: os.remove(file_loc) ## line 525 ##
sage: sig_on_count() # check sig_on/off pairings (virtual doctest) ## line 526 ##
0
sage: from sage.combinat.designs import ext_rep ## line 549 ##
sage: file_loc = ext_rep.dump_to_tmpfile(ext_rep.v2_b2_k2_icgsa) ## line 550 ##
sage: proc = ext_rep.XTreeProcessor() ## line 551 ##
sage: s = ext_rep.open_extrep_url("file://" + file_loc) ## line 552 ##
objc[24472]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called.
objc[24472]: +[__NSPlaceholderDate initialize] may have been in progress in another thread when fork() was called. We cannot safely call it or ignore it in the fork() child process. Crashing instead. Set a breakpoint on objc_initializeAfterForkError to debug.
------------------------------------------------------------------------
0   signals.so                          0x0000000104c5d34a print_backtrace + 58
1   signals.so                          0x0000000104c619a3 sigdie + 67
2   signals.so                          0x0000000104c61900 sigdie_for_sig + 256
3   signals.so                          0x0000000104c617b0 _sig_on_trampoline + 0
4   libsystem_platform.dylib            0x00007fff63caaf5a _sigtramp + 26
5   ???                                 0x3237343432000000 0x0 + 3618418224397287424
6   libsystem_kernel.dylib              0x00007fff63ae625f abort_with_payload_wrapper_internal + 0
7   libobjc.A.dylib                     0x00007fff62d87521 _ZL12_objc_fatalvyyPKcP13__va_list_tag + 108
8   libobjc.A.dylib                     0x00007fff62d873e3 __objc_error + 0
9   libobjc.A.dylib                     0x00007fff62d87f94 _ZL25lockAndFinishInitializingP10objc_classS0_ + 0
10  libobjc.A.dylib                     0x00007fff62d78e8b lookUpImpOrForward + 228
11  libobjc.A.dylib                     0x00007fff62d78914 _objc_msgSend_uncached + 68
12  CoreFoundation                      0x00007fff3b99c9b2 CFDateCreate + 34
13  CoreFoundation                      0x00007fff3b99a29e __CFBinaryPlistCreateObjectFiltered + 1582
14  CoreFoundation                      0x00007fff3b99b8ed __CFBinaryPlistCreateObjectFiltered + 7293
15  CoreFoundation                      0x00007fff3b9815fb __CFTryParseBinaryPlist + 187
16  CoreFoundation                      0x00007fff3b980ebe _CFPropertyListCreateWithData + 190
17  CoreFoundation                      0x00007fff3b980d50 CFPropertyListCreateWithData + 80
18  CoreFoundation                      0x00007fff3b9990cb -[CFPrefsPlistSource handleReply:toRequestNewDataMessage:onConnection:retryCount:error:] + 683
19  CoreFoundation                      0x00007fff3b998df3 __93-[CFPrefsSearchListSource handleReply:toRequestNewDataMessage:onConnection:retryCount:error:]_block_invoke + 147
20  libxpc.dylib                        0x00007fff63cf0935 xpc_array_apply + 57
21  CoreFoundation                      0x00007fff3b998d2b -[CFPrefsSearchListSource handleReply:toRequestNewDataMessage:onConnection:retryCount:error:] + 299
22  CoreFoundation                      0x00007fff3bb1981c __80-[CFPrefsSearchListSource alreadylocked_generationCountFromListOfSources:count:]_block_invoke_3.139 + 76
23  CoreFoundation                      0x00007fff3bb429d4 -[_CFXPreferences withConnectionForRole:performBlock:] + 36
24  CoreFoundation                      0x00007fff3bb197c4 __80-[CFPrefsSearchListSource alreadylocked_generationCountFromListOfSources:count:]_block_invoke_2.138 + 116
25  libsystem_trace.dylib               0x00007fff63ccd9f0 _os_activity_initiate_impl + 53
26  CoreFoundation                      0x00007fff3bb19722 __80-[CFPrefsSearchListSource alreadylocked_generationCountFromListOfSources:count:]_block_invoke.136 + 114
27  CoreFoundation                      0x00007fff3bb19067 CFPREFERENCES_IS_WAITING_FOR_USER_CFPREFSD + 39
28  CoreFoundation                      0x00007fff3bb192bc -[CFPrefsSearchListSource alreadylocked_generationCountFromListOfSources:count:] + 348
29  CoreFoundation                      0x00007fff3b997416 -[CFPrefsSearchListSource alreadylocked_copyDictionary] + 326
30  CoreFoundation                      0x00007fff3b996f93 -[CFPrefsSearchListSource alreadylocked_copyValueForKey:] + 67
31  CoreFoundation                      0x00007fff3bad6df5 -[CFPrefsSource copyValueForKey:] + 53
32  CoreFoundation                      0x00007fff3bb414a0 __76-[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:]_block_invoke + 32
33  CoreFoundation                      0x00007fff3bb1aa49 __108-[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:]_block_invoke + 297
34  CoreFoundation                      0x00007fff3bb1a8b5 -[_CFXPreferences(SearchListAdditions) withSearchListForIdentifier:container:cloudConfigurationURL:perform:] + 341
35  CoreFoundation                      0x00007fff3bb41443 -[_CFXPreferences copyAppValueForKey:identifier:container:configurationURL:] + 131
36  CoreFoundation                      0x00007fff3b99e4e3 CFPreferencesCopyAppValue + 99
37  SystemConfiguration                 0x00007fff47f7b5e1 SCDynamicStoreCopyProxiesWithOptions + 155
38  _scproxy.so                         0x0000000105d9aace get_proxies + 14
39  libpython2.7.dylib                  0x00000001042f9937 PyEval_EvalFrameEx + 22503
40  libpython2.7.dylib                  0x00000001042fe991 fast_function + 337
41  libpython2.7.dylib                  0x00000001042f96d4 PyEval_EvalFrameEx + 21892
42  libpython2.7.dylib                  0x00000001042fe991 fast_function + 337
43  libpython2.7.dylib                  0x00000001042f96d4 PyEval_EvalFrameEx + 21892
44  libpython2.7.dylib                  0x00000001042f3ef4 PyEval_EvalCodeEx + 2276
45  libpython2.7.dylib                  0x00000001042702b4 function_call + 340
46  libpython2.7.dylib                  0x0000000104245841 PyObject_Call + 97
47  libpython2.7.dylib                  0x0000000104255b02 instancemethod_call + 178
48  libpython2.7.dylib                  0x0000000104245841 PyObject_Call + 97
49  libpython2.7.dylib                  0x00000001042fe2c2 PyEval_CallObjectWithKeywords + 162
50  libpython2.7.dylib                  0x0000000104253a43 PyInstance_New + 131
51  libpython2.7.dylib                  0x0000000104245841 PyObject_Call + 97
52  libpython2.7.dylib                  0x00000001042f98e9 PyEval_EvalFrameEx + 22425
53  libpython2.7.dylib                  0x00000001042f3ef4 PyEval_EvalCodeEx + 2276
54  libpython2.7.dylib                  0x00000001042fe8ad fast_function + 109
55  libpython2.7.dylib                  0x00000001042f96d4 PyEval_EvalFrameEx + 21892
56  libpython2.7.dylib                  0x00000001042f3ef4 PyEval_EvalCodeEx + 2276
57  libpython2.7.dylib                  0x00000001042fe8ad fast_function + 109
58  libpython2.7.dylib                  0x00000001042f96d4 PyEval_EvalFrameEx + 21892
59  libpython2.7.dylib                  0x00000001042fe991 fast_function + 337
60  libpython2.7.dylib                  0x00000001042f96d4 PyEval_EvalFrameEx + 21892
61  libpython2.7.dylib                  0x00000001042f3ef4 PyEval_EvalCodeEx + 2276
62  libpython2.7.dylib                  0x00000001042f43a1 PyEval_EvalFrameEx + 593
63  libpython2.7.dylib                  0x00000001042f3ef4 PyEval_EvalCodeEx + 2276
64  libpython2.7.dylib                  0x00000001042fe8ad fast_function + 109
65  libpython2.7.dylib                  0x00000001042f96d4 PyEval_EvalFrameEx + 21892
66  libpython2.7.dylib                  0x00000001042f3ef4 PyEval_EvalCodeEx + 2276
67  libpython2.7.dylib                  0x00000001042fe8ad fast_function + 109
68  libpython2.7.dylib                  0x00000001042f96d4 PyEval_EvalFrameEx + 21892
69  libpython2.7.dylib                  0x00000001042f3ef4 PyEval_EvalCodeEx + 2276
70  libpython2.7.dylib                  0x00000001042fe8ad fast_function + 109
71  libpython2.7.dylib                  0x00000001042f96d4 PyEval_EvalFrameEx + 21892
72  libpython2.7.dylib                  0x00000001042f3ef4 PyEval_EvalCodeEx + 2276
73  libpython2.7.dylib                  0x00000001042fe8ad fast_function + 109
74  libpython2.7.dylib                  0x00000001042f96d4 PyEval_EvalFrameEx + 21892
75  libpython2.7.dylib                  0x00000001042f3ef4 PyEval_EvalCodeEx + 2276
76  libpython2.7.dylib                  0x00000001042702b4 function_call + 340
77  libpython2.7.dylib                  0x0000000104245841 PyObject_Call + 97
78  libpython2.7.dylib                  0x0000000104255b02 instancemethod_call + 178
79  libpython2.7.dylib                  0x0000000104245841 PyObject_Call + 97
80  libpython2.7.dylib                  0x00000001042abce8 slot_tp_call + 168
81  libpython2.7.dylib                  0x0000000104245841 PyObject_Call + 97
82  libpython2.7.dylib                  0x00000001042f98e9 PyEval_EvalFrameEx + 22425
83  libpython2.7.dylib                  0x00000001042f3ef4 PyEval_EvalCodeEx + 2276
84  libpython2.7.dylib                  0x00000001042fe8ad fast_function + 109
85  libpython2.7.dylib                  0x00000001042f96d4 PyEval_EvalFrameEx + 21892
86  libpython2.7.dylib                  0x00000001042fe991 fast_function + 337
87  libpython2.7.dylib                  0x00000001042f96d4 PyEval_EvalFrameEx + 21892
88  libpython2.7.dylib                  0x00000001042f3ef4 PyEval_EvalCodeEx + 2276
89  libpython2.7.dylib                  0x00000001042702b4 function_call + 340
90  libpython2.7.dylib                  0x0000000104245841 PyObject_Call + 97
91  libpython2.7.dylib                  0x0000000104255b02 instancemethod_call + 178
92  libpython2.7.dylib                  0x0000000104245841 PyObject_Call + 97
93  libpython2.7.dylib                  0x00000001042acd4e slot_tp_init + 174
94  libpython2.7.dylib                  0x00000001042a8bb9 type_call + 313
95  libpython2.7.dylib                  0x0000000104245841 PyObject_Call + 97
96  libpython2.7.dylib                  0x00000001042f98e9 PyEval_EvalFrameEx + 22425
97  libpython2.7.dylib                  0x00000001042fe991 fast_function + 337
98  libpython2.7.dylib                  0x00000001042f96d4 PyEval_EvalFrameEx + 21892
99  libpython2.7.dylib                  0x00000001042f3ef4 PyEval_EvalCodeEx + 2276
100 libpython2.7.dylib                  0x00000001042fe8ad fast_function + 109
101 libpython2.7.dylib                  0x00000001042f96d4 PyEval_EvalFrameEx + 21892
102 libpython2.7.dylib                  0x00000001042f3ef4 PyEval_EvalCodeEx + 2276
103 libpython2.7.dylib                  0x00000001042fe8ad fast_function + 109
104 libpython2.7.dylib                  0x00000001042f96d4 PyEval_EvalFrameEx + 21892
105 libpython2.7.dylib                  0x00000001042f3ef4 PyEval_EvalCodeEx + 2276
106 libpython2.7.dylib                  0x00000001042fe8ad fast_function + 109
107 libpython2.7.dylib                  0x00000001042f96d4 PyEval_EvalFrameEx + 21892
108 libpython2.7.dylib                  0x00000001042f3ef4 PyEval_EvalCodeEx + 2276
109 libpython2.7.dylib                  0x00000001042fe8ad fast_function + 109
110 libpython2.7.dylib                  0x00000001042f96d4 PyEval_EvalFrameEx + 21892
111 libpython2.7.dylib                  0x00000001042f3ef4 PyEval_EvalCodeEx + 2276
112 libpython2.7.dylib                  0x00000001042fe8ad fast_function + 109
113 libpython2.7.dylib                  0x00000001042f96d4 PyEval_EvalFrameEx + 21892
114 libpython2.7.dylib                  0x00000001042f3ef4 PyEval_EvalCodeEx + 2276
115 libpython2.7.dylib                  0x00000001042f3602 PyEval_EvalCode + 34
116 libpython2.7.dylib                  0x000000010432232d PyRun_FileExFlags + 157
117 libpython2.7.dylib                  0x0000000104321dac PyRun_SimpleFileExFlags + 668
118 libpython2.7.dylib                  0x00000001043386cf Py_Main + 3279
119 libdyld.dylib                       0x00007fff6399c015 start + 1
------------------------------------------------------------------------
Unhandled SIGABRT: An abort() occurred.
This probably occurred because a *compiled* module has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Python will now terminate.
------------------------------------------------------------------------

**********************************************************************
----------------------------------------------------------------------
sage -t --long --warn-long 113.9 src/sage/combinat/designs/ext_rep.py  # Killed due to abort
----------------------------------------------------------------------
Total time for all tests: 0.2 seconds
    cpu time: 0.0 seconds
    cumulative wall time: 0.0 seconds

and a very similar one in src/sage/doctest/external.py.
And few timeouts - not surprising for an 8-year old machine...

Looks good enough for a positive OSX review to me.

@embray
Copy link
Contributor

embray commented Dec 5, 2018

comment:37

This looks like it's still a problem. The reason you're not seeing it at the prompt is that it has something to do with forked processes, which is what you have (by default) in the doctest runner, but not at the command line. So one of these system libraries (perhaps, I'm just guessing) has broken post-fork() behavior.

But I can't see clearly through all that CoreFoundation stuff to know what's going on. There's even something in that stacktrace mentioning cloudConfigurationURL which terrifies me. Apple... :<

@dimpase
Copy link
Member Author

dimpase commented Dec 5, 2018

comment:38

Replying to @embray:

This looks like it's still a problem. The reason you're not seeing it at the prompt is that it has something to do with forked processes, which is what you have (by default) in the doctest runner, but not at the command line. So one of these system libraries (perhaps, I'm just guessing) has broken post-fork() behavior.

this looks like export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES might be needed,
and this has nothing to do with Homebrew or Sage...

We have seen this stuff already, I just already forgot (as one does with nightmares :-))

But I can't see clearly through all that CoreFoundation stuff to know what's going on. There's even something in that stacktrace mentioning cloudConfigurationURL which terrifies me. Apple... :<

@embray
Copy link
Contributor

embray commented Dec 5, 2018

comment:39

Replying to @dimpase:

Replying to @embray:

This looks like it's still a problem. The reason you're not seeing it at the prompt is that it has something to do with forked processes, which is what you have (by default) in the doctest runner, but not at the command line. So one of these system libraries (perhaps, I'm just guessing) has broken post-fork() behavior.

this looks like export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES might be needed,
and this has nothing to do with Homebrew or Sage...

We have seen this stuff already, I just already forgot (as one does with nightmares :-))

I thought maybe it had something to do with that too, but I wasn't sure if you re-ran those tests before/after this patch.

@dimpase
Copy link
Member Author

dimpase commented Dec 5, 2018

Reviewer: Erik Bray, Dima Pasechnik

@dimpase
Copy link
Member Author

dimpase commented Dec 5, 2018

Author: Erik Bray, Dima Pasechnik

@dimpase
Copy link
Member Author

dimpase commented Dec 5, 2018

comment:40

OK, indeed, export OBJC_DISABLE_INITIALIZE_FORK_SAFETY=YES makes tests work. Should we send this to the bots now?

@embray
Copy link
Contributor

embray commented Dec 5, 2018

comment:42

I won't be surprised if the buildbots discover new problems with this but that's what they're there for. Good for me until and unless we hear otherwise.

@jhpalmieri
Copy link
Member

comment:43

Those OS X failures involving OBJC_DISABLE_... are discussed at #25921.

@vbraun
Copy link
Member

vbraun commented Dec 7, 2018

Changed branch from public/build/t26286 to 1d7b12e

@jhpalmieri
Copy link
Member

comment:45

This broke the build on an OS X Mojave machine. With Mojave, it is possible to have no directory /usr/include, for example, but with this branch, ./configure found zlib somewhere. The problem is that Python doesn't find it, so Python is built without zlib support, and that breaks the pip build, for example.

I've opened #26899 for this.

@jhpalmieri
Copy link
Member

Changed commit from 1d7b12e to none

@dimpase
Copy link
Member Author

dimpase commented Dec 23, 2019

comment:47

opened #28906 to deal with potentially missing zlib.pc.

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

4 participants