Closed maiha closed 4 years ago
Thanks for pointing it out. I'd forgotten to add "inline" modifiers. I pushed the fix. However, there's another problem with the static linking; Pthread doesn't work with static linking. I'm looking for a solution now.
Yep! It worked with master!
$ make
$ ldd ./tkrzw_dbm_util
not a dynamic executable
I'm also looking forward to supporting pthreads for the static link version. Thank you very much.
I fixed the issue for pthread static linking. It's been already pushed. Now, you can run "make check" even with "configure --enable-static".
You work fast! And great job! ăď¸ đŻ đ
Sorry to be of topic. @maiha, Is a crystal client for tkrzw coming?
The successor of tokyocabinet/kyotocabinet is here, dreams do come true after all!!! :) Christmas is early this year.
Hi @lumina7 Yep, that's the plan. For now, I just created the repository. đ https://github.com/maiha/tkrzw.cr
Pthread doesn't work with static linking.
Did you consider making pthread support optional in the first place?
Pthread is supported by default. The issue discussed here was to do static linking. Somehow, the Pthread library cannot be linked statically. Thus, we need some tweaks to exclude it from the range of static linking.
On Sun, Dec 20, 2020 at 2:35 AM Paul Sokolovsky notifications@github.com wrote:
Pthread doesn't work with static linking.
Did you consider making pthread support optional in the first place?
â You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/estraier/tkrzw/issues/1#issuecomment-748502499, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQGJVREUSUU3XX2ICHPZBD3SVTP57ANCNFSM4PAW3KBQ .
btw, why static library so big? 80Mb. and like + ~30Mb for binary which liked it. May be it links some unnesessary things?
The total size of *.o of Tkrzw is 80MB. So, probably, the large size is due to the compiler, not the linker. du -bch tkrzw_lib_common.o tkrzw_str_util.o tkrzw_hash_util.o tkrzw_time_util.o tkrzw_compress.o tkrzw_file_util.o tkrzw_file_std.o tkrzw_file_mmap.o tkrzw_file_pos.o tkrzw_file_poly.o tkrzw_message_queue.o tkrzw_dbm.o tkrzw_dbm_ulog.o tkrzw_dbm_common_impl.o tkrzw_dbm_hash_impl.o tkrzw_dbm_hash.o tkrzw_dbm_tree_impl.o tkrzw_dbm_tree.o tkrzw_dbm_skip_impl.o tkrzw_dbm_skip.o tkrzw_dbm_tiny.o tkrzw_dbm_baby.o tkrzw_dbm_cache.o tkrzw_dbm_std.o tkrzw_dbm_poly.o tkrzw_dbm_shard.o tkrzw_dbm_async.o tkrzw_cmd_util.o tkrzw_langc.o
The reasons why the object files are so big are various. Using STL extensively is one of them. Using -Os is effective to reduce the size. Another way is to make a mini library by selecting some object files which are necessary to specific use cases. However, maintaining them would be painstaking.
On Sun, Jan 16, 2022 at 9:21 PM Kostya M @.***> wrote:
btw, why static library so big? 80Mb. and like + ~30Mb for binary which liked it. May be it links some unnesessary things?
â Reply to this email directly, view it on GitHub https://github.com/estraier/tkrzw/issues/1#issuecomment-1013865864, or unsubscribe https://github.com/notifications/unsubscribe-auth/AQGJVRBTR2SLOQGJSEI5LYDUWKZ3VANCNFSM4PAW3KBQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.
You are receiving this because you commented.Message ID: @.***>
Compilation with
--enable-static --disable-shared
fails.g++ (Ubuntu 7.5.0-6ubuntu2) 7.5.0
Best regards,