Menu

Unable to build r1.52 on SUN/Solaris => Found reason & fixed to official code?

Anonymous
2022-03-31
2022-03-31
  • Anonymous

    Anonymous - 2022-03-31

    Hello,

    Had problem to build r1.52 on SUN/Solaris (SunOS 5.11 11.3 sunv4 sparc), got error (shortened as build on another machine with restrictions) as below:

    …/build $ cmake ..

    [ 84% ] Building CXX object tools/CMakefiles/GeodSolve.dir/GeodSolve.cpp.o
    In file included from /usr/include/wctype.h:12:0,

    …/tools/GeodSolve.cpp:12:
    …/include/GeographicLib/GeodesicLineExact.hpp:46:33: error expected unqualified-id before numeric constant
    _A4, …, _E1, …
    ^

    . ### Found that file wctype.h includes file iso/wctype_iso.h which contains definition “for character class” with first line as below:

    . #define _E1 0x00000100 / phonogram (international use) /

    => My solution was to modify: _E1 to __E1 in files …/include/GeographicLib/GeodesicLineExact.hpp and s…/src/GeodesicLineExact.cpp

    • Is this anything you/some can fix to next “release” or shall I stay with my updates?
    • If yes, when can I get the updates?

    PS.
    Thanks for good work;)
    DS.

    // Best regards, Per-Arne Söderkvist, flight simulation engineer

     
  • Charles Karney

    Charles Karney - 2022-03-31

    This problem had already been fixed and will be available in the next release (which I'm hoping will before June 1). Your fix is fine but suboptimal. The problem is that identifiers starting with

    _[A-Z] or __
    

    are "reserved", see https://en.cppreference.com/w/cpp/language/identifiers

    My fix was to change _E1 to _eE1. That's better than using __E1. I recommend you do the same as me in case Sun decides to use __E1 for something.

     
  • Anonymous

    Anonymous - 2022-03-31

    Thanks for quick answer;)

     
  • Charles Karney

    Charles Karney - 2022-03-31

    The source code for an alpha version of the new release is in the distrib-C++ directory under files download tab. This is NOT FOR USE IN PRODUCTION. I might (will!) change the tar/zip files without warning. This is version 2.0 which folds in lots of changes (yet to be documented) in how things are organized.

     

Anonymous
Anonymous

Add attachments
Cancel