#21185 closed defect (fixed)
linbox does not find fflas_ffpack on cygwin
Reported by: | tscrim | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | sage-7.4 |
Component: | porting: Cygwin | Keywords: | |
Cc: | embray, jpflori, cpernet | Merged in: | |
Authors: | Travis Scrimshaw | Reviewers: | Erik Bray |
Report Upstream: | N/A | Work issues: | |
Branch: | 3228aed (Commits, GitHub, GitLab) | Commit: | |
Dependencies: | Stopgaps: |
Description (last modified by )
On Cygwin using Sage 7.3, linbox can't seem to find the installation of FFLAS-FFPACK, despite fflas_ffpack already being installed.
Attachments (1)
Change History (18)
Changed 6 years ago by
comment:1 Changed 6 years ago by
- Description modified (diff)
comment:2 Changed 6 years ago by
comment:3 Changed 6 years ago by
Linbox is a standard package for doing linear algebra over \ZZ
and finite fields.
Both my cygwin32 and cygwin64 builds failed on this step. This is possibly a regression due to #20926. Checking now.
comment:4 Changed 6 years ago by
Yes, this is due to #20926; when I reverted that change, I could build linbox on Cygwin32. So would the best way forward would be to add a check against Cygwin or do something different?
comment:5 Changed 6 years ago by
Ah, it might be good to look in your config.log
and see what failed at:
154 checking for FFLAS-FFPACK >= 10600 and < 10700... not found 155 156 ******************************************************************************* 157 ERROR: Fflas-Ffpack not found! 158 159 Fflas-Ffpack routines are required for this library to compile. Please 160 make sure they are installed and specify its location with the option 161 --with-fflas-ffpack=<lib> when running configure.
It probably failed to compile a test program or something. If #20926 added -std=c++98
this can lead to errors in some headers in Cygwin, which is an issued I've encountered a few times in different ways. Changing it to -std=gnu++98
should work.
comment:6 Changed 6 years ago by
Here is where the linbox config.log
shows it failed:
configure:17915: checking for FFLAS-FFPACK >= 10600 and < 10700 configure:17946: g++ -o conftest.exe -g -fPIC -std=c++98 -I/home/Travis/sage/local/include -I/home/Travis/sage/local/include -I/home/Travis/sage/local/include -I/home/Travis/sage/loca l/include -DDISABLE_COMMENTATOR -L/home/Travis/sage/local/lib -Wl,-rpath,/home/Travis/sage/ local/lib conftest.cpp -lblas >&5 conftest.cpp:1:0: warning: -fPIC ignored for target (all code is position independent) /* confdefs.h */ ^ In file included from /home/Travis/sage/local/include/fflas-ffpack/field/modular-balanced.h: 42:0, from /home/Travis/sage/local/include/fflas-ffpack/fflas/fflas.h:49, from /home/Travis/sage/local/include/fflas-ffpack/fflas-ffpack.h:36, from conftest.cpp:45: /home/Travis/sage/local/include/fflas-ffpack/field/modular-randiter.h: In constructor 'FFPAC K::ModularRandIter<Element>::ModularRandIter(const FFPACK::Modular<T>&)': /home/Travis/sage/local/include/fflas-ffpack/field/modular-randiter.h:52:17: error: there ar e no arguments to 'srand48' that depend on a template parameter, so a declaration of 'srand4 8' must be available [-fpermissive] srand48(_seed); ^ /home/Travis/sage/local/include/fflas-ffpack/field/modular-randiter.h:52:17: note: (if you u se '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated) /home/Travis/sage/local/include/fflas-ffpack/field/modular-randiter.h: In member function 'E lement& FFPACK::ModularRandIter<Element>::random(Element&) const': /home/Travis/sage/local/include/fflas-ffpack/field/modular-randiter.h:62:38: error: there ar e no arguments to 'lrand48' that depend on a template parameter, so a declaration of 'lrand4 8' must be available [-fpermissive] return _F.init(a,(double)(lrand48()-std::numeric_limits<long>::max()));
I changed it to -std=gnu++98
and then linbox compiled just fine on Cygwin64.
comment:7 follow-up: ↓ 15 Changed 6 years ago by
I think then maybe just add a tweak to #20926 to use -std=gnu++98
on Cygwin.
comment:8 Changed 6 years ago by
- Cc cpernet added
CCing Clément so that changes can be integrated upstream.
comment:9 Changed 6 years ago by
- Branch set to public/cygwin/linbox_std_flags-21185
- Commit set to 3228aed7c0b88fb896f446cd0601af163d3bc7ea
- Status changed from new to needs_review
comment:10 Changed 6 years ago by
- Status changed from needs_review to positive_review
Looks fine to me.
I do wonder, given that there are several packages that for one reason or another want to set a -std
flag in CFLAGS
and/or CXXFLAGS
that there shouldn't be some reusable variable for it right in sage-env
, which would include the workaround for Cygwin in one place.
Maybe not worth it though. The issue we're having with fflas doesn't apply in all cases. That is, many packages will build fine in Cygwin with -std=c++98
. There are just some bugs in some of the newlib headers that can crop up depending on what C(++) standard you're using and what order headers happen to be included in.
comment:11 Changed 6 years ago by
- Status changed from positive_review to needs_work
Reviewer name is missing
comment:12 Changed 6 years ago by
- Reviewers set to Erik Bray
- Status changed from needs_work to positive_review
comment:13 Changed 6 years ago by
- Branch changed from public/cygwin/linbox_std_flags-21185 to 3228aed7c0b88fb896f446cd0601af163d3bc7ea
- Resolution set to fixed
- Status changed from positive_review to closed
comment:14 Changed 6 years ago by
- Commit 3228aed7c0b88fb896f446cd0601af163d3bc7ea deleted
Ticket #17635 now conflicts with this one, as the new releases of LinBox, !Givaro and fflas-ffpack all require --std=c++11
.
As I'm not familiar with this cygwin issue and do not have access to a cygwin machine, could you confirm to me that adding a
if [ "$UNAME" = CYGWIN ]; then CXXFLAGS="$CXXFLAGS -std=gnu++11" fi
in the spkg-install script would work on cygwin?
Or maybe the issue no longer exists with --std=c++11
.
comment:15 in reply to: ↑ 7 Changed 6 years ago by
comment:16 Changed 6 years ago by
FYI, on my Cygwin32 and Cygwin64 setups, the provided tarballs use -std=gnu++11
by default.
That's outside of Sage (and without NTL, IML), but I don't see why it would change when Sage builds it.
comment:17 Changed 6 years ago by
But that's with the new Givaro, FFLAS-FFPACK, Linbox. Posted over the upgrade ticket.
I haven't run into this....yet....
Or is linbox not a standard package? I don't know what it is.