Opened 10 years ago

Closed 8 years ago

#45616 closed defect (invalid)

Compile error with g++ 4.8.2

Reported by: gsteele13@… Owned by: macports-tickets@…
Priority: Normal Milestone:
Component: ports Version: 2.3.2
Keywords: Cc: larryv (Lawrence Velázquez)
Port: boost

Description (last modified by larryv (Lawrence Velázquez))

I recently reinstalled mac OS on my macbook, and in doing so, have switched from a 10.6 fink system to a 10.9 macports system.

I was recently trying to compile some software (code available here http://nsweb.tn.tudelft.nl/~gsteele/spyview/) using the macports environment (primarily linking to librarires fltk and boost).

The code compiled fine on my old 10.6 fink installation, but I am now getting the following error in 10.9 with macports:

In file included from /opt/local/include/boost/limits.hpp:19:0,
                 from /opt/local/include/boost/integer_fwd.hpp:16,
                 from /opt/local/include/boost/integer.hpp:18,
                 from /opt/local/include/boost/archive/basic_binary_iprimitive.hpp:49,
                 from /opt/local/include/boost/archive/binary_iarchive_impl.hpp:21,
                 from /opt/local/include/boost/archive/binary_iarchive.hpp:20,
                 from myboost.h:5,
                 from ImagePrinter.H:9,
                 from ImageWindow.H:19,
                 from spyview_ui.h:6,
                 from spyview_ui.C:3:
/opt/local/include/gcc48/c++/limits:1405:35: error: template argument 1 is invalid
     struct numeric_limits<__int128>

I have also tried the apple-gcc42 compiler, and with this compiler, the code compiles fine, but fails at linking (I guess probably the gcc-4.8 c++ libraries are not linkable with gcc-4.2?).

Has anyone else had this problem?

Thanks,
Gary

Change History (5)

comment:1 Changed 10 years ago by larryv (Lawrence Velázquez)

Cc: larryv@… added
Description: modified (diff)

Could you provide a test case?

comment:2 Changed 10 years ago by ryandesign (Ryan Carsten Schmidt)

You have to use clang; you can't use gcc.

comment:3 Changed 10 years ago by gsteele13@…

thanks, indeed, i was not aware that everything has switched over to clang

with CXX=clang++, the error is gone, thanks!

(now I just need to clean up my code so that it is clang compatible...)

comment:4 Changed 8 years ago by ken-cunningham-webuse

hello, friendly committers -- this ticket can be closed!

comment:5 Changed 8 years ago by mf2k (Frank Schima)

Resolution: invalid
Status: newclosed
Note: See TracTickets for help on using tickets.