Opened 7 years ago

Closed 5 years ago

#14648 closed enhancement (duplicate)

Old FSF config.(guess|sub) scripts do not recognize Cygwin64

Reported by: jpflori Owned by: jdemeyer
Priority: major Milestone: sage-duplicate/invalid/wontfix
Component: packages: standard Keywords: spkg cygwin cygwin64
Cc: kcrisman, dimpase, leif, tscrim Merged in:
Authors: Reviewers: Jean-Pierre Flori
Report Upstream: Reported upstream. Developers acknowledge bug. Work issues:
Branch: Commit:
Dependencies: #15365, #15580, #15015 Stopgaps:

Description (last modified by jpflori)

The FSF config.guess and config.sub shipped with MPIR 2.6.0 and some other packages are very old (timestamp says 2003 for the MPIR ones) and fail to recognize Cygwin64. Latest upstream files at:

solves this issue.

MPIR report at:

Other spkg affected:

  • sqlite fixed at #16098.
  • ecl (twice because of shipped but not used old GMP...) #9493.
  • IML fixed here!

Change History (59)

comment:1 Changed 7 years ago by jpflori

There is a planned update to MPIR spkg at #13948.

comment:2 Changed 7 years ago by jpflori

sqlite spkg (even the latest upstream packaged in 5.10.beta*) fails for the same reason.

comment:3 Changed 7 years ago by leif

  • Cc leif added

comment:4 follow-up: Changed 7 years ago by jpflori

