Minimal installation with smart pointers only

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Minimal installation with smart pointers only

Mateusz Loskot
Hi,

Today, I tried to extract smart pointers library from Boost tree  using
bcp tool.
Everything seems to work well:
1. I checkouted latest Boost CVS
2. I build bcp without any problems, using VC++ 8.0
3. I run bcp --cvs --list to see how many files are related to
smart_ptr.hpp (and shared_ptr.hpp too).

4. Finally, I extracted smart pointers library:

d:\boost_cvs> bcp --cvs smart_ptr.hpp d:\tmp\boost-smart_ptr

Next, I compiled some examples using this extraction and everything
works well.

My only question is if this is normal that smart_ptr extraction weight
is about 2.8MB ?
Are there any options that can be used to make this package smaller?


Here is a linsg (looong) of files that I got copied during the
extraction process. Could anyone take a look at it and see if there are
some files not used which can be safely removed?

////////////////////////////////////////////////////////
// START OF THE LIST

./boost/assert.hpp
./boost/checked_delete.hpp
./boost/config
./boost/config/abi
./boost/config/abi/borland_prefix.hpp
./boost/config/abi/borland_suffix.hpp
./boost/config/abi/msvc_prefix.hpp
./boost/config/abi/msvc_suffix.hpp
./boost/config/abi_prefix.hpp
./boost/config/abi_suffix.hpp
./boost/config/auto_link.hpp
./boost/config/compiler
./boost/config/compiler/borland.hpp
./boost/config/compiler/comeau.hpp
./boost/config/compiler/common_edg.hpp
./boost/config/compiler/compaq_cxx.hpp
./boost/config/compiler/digitalmars.hpp
./boost/config/compiler/gcc.hpp
./boost/config/compiler/gcc_xml.hpp
./boost/config/compiler/greenhills.hpp
./boost/config/compiler/hp_acc.hpp
./boost/config/compiler/intel.hpp
./boost/config/compiler/kai.hpp
./boost/config/compiler/metrowerks.hpp
./boost/config/compiler/mpw.hpp
./boost/config/compiler/sgi_mipspro.hpp
./boost/config/compiler/sunpro_cc.hpp
./boost/config/compiler/vacpp.hpp
./boost/config/compiler/visualc.hpp
./boost/config/no_tr1
./boost/config/no_tr1/complex.hpp
./boost/config/no_tr1/functional.hpp
./boost/config/no_tr1/memory.hpp
./boost/config/no_tr1/utility.hpp
./boost/config/platform
./boost/config/platform/aix.hpp
./boost/config/platform/amigaos.hpp
./boost/config/platform/beos.hpp
./boost/config/platform/bsd.hpp
./boost/config/platform/cygwin.hpp
./boost/config/platform/hpux.hpp
./boost/config/platform/irix.hpp
./boost/config/platform/linux.hpp
./boost/config/platform/macos.hpp
./boost/config/platform/qnxnto.hpp
./boost/config/platform/solaris.hpp
./boost/config/platform/win32.hpp
./boost/config/posix_features.hpp
./boost/config/requires_threads.hpp
./boost/config/select_compiler_config.hpp
./boost/config/select_platform_config.hpp
./boost/config/select_stdlib_config.hpp
./boost/config/stdlib
./boost/config/stdlib/dinkumware.hpp
./boost/config/stdlib/libcomo.hpp
./boost/config/stdlib/libstdcpp3.hpp
./boost/config/stdlib/modena.hpp
./boost/config/stdlib/msl.hpp
./boost/config/stdlib/roguewave.hpp
./boost/config/stdlib/sgi.hpp
./boost/config/stdlib/stlport.hpp
./boost/config/stdlib/vacpp.hpp
./boost/config/suffix.hpp
./boost/config/user.hpp
./boost/config.hpp
./boost/current_function.hpp
./boost/detail
./boost/detail/atomic_count.hpp
./boost/detail/atomic_count_gcc.hpp
./boost/detail/atomic_count_pthreads.hpp
./boost/detail/atomic_count_win32.hpp
./boost/detail/bad_weak_ptr.hpp
./boost/detail/interlocked.hpp
./boost/detail/lightweight_mutex.hpp
./boost/detail/lwm_nop.hpp
./boost/detail/lwm_pthreads.hpp
./boost/detail/lwm_win32_cs.hpp
./boost/detail/quick_allocator.hpp
./boost/detail/shared_array_nmt.hpp
./boost/detail/shared_count.hpp
./boost/detail/shared_ptr_nmt.hpp
./boost/detail/sp_counted_base.hpp
./boost/detail/sp_counted_base_cw_ppc.hpp
./boost/detail/sp_counted_base_gcc_ia64.hpp
./boost/detail/sp_counted_base_gcc_ppc.hpp
./boost/detail/sp_counted_base_gcc_x86.hpp
./boost/detail/sp_counted_base_nt.hpp
./boost/detail/sp_counted_base_pt.hpp
./boost/detail/sp_counted_base_w32.hpp
./boost/detail/sp_counted_impl.hpp
./boost/detail/workaround.hpp
./boost/enable_shared_from_this.hpp
./boost/intrusive_ptr.hpp
./boost/mpl
./boost/mpl/aux_
./boost/mpl/aux_/adl_barrier.hpp
./boost/mpl/aux_/arity.hpp
./boost/mpl/aux_/config
./boost/mpl/aux_/config/adl.hpp
./boost/mpl/aux_/config/arrays.hpp
./boost/mpl/aux_/config/ctps.hpp
./boost/mpl/aux_/config/dtp.hpp
./boost/mpl/aux_/config/eti.hpp
./boost/mpl/aux_/config/gcc.hpp
./boost/mpl/aux_/config/integral.hpp
./boost/mpl/aux_/config/intel.hpp
./boost/mpl/aux_/config/lambda.hpp
./boost/mpl/aux_/config/msvc.hpp
./boost/mpl/aux_/config/nttp.hpp
./boost/mpl/aux_/config/overload_resolution.hpp
./boost/mpl/aux_/config/preprocessor.hpp
./boost/mpl/aux_/config/static_constant.hpp
./boost/mpl/aux_/config/ttp.hpp
./boost/mpl/aux_/config/workaround.hpp
./boost/mpl/aux_/integral_wrapper.hpp
./boost/mpl/aux_/lambda_arity_param.hpp
./boost/mpl/aux_/lambda_support.hpp
./boost/mpl/aux_/na.hpp
./boost/mpl/aux_/na_fwd.hpp
./boost/mpl/aux_/na_spec.hpp
./boost/mpl/aux_/nttp_decl.hpp
./boost/mpl/aux_/preprocessor
./boost/mpl/aux_/preprocessor/def_params_tail.hpp
./boost/mpl/aux_/preprocessor/enum.hpp
./boost/mpl/aux_/preprocessor/filter_params.hpp
./boost/mpl/aux_/preprocessor/params.hpp
./boost/mpl/aux_/preprocessor/sub.hpp
./boost/mpl/aux_/preprocessor/tuple.hpp
./boost/mpl/aux_/static_cast.hpp
./boost/mpl/aux_/template_arity_fwd.hpp
./boost/mpl/aux_/value_wknd.hpp
./boost/mpl/aux_/yes_no.hpp
./boost/mpl/bool.hpp
./boost/mpl/bool_fwd.hpp
./boost/mpl/if.hpp
./boost/mpl/int.hpp
./boost/mpl/integral_c.hpp
./boost/mpl/integral_c_fwd.hpp
./boost/mpl/integral_c_tag.hpp
./boost/mpl/int_fwd.hpp
./boost/mpl/lambda_fwd.hpp
./boost/mpl/limits
./boost/mpl/limits/arity.hpp
./boost/mpl/size_t.hpp
./boost/mpl/size_t_fwd.hpp
./boost/mpl/void_fwd.hpp
./boost/non_type.hpp
./boost/preprocessor
./boost/preprocessor/arithmetic
./boost/preprocessor/arithmetic/add.hpp
./boost/preprocessor/arithmetic/dec.hpp
./boost/preprocessor/arithmetic/inc.hpp
./boost/preprocessor/arithmetic/sub.hpp
./boost/preprocessor/array
./boost/preprocessor/array/data.hpp
./boost/preprocessor/array/elem.hpp
./boost/preprocessor/array/size.hpp
./boost/preprocessor/cat.hpp
./boost/preprocessor/comma_if.hpp
./boost/preprocessor/config
./boost/preprocessor/config/config.hpp
./boost/preprocessor/control
./boost/preprocessor/control/detail
./boost/preprocessor/control/detail/dmc
./boost/preprocessor/control/detail/dmc/while.hpp
./boost/preprocessor/control/detail/edg
./boost/preprocessor/control/detail/edg/while.hpp
./boost/preprocessor/control/detail/msvc
./boost/preprocessor/control/detail/msvc/while.hpp
./boost/preprocessor/control/detail/while.hpp
./boost/preprocessor/control/expr_iif.hpp
./boost/preprocessor/control/if.hpp
./boost/preprocessor/control/iif.hpp
./boost/preprocessor/control/while.hpp
./boost/preprocessor/debug
./boost/preprocessor/debug/error.hpp
./boost/preprocessor/detail
./boost/preprocessor/detail/auto_rec.hpp
./boost/preprocessor/detail/check.hpp
./boost/preprocessor/detail/dmc
./boost/preprocessor/detail/dmc/auto_rec.hpp
./boost/preprocessor/detail/is_binary.hpp
./boost/preprocessor/empty.hpp
./boost/preprocessor/enum_params.hpp
./boost/preprocessor/facilities
./boost/preprocessor/facilities/empty.hpp
./boost/preprocessor/facilities/identity.hpp
./boost/preprocessor/identity.hpp
./boost/preprocessor/inc.hpp
./boost/preprocessor/iterate.hpp
./boost/preprocessor/iteration
./boost/preprocessor/iteration/detail
./boost/preprocessor/iteration/detail/bounds
./boost/preprocessor/iteration/detail/bounds/lower1.hpp
./boost/preprocessor/iteration/detail/bounds/lower2.hpp
./boost/preprocessor/iteration/detail/bounds/lower3.hpp
./boost/preprocessor/iteration/detail/bounds/lower4.hpp
./boost/preprocessor/iteration/detail/bounds/lower5.hpp
./boost/preprocessor/iteration/detail/bounds/upper1.hpp
./boost/preprocessor/iteration/detail/bounds/upper2.hpp
./boost/preprocessor/iteration/detail/bounds/upper3.hpp
./boost/preprocessor/iteration/detail/bounds/upper4.hpp
./boost/preprocessor/iteration/detail/bounds/upper5.hpp
./boost/preprocessor/iteration/detail/finish.hpp
./boost/preprocessor/iteration/detail/iter
./boost/preprocessor/iteration/detail/iter/forward1.hpp
./boost/preprocessor/iteration/detail/iter/forward2.hpp
./boost/preprocessor/iteration/detail/iter/forward3.hpp
./boost/preprocessor/iteration/detail/iter/forward4.hpp
./boost/preprocessor/iteration/detail/iter/forward5.hpp
./boost/preprocessor/iteration/detail/iter/reverse1.hpp
./boost/preprocessor/iteration/detail/iter/reverse2.hpp
./boost/preprocessor/iteration/detail/iter/reverse3.hpp
./boost/preprocessor/iteration/detail/iter/reverse4.hpp
./boost/preprocessor/iteration/detail/iter/reverse5.hpp
./boost/preprocessor/iteration/detail/local.hpp
./boost/preprocessor/iteration/detail/rlocal.hpp
./boost/preprocessor/iteration/detail/self.hpp
./boost/preprocessor/iteration/detail/start.hpp
./boost/preprocessor/iteration/iterate.hpp
./boost/preprocessor/iteration/local.hpp
./boost/preprocessor/iteration/self.hpp
./boost/preprocessor/list
./boost/preprocessor/list/adt.hpp
./boost/preprocessor/list/append.hpp
./boost/preprocessor/list/detail
./boost/preprocessor/list/detail/dmc
./boost/preprocessor/list/detail/dmc/fold_left.hpp
./boost/preprocessor/list/detail/edg
./boost/preprocessor/list/detail/edg/fold_left.hpp
./boost/preprocessor/list/detail/edg/fold_right.hpp
./boost/preprocessor/list/detail/fold_left.hpp
./boost/preprocessor/list/detail/fold_right.hpp
./boost/preprocessor/list/fold_left.hpp
./boost/preprocessor/list/fold_right.hpp
./boost/preprocessor/list/for_each_i.hpp
./boost/preprocessor/list/reverse.hpp
./boost/preprocessor/list/transform.hpp
./boost/preprocessor/logical
./boost/preprocessor/logical/and.hpp
./boost/preprocessor/logical/bitand.hpp
./boost/preprocessor/logical/bool.hpp
./boost/preprocessor/logical/compl.hpp
./boost/preprocessor/punctuation
./boost/preprocessor/punctuation/comma.hpp
./boost/preprocessor/punctuation/comma_if.hpp
./boost/preprocessor/repeat.hpp
./boost/preprocessor/repetition
./boost/preprocessor/repetition/detail
./boost/preprocessor/repetition/detail/dmc
./boost/preprocessor/repetition/detail/dmc/for.hpp
./boost/preprocessor/repetition/detail/edg
./boost/preprocessor/repetition/detail/edg/for.hpp
./boost/preprocessor/repetition/detail/for.hpp
./boost/preprocessor/repetition/detail/msvc
./boost/preprocessor/repetition/detail/msvc/for.hpp
./boost/preprocessor/repetition/enum_params.hpp
./boost/preprocessor/repetition/for.hpp
./boost/preprocessor/repetition/repeat.hpp
./boost/preprocessor/slot
./boost/preprocessor/slot/detail
./boost/preprocessor/slot/detail/counter.hpp
./boost/preprocessor/slot/detail/def.hpp
./boost/preprocessor/slot/detail/shared.hpp
./boost/preprocessor/slot/detail/slot1.hpp
./boost/preprocessor/slot/detail/slot2.hpp
./boost/preprocessor/slot/detail/slot3.hpp
./boost/preprocessor/slot/detail/slot4.hpp
./boost/preprocessor/slot/detail/slot5.hpp
./boost/preprocessor/slot/slot.hpp
./boost/preprocessor/tuple
./boost/preprocessor/tuple/eat.hpp
./boost/preprocessor/tuple/elem.hpp
./boost/preprocessor/tuple/rem.hpp
./boost/preprocessor/tuple/to_list.hpp
./boost/scoped_array.hpp
./boost/scoped_ptr.hpp
./boost/shared_array.hpp
./boost/shared_ptr.hpp
./boost/smart_ptr.hpp
./boost/static_assert.hpp
./boost/throw_exception.hpp
./boost/type.hpp
./boost/type_traits
./boost/type_traits/add_reference.hpp
./boost/type_traits/alignment_of.hpp
./boost/type_traits/broken_compiler_spec.hpp
./boost/type_traits/config.hpp
./boost/type_traits/detail
./boost/type_traits/detail/bool_trait_def.hpp
./boost/type_traits/detail/bool_trait_undef.hpp
./boost/type_traits/detail/cv_traits_impl.hpp
./boost/type_traits/detail/false_result.hpp
./boost/type_traits/detail/ice_and.hpp
./boost/type_traits/detail/ice_eq.hpp
./boost/type_traits/detail/ice_not.hpp
./boost/type_traits/detail/ice_or.hpp
./boost/type_traits/detail/is_function_ptr_helper.hpp
./boost/type_traits/detail/is_function_ptr_tester.hpp
./boost/type_traits/detail/is_mem_fun_pointer_impl.hpp
./boost/type_traits/detail/is_mem_fun_pointer_tester.hpp
./boost/type_traits/detail/size_t_trait_def.hpp
./boost/type_traits/detail/size_t_trait_undef.hpp
./boost/type_traits/detail/template_arity_spec.hpp
./boost/type_traits/detail/type_trait_def.hpp
./boost/type_traits/detail/type_trait_undef.hpp
./boost/type_traits/detail/wrap.hpp
./boost/type_traits/detail/yes_no_type.hpp
./boost/type_traits/ice.hpp
./boost/type_traits/integral_constant.hpp
./boost/type_traits/intrinsics.hpp
./boost/type_traits/is_abstract.hpp
./boost/type_traits/is_arithmetic.hpp
./boost/type_traits/is_array.hpp
./boost/type_traits/is_class.hpp
./boost/type_traits/is_convertible.hpp
./boost/type_traits/is_enum.hpp
./boost/type_traits/is_float.hpp
./boost/type_traits/is_function.hpp
./boost/type_traits/is_integral.hpp
./boost/type_traits/is_member_function_pointer.hpp
./boost/type_traits/is_member_pointer.hpp
./boost/type_traits/is_pod.hpp
./boost/type_traits/is_pointer.hpp
./boost/type_traits/is_polymorphic.hpp
./boost/type_traits/is_reference.hpp
./boost/type_traits/is_same.hpp
./boost/type_traits/is_scalar.hpp
./boost/type_traits/is_union.hpp
./boost/type_traits/is_void.hpp
./boost/type_traits/remove_cv.hpp
./boost/type_traits/remove_reference.hpp
./boost/type_traits/type_with_alignment.hpp
./boost/version.hpp
./boost/weak_ptr.hpp
./libs/smart_ptr
./libs/smart_ptr/src
./libs/smart_ptr/src/sp_collector.cpp
./libs/smart_ptr/src/sp_debug_hooks.cpp

