Hi,

I think I did. 

$ git pull
remote: Counting objects: 4, done.
remote: Total 4 (delta 3), reused 3 (delta 3), pack-reused 1
Unpacking objects: 100% (4/4), done.
From https://github.com/maekitalo/cxxtools
   e442b89..b1bd3dd  master     -> origin/master
Updating e442b89..b1bd3dd
Fast-forward
 src/streambuffer.cpp | 35 ++++++++++++++++++-----------------
 1 file changed, 18 insertions(+), 17 deletions(-)
$

… lines deleted

$ ./configure

… lines deleted

$ make
Making all in src
/Applications/Xcode.app/Contents/Developer/usr/bin/make  all-am
...
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../src -I../include -I../include 
-Wno-long-long -Wall -pedantic -g -O2 -std=c++11 -MT base64codec.lo -MD -MP -MF 
.deps/base64codec.Tpo -c base64codec.cpp  -fno-common -DPIC -o 
.libs/base64codec.o
depbase=`echo csvdeserializer.lo | sed 's|[^/]*$|.deps/&|;s|\.lo$||'`;\
        /bin/sh ../libtool  --tag=CXX   --mode=compile g++ -DHAVE_CONFIG_H -I.  
-I../src -I../include -I../include -Wno-long-long -Wall -pedantic  -g -O2 
-std=c++11  -MT csvdeserializer.lo -MD -MP -MF $depbase.Tpo -c -o 
csvdeserializer.lo csvdeserializer.cpp &&\
        mv -f $depbase.Tpo $depbase.Plo
libtool: compile:  g++ -DHAVE_CONFIG_H -I. -I../src -I../include -I../include 
-Wno-long-long -Wall -pedantic -g -O2 -std=c++11 -MT csvdeserializer.lo -MD -MP 
-MF .deps/csvdeserializer.Tpo -c csvdeserializer.cpp  -fno-common -DPIC -o 
.libs/csvdeserializer.o
In file included from csvdeserializer.cpp:29:
In file included from ../include/cxxtools/csvdeserializer.h:33:
In file included from ../include/cxxtools/deserializer.h:33:
In file included from ../include/cxxtools/composer.h:31:
In file included from ../include/cxxtools/serializationinfo.h:39:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/deque:912:49:
 error: 
      invalid application of 'sizeof' to an incomplete type 'value_type' (aka
      'cxxtools::SerializationInfo')
    static const difference_type __block_size = sizeof(value_type) < 256 ? 4...
                                                ^~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/deque:1183:15:
 note: 
      in instantiation of template class
      'std::__1::__deque_base<cxxtools::SerializationInfo,
      std::__1::allocator<cxxtools::SerializationInfo> >' requested here
    : private __deque_base<_Tp, _Allocator>
              ^
../include/cxxtools/serializationinfo.h:120:17: note: in instantiation of
      template class 'std::__1::deque<cxxtools::SerializationInfo,
      std::__1::allocator<cxxtools::SerializationInfo> >' requested here
        typedef Nodes::iterator Iterator;
                ^
../include/cxxtools/serializationinfo.h:110:7: note: definition of
      'cxxtools::SerializationInfo' is not complete until the closing '}'
class SerializationInfo
      ^
In file included from csvdeserializer.cpp:29:
In file included from ../include/cxxtools/csvdeserializer.h:33:
In file included from ../include/cxxtools/deserializer.h:33:
In file included from ../include/cxxtools/composer.h:31:
In file included from ../include/cxxtools/serializationinfo.h:39:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/deque:1193:30:
 error: 
      '__alloc_traits' is a protected member of
      'std::__1::__deque_base<cxxtools::SerializationInfo,
      std::__1::allocator<cxxtools::SerializationInfo> >'
    typedef typename __base::__alloc_traits        __alloc_traits;
                             ^
../include/cxxtools/serializationinfo.h:120:17: note: in instantiation of
      template class 'std::__1::deque<cxxtools::SerializationInfo,
      std::__1::allocator<cxxtools::SerializationInfo> >' requested here
        typedef Nodes::iterator Iterator;
                ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/deque:904:54:
 note: 
      declared protected here
    typedef allocator_traits<allocator_type>         __alloc_traits;
                                                     ^

