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

Building ecl-16.1.2 fails on some Cygwin versions #25057

Closed
embray opened this issue Mar 29, 2018 · 17 comments
Closed

Building ecl-16.1.2 fails on some Cygwin versions #25057

embray opened this issue Mar 29, 2018 · 17 comments

Comments

@embray
Copy link
Contributor

embray commented Mar 29, 2018

IIRC I've had this problem for a while but never made a report of it.

[ecl-16.1.2.p5] gcc -DECLDIR="\"/home/embray/src/sagemath/sage/local/lib/ecl-16.1.2\"" -I. -I/home/embray/src/sagemath/sage/local/var/tmp/sage/build/ecl-16.1.2.p5/src/build -I/home/embray/src/sagemath/sage/local/var/tmp/sage/build/ecl-16.1.2.p5/src/src/c -I../ecl/gc -DECL_API -DECL_NO_LEGACY   -I/home/embray/src/sagemath/sage/local/include  -g -O0   -Dcygwin -c -o ffi/backtrace.o ffi/backtrace.o.c
[ecl-16.1.2.p5] /home/embray/src/sagemath/sage/local/var/tmp/sage/build/ecl-16.1.2.p5/src/src/c/ffi/backtrace.d: In function 'backtrace_symbols':
[ecl-16.1.2.p5] /home/embray/src/sagemath/sage/local/var/tmp/sage/build/ecl-16.1.2.p5/src/src/c/ffi/backtrace.d:84:9: error: unknown type name 'Dl_info'
[ecl-16.1.2.p5]          Dl_info data[1];
[ecl-16.1.2.p5]          ^~~~~~~
[ecl-16.1.2.p5] /home/embray/src/sagemath/sage/local/var/tmp/sage/build/ecl-16.1.2.p5/src/src/c/ffi/backtrace.d:88:21: warning: implicit declaration of function 'dladdr' [-Wimplicit-function-declaration]
[ecl-16.1.2.p5]                  if (dladdr(buffer[i], data)) {
[ecl-16.1.2.p5]                      ^~~~~~
[ecl-16.1.2.p5] /home/embray/src/sagemath/sage/local/var/tmp/sage/build/ecl-16.1.2.p5/src/src/c/ffi/backtrace.d:89:42: error: request for member 'dli_sname' in something not a structure or union
[ecl-16.1.2.p5]                          strings[i] = data->dli_sname;
[ecl-16.1.2.p5]                                           ^~
[ecl-16.1.2.p5] make[5]: *** [Makefile:86: ffi/backtrace.o] Error 1

It works if I run SAGE_DEBUG=no make ecl.

Upstream: Not yet reported upstream; Will do shortly.

Component: porting: Cygwin

Author: Erik Bray

Branch/Commit: 981cca9

Reviewer: Travis Scrimshaw

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

@embray embray added this to the sage-8.2 milestone Mar 29, 2018
@embray embray self-assigned this Mar 29, 2018
@embray
Copy link
Contributor Author

embray commented Mar 29, 2018

comment:2

I feel like I've run into a problem with Dl_info on Cygwin before, but I can't recall where...

@embray
Copy link
Contributor Author

embray commented Mar 29, 2018

comment:3

I see, Dl_info is not defined unless the _GNU_SOURCE macro is defined--this the default on Linux, but on Cygwin it is not defined by default. This should be fixed upstream, but we can also easily add it in.

@embray
Copy link
Contributor Author

embray commented Mar 29, 2018

Upstream: Not yet reported upstream; Will do shortly.

@embray embray modified the milestones: sage-8.2, sage-8.3 Apr 26, 2018
@embray embray removed this from the sage-8.3 milestone Jul 18, 2018
@embray
Copy link
Contributor Author

embray commented Sep 24, 2018

comment:6

Just got this on the buildbot machine I'm trying to set up, mysteriously, even without SAGE_DEBUG defined. In fact, I'm not sure why this was affected by SAGE_DEBUG in the first place...

@embray
Copy link
Contributor Author

embray commented Sep 24, 2018

comment:7

My only guess for why I don't get this on my local machine is that it must have something to do with ccache. I haven't even seen this on the patchbot in a while, which also has a well-primed ccache. I just have to wonder what's being missed from the ccache hash. It's also possible this only stopped working on more recent cygwin versions but it's not obvious to me when that would have occurred...

@embray
Copy link
Contributor Author

embray commented Sep 25, 2018

comment:8

Well, I tried re-building ecl with CCACHE_DISABLE=1 and it still built, so it probably has something to do with the newlib version or gcc or something. Very strange...

@embray
Copy link
Contributor Author

embray commented Sep 25, 2018

comment:9

Setting this as a blocker since it's preventing building in general, at least, I'm guessing on newer Cygwins. Fortunately it has an easy workaround.

@embray embray added this to the sage-8.4 milestone Sep 25, 2018
@embray embray changed the title Building ecl-16.1.2 with SAGE_DEBUG=yes fails on Cygwin Building ecl-16.1.2 fails on some Cygwin versions Sep 25, 2018
@embray
Copy link
Contributor Author

embray commented Sep 25, 2018

comment:10

Fairly trivial fix. In this case I deliberately did not bump the package version for a few reasons:

  1. The main purpose of doing so would be for testing on buildbots, however there is still not yet an automated Cygwin buildbot (ironically, this issue was hit in the process of trying to test and configure one).

  2. It only affects Sage on Cygwin--there is no need to waste buildbot time on other platforms that won't be affected by this change.

  3. Even on existing builds on Cygwin it is not necessary to re-build ECL due to this change; this will only fix an issue on systems where ECL could not be built in the first place.

I'm happy to bump it anyways if anyone suggests otherwise, but I believe these are good arguments not to in this case.


New commits:

981cca9Trac #25057: fix building ECL on Cygwins where Dl_info is not defined without _GNU_SOURCE

@embray
Copy link
Contributor Author

embray commented Sep 25, 2018

Author: Erik Bray

@embray
Copy link
Contributor Author

embray commented Sep 25, 2018

Branch: u/embray/cygwin/ticket-25057

@embray
Copy link
Contributor Author

embray commented Sep 25, 2018

Commit: 981cca9

@dimpase
Copy link
Member

dimpase commented Sep 25, 2018

comment:11

Would it help to have a Windows (10? something else) Google CE host running Cygwin patch/buildbots?
(I have a grant from Google that lets me do this for the coming 5 months or so).

@embray
Copy link
Contributor Author

embray commented Sep 25, 2018

comment:12

Replying to @dimpase:

Would it help to have a Windows (10? something else) Google CE host running Cygwin patch/buildbots?
(I have a grant from Google that lets me do this for the coming 5 months or so).

It may or may not. I've had a number of private conversations about possibilities for hosting such things. The problem has consistently been that Cygwin under a virtualized host can be rather slow. This slowness can be mitigated significantly with appropriate control over the VM host, but with cloud services we frequently don't even have that. I tried setting up a VM on Azure, for example, and it was still rather slow.

Anyways, we now (or will soon) have a buildbot running on a VM once all these blocker issues are fixed. In the meantime the best thing is having a dedicated host. We have had discussions about purchasing a machine with OpenDreamKit funds, but I don't know where that's at right now.

@tscrim
Copy link
Collaborator

tscrim commented Sep 26, 2018

comment:13

I was not hit with this, but Sage builds on my cygwin just fine with this and it doesn't affect other systems. So I am setting this to a positive review.

@tscrim
Copy link
Collaborator

tscrim commented Sep 26, 2018

Reviewer: Travis Scrimshaw

@embray
Copy link
Contributor Author

embray commented Sep 26, 2018

comment:14

Thanks for checking. Indeed I'm still a little mystified as to why this was affecting this new machine I set up but not others. But the basic underlying issue is clear.

@vbraun
Copy link
Member

vbraun commented Sep 27, 2018

Changed branch from u/embray/cygwin/ticket-25057 to 981cca9

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