// END OF THE LIST
////////////////////////////////////////////////////////


Thanks in advance
--
Mateusz Łoskot
http://mateusz.loskot.net
_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
--
Mateusz Loskot, http://mateusz.loskot.net
Reply | Threaded
Open this post in threaded view
|

Re: Minimal installation with smart pointers only

Pavel Vozenilek

"Mateusz £oskot" wrote:

> Today, I tried to extract smart pointers library from Boost tree  using
> bcp tool.

> 3. I run bcp --cvs --list to see how many files are related to
> smart_ptr.hpp (and shared_ptr.hpp too).
>
> My only question is if this is normal that smart_ptr extraction weight
> is about 2.8MB ?
> Are there any options that can be used to make this package smaller?
>

bcp tool is very pessimistic and errs on safety side.

You may manually remove files that are not needed
by trial and error method (compilers/platforms/
possibly locking code/possibly preprocessor code).

However majority of these files just takes space on disk
and does not increase compilation time/runtime overhead
- the pruning may not be worth of the effort.

/Pavel




_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Minimal installation with smart pointers only

Mateusz Loskot
Pavel Vozenilek wrote:

> "Mateusz Łoskot" wrote:
>
>> Today, I tried to extract smart pointers library from Boost tree
>> using bcp tool.
>
>> 3. I run bcp --cvs --list to see how many files are related to
>> smart_ptr.hpp (and shared_ptr.hpp too).
>>
>> My only question is if this is normal that smart_ptr extraction
>> weight is about 2.8MB ? Are there any options that can be used to
>> make this package smaller?
>>
>
> bcp tool is very pessimistic and errs on safety side.