… lines deleted

                                                     ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/deque:1202:30:
 error: 
      'const_pointer' is a protected member of
      'std::__1::__deque_base<cxxtools::SerializationInfo,
      std::__1::allocator<cxxtools::SerializationInfo> >'
    typedef typename __base::const_pointer         const_pointer;
                             ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/deque:910:54:
 note: 
      declared protected here
    typedef typename __alloc_traits::const_pointer   const_pointer;
                                                     ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/deque:1359:30:
 error: 
      '__map_const_pointer' is a protected member of
      'std::__1::__deque_base<cxxtools::SerializationInfo,
      std::__1::allocator<cxxtools::SerializationInfo> >'
    typedef typename __base::__map_const_pointer __map_const_pointer;
                             ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/deque:930:81:
 note: 
      declared protected here
  ...typename allocator_traits<__const_pointer_allocator>::const_pointer __ma...
                                                                         ^
In file included from csvdeserializer.cpp:29:
In file included from ../include/cxxtools/csvdeserializer.h:33:
In file included from ../include/cxxtools/deserializer.h:33:
In file included from ../include/cxxtools/composer.h:31:
../include/cxxtools/serializationinfo.h:682:9: error: indirection requires
      pointer operand ('SerializationInfo::ConstIterator' (aka 'int') invalid)
        *it >>= vec.back();
        ^~~
../include/cxxtools/serializationinfo.h:710:9: error: indirection requires
      pointer operand ('SerializationInfo::ConstIterator' (aka 'int') invalid)
        *it >>= list.back();
        ^~~
… lines deleted
        ^~~
../include/cxxtools/serializationinfo.h:930:9: error: indirection requires
      pointer operand ('SerializationInfo::ConstIterator' (aka 'int') invalid)
        *it >>= t;
        ^~~
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
make[2]: *** [csvdeserializer.lo] Error 1
make[1]: *** [all] Error 2
make: *** [all-recursive] Error 1
$


Jean-Marc

Le 29 juil. 2015 à 18:49, Tommi Mäkitalo <[email protected]> a écrit :

