On 10.09.2013 19:29, Steele, Raymond wrote:
I cannot seem to figure out which <limits> integer_fw.hpp is using on my 
system.  I put the following in scopeguard.cxx and received a

void ScopeGuard::dismiss()
{
     struct Dummy{} dummy = ::std::numeric_limits<unsigned char>::digits;
     m_func.clear();
}


Here is the output.
[...]
"/usr/local/include/boost/integer_fwd.hpp", line 138: Error: Illegal value for 
template parameter.
"/usr/local/include/boost/integer_fwd.hpp", line 138: Error: Cannot use class 
specialization with non-classes.
"/opt/aoo-4.0.0/main/comphelper/source/misc/scopeguard.cxx", line 63: Error: 
Cannot use const int to initialize Dummy.

Ah, so this shows that the digits member is a const int as it should be.
Why low_bit_mask_t<> doesn't like the specialization with int is strange, because in my boost/integer/integer_mask.hpp only allows integer specializations (for std::size_t)!

What is also interesting is the location of the integer_fwd.hpp header file: /usr/local/include/boost/ Are you using "--with-system-boost" or "--with-system-headers"? What version of boost is installed on your system? AOO's current reference implementation of boost is 1.48.

I did a search for all the limits files on my system. Here are the results.:

bash-3.2# find / -name limits
/usr/sfw/include/c++/3.4.3/limits
/usr/include/stdcxx4/limits
/usr/local/include/boost/mpl/limits
/usr/local/include/boost/tr1/tr1/limits
/usr/local/include/boost_52/mpl/limits
/usr/local/include/boost_52/tr1/tr1/limits
/usr/local/gcc-4.8.1/include/c++/4.8.1/limits
/opt/aoo-4.0.0/main/stlport/unxsoli4.pro/inc/stlport/limits
/opt/aoo-4.0.0/main/stlport/unxsoli4.pro/inc/stlport/SC5/limits
/opt/aoo-4.0.0/main/stlport/unxsoli4.pro/misc/build/STLport-4.0/stlport/limits
/opt/aoo-4.0.0/main/stlport/unxsoli4.pro/misc/build/STLport-4.0/stlport/SC5/limits
/opt/aoo-4.0.0/main/solver/400/unxsoli4.pro/inc/stl/limits
/opt/aoodeps/perl-5.18.1/cpan/Devel-PPPort/parts/inc/limits
/opt/aoodeps/STLport-5.2.1/stlport/limits
/opt/aoodeps/boost_1_48_0/boost/mpl/limits
/opt/aoodeps/boost_1_48_0/boost/tr1/tr1/limits
/opt/aoodeps/gcc-4.8.1/libstdc++-v3/testsuite/18_support/headers/limits
/opt/aoodeps/gcc-4.8.1/libstdc++-v3/include/std/limits
/opt/solarisstudio12.3/prod/include/CC/Cstd/limits
/opt/solarisstudio12.3/prod/include/CC/stlport4/limits
/boost_1_54_0/boost/mpl/limits
/boost_1_54_0/boost/tr1/tr1/limits
/gcc-4.8.1.OLD/include/c++/4.8.1/limits

Darn, these are a lot of <limits> file. If the compiler picks one that is not consistent with the related include files then all kinds of troubles are not surprising.

To find out which <limits> file is included you could use the gcc option "-E", that tells the compiler to just preprocess a source file and output the preprocessed result to the output file specified by "-o".

As an example change into the configmgr directory and
   build verbose=true
there. You'll see the exact command line for the compiler building e.g. partial.cxx. Change the "-c" option ("compile") to "-E" ("preprocess only") and run this one command line. The resulting partial.o is the preprocessed source that will show you which <limits> was included.

Lastly,
The following patch seems to address the erf() issue. I edited 
/opt/aoo-4.0./main/solver/400/unxsoli4.pro/inc/vigra/config.hxx with the 
following and it seems to compile without error.  However, isn't 
/opt/aoo-4.0.0/main/solver/400/unxsoli4.pro/inc/vigra/config.hxx generated by 
the build. Should this be modified somewhere else?

When external libraries are built the process is as follows:
1. the tarball of the library is unpacked
2. some patches are applied (for vigra its the file "vigra-1.6.0.patch")
3. the library is built
4. the library is delivered to "solver"

Though modifying the header in solver can temporarily solve a compile problem in a dependent module (e.g. basebmp) it is better to do the needed modification before the library is built to get a consistent state. To get the patch in as early as possible the patch file has to be modified. As mentioned yesterday I already attached a patch against "vigra-1.6.0.patch" to issue 123228.

By the way, did the modified vigra config.hxx allow basebmp to be built?

Herbert

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@openoffice.apache.org
For additional commands, e-mail: dev-h...@openoffice.apache.org

Reply via email to