I can understand the first point, but what does "errs on safety side"
mean exactly?
Are you trying to say using bcp is not recommended because it may be not
safe (for some reason) and I should avoid it?

> You may manually remove files that are not needed by trial and error
> method (compilers/platforms/ possibly locking code/possibly
> preprocessor code).

Yup, I'm going to do it that way.

> However majority of these files just takes space on disk and does not
> increase compilation time/runtime overhead - the pruning may not be
> worth of the effort.

Yes, I know, but I'm just asking to understand it.

Cheers
--
Mateusz Łoskot
http://mateusz.loskot.net
_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
--
Mateusz Loskot, http://mateusz.loskot.net
Reply | Threaded
Open this post in threaded view
|

Re: Minimal installation with smart pointers only

Rene Rivera
Mateusz Łoskot wrote:

> Pavel Vozenilek wrote:
>> "Mateusz Łoskot" wrote:
>>
>>> Today, I tried to extract smart pointers library from Boost tree
>>> using bcp tool.
>>> 3. I run bcp --cvs --list to see how many files are related to
>>> smart_ptr.hpp (and shared_ptr.hpp too).
>>>
>>> My only question is if this is normal that smart_ptr extraction
>>> weight is about 2.8MB ? Are there any options that can be used to
>>> make this package smaller?
>>>
>> bcp tool is very pessimistic and errs on safety side.
>
> I can understand the first point, but what does "errs on safety side"
> mean exactly?
> Are you trying to say using bcp is not recommended because it may be not
> safe (for some reason) and I should avoid it?

