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

Fix build issues so Sage builds with the Sun Studio Compiler suite. #7056

Closed
sagetrac-drkirkby mannequin opened this issue Sep 28, 2009 · 13 comments
Closed

Fix build issues so Sage builds with the Sun Studio Compiler suite. #7056

sagetrac-drkirkby mannequin opened this issue Sep 28, 2009 · 13 comments

Comments

@sagetrac-drkirkby
Copy link
Mannequin

sagetrac-drkirkby mannequin commented Sep 28, 2009

Introduction

Sun's compiler on Solaris produces faster code than gcc, and is more reliable with 64-bit code than gcc. This ticket outlines the issues that need to be resolved to get Sage to build on Sun Studio, and are specific to Sun Studio. As more are discovered, I'll add them to the description, so it's easy to them all, rather than find them buried well down the page.

In many cases, the bugs can potentially affect all compilers, but are only observed on Sun Studio.

Hardware used for testing

Attempts were made to build Sage on the following two Solaris machines. Where a problem is detected on only one, or is suspect it might occur on only one machine, then the hostname is stated.

Hostname Hardware Processor CPUs Cores Speed Architecture OS version Compiler
swan Sun Blade 2000 UltraSPARC-III+ 2 2 1200 MHz sun4u Solaris 10 update 7 Sun Studio 12.1
t2 Sun T5240 SPARC T2+ 2 16 1167 MHz sun4v Solaris 10 update 7 Sun Studio 12

Bugs

The actual bugs found, along with the trac number are listed below. The hostname is stated it if might be relevant.

If the description is in italics, and marked with note number 11, then the problem in itself would not prevent Sage being built with Sun Studio, but would impact performance adversely.

Description hostname Trac # Note(s)

| || | |
|-----------------------------||-----|---|
|Update prereq from 0.3 to 0.4||#7021|1,7|
|zn_poly-0.9 uses gcc, irrespective of setting of CC||#7039|2|
|symmetrica ignores CC||#7032|2|
|ATLAS ignores CC variable, then dumps core when trying to build with Sun Studio on Solaris|swan|#7048|2,3|
|Flint ignores CC and CXX||#7024|2|
|lapack sends GNU option -fPIC to Sun fortran compiler||#7047||
|eclib 20080310.p7 has code Sun's C++ compiler does not understand||#7044||
|Code actually in Sage (not other project) ignores CC and uses gcc||#7040|2|
|ntl 5.4.2.p9 passes -fPIC to Sun linker with Sun Studio||#7043||
|givaro 3.2.13rc2 says GMP is not installed, even though MPIR is|swan|#7025|4,5|
|linbox 1.1.6.p0 says GMP is not installed, even though MPIR is|swan|#7026|4,5|
|R sends the correct Sun flags to C and C++ compilers, but not Fortran||#7035||
|GAP purposely unsets CC which screws up Sun Studio build||#7041|6|
|libm4ri thinks the C compiler is broken|swan|#7037||
|rubiks ignores CXX and uses g++ even if CXX is Sun compiler||#7036|7|
|ratpoints 2.1.2.p2 ignores CC and uses gcc whatever||#7038|2|
|libfplll can't find _gmpz_init in -lgmp||#7033|5|
|update libgcrypt to the latest version 1.4.4||#7045|7|
|f2c ignores CC and uses gcc anyway||#7027|2|
|PolyBoRi pass GNU specific options to the Sun compiler||#7034|8|
|quaddouble-2.2.p9 believe Sun's C++ compiler is broken||#7030|9|
|singular believe Sun's C++ compiler is broken||#7031|9|
|Sun C++ compiler does not accept pynac C++ code||#7029||
|matplotlib 0.99.0 tries to use C compiler for C++ code.||#7028||
|cliquer-1.2 ignores CC and uses gcc instead of Sun compiler.|swan|#7057|10|
|linbox reports "using frickin' slow GSL C-blas" if building with Sun Studio compiler||#7058|11|
|update libgcrypt to the latest version 1.4.4||#7045|7|
|ECL snapshot of 13th Sept 2009 fails with Sun Studio 12.1||#7062|
|lcalc fails - Sun Studio compiler does not accept code. (I'm not surprised)||#7065|12|
|sympow ignores CC and uses gcc even when CC is set to Sun's compiler||#7066||
|cddlib 094f fails to build with Sun Studio - fabs() unresolved. Probably needs -lm||#7067|13|
|gfan 0.3.p4 Shows numerous missing header files with Sun compiler.||#7068||
|tachyon-0.98beta.p9 ignores CC and uses gcc, so can't build with Sun Studio. Also uses -O6 which might be dangerous.||#7069||
|palp-1.1.p1 ignores CC variable and uses gcc, so fails with Sun Studio.||#7071||
|scipy 0.7.p2 has a GNUism, sending GNU flags to the Sun compiler.||#7072||
|scipy_sandbox 20071020.p4 has a GNUism, sending GNU flags to the Sun compiler.||#7073||
|cvxopt-0.9.p8 sends GNU options to Sun Fortran compiler and has bad C code.||#7074||
|Update sqlite to latest release - needed for Sun's compiler||#6759|7|
|Error building 'modified sage library code' when including paripriv.h||#6579|14|
|libm4ri thinks the C compiler is broken||#7037||

Notes

  1. This update should have benefits to Sage on any platform, with any compiler. It is however absolutely essential this is fixed for Sun Studio.

  2. Although discovered when testing with Sun Studio, the bug relates to the failure of a program to properly observe CC, CXX or SAGE_FORTRAN, so it can be expected to exist with any compiler.

  3. The core dump was observed on hostname 'swan'. The failure to observe CC can be expected on any platform, but dumping core may be only on this machine.

  4. Checked only on the hostname. This may or may not be specific to that machine.

  5. Tickets givaro 3.2.13rc2 says GMP is not installed, even though MPIR is. #7025, linbox 1.1.6.p0 says GMP is not installed, even though MPIR is #7026 and libfplll can't find _gmpz_init in -lgmp #7033 are very closely related, as they all relate to a failure of a program to reconsise GMP being installed. Of course, it is not installed, but MPIR is, which is a substitute.

  6. Although easy to fix, to do some introduces a major impact on the time to build Sage.

  7. A fix is available, but either awaiting review, needing work, or reviewed and awaiting to be in the next release.

  8. This uses SCons, and in general anything using SCons appears to be a problem on Solaris.

  9. quaddouble-2.2.p9 believe Sun's C++ compiler is broken. #7030 and singular believes the Sun C++ compiler is broken. #7031 are closely related, as both believe the Sun C++ compiler is broken, which it is not.

  10. cliquer is seriously messed up, sometimes using gcc when you want it to use cc, and other times trying to use cc when you want it to use gcc! I believe it is incorrect use of SCons, so CC and CXX are not set properly.

  11. This does not actually prevent linbox building, but is just an indication performance will sufffer. Later ticket linbox 1.1.6.p0 says GMP is not installed, even though MPIR is #7026 will cause the build to fail when using Sun Studio.

  12. gcc gives tons of warnings with this code, so I'm not at all surprised the Sun compiler rejects it. The author should be encouraged to sort out why his/her code should generate so many warnings/errors.

  13. The fix looks quite easy.

  14. This stops Sage building with gcc too, though one can circumvent this by commenting out 3 lines. The effect of commenting these out is not known.

CC: @fchapoton

Component: porting: Solaris

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

@sagetrac-drkirkby sagetrac-drkirkby mannequin added this to the sage-5.11 milestone Sep 28, 2009
@sagetrac-drkirkby

This comment has been minimized.

@sagetrac-drkirkby

This comment has been minimized.

@sagetrac-drkirkby

This comment has been minimized.

@sagetrac-drkirkby

This comment has been minimized.

@sagetrac-drkirkby

This comment has been minimized.

@sagetrac-drkirkby

This comment has been minimized.

@sagetrac-drkirkby

This comment has been minimized.

@sagetrac-drkirkby

This comment has been minimized.

@sagetrac-drkirkby

This comment has been minimized.

@sagetrac-drkirkby

This comment has been minimized.

@sagetrac-drkirkby

This comment has been minimized.

@jdemeyer jdemeyer modified the milestones: sage-5.11, sage-5.12 Aug 13, 2013
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.1, sage-6.2 Jan 30, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.2, sage-6.3 May 6, 2014
@sagetrac-vbraun-spam sagetrac-vbraun-spam mannequin modified the milestones: sage-6.3, sage-6.4 Aug 10, 2014
@mkoeppe
Copy link
Contributor

mkoeppe commented Apr 1, 2020

comment:16

Should be closed as outdated.

@mkoeppe mkoeppe removed this from the sage-6.4 milestone Apr 1, 2020
@fchapoton
Copy link
Contributor

comment:17

agreed again

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

3 participants