> Hi,
> 
> did you try the latest cxxtools with the pointer to std::deque? This may fix 
> the problem, but I'm not really sure.
> 
> 
> Tommi
> 
> Am 28.07.2015 um 10:05 schrieb Jean-Marc Choulet:
>> Hi Tommi,
>> 
>> Your modifications don’t compile on my Mac OS X. The problem is certainly 
>> the Mac OS X compiler :
>> 
>> MacBook:~ jm$ gcc --version
>> Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr 
>> --with-gxx-include-dir=/usr/include/c++/4.2.1
>> Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn)
>> Target: x86_64-apple-darwin13.4.0
>> Thread model: posix
>> MacBook:~ jm$
>> 
>> 
>> Yesterday, I installed GCC 4.9.2 from sources. All works fine now :)
>> 
>> Thanks,
>> 
>> Jean-Marc
>> 
>> 
>> Le 25 juil. 2015 à 16:46, Tommi Mäkitalo <[email protected]> a écrit :
>> 
>>> Hi,
>>> 
>>> I checked in the change. Now we have a pointer to std::deque in 
>>> SerializationInfo. I benchmarked the variants of SerializationInfo and 
>>> indeed the version with std::deque was significantly slower than 
>>> std::vector and the last change to pointer to deque is about as fast as 
>>> std::vector. The size of SerializationInfo with std::vector was 96 bytes, 
>>> with std::deque 160 bytes and with the pointer only 80 bytes. So I feel, 
>>> that the last implementation is indeed the best.
>>> 
>>> But using a pointer is quite challenging to get copying and moving right, 
>>> so that I hope, that there are not memory leaks or other bugs. Please test 
>>> it. I will also test with valgrind.
>>> 
>>> Tommi
>>> 
>>> Am 25.07.2015 um 12:12 schrieb Tommi Mäkitalo:
>>>> Hi,
>>>> 
>>>> I made a important change in cxxtools::SerializationInfo.
>>>> 
>>>> The subnodes were held in a std::vector. We got a crash in our application 
>>>> since addMember might reallocate the vector, which invalidates the 
>>>> references previously got from addMember on that node. So I changed the 
>>>> container into a std::deque, which do not invalidate references.
>>>> 
>>>> I partly understand, why gcc on MacOS X has problems with that. The class 
>>>> SerializationInfo has a member of type std::deque<SerializationInfo>. But 
>>>> the compiler do not know the full class when it sees the declaration. I'm 
>>>> quite sure this is fully legal C++. And it was ok with std::vector.
>>>> 
>>>> But I have a idea, how to help the compiler.
>>>> 
>>>> Instead of holding a std::deque, it may just have a pointer to a 
>>>> std::deque.
>>>> 
>>>> There is a drawback but also a advantage. The drawback is, that 
>>>> SerializationInfo has to allocate the deque, which is a additional 
>>>> allocation. The advantage is that the sizeof(SerializationInfo) will be 
>>>> reduces. On my system sizeof(deque) is 80 but the sizeof(pointer) is just 
>>>> 8, so the sizeof(SerializationInfo will be reduced by 72 bytes. I guess 
>>>> that most of the SerializationInfos won't have subnodes. There in normal 
>>>> applications more values than arrays or objects to serialize, so that 
>>>> overall memory consumption will be reduced.
>>>> 
>>>> There are many unittests for SerializationInfo and all rpc unittests and 
>>>> others use SerializationInfo also. So the risk to break something is 
>>>> negligible.
>>>> 
>>>> 
>>>> Tommi
>>>> 
>>>> Am 25.07.2015 um 07:33 schrieb Jean-Marc Choulet:
>>>>> Hello,
>>>>> 
>>>>> I have installed manually automate, autoconf, … 
>>>>> 
>>>>> I can run autoreconf without errors . I have now a error when I try to 
>>>>> compile cxxtools :
>>>>> 
>>>>> make
>>>>> Making all in src
>>>>> 
>>>>> … lines deleted …
>>>>> 
>>>>> In file included from csvdeserializer.cpp:29:
>>>>> In file included from ../include/cxxtools/csvdeserializer.h:33:
>>>>> In file included from ../include/cxxtools/deserializer.h:33:
>>>>> In file included from ../include/cxxtools/composer.h:31:
>>>>> In file included from ../include/cxxtools/serializationinfo.h:39:
>>>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/deque:912:49:
>>>>>  error: invalid application of 'sizeof' to an
>>>>>       incomplete type 'value_type' (aka 'cxxtools::SerializationInfo')
>>>>>     static const difference_type __block_size = sizeof(value_type) < 256 
>>>>> ? 4096 / sizeof(value_type) : 16;
>>>>>                                                 ^~~~~~~~~~~~~~~~~~
>>>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/deque:1183:15:
>>>>>  note: in instantiation of template class
>>>>>       'std::__1::__deque_base<cxxtools::SerializationInfo, 
>>>>> std::__1::allocator<cxxtools::SerializationInfo> >' requested here
>>>>>     : private __deque_base<_Tp, _Allocator>
>>>>>               ^
>>>>> ../include/cxxtools/serializationinfo.h:120:17: note: in instantiation of 
>>>>> template class 'std::__1::deque<cxxtools::SerializationInfo,
>>>>>       std::__1::allocator<cxxtools::SerializationInfo> >' requested here
>>>>>         typedef Nodes::iterator Iterator;
>>>>>                 ^
>>>>> ../include/cxxtools/serializationinfo.h:110:7: note: definition of 
>>>>> 'cxxtools::SerializationInfo' is not complete until the closing '}'
>>>>> class SerializationInfo
>>>>>       ^
>>>>> In file included from csvdeserializer.cpp:29:
>>>>> In file included from ../include/cxxtools/csvdeserializer.h:33:
>>>>> In file included from ../include/cxxtools/deserializer.h:33:
>>>>> In file included from ../include/cxxtools/composer.h:31:
>>>>> In file included from ../include/cxxtools/serializationinfo.h:39:
>>>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/deque:1193:30:
>>>>>  error: '__alloc_traits' is a protected member
>>>>>       of 'std::__1::__deque_base<cxxtools::SerializationInfo, 
>>>>> std::__1::allocator<cxxtools::SerializationInfo> >'
>>>>>     typedef typename __base::__alloc_traits        __alloc_traits;
>>>>>                              ^
>>>>> ../include/cxxtools/serializationinfo.h:120:17: note: in instantiation of 
>>>>> template class 'std::__1::deque<cxxtools::SerializationInfo,
>>>>>       std::__1::allocator<cxxtools::SerializationInfo> >' requested here
>>>>>         typedef Nodes::iterator Iterator;
>>>>>                 ^
>>>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/deque:904:54:
>>>>>  note: declared protected here
>>>>>     typedef allocator_traits<allocator_type>         __alloc_traits;
>>>>>                                                      ^
>>>>> … lines deleted ...
>>>>>                                                      ^
>>>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/deque:1359:30:
>>>>>  error: '__map_const_pointer' is a protected
>>>>>       member of 'std::__1::__deque_base<cxxtools::SerializationInfo, 
>>>>> std::__1::allocator<cxxtools::SerializationInfo> >'
>>>>>     typedef typename __base::__map_const_pointer __map_const_pointer;
>>>>>                              ^
>>>>> /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/deque:930:81:
>>>>>  note: declared protected here
>>>>>     typedef typename 
>>>>> allocator_traits<__const_pointer_allocator>::const_pointer 
>>>>> __map_const_pointer;
>>>>>                                                                           
>>>>>       ^
>>>>> In file included from csvdeserializer.cpp:29:
>>>>> In file included from ../include/cxxtools/csvdeserializer.h:33:
>>>>> In file included from ../include/cxxtools/deserializer.h:33:
>>>>> In file included from ../include/cxxtools/composer.h:31:
>>>>> ../include/cxxtools/serializationinfo.h:679:9: error: indirection 
>>>>> requires pointer operand ('SerializationInfo::ConstIterator' (aka 'int') 
>>>>> invalid)
>>>>>         *it >>= vec.back();
>>>>>         ^~~
>>>>> ../include/cxxtools/serializationinfo.h:707:9: error: indirection 
>>>>> requires pointer operand ('SerializationInfo::ConstIterator' (aka 'int') 
>>>>> invalid)
>>>>>         *it >>= list.back();
>>>>>         ^~~
>>>>> ../include/cxxtools/serializationinfo.h:735:9: error: indirection 
>>>>> requires pointer operand ('SerializationInfo::ConstIterator' (aka 'int') 
>>>>> invalid)
>>>>>         *it >>= deque.back();
>>>>>         ^~~
>>>>> ../include/cxxtools/serializationinfo.h:763:9: error: indirection 
>>>>> requires pointer operand ('SerializationInfo::ConstIterator' (aka 'int') 
>>>>> invalid)
>>>>>         *it >>= t;
>>>>>         ^~~
>>>>> ../include/cxxtools/serializationinfo.h:792:9: error: indirection 
>>>>> requires pointer operand ('SerializationInfo::ConstIterator' (aka 'int') 
>>>>> invalid)
>>>>>         *it >>= t;
>>>>>         ^~~
>>>>> ../include/cxxtools/serializationinfo.h:838:9: error: indirection 
>>>>> requires pointer operand ('SerializationInfo::ConstIterator' (aka 'int') 
>>>>> invalid)
>>>>>         *it >>= v;
>>>>>         ^~~
>>>>> ../include/cxxtools/serializationinfo.h:868:9: error: indirection 
>>>>> requires pointer operand ('SerializationInfo::ConstIterator' (aka 'int') 
>>>>> invalid)
>>>>>         *it >>= v;
>>>>>         ^~~
>>>>> ../include/cxxtools/serializationinfo.h:927:9: error: indirection 
>>>>> requires pointer operand ('SerializationInfo::ConstIterator' (aka 'int') 
>>>>> invalid)
>>>>>         *it >>= t;
>>>>>         ^~~
>>>>> fatal error: too many errors emitted, stopping now [-ferror-limit=]
>>>>> 20 errors generated.
>>>>> make[2]: *** [csvdeserializer.lo] Error 1
>>>>> make[1]: *** [all] Error 2
>>>>> make: *** [all-recursive] Error 1
>>>>> MacBook-Pro-de-Jean-Marc:cxxtools
>>>>> 
>>>>> 
>>>>> 
>>>>> 
>>>>> Is it possible to compile tntnet on Mac OS X ?
>>>>> 
>>>>> Thanks,
>>>>> 
>>>>> Jean-Marc
>>>>> 
>>>>> 
>>>>> ------------------------------------------------------------------------------
>>>>> 
>>>>> 
>>>>> _______________________________________________
>>>>> Tntnet-general mailing list
>>>>> [email protected]
>>>>> https://lists.sourceforge.net/lists/listinfo/tntnet-general
>>>> 
>>>> 
>>>> 
>>>> ------------------------------------------------------------------------------
>>>> 
>>>> 
>>>> _______________________________________________
>>>> Tntnet-general mailing list
>>>> [email protected]
>>>> https://lists.sourceforge.net/lists/listinfo/tntnet-general
>>> 
>>> ------------------------------------------------------------------------------
>>> _______________________________________________
>>> Tntnet-general mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/tntnet-general
>> 
>> 
>> 
>> ------------------------------------------------------------------------------
>> 
>> 
>> _______________________________________________
>> Tntnet-general mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/tntnet-general
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Tntnet-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/tntnet-general

------------------------------------------------------------------------------
_______________________________________________
Tntnet-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tntnet-general

Reply via email to