Pavel said the "bcp tool ... errs on safety side" not smart pointers.
The bcp tool includes any referenced "libraries" from smart_ptr in your
case. So it may be that:

a. smart_ptr only uses MPL for some compilers but not yours. It doesn't
distinguish as it doesn't try and decipher the preprocessor code. Just
that a file has "#include" some other file.

b. It may be that smart_ptr includes only 1 isolated file of another
library, but it may copy over more than just that file to be safe.



--
-- Grafik - Don't Assume Anything
-- Redshift Software, Inc. - http://redshift-software.com
-- rrivera/acm.org - grafik/redshift-software.com
-- 102708583/icq - grafikrobot/aim - grafikrobot/yahoo

_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Minimal installation with smart pointers only

Mateusz Loskot
Rene Rivera wrote:

> Mateusz Łoskot wrote:
>> Pavel Vozenilek wrote:
>>> "Mateusz Łoskot" wrote:
>>>
>>>> Today, I tried to extract smart pointers library from Boost tree
>>>> using bcp tool.
>>>> 3. I run bcp --cvs --list to see how many files are related to
>>>> smart_ptr.hpp (and shared_ptr.hpp too).
>>>>
>>>> My only question is if this is normal that smart_ptr extraction
>>>> weight is about 2.8MB ? Are there any options that can be used to
>>>> make this package smaller?
>>>>
>>> bcp tool is very pessimistic and errs on safety side.
>> I can understand the first point, but what does "errs on safety side"
>> mean exactly?
>> Are you trying to say using bcp is not recommended because it may be not
>> safe (for some reason) and I should avoid it?
>
> Pavel said the "bcp tool ... errs on safety side" not smart pointers.
> The bcp tool includes any referenced "libraries" from smart_ptr in your
> case. So it may be that:
>
> a. smart_ptr only uses MPL for some compilers but not yours. It doesn't
> distinguish as it doesn't try and decipher the preprocessor code. Just
> that a file has "#include" some other file.
>
> b. It may be that smart_ptr includes only 1 isolated file of another
> library, but it may copy over more than just that file to be safe.
>

Now, it's clear.
Thanks!

Cheers
--
Mateusz Łoskot
http://mateusz.loskot.net
_______________________________________________
Boost-users mailing list
[hidden email]
http://lists.boost.org/mailman/listinfo.cgi/boost-users
--
Mateusz Loskot, http://mateusz.loskot.net