Project

General

Profile

Support #887

My first compilations with clang

Added by Anna Maria Bigatti almost 8 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Normal
Category:
Portability
Target version:
Start date:
31 May 2016
Due date:
% Done:

100%

Estimated time:
Spent time:

Description

I've just updated to MacOS 10.11 (from 10.6).
Here I note the problems and remarks on the first compilations.


Related issues

Related to CoCoALib - Design #764: ExternalLib: simplify configurationClosed2015-09-02

Related to CoCoALib - Feature #82: C++11 compatibility questionsClosed2012-01-26

History

#1 Updated by Anna Maria Bigatti almost 8 years ago

  • % Done changed from 0 to 10

This is just a local problem with files not in cvs
The file /include/CoCoA/TmpSBStats.H contains the line

#include <tr1/unordered_map>

giving this error
../../include/CoCoA/TmpSBStats.H:11:10: fatal error: 'tr1/unordered_map' file

#2 Updated by Anna Maria Bigatti almost 8 years ago

... I'm not quite sure what this refers to...

Rebuilding dependencies in ...
clang: warning: treating 'c' input as 'c++' when in C++ mode, this behavior is deprecated

#3 Updated by Anna Maria Bigatti almost 8 years ago

I expect this is well under control ;-)

Compiling RingFqLog.o
RingFqLog.C:516:3: warning: all paths through this function will call itself
      [-Winfinite-recursion]
  {
  ^
1 warning generated.
Compiling RingFqVec.o
RingFqVec.C:532:3: warning: all paths through this function will call itself
      [-Winfinite-recursion]
  {
  ^

#4 Updated by Anna Maria Bigatti almost 8 years ago

... another thing I don't really know the meaning of:

ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in ___gmpn_divexact_1 from ../../configuration/ExternalLibs/lib/libgmp-symlink.a(dive_1.o). To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie

#5 Updated by Anna Maria Bigatti almost 8 years ago

  • Assignee set to Anna Maria Bigatti
  • Category set to Portability
  • Target version set to CoCoALib-0.99542 spring 2016

CoCoA-5 running!!

With CoCoALib and external libraries CDD GFAN GSL READLINE 

I had to recompile (naturally) gfan, boost, gmp (I installed the latest 1.61.0, and 6.1.0 and made my usual local installation), and I thought of adding detailed documentation about compiling boost and gmp: a normal cocoalib user is not likely to need to compile them, but might be handy.
(Sandro Logar, and someone at the CoCoA school, had trouble running the CoCoA distribution because he was missing some dynamical library, so also the linux line to install a package might be useful somewhere)

I had trouble with normaliz, but I always do ;-) and with frobby, but I think to recall that John has already found some fix.
So I'm not too worried about those right now.

I'm pleased :-)

#6 Updated by John Abbott almost 8 years ago

The warnings about infinite recursion correspond to code which has a comment BUG BUG BUG; I suppose I'll fix it when I have both time and inclination (and remember to do it).

#7 Updated by John Abbott almost 8 years ago

I like the idea of adding some hints about compiling external libraries. I already have some notes (but perhaps they are not in CVS?)

I'm undecided whether it is better to have a single file containing hints for all external libraries, or whether to have a separate file for each external library...

#8 Updated by Anna Maria Bigatti almost 8 years ago

John Abbott wrote:

I like the idea of adding some hints about compiling external libraries. I already have some notes (but perhaps they are not in CVS?)

I'm undecided whether it is better to have a single file containing hints for all external libraries, or whether to have a separate file for each external library...

I prefer one for each. (cvs-ed)

#9 Updated by Anna Maria Bigatti almost 8 years ago

  • Target version changed from CoCoALib-0.99542 spring 2016 to CoCoALib-0.99550 spring 2017

#10 Updated by John Abbott over 7 years ago

  • Target version changed from CoCoALib-0.99550 spring 2017 to CoCoALib-0.99560

#11 Updated by Anna Maria Bigatti over 7 years ago

Improved documentation about compiling ExternalLibs (after much suffering in recompiling with clang)

#12 Updated by Anna Maria Bigatti over 7 years ago

  • Related to Design #764: ExternalLib: simplify configuration added

#13 Updated by Anna Maria Bigatti over 7 years ago

Being annoyed by this repeated message (and also thinking of any other Mac user!!)

ld: warning: PIE disabled. Absolute addressing (perhaps -mdynamic-no-pic) not allowed in code signed PIE, but used in ___gmpn_divexact_1 from ../../configuration/ExternalLibs/lib/libgmp-symlink.a(dive_1.o). To fix this warning, don't compile with -mdynamic-no-pic or link with -Wl,-no_pie

I worked of configuration for adding automatically this little "-Wl,-no_pie" in the right place when using "clang" (but it this really a clang problem? or a Mac problem? or a "11" problem?)

#14 Updated by Anna Maria Bigatti over 7 years ago

when running dependencies there are lots of warnings about boost

        BOOST_SCOPE_EXIT_ID(BOOST_SCOPE_EXIT_AUX_PP_LINE_COUNTER, \

but it's not a problem

#15 Updated by Anna Maria Bigatti over 7 years ago

  • % Done changed from 10 to 70

removed TmpSmartPtrIRCCOW.H (gave warnings, and it was not used)
I saved a copy called TmpSmartPtrIRCCOW.H.dont-read (so our clever makefile does not complain I have an unused .H file ;-)

#16 Updated by Anna Maria Bigatti over 6 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 70 to 90

I still get lots of wanrings, but I don't know how to solve them.
Maybe we should close this (it's a long time since my first compilation with clang) and open a new issue about these warnings.

#17 Updated by John Abbott over 6 years ago

  • Related to Feature #82: C++11 compatibility questions added

#18 Updated by John Abbott over 6 years ago

It would be helpful to "ignore" warnings which will disappear when we update the code to be C++11 compatible.

The other warnings will require "individual" attention. If there are some we can easily resolve, we should do that (but after the imminent release of 0.99560). Sorting out the remaining ones is another one of those tasks that could take a lot of time but produce no "visible benefit".

#19 Updated by John Abbott over 6 years ago

  • Status changed from Resolved to Closed
  • % Done changed from 90 to 100

Also available in: Atom PDF