From: "Timur Safin" <tsafin@tarantool.org> To: 'Vladislav Shpilevoy' <v.shpilevoy@tarantool.org>, 'Cyrill Gorcunov' <gorcunov@gmail.com> Cc: tarantool-patches@dev.tarantool.org Subject: Re: [Tarantool-patches] [PATCH 00/43] Unhide symbols Date: Fri, 17 Apr 2020 10:48:21 +0300 [thread overview] Message-ID: <1ce401d6148c$90eb3940$b2c1abc0$@tarantool.org> (raw) In-Reply-To: <eb5eb634-3807-9c5c-817f-f974cbe430da@tarantool.org> : -----Original Message----- : From: Tarantool-patches <tarantool-patches-bounces@dev.tarantool.org> On : Behalf Of Vladislav Shpilevoy ... : : Seems like people keep ignoring my point about us not always : being able to add the macros to the place, where a symbol is : defined. I repeat: : : We not always can/want change files where symbols are : defined. Timur, Sergey, Cyrill - please, realize that. : : I said it in private chats I don't know how many times already, : and in emails too. Every single attempt to bring that up was : ignored. : : Some libraries, such as from third_party/, has nothing to do : with a few of their symbols needed in FFI in our src/ folder, or : considered public symbols in module.h. : : For example, we want to export many things from luajit library, : because user's dynamic modules should be able to use all Lua C API : functions in their code. We can't just interfere into luajit with : our custom sections and linker scripts. It would break the module : isolation. The same can be said for all other modules not located : right inside tarantool/tarantool repository. : : What if we will ever need to export something from curl? We can't : patch it, because Tarantool should be able to use vanilla curl, not : only our fork. We can't change library source code in such cases. : : Or what if we ever take h2o http library? We can't just go and mark : whatever symbols we find here when we want them in FFI. We need to : export them by tarantool/tarantool means. : : The only thing we can mark for export right where it is defined is : our own files in the main tarantool repository. Even submodules should : not be affected by this, such as src/lib/small. : : When we want to export something from independent modules and libraries, : we need to do that in tarantool/tarantool, in dedicated places. For : example, if I want some parts of OpenSSL exported, I should do that : where it is needed: in src/lua/digest.c. I shouldn't patch OpenSSL. : : But when I want to export symbols from src/box - I can do that right : in places where these symbols are defined. : : That magic macros EXPORT_API should be able to work even when we : write it not right where the symbol is defined. Like in the kernel, : from what I understand. Now I hear you, bro! Although it's possible to export symbol alias elsewhere, outside of 3rd party codebase, and do all the dirty symbol aliasing tricks using something similar to EXPORT* macro in kernel. But, to be honest - it's not worth all the complexities introduced. The simple linker export symbols list will be much simple and still serve our purposes. So for curl and openssl, at least export symbols lists look like the preferred way here (and may be for small, but to less degree). And although, _personally_, I'd still much prefer to have our own symbols annotated in the code with EXPORT--like macros, but it will be inconsistent with 3rd party, and will not provide much added value. So looks like the simplest way here is to take Kostja advice and restore original approach from ages ago. (Well with some simplifications which we could use there to avoid unnecessary headers inclusion at the exporting function). [It was fun to play with linker loader scripts, and learn new/old linker tricks, but apparently the simpler approach is better here in a longer run.] Regards, Timur
next prev parent reply other threads:[~2020-04-17 7:48 UTC|newest] Thread overview: 76+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-12 0:12 Vladislav Shpilevoy 2020-04-12 0:12 ` [Tarantool-patches] [PATCH 01/43] cmake: remove double usage of some source files Vladislav Shpilevoy 2020-04-12 0:12 ` [Tarantool-patches] [PATCH 10/43] build: export src/lib/core/fiber.c symbols Vladislav Shpilevoy 2020-04-12 0:12 ` [Tarantool-patches] [PATCH 11/43] build: export src/lua/init.c symbols Vladislav Shpilevoy 2020-04-12 0:12 ` [Tarantool-patches] [PATCH 12/43] build: export src/lib/core/port.c symbols Vladislav Shpilevoy 2020-04-12 0:12 ` [Tarantool-patches] [PATCH 13/43] build: export src/lib/csv/csv.c symbols Vladislav Shpilevoy 2020-04-12 0:12 ` [Tarantool-patches] [PATCH 14/43] build: export src/title.c symbols Vladislav Shpilevoy 2020-04-12 0:12 ` [Tarantool-patches] [PATCH 15/43] build: export src/lua/tnt_iconv.c symbols Vladislav Shpilevoy 2020-04-12 0:12 ` [Tarantool-patches] [PATCH 16/43] build: export src/lib/core/exception.cc symbols Vladislav Shpilevoy 2020-04-12 0:12 ` [Tarantool-patches] [PATCH 17/43] build: export src/lib/uuid/tt_uuid.c symbols Vladislav Shpilevoy 2020-04-12 0:12 ` [Tarantool-patches] [PATCH 18/43] build: export src/lib/core/say.c symbols Vladislav Shpilevoy 2020-04-12 0:12 ` [Tarantool-patches] [PATCH 19/43] build: export src/lib/uri/uri.c symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 02/43] cmake: remove dynamic-list linker option Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 20/43] build: export third_party/PMurHash.c symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 21/43] build: export src/crc32.c symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 22/43] build: export src/lua/msgpack.c symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 23/43] build: export src/main.cc symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 24/43] build: export src/box/space.c symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 25/43] build: export src/box/schema.cc symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 26/43] build: export src/lib/crypto/crypto.c symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 27/43] build: export src/lua/buffer.c symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 28/43] build: export src/lib/swim/swim.c symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 29/43] build: export src/lib/core/fiber_cond.c symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 03/43] build: export src/lib/core/clock.c symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 30/43] build: export src/lib/core/coio.cc symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 31/43] build: export src/lua/utils.c symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 32/43] build: export src/box/lua/tuple.c symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 33/43] build: export src/lua/error.c symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 34/43] build: export src/box/txn.c symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 35/43] build: export src/box/key_def.c symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 36/43] build: export src/box/tuple.c symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 37/43] build: export src/box/index.cc symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 38/43] build: export src/box/box.cc symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 39/43] build: export src/box/error.cc symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 04/43] build: export src/scramble.c symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 40/43] build: export src/lib/core/diag.c symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 41/43] build: export src/lib/core/latch.c symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 42/43] build: export src/lua/string.c symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 43/43] build: export public Lua symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 05/43] build: export src/lua/socket.c symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 06/43] build: export third_party/base64.c symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 07/43] build: export src/lua/digest.c symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 08/43] build: export src/lib/salad/guava.c symbols Vladislav Shpilevoy 2020-04-12 0:13 ` [Tarantool-patches] [PATCH 09/43] build: export src/lib/core/random.c symbols Vladislav Shpilevoy 2020-04-14 18:14 ` Timur Safin 2020-04-12 11:34 ` [Tarantool-patches] [PATCH 00/43] Unhide symbols Konstantin Osipov 2020-04-12 14:05 ` Vladislav Shpilevoy 2020-04-13 9:40 ` Konstantin Osipov 2020-04-13 9:42 ` Konstantin Osipov 2020-04-13 13:53 ` Vladislav Shpilevoy 2020-04-13 14:15 ` Konstantin Osipov 2020-04-13 14:21 ` Vladislav Shpilevoy 2020-04-13 19:49 ` Sergey Ostanevich 2020-04-13 21:01 ` Vladislav Shpilevoy 2020-04-13 21:38 ` Konstantin Osipov 2020-04-14 18:01 ` Timur Safin 2020-04-14 18:26 ` Timur Safin 2020-04-14 20:41 ` 'Konstantin Osipov' 2020-04-15 10:28 ` Mons Anderson 2020-04-15 10:40 ` Mons Anderson 2020-04-15 10:50 ` sergos 2020-04-15 21:58 ` Vladislav Shpilevoy 2020-04-16 12:13 ` Cyrill Gorcunov 2020-04-16 20:30 ` Vladislav Shpilevoy 2020-04-17 7:48 ` Timur Safin [this message] 2020-04-17 8:29 ` Cyrill Gorcunov 2020-04-15 11:27 ` Konstantin Osipov 2020-04-12 14:25 ` Vladislav Shpilevoy 2020-04-12 20:18 ` Vladislav Shpilevoy 2020-04-13 14:26 ` Vladislav Shpilevoy 2020-04-13 16:44 ` Cyrill Gorcunov 2020-04-13 17:57 ` Vladislav Shpilevoy 2020-04-13 18:17 ` Cyrill Gorcunov 2020-04-14 1:15 ` Vladislav Shpilevoy 2020-04-14 1:27 ` [Tarantool-patches] [PATCH 44/43] build: export src/box/lua/console.c symbols Vladislav Shpilevoy 2020-04-15 23:15 ` [Tarantool-patches] [PATCH 00/43] Unhide symbols Vladislav Shpilevoy
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to='1ce401d6148c$90eb3940$b2c1abc0$@tarantool.org' \ --to=tsafin@tarantool.org \ --cc=gorcunov@gmail.com \ --cc=tarantool-patches@dev.tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH 00/43] Unhide symbols' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox