Bug 198893 - math/sage : fails to build on FreeBSD 10
Summary: math/sage : fails to build on FreeBSD 10
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Stephen Montgomery-Smith
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-03-25 07:35 UTC by John Marino
Modified: 2015-05-22 22:07 UTC (History)
0 users

See Also:
bugzilla: maintainer-feedback? (stephen)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description John Marino freebsd_committer freebsd_triage 2015-03-25 07:35:33 UTC
Was latest release of math/sage build-tested on FreeBSD 10?
Or is it possible it builds on FreeBSD 10.1 and not FreeBSD 10?

This is the error I'm getting:

nr.cpp: In member function 'void fplll::FP_NR<F>::pow_si(const fplll::FP_NR<F>&, long int, mpfr_rnd_t) [with F = long double]':
nr.cpp:1086:50: error: 'powl' was not declared in this scope
   data = powl(a.data, static_cast<long double>(b));
                                                  ^

I got it during the removal of PTHREAD_LIBS test, but I don't think this error is related.
Comment 1 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2015-03-25 23:57:13 UTC
I did see some recent emails about how the c compilers aren't working properly on FreeBSD, because of the lack of FreeBSD having the full set of C99 floating point functions.  Maybe it is related.

If you email me directly, I could walk you through how to modify the code so that powl is changed to pow.  Then it should compile properly.
Comment 2 John Marino freebsd_committer freebsd_triage 2015-03-25 23:59:55 UTC
I don't understand.

The port doesn't build out of the box, so I would think you'd fix it so it does.  I actually don't care about sage at all, I'm only reporting a build error (one that isn't seen often because atlas masks it)
Comment 3 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2015-03-26 00:04:12 UTC
(In reply to John Marino from comment #2)

Oh, OK.  Thanks.

FreeBSD is a bit of a moving target with respect to these kinds of faults.  So I'm not going to work to hard to try to keep up.
Comment 4 John Marino freebsd_committer freebsd_triage 2015-03-26 00:08:16 UTC
if sage doesn't build on any release (and FreeBSD 10 is the current release), you might as well remove it.

I'm not convinced this is a compiler issue -- it looks like a missing header issue to me.  (e.g. code)
Comment 5 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2015-03-26 00:16:30 UTC
(In reply to John Marino from comment #4)

It is a useful port, because I get many requests concerning it.  So I don't want it removed, even if it happens not to build with a release.

I am very busy in the near future.  So I'll see if I can find and fix the error some time later.

(I know I should use redports, but the last time I tried using it, my account had either been deleted, or my account wasn't fully functional.)
Comment 6 John Marino freebsd_committer freebsd_triage 2015-03-26 00:29:34 UTC
(In reply to Stephen Montgomery-Smith from comment #5)
> It is a useful port, because I get many requests concerning it.  
> So I don't want it removed, even if it happens not to build with a release.

This is why I'm confused, because *by definition* if it doesn't build, it is not useful.  At the very least, you should set BROKEN= or IGNORE= for all releases that it won't build on, so people don't waste their time only to have the build fail.

> I am very busy in the near future.  So I'll see if I can find and fix the error
> some time later.
> (I know I should use redports, but the last time I tried using it, my account 
> had either been deleted, or my account wasn't fully functional.)

Redports has been down for months, with no estimate for return.  Even before it broke, it was no longer very useful because it was based on an obsolete tinderbox.

Anyway, I'd at least mark it BROKEN -- that will give you like 6 months to find time to fix it.
Comment 7 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2015-03-26 00:48:37 UTC
(In reply to John Marino from comment #6)

OK, I'll add a line like this:

BROKEN= https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=198893 but try "make -DTRYBROKEN" because it might work for you

I think it is more likely to be because of recent changes to c compilers.  But who knows.
Comment 8 commit-hook freebsd_committer freebsd_triage 2015-03-26 01:06:23 UTC
A commit references this bug:

Author: stephen
Date: Thu Mar 26 01:05:50 UTC 2015
New revision: 382283
URL: https://svnweb.freebsd.org/changeset/ports/382283

Log:
  - Mark broken until I have time to figure it out.

  PR:		198893
  Submitted by:	John Marino

Changes:
  head/math/sage/Makefile
Comment 9 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2015-03-27 02:00:02 UTC
I'm going to guess the build works in FreeBSD 10.1 because of Revision 271779 (see https://svnweb.freebsd.org/base/stable/10/lib/msun/src/math.h?view=log), and so that suggests the broken should happen if OSVERSION is between 1000000 and 1000716 (see https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/versions.html).
Comment 10 commit-hook freebsd_committer freebsd_triage 2015-03-27 02:22:47 UTC
A commit references this bug:

Author: stephen
Date: Fri Mar 27 02:21:52 UTC 2015
New revision: 382360
URL: https://svnweb.freebsd.org/changeset/ports/382360

Log:
  - Narrow BROKEN down to likely OSVERSIONs.

  PR:		198893
  Submitted by:	John Marino
  References:	https://svnweb.freebsd.org/base?view=revision&revision=271779 https://www.freebsd.org/doc/en_US.ISO8859-1/books/porters-handbook/versions.html

Changes:
  head/math/sage/Makefile
Comment 11 John Marino freebsd_committer freebsd_triage 2015-03-27 07:09:27 UTC
you committed:
.if OSVERSION>=1000000 && OSVERSION<1000717

shouldn't it be:
.if OSVERSION<1000717

?


Unless it actually builds on FreeBSD 8.x and 9.x, just not FreeBSD 10.0.

It might if the powl was backported to them as well, but I don't know either way.
Comment 12 commit-hook freebsd_committer freebsd_triage 2015-03-28 00:27:09 UTC
A commit references this bug:

Author: stephen
Date: Sat Mar 28 00:27:00 UTC 2015
New revision: 382444
URL: https://svnweb.freebsd.org/changeset/ports/382444

Log:
  - Broaden BROKEN to include all FreeBSD versions less than 10.

  PR:		198893
  Submitted by:	John Marino

Changes:
  head/math/sage/Makefile
Comment 13 commit-hook freebsd_committer freebsd_triage 2015-03-28 20:01:10 UTC
A commit references this bug:

Author: stephen
Date: Sat Mar 28 20:00:57 UTC 2015
New revision: 382550
URL: https://svnweb.freebsd.org/changeset/ports/382550

Log:
  - Fix so that it will build even if C99 functions missing from FreeBSD.
    Accomplish this by re-enabling the cephes subpackage, and then putting
    a wrapper around "ld" so that the option --copy-dt-needed-entries is set.
  - Bump portrevision.

  PR:		198893
  Submitted by:	John Marino

Changes:
  head/math/sage/Makefile
  head/math/sage/files/ld.in
  head/math/sage/files/patch-build_pkgs_cephes_spkg-install
Comment 14 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2015-03-28 20:39:58 UTC
John, can you check and see if the latest change to sage allows it to be built under FreeBSD-10.0?
Comment 15 John Marino freebsd_committer freebsd_triage 2015-03-28 23:07:35 UTC
(In reply to Stephen Montgomery-Smith from comment #14)
It failed to build documentation.
Specifically it could not find "dvips" command.  What dependency has the dvips program?

Do you need the log or is that enough?
Comment 16 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2015-03-29 02:06:42 UTC
(In reply to John Marino from comment #15)

Thank you very much.  This is very helpful.  It must be that dvips is built when latex is built, but as a build depends rather than a run depends.  So I will add the dvips dependency.
Comment 17 commit-hook freebsd_committer freebsd_triage 2015-03-29 02:09:42 UTC
A commit references this bug:

Author: stephen
Date: Sun Mar 29 02:09:04 UTC 2015
New revision: 382562
URL: https://svnweb.freebsd.org/changeset/ports/382562

Log:
  - Add dvips as a build dependency.

  PR:		198893
  Submitted by:	John Marino

Changes:
  head/math/sage/Makefile
Comment 18 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2015-03-30 02:51:59 UTC
THe problem seems to be fixed now.  Thank you.
Comment 19 John Marino freebsd_committer freebsd_triage 2015-03-30 06:16:08 UTC
It's not.  It takes a long time to build, I started it last night before I went to bed.


I'm still getting a failure message "dvips" must be installed (says it's provided in print/tex-dvipsk).

I am curious, are you not using "poudriere" to check these?

For my part, I'm going to try building this again with sanity check on.  I've been avoiding rebuilding atlas since it also takes 2 hours, but if it has to, so be it.
Comment 20 John Marino freebsd_committer freebsd_triage 2015-03-30 06:18:35 UTC
hmm, i think the dvips message I'm seeing now is not the main error.  I'm going to upload the log.
Comment 21 John Marino freebsd_committer freebsd_triage 2015-03-30 06:27:40 UTC
the log is 28 Mb (wow).
Even compressed, I can't attach it (it's 1.1 Mb, and 1Mb is the limit).

You can download it here:
http://leaf.dragonflybsd.org/~marino/sage-6.5.1.log.txz
Comment 22 John Marino freebsd_committer freebsd_triage 2015-03-30 06:32:10 UTC
I've just started a new, sanity-checked build.  Let's see if the outcome is any different.  It obviously will take a long time.
Comment 23 John Marino freebsd_committer freebsd_triage 2015-03-30 08:09:13 UTC
the sanity-checked build finished; same result.  It fails with "recipe for target 'doc-html' failed"
Comment 24 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2015-03-30 12:27:58 UTC
(In reply to John Marino from comment #23)

Somewhere close to the end of the log, it says:
[reference] The full traceback has been saved in /tmp/sphinx-err-SOZW7F.log

Would you still happen to have a copy of /tmp/sphinx-err-SOZW7F.log on your system?
Comment 25 John Marino freebsd_committer freebsd_triage 2015-03-30 12:37:41 UTC
no, it's part of the the poudriere jail that gets deleted when poudriere completes.

You could see this if you use "poudriere testport -i" which will let you interactively enter the build after it fails.
Comment 26 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2015-03-30 12:42:23 UTC
(In reply to John Marino from comment #25)

I have never used poudriere.  I may give it a go.  Similar tools I tried in the past I found rather hard to use.

It would be nice to know that dvips is not the problem.  When I first created the sage port, I did a lot of hand checking to see which depends were really needed, and now that I think about it, I don't remember dvips being necessary for the build.

I am unable to reproduce the problem you are reporting.
Comment 27 John Marino freebsd_committer freebsd_triage 2015-03-30 12:45:59 UTC
you really should use it, especially given the number of ports you support.  99% of the time, if it doesn't pass, something is wrong with the port.

And it's quite common that a port builds outside poudriere, but not in it.  The problem is still with the port.

It's quite easy to use.  It's even in the handbook now.

(don't let the length of handbook entry fool you, you only need about two commands to get it going for use)
Comment 28 commit-hook freebsd_committer freebsd_triage 2015-03-30 16:48:37 UTC
A commit references this bug:

Author: stephen
Date: Mon Mar 30 16:48:17 UTC 2015
New revision: 382691
URL: https://svnweb.freebsd.org/changeset/ports/382691

Log:
  - Remove dvips as a build dependency.

  PR:		198893
  Submitted by:	John Marino

Changes:
  head/math/sage/Makefile
Comment 29 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2015-03-30 17:16:11 UTC
(In reply to commit-hook from comment #28)

So dvips is not the issue.  I was able to reproduce something like the bug you reported.  I think it is a very difficult problem, because the bug seems to express itself inconsistently.  It might be some rather horrible race issue.
Comment 30 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2015-05-22 21:48:19 UTC
After making some enquiries, it looks like the race conditions happen during the document building process on other operating systems.  I have switched off the document building in r386874.  I believe this should fix this PR.  But I'll wait for confirmation before closing this PR.
Comment 31 John Marino freebsd_committer freebsd_triage 2015-05-22 21:50:55 UTC
Hi Stephen,
I won't be able to confirm it (I don't normally build it) but conceptually your fix looks fine to me.  I think you can go ahead and close the PR -- let's be optimistic!
Comment 32 Stephen Montgomery-Smith freebsd_committer freebsd_triage 2015-05-22 22:07:22 UTC
Optimistically closed.