Same problem when configuring ECL, it fails in the provided gmp subdir (that we don't even use...).

comment:5 in reply to: ↑ 4 ; follow-up: Changed 6 years ago by leif

Replying to jpflori:

Same problem when configuring ECL, it fails in the provided gmp subdir (that we don't even use...).

I proposed a patch to allow removing the GMP folder a couple of times... 8/

comment:6 Changed 6 years ago by jpflori

  • Description modified (diff)
  • Keywords mpir removed
  • Summary changed from MPIR fails to configure on Cygwin64 to Old FSF config.(guess|sub) scripts do not recognize Cygwin64

I'm changing this ticket to only take care of the outdated fsf config.* scripts.

The further problems with MPIR should go elsewher.

comment:7 in reply to: ↑ 5 Changed 6 years ago by leif

Replying to leif:

Replying to jpflori:

Same problem when configuring ECL, it fails in the provided gmp subdir (that we don't even use...).

I proposed a patch to allow removing the GMP folder a couple of times... 8/

ROFL, three years ago: #9493.

(No idea whether the patch w.r.t. install-sh still applies or is at all still necessary.)

comment:8 Changed 6 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:9 Changed 6 years ago by jpflori

  • Cc tscrim added

comment:10 Changed 6 years ago by tscrim

Given the above, shall we put the new scripts as a patch and start the review?

comment:11 Changed 6 years ago by tscrim

  • Branch set to u/tscrim/ticket/14648
  • Commit set to f5a57d0c790c6e6afd67fb02ce23a1ac31db8fb5

Here's my attempt at a patch.


New commits:

c0a09c5Make sure tinfo is correctly linked in when needed on Cygwin.
45bb195Update ncurses to dev version 5.9-20131221.
f5a57d0Merge branch 'u/jpflori/ticket/15617' of trac.sagemath.org:sage into cygwin64build
Last edited 6 years ago by tscrim (previous) (diff)

comment:12 Changed 6 years ago by git

  • Commit changed from f5a57d0c790c6e6afd67fb02ce23a1ac31db8fb5 to 815819c36ab1f278464c68e2ef5b3749d23da82c

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

815819cInitial attempt.

comment:13 Changed 6 years ago by tscrim

Now with the correct thing pushed.

comment:14 Changed 6 years ago by jdemeyer

This patch is very bad. MPIR's config.guess is a custom script, it is not the autotools' version. See also the thread you linked to.

For example, it detects my machine as sandybridge-unknown-linux-gnu. With this patch, this becomes x86_64-unknown-linux-gnu.

Also, Initial attempt. is obviously a bad commit message.

comment:15 Changed 6 years ago by jpflori

Hey Travis, I'll up my working (hopefully not only for me) branch a little later today. In this very ticket I'll only update the FSF scripts. In another one I'll put the magic needed for MPIR to build the correct ABI.

comment:16 Changed 6 years ago by jpflori

  • Branch changed from u/tscrim/ticket/14648 to u/jpflori/ticket/14648
  • Commit changed from 815819c36ab1f278464c68e2ef5b3749d23da82c to 0ac6c60c8ed2b1607645d771f76beeff1b02d82d

Maybe some other spkgs are missing, I'll add them while buillding Sage.


New commits:

f09bc42Let MPIR build without C++ support on Cygwin.
c81e4b9Merge remote-tracking branch 'trac/u/jpflori/ticket/15365' into ticket/14648
0ac6c60Update config.(guess|sub) files to recognize Cygwin64.

comment:17 Changed 6 years ago by jpflori

  • Dependencies set to #15365

comment:18 Changed 6 years ago by git

  • Commit changed from 0ac6c60c8ed2b1607645d771f76beeff1b02d82d to c311252891e2ef51244de0ab6ceeee73eedfeacc

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

f09bc42Let MPIR build without C++ support on Cygwin.
c81e4b9Merge remote-tracking branch 'trac/u/jpflori/ticket/15365' into ticket/14648
c311252Update config.(guess|sub) files to recognize Cygwin64.

comment:19 Changed 6 years ago by git

  • Commit changed from c311252891e2ef51244de0ab6ceeee73eedfeacc to b922e3b00fededdb77b25210d247d252b3136230

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

f09bc42Let MPIR build without C++ support on Cygwin.
c81e4b9Merge remote-tracking branch 'trac/u/jpflori/ticket/15365' into ticket/14648
b922e3bUpdate config.(guess|sub) files to recognize Cygwin64.

comment:20 Changed 6 years ago by git

  • Commit changed from b922e3b00fededdb77b25210d247d252b3136230 to 9ba3d7fb03b7e55aa3f116a82840e5b07e472ea1

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

f09bc42Let MPIR build without C++ support on Cygwin.
c81e4b9Merge remote-tracking branch 'trac/u/jpflori/ticket/15365' into ticket/14648
9ba3d7fUpdate config.(guess|sub) files to recognize Cygwin64.

comment:21 Changed 6 years ago by jpflori

IML needs updating.

comment:22 Changed 6 years ago by jdemeyer

Since #15580, you could also consider copying config.guess from $SAGE_ROOT/config/config.guess.

comment:23 Changed 6 years ago by jpflori

Yes, that's a very good idea!

comment:24 Changed 6 years ago by jdemeyer

Be sure to check which version of Automake you require (config.guess belongs to Automake) and edit configure.ac accordingly.

comment:25 Changed 6 years ago by jpflori

I guess there is some magic in configure which checks for consistency between configure.ac and config.guess?

comment:26 Changed 6 years ago by jdemeyer

I meant edit $SAGE_ROOT/configure.ac, in particular the line

AM_INIT_AUTOMAKE([1.9.6 foreign])

And no, I don't think autotools cares about the version of config.guess, it just requires it to be available.

comment:27 Changed 6 years ago by jpflori

After a quick look through automake versions it would be 1.10.

comment:28 follow-up: Changed 6 years ago by tscrim

FTR, this currently doesn't work for me on my cygwin32 and ubuntu machines. I believe it's the same issue as comment:14:

checking build system type... Invalid configuration `k8-pc-linux-gnu': machine `k8-pc' not recognized
configure: error: /bin/bash ./config.sub k8-pc-linux-gnu failed
Error configuring MPIR (with CFLAGS unset).

comment:29 in reply to: ↑ 28 Changed 6 years ago by jpflori

Replying to tscrim:

FTR, this currently doesn't work for me on my cygwin32 and ubuntu machines. I believe it's the same issue as comment:14:

checking build system type... Invalid configuration `k8-pc-linux-gnu': machine `k8-pc' not recognized
configure: error: /bin/bash ./config.sub k8-pc-linux-gnu failed
Error configuring MPIR (with CFLAGS unset).

I assume the previous version of the pkg does work?

comment:30 Changed 6 years ago by jpflori

(And you are using my branch and not yours?)

comment:31 Changed 6 years ago by tscrim

Yes (and yes).

comment:32 Changed 6 years ago by git

  • Commit changed from 9ba3d7fb03b7e55aa3f116a82840e5b07e472ea1 to 79275bdb80d4b50a86dace1ba083da6b34a2b873

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

318da4dMerge remote-tracking branch 'trac/develop' into ticket/14648
79275bdUse config.(guess|sub) from $SAGE_ROOT/config/.

comment:33 Changed 6 years ago by jpflori

  • Authors set to Jean-Pierre Flori
  • Dependencies changed from #15365 to #15365, #15580
  • Status changed from new to needs_review

comment:34 Changed 6 years ago by jpflori

For the k8 issue, did any previous version work?

comment:35 Changed 6 years ago by jpflori

Ok, I guess the problem is with https://github.com/wbhart/mpir/commit/3b410a80565eb71fd32a86630d550098ebc85f82

In fact, the MPIR wrapper should be modified to map k8 and so on to something else.

comment:36 Changed 6 years ago by jpflori

  • Status changed from needs_review to needs_work

comment:37 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.1 to sage-6.2

comment:38 Changed 6 years ago by jpflori

Latest sqlite is wroking on Cygwin64 (or rather "at least it builds now"). See #16098.

comment:39 Changed 6 years ago by jpflori

Latest MPIR at #15015 will work as well.

comment:40 Changed 6 years ago by jpflori

ECL fixed at #9493.

So only dealing with IML here.

comment:41 Changed 6 years ago by git

  • Commit changed from 79275bdb80d4b50a86dace1ba083da6b34a2b873 to d3a4456c68cd7ecbe13f7ada905002c7cd8440f3

Branch pushed to git repo; I updated commit sha1. This was a forced push. New commits:

d3a4456Use uptodate config.* script for IML.

comment:42 Changed 6 years ago by jpflori

  • Description modified (diff)
  • Status changed from needs_work to needs_review

comment:43 Changed 6 years ago by vbraun

Thats a kind of vile hack to use some of the Sage autoconf output. Did you contact IML upstream?

comment:44 Changed 6 years ago by jpflori

Note that this vile hack just use standard files distributed by autoconf, not some files specifically crafted (well, the exact version is) by configure when it's run.

Not contacted IML though, I though the project was dead. If not we should really work more with them to deal with the BLAS/linking hell in their build system.

comment:45 follow-up: Changed 6 years ago by vbraun

Well we could give it a try. If there is no response then we should just make our own tarball with updated autoconf. Its not exactly a moving target ;-)

I agree that the hack works, but its ugly and fragile if we change anything in the sage autoconf files (e.g. move to a different directory).

comment:46 in reply to: ↑ 45 Changed 6 years ago by jpflori

Replying to vbraun:

Well we could give it a try. If there is no response then we should just make our own tarball with updated autoconf. Its not exactly a moving target ;-)

I'll drop them an email (without specific patches first, just getting the temperature there).

I agree that the hack works, but its ugly and fragile if we change anything in the sage autoconf files (e.g. move to a different directory).

Sure, I realize I should at least check the return code for such cases.

comment:47 follow-up: Changed 6 years ago by jpflori

Sent an email upstream.

comment:48 in reply to: ↑ 47 Changed 6 years ago by leif

Replying to jpflori:

Sent an email upstream.

/dev/null?

comment:49 follow-up: Changed 6 years ago by jpflori

Maybe... At least the mail address given here: https://cs.uwaterloo.ca/~astorjoh/iml.html#bug Don't know where the authors are working now.

comment:50 Changed 6 years ago by git

  • Commit changed from d3a4456c68cd7ecbe13f7ada905002c7cd8440f3 to 4638ee169c6e0b2d4f0a35ad8142a09bf00adbd8

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

4638ee1Check that FSF config.* scripts are correctly copied from SAGE_ROOT/config.

comment:51 in reply to: ↑ 49 ; follow-up: Changed 6 years ago by jpflori

Replying to jpflori:

Maybe... At least the mail address given here: https://cs.uwaterloo.ca/~astorjoh/iml.html#bug Don't know where the authors are working now.

Got a reply and Arne would be very happy to make a new release. Now it's time to think about what we should push upstream with regard to the build system (it may be a good time to provide support for different BLAS implem than ATLAS), bug fixes and so on.

comment:52 in reply to: ↑ 51 ; follow-up: Changed 6 years ago by leif

Replying to jpflori:

Replying to jpflori:

Maybe... At least the mail address given here: https://cs.uwaterloo.ca/~astorjoh/iml.html#bug Don't know where the authors are working now.

Got a reply and Arne would be very happy to make a new release.

\o/ (after years of apparent death)

Now it's time to think about what we should push upstream with regard to the build system (it may be a good time to provide support for different BLAS implem than ATLAS), bug fixes and so on.

Best post to sage-devel, such that the usual suspectives will notice, and/or cc some of those involved in the previous IML tickets (#748 (!), #9568 ...).

comment:53 in reply to: ↑ 52 Changed 6 years ago by vbraun

  • Report Upstream changed from N/A to Reported upstream. Developers acknowledge bug.

Replying to leif:

the previous IML tickets (#748

%-)

comment:54 Changed 6 years ago by fbissey

Thanks for the head up on IML :) the laundry list as far as I remember is

comment:55 Changed 6 years ago by vbraun_spam

  • Milestone changed from sage-6.2 to sage-6.3

comment:56 Changed 5 years ago by jpflori

Better late than never, I've forwaded our patches (except the emamples one, what is that for? quicker test?) and two new ones for inclusion in a potential new release of IML (one for shared libs on Cygwin (who cares? :)) and on to add a --with-cblas configure flag to pass the ld flags for linking to cblas, falling back to the old atlas detection code in case of failure).

Best, JP

comment:57 Changed 5 years ago by vbraun_spam

  • Milestone changed from sage-6.3 to sage-6.4

comment:58 Changed 5 years ago by jpflori

  • Authors Jean-Pierre Flori deleted
  • Branch u/jpflori/ticket/14648 deleted
  • Commit 4638ee169c6e0b2d4f0a35ad8142a09bf00adbd8 deleted
  • Dependencies changed from #15365, #15580 to #15365, #15580, #15015
  • Milestone changed from sage-6.4 to sage-duplicate/invalid/wontfix
  • Reviewers set to Jean-Pierre Flori
  • Status changed from needs_review to positive_review

All packages are now recent enough except for MPIR which will get updated in #15015.

comment:59 Changed 5 years ago by vbraun

  • Resolution set to duplicate
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.