From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-oo1-f66.google.com (mail-oo1-f66.google.com [209.85.161.66]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id C6FC440F3AE for ; Wed, 17 Jun 2020 18:29:23 +0300 (MSK) Received: by mail-oo1-f66.google.com with SMTP id 18so482550ooy.3 for ; Wed, 17 Jun 2020 08:29:23 -0700 (PDT) MIME-Version: 1.0 References: <20200611002510.35349-1-huston.mavr@gmail.com> <7855a532-9877-3fef-4a52-c480b4509e4a@tarantool.org> In-Reply-To: <7855a532-9877-3fef-4a52-c480b4509e4a@tarantool.org> From: Mavr Huston Date: Wed, 17 Jun 2020 18:29:10 +0300 Message-ID: Content-Type: multipart/alternative; boundary="000000000000f75e7305a8495246" Subject: Re: [Tarantool-patches] [PATCH] cmake: cleanup src/CMakeLists.txt List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy Cc: Alexander Turenko , tarantool-patches@dev.tarantool.org, yaroslav.dynnikov@gmail.com --000000000000f75e7305a8495246 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable EXPORT_LIST contains following libraries in case of static build (with normal build it's empty): /usr/lib/x86_64-linux-gnu/libreadline.so /usr/lib/x86_64-linux-gnu/libcurses.so /usr/lib/x86_64-linux-gnu/libform.so /usr/lib/x86_64-linux-gnu/libtinfo.so /usr/lib/x86_64-linux-gnu/libz.so /opt/local/lib/libssl.so /opt/local/lib/libcrypto.so /usr/lib/x86_64-linux-gnu/libz.so /opt/local/lib/libicui18n.so /opt/local/lib/libicuuc.so /opt/local/lib/libicudata.so It doesn=E2=80=99t contains libcurl because it=E2=80=99s bundled statically= . So it isn=E2=80=99t related to https://github.com/tarantool/tarantool/issues/4559 but this problem may be solved with next patch: https://github.com/tarantool/tarantool/tree/rosik/refactor-static-build. At this patch added flag --disble-symbos-hiding ( https://github.com/tarantool/tarantool/blob/rosik/refactor-static-build/cma= ke/BuildLibCURL.cmake#L93 ) at building libcurl and after that most of libcurl symbols are visible from tarantool binary =D0=B2=D1=82, 16 =D0=B8=D1=8E=D0=BD. 2020 =D0=B3. =D0=B2 00:20, Vladislav S= hpilevoy : > Hi! > > On 11/06/2020 02:25, HustonMmmavr wrote: > > Removed definition and initialization of EXPORT_LIST variable at file > > src/CMakeLists.txt. After patch 03790ac551 this variable is unused > > (no reference to this variable after its initialization can be found > > in whole project) and it is only misleading. > > Actually I am not sure it is not needed. Seems like purpose of this > exporter was the same as for static libraries in a non-static build - > not to allow to remove any public symbols of these libraries. > > Because linker can eliminate some parts of static libraries, if sees > they are not used in the final executable. > > So probably EXPORT_LIST for static build should be exported just like > exports.h, and it was missed in #2971. > > > Closes #5066 > > --- > > I've builded tarantool before applying this changes and after. > > Then I've checked difference in tarantool binary file symbols with > > nm and diff commands and there was no difference. > > Have you tried static build or normal build? Did you see the content > of EXPORT_LIST, what is there? Isn't this related to > https://github.com/tarantool/tarantool/issues/4559? > > > Issue: https://github.com/tarantool/tarantool/issues/5066 > > Branch: > https://github.com/tarantool/tarantool/tree/HustonMmmavr/gh-5066-delete-u= nusued-export-list > --000000000000f75e7305a8495246 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable


EXPORT_LIST contains follo= wing libraries in case of static build (with normal build it's empty):<= /p>

/usr/lib/x86_64-linux-gnu/libr= eadline.so

/usr/lib/x86_64-linux-gnu/libc= urses.so

/usr/lib/x86_64-linux-gnu/libf= orm.so

/usr/lib/x86_64-linux-gnu/libt= info.so

/usr/lib/x86_64-linux-gnu/libz= .so

/opt/local/lib/libssl.so

/opt/local/lib/libcrypto.so

/usr/lib/x86_64-linux-gnu/libz= .so

/opt/local/lib/libicui18n.so

/opt/local/lib/libicuuc.so

/opt/local/lib/libicudata.so


It doesn=E2=80=99t contains li= bcurl because it=E2=80=99s bundled statically. So it isn=E2=80=99t related = to https://github.com/tarantoo= l/tarantool/issues/4559 but this problem may be solved with next p= atch: htt= ps://github.com/tarantool/tarantool/tree/rosik/refactor-static-build= . At this patch added flag --disble-symbos-hiding (ht= tps://github.com/tarantool/tarantool/blob/rosik/refactor-static-build/cmake= /BuildLibCURL.cmake#L93) at building libcurl and after that most o= f libcurl symbols are visible from tarantool binary


=D0=B2=D1=82, 16 =D0= =B8=D1=8E=D0=BD. 2020 =D0=B3. =D0=B2 00:20, Vladislav Shpilevoy <v.shpilevoy@tarantool.org>:
Hi!

On 11/06/2020 02:25, HustonMmmavr wrote:
> Removed definition and initialization of EXPORT_LIST variable at file<= br> > src/CMakeLists.txt. After patch 03790ac551 this variable is unused
> (no reference to this variable after its initialization can be found > in whole project) and it is only misleading.

Actually I am not sure it is not needed. Seems like purpose of this
exporter was the same as for static libraries in a non-static build -
not to allow to remove any public symbols of these libraries.

Because linker can eliminate some parts of static libraries, if sees
they are not used in the final executable.

So probably EXPORT_LIST for static build should be exported just like
exports.h, and it was missed in #2971.

> Closes #5066
> ---
> I've builded tarantool before applying this changes and after.
> Then I've checked difference in tarantool binary file symbols with=
> nm and diff commands and there was no difference.

Have you tried static build or normal build? Did you see the content
of EXPORT_LIST, what is there? Isn't this related to
https://github.com/tarantool/tarantool/issues/4559= ?

> Issue: https://github.com/tarantool/tarantool= /issues/5066
> Branch: https://github.com/tarantool/tarantool/tree/HustonMmmavr/gh-5066-delete= -unusued-export-list
--000000000000f75e7305a8495246--