Beginners > Installation questions
Error building iphreeqc with PGI compilers
(1/1)
Hector:
Hi PHREEQC Experts,
I am trying to build iphreeqc with PGI compilers (v18.4 community edition), this is the configure line:
--- Code: ---CXX=pgc++ CC=pgcc FC=pgfortran ./configure --prefix=$DEV_lib_dir/iphreeqc --enable-fortran-module --enable-fortran-test
--- End code ---
Once I start compiling with make I got the following errors:
--- Code: --- CXX phreeqcpp/transport.lo
"phreeqcpp/transport.cpp", line 1: error: unrecognized token
#include "Utils.h"
^
"phreeqcpp/transport.cpp", line 1: error: expected a declaration
#include "Utils.h"
^
"phreeqcpp/transport.cpp", line 1: error: unrecognized token
#include "Utils.h"
^
"phreeqcpp/transport.cpp", line 1: error: unrecognized token
#include "Utils.h"
^
"phreeqcpp/transport.cpp", line 1: error: "#" not expected here
#include "Utils.h"
^
"/usr/include/c++/5/bits/postypes.h", line 98: error: identifier "ptrdiff_t" is
undefined
typedef ptrdiff_t streamsize; // Signed integral type
^
"/usr/include/c++/5/iosfwd", line 76: error: char_traits is not a template
template<typename _CharT, typename _Traits = char_traits<_CharT> >
^
"/usr/include/c++/5/iosfwd", line 79: error: char_traits is not a template
template<typename _CharT, typename _Traits = char_traits<_CharT> >
^
"/usr/include/c++/5/iosfwd", line 82: error: char_traits is not a template
template<typename _CharT, typename _Traits = char_traits<_CharT> >
^
"/usr/include/c++/5/iosfwd", line 85: error: char_traits is not a template
template<typename _CharT, typename _Traits = char_traits<_CharT> >
^
"/usr/include/c++/5/iosfwd", line 88: error: char_traits is not a template
template<typename _CharT, typename _Traits = char_traits<_CharT> >
^
"/usr/include/c++/5/iosfwd", line 94: error: char_traits is not a template
template<typename _CharT, typename _Traits = char_traits<_CharT>,
^
"/usr/include/c++/5/iosfwd", line 95: error: allocator is not a template
typename _Alloc = allocator<_CharT> >
^
"/usr/include/c++/5/iosfwd", line 98: error: char_traits is not a template
template<typename _CharT, typename _Traits = char_traits<_CharT>,
^
"/usr/include/c++/5/iosfwd", line 99: error: allocator is not a template
typename _Alloc = allocator<_CharT> >
^
"/usr/include/c++/5/iosfwd", line 102: error: char_traits is not a template
template<typename _CharT, typename _Traits = char_traits<_CharT>,
^
"/usr/include/c++/5/iosfwd", line 103: error: allocator is not a template
typename _Alloc = allocator<_CharT> >
^
"/usr/include/c++/5/iosfwd", line 106: error: char_traits is not a template
template<typename _CharT, typename _Traits = char_traits<_CharT>,
^
"/usr/include/c++/5/iosfwd", line 107: error: allocator is not a template
typename _Alloc = allocator<_CharT> >
^
"/usr/include/c++/5/iosfwd", line 112: error: char_traits is not a template
template<typename _CharT, typename _Traits = char_traits<_CharT> >
^
"/usr/include/c++/5/iosfwd", line 115: error: char_traits is not a template
template<typename _CharT, typename _Traits = char_traits<_CharT> >
^
"/usr/include/c++/5/iosfwd", line 118: error: char_traits is not a template
template<typename _CharT, typename _Traits = char_traits<_CharT> >
^
"/usr/include/c++/5/iosfwd", line 121: error: char_traits is not a template
template<typename _CharT, typename _Traits = char_traits<_CharT> >
^
"/usr/include/c++/5/iosfwd", line 124: error: char_traits is not a template
template<typename _CharT, typename _Traits = char_traits<_CharT> >
^
"/usr/include/c++/5/iosfwd", line 127: error: char_traits is not a template
template<typename _CharT, typename _Traits = char_traits<_CharT> >
^
"/usr/include/c++/5/iosfwd", line 147: error: basic_stringbuf is not a template
typedef basic_stringbuf<char> stringbuf;
^
"/usr/include/c++/5/iosfwd", line 150: error: basic_istringstream is not a
template
typedef basic_istringstream<char> istringstream;
^
"/usr/include/c++/5/iosfwd", line 153: error: basic_ostringstream is not a
template
typedef basic_ostringstream<char> ostringstream;
^
"/usr/include/c++/5/iosfwd", line 156: error: basic_stringstream is not a
template
typedef basic_stringstream<char> stringstream;
^
"/usr/include/c++/5/iosfwd", line 187: error: basic_stringbuf is not a template
typedef basic_stringbuf<wchar_t> wstringbuf;
^
"/usr/include/c++/5/iosfwd", line 190: error: basic_istringstream is not a
template
typedef basic_istringstream<wchar_t> wistringstream;
^
"/usr/include/c++/5/iosfwd", line 193: error: basic_ostringstream is not a
template
typedef basic_ostringstream<wchar_t> wostringstream;
^
"/usr/include/c++/5/iosfwd", line 196: error: basic_stringstream is not a
template
typedef basic_stringstream<wchar_t> wstringstream;
^
"/usr/include/c++/5/bits/stl_iterator_base_types.h", line 116: error:
identifier "ptrdiff_t" is undefined
template<typename _Category, typename _Tp, typename _Distance = ptrdiff_t,
^
"/usr/include/c++/5/bits/stl_iterator_base_types.h", line 182: error:
identifier "ptrdiff_t" is undefined
typedef ptrdiff_t difference_type;
^
"/usr/include/c++/5/bits/stl_iterator_base_types.h", line 193: error:
identifier "ptrdiff_t" is undefined
typedef ptrdiff_t difference_type;
^
"/usr/include/c++/5/bits/char_traits.h", line 104: error: namespace "std" has
no member "size_t"
compare(const char_type* __s1, const char_type* __s2, std::size_t __n);
^
"/usr/include/c++/5/bits/char_traits.h", line 106: error: namespace "std" has
no member "size_t"
static std::size_t
^
"/usr/include/c++/5/bits/char_traits.h", line 110: error: namespace "std" has
no member "size_t"
find(const char_type* __s, std::size_t __n, const char_type& __a);
^
"/usr/include/c++/5/bits/char_traits.h", line 113: error: namespace "std" has
no member "size_t"
move(char_type* __s1, const char_type* __s2, std::size_t __n);
^
"/usr/include/c++/5/bits/char_traits.h", line 116: error: namespace "std" has
no member "size_t"
copy(char_type* __s1, const char_type* __s2, std::size_t __n);
^
"/usr/include/c++/5/bits/char_traits.h", line 119: error: namespace "std" has
no member "size_t"
assign(char_type* __s, std::size_t __n, char_type __a);
^
"/usr/include/c++/5/bits/char_traits.h", line 145: error: namespace "std" has
no member "size_t"
compare(const char_type* __s1, const char_type* __s2, std::size_t __n)
^
"/usr/include/c++/5/bits/char_traits.h", line 156: error: namespace "std" has
no member "size_t"
std::size_t
^
"/usr/include/c++/5/bits/char_traits.h", line 169: error: namespace "std" has
no member "size_t"
find(const char_type* __s, std::size_t __n, const char_type& __a)
^
"/usr/include/c++/5/bits/char_traits.h", line 180: error: namespace "std" has
no member "size_t"
move(char_type* __s1, const char_type* __s2, std::size_t __n)
^
"/usr/include/c++/5/bits/char_traits.h", line 189: error: namespace "std" has
no member "size_t"
copy(char_type* __s1, const char_type* __s2, std::size_t __n)
^
"/usr/include/c++/5/bits/char_traits.h", line 199: error: namespace "std" has
no member "size_t"
assign(char_type* __s, std::size_t __n, char_type __a)
^
"/usr/include/c++/5/new", line 111: error: namespace "std" has no member
"size_t"
void* operator new(std::size_t) _GLIBCXX_THROW (std::bad_alloc)
^
"/usr/include/c++/5/new", line 113: error: namespace "std" has no member
"size_t"
void* operator new[](std::size_t) _GLIBCXX_THROW (std::bad_alloc)
^
"/usr/include/c++/5/new", line 119: error: namespace "std" has no member
"size_t"
void* operator new(std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
^
"/usr/include/c++/5/new", line 121: error: namespace "std" has no member
"size_t"
void* operator new[](std::size_t, const std::nothrow_t&) _GLIBCXX_USE_NOEXCEPT
^
"/usr/include/c++/5/new", line 129: error: namespace "std" has no member
"size_t"
inline void* operator new(std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
^
"/usr/include/c++/5/new", line 131: error: namespace "std" has no member
"size_t"
inline void* operator new[](std::size_t, void* __p) _GLIBCXX_USE_NOEXCEPT
^
"/usr/include/c++/5/ext/new_allocator.h", line 44: error: namespace "std" has
no member "size_t"
using std::size_t;
^
"/usr/include/c++/5/ext/new_allocator.h", line 45: error: namespace "std" has
no member "ptrdiff_t"
using std::ptrdiff_t;
^
"/usr/include/c++/5/ext/new_allocator.h", line 62: error: identifier
"ptrdiff_t" is undefined
typedef ptrdiff_t difference_type;
^
"/usr/include/c++/5/bits/allocator.h", line 63: error: allocator is not a
template
class allocator<void>
^
"/usr/include/c++/5/bits/allocator.h", line 67: error: identifier "ptrdiff_t"
is undefined
typedef ptrdiff_t difference_type;
^
"/usr/include/c++/5/bits/allocator.h", line 74: error: allocator is not a
template
{ typedef allocator<_Tp1> other; };
^
"/usr/include/c++/5/bits/allocator.h", line 96: error: identifier "ptrdiff_t"
is undefined
typedef ptrdiff_t difference_type;
^
"/usr/include/c++/5/bits/basic_string.h", line 4782: error: basic_string is not
a template
basic_string<_CharT, _Traits, _Alloc>
^
"/usr/include/c++/5/bits/basic_string.h", line 4783: error: basic_string is not
a template
operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 4784: error: basic_string is not
a template
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
^
"/usr/include/c++/5/bits/basic_string.h", line 4783: error: nonmember operator
requires a parameter with class or enum type
operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 4798: error: basic_string is not
a template
basic_string<_CharT,_Traits,_Alloc>
^
"/usr/include/c++/5/bits/basic_string.h", line 4800: error: basic_string is not
a template
const basic_string<_CharT,_Traits,_Alloc>& __rhs);
^
"/usr/include/c++/5/bits/basic_string.h", line 4799: error: nonmember operator
requires a parameter with class or enum type
operator+(const _CharT* __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 4809: error: basic_string is not
a template
basic_string<_CharT,_Traits,_Alloc>
^
"/usr/include/c++/5/bits/basic_string.h", line 4810: error: basic_string is not
a template
operator+(_CharT __lhs, const basic_string<_CharT,_Traits,_Alloc>& __rhs);
^
"/usr/include/c++/5/bits/basic_string.h", line 4819: error: basic_string is not
a template
inline basic_string<_CharT, _Traits, _Alloc>
^
"/usr/include/c++/5/bits/basic_string.h", line 4820: error: basic_string is not
a template
operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 4820: error: nonmember operator
requires a parameter with class or enum type
operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 4835: error: basic_string is not
a template
inline basic_string<_CharT, _Traits, _Alloc>
^
"/usr/include/c++/5/bits/basic_string.h", line 4836: error: basic_string is not
a template
operator+(const basic_string<_CharT, _Traits, _Alloc>& __lhs, _CharT __rhs)
^
"/usr/include/c++/5/bits/basic_string.h", line 4904: error: basic_string is not
a template
operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 4905: error: basic_string is not
a template
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
^
"/usr/include/c++/5/bits/basic_string.h", line 4904: error: nonmember operator
requires a parameter with class or enum type
operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 4911: error: basic_string is not
a template
operator==(const basic_string<_CharT>& __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 4912: error: basic_string is not
a template
const basic_string<_CharT>& __rhs)
^
"/usr/include/c++/5/bits/basic_string.h", line 4911: error: nonmember operator
requires a parameter with class or enum type
operator==(const basic_string<_CharT>& __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 4926: error: basic_string is not
a template
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
^
"/usr/include/c++/5/bits/basic_string.h", line 4925: error: nonmember operator
requires a parameter with class or enum type
operator==(const _CharT* __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 4937: error: basic_string is not
a template
operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 4937: error: nonmember operator
requires a parameter with class or enum type
operator==(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 4950: error: basic_string is not
a template
operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 4951: error: basic_string is not
a template
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
^
"/usr/include/c++/5/bits/basic_string.h", line 4950: error: nonmember operator
requires a parameter with class or enum type
operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 4963: error: basic_string is not
a template
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
^
"/usr/include/c++/5/bits/basic_string.h", line 4962: error: nonmember operator
requires a parameter with class or enum type
operator!=(const _CharT* __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 4974: error: basic_string is not
a template
operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 4974: error: nonmember operator
requires a parameter with class or enum type
operator!=(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 4987: error: basic_string is not
a template
operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 4988: error: basic_string is not
a template
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
^
"/usr/include/c++/5/bits/basic_string.h", line 4987: error: nonmember operator
requires a parameter with class or enum type
operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 4999: error: basic_string is not
a template
operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 4999: error: nonmember operator
requires a parameter with class or enum type
operator<(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 5012: error: basic_string is not
a template
const basic_string<_CharT, _Traits, _Alloc>& __rhs)
^
"/usr/include/c++/5/bits/basic_string.h", line 5011: error: nonmember operator
requires a parameter with class or enum type
operator<(const _CharT* __lhs,
^
"/usr/include/c++/5/bits/basic_string.h", line 5024: error: basic_string is not
a template
operator>(const basic_string<_CharT, _Traits, _Alloc>& __lhs,
^
Error limit reached.
100 errors detected in the compilation of "phreeqcpp/transport.cpp".
Compilation terminated.
Makefile:986: recipe for target 'phreeqcpp/transport.lo' failed
--- End code ---
I used gcc compilers without problems, what could be the problem here?
Thank you for your help,
Best regards,
Hector
Hector:
Hi PHREEQC Experts!
I got a solution from here: https://www.pgroup.com/userforum/viewtopic.php?p=24340
I needed to used dos2unix on the file src/phreeqcpp/transport.cpp
--- Code: ---dos2unix src/phreeqcpp/transport.cpp
--- End code ---
And then compilation went fine.
Best,
Hector
Navigation
[0] Message Index
Go to full version