Skip to content

ICU-22610 Use Requires.private and Libs.private#2949

Merged
markusicu merged 1 commit intounicode-org:mainfrom
earlchew-aws:ICU-22610
Sep 22, 2024
Merged

ICU-22610 Use Requires.private and Libs.private#2949
markusicu merged 1 commit intounicode-org:mainfrom
earlchew-aws:ICU-22610

Conversation

@earlchew-aws
Copy link
Contributor

To prevent overlinking when publishing shared libraries, specify internal dependencies using Requires.private and Libs.private.

Use Libs.private in icu-uc.pc for libicudata.so, and Requires.private in icu-i18n.pc, icu-io.pc, and icu-lx.pc, so that ICU internal dependencies will not be bound into clients.

The resulting *.pc files will produce the following output for icu-i18n and icu-lx, provided pkgconf has commit 78d53ea0 (2.2.0 or later) which de-duplicates multiple -L options:

commit 78d53ea012dfbaf397bf8e6907efac5b51abac56
Author: Kai Pastor <[email protected]>
Date:   Fri Feb 23 15:18:08 2024 +0100

    Revise serials, traversal, flattening

./configure --enable-shared ...

#
# icu-i18n
#

% pkgconf --libs  icu-i18n
-L/opt/local/lib -licui18n

% pkgconf --libs --static icu-i18n
-L/opt/local/lib -licui18n -licuuc -licudata -lpthread -lm

#
# icu-lx
#

% pkgconf  --libs icu-lx
-L/opt/local/lib -liculx

% pkgconf  --libs --static icu-lx
-L/opt/local/lib -liculx -L/usr/lib/x86_64-linux-gnu -licu-le-hb -lharfbuzz -lm -licuuc -licudata -lpthread -lm

./configure --disable-shared --enable-static ...

#
# icu-i18n
#

% pkgconf --libs  icu-i18n
-L/opt/local/lib -licui18n -licuuc -licudata -lpthread -lm

% pkgconf  --libs --static icu-i18n
-L/opt/local/lib -licui18n -licuuc -licudata -lpthread -lm

#
# icu-lx
#

% pkgconf  --libs icu-lx
-L/opt/local/lib -liculx -L/usr/lib/x86_64-linux-gnu -licu-le-hb

% pkgconf  --libs --static icu-lx
-L/opt/local/lib -liculx -L/usr/lib/x86_64-linux-gnu -licu-le-hb -lharfbuzz -licuuc -licudata -lpthread -lm
Checklist

@CLAassistant
Copy link

CLAassistant commented Apr 4, 2024

CLA assistant check
All committers have signed the CLA.

@echeran
Copy link
Contributor

echeran commented Apr 18, 2024

Please sign the CLA using the CLA button. We need that signed and confirmed via the CLA Assistant checker before we can take a look.

@jira-pull-request-webhook
Copy link

Hooray! The files in the branch are the same across the force-push. 😃

~ Your Friendly Jira-GitHub PR Checker Bot

@earlchew-aws
Copy link
Contributor Author

@markusicu Mix up with CLA signing sorted out.

@earlchew-aws
Copy link
Contributor Author

@echeran @markusicu AFAICT CLA Assistant checker confirms the CLA.

@markusicu markusicu self-assigned this Jul 11, 2024
@markusicu markusicu requested a review from srl295 July 11, 2024 16:52
Copy link
Member

@srl295 srl295 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great. there's more to sort out with le/hb but that's for another time.

To prevent overlinking when publishing shared libraries,
specify internal dependencies using Requires.private and
Libs.private.

Use Libs.private in icu-uc.pc for libicudata.so, and
Requires.private in icu-i18n.pc, icu-io.pc, and icu-lx.pc,
so that ICU internal dependencies will not be bound
into clients.

The resulting *.pc files will produce the following
output for icu-i18n and icu-lx, provided pkgconf has
commit 78d53ea0 (2.2.0 or later) which de-duplicates
multiple -L options:

    commit 78d53ea012dfbaf397bf8e6907efac5b51abac56
    Author: Kai Pastor <[email protected]>
    Date:   Fri Feb 23 15:18:08 2024 +0100

        Revise serials, traversal, flattening

  ./configure --enable-shared ...

    #
    # icu-i18n
    #

    % pkgconf --libs  icu-i18n
    -L/opt/local/lib -licui18n

    % pkgconf --libs --static icu-i18n
    -L/opt/local/lib -licui18n -licuuc -licudata -lpthread -lm

    #
    # icu-lx
    #

    % pkgconf  --libs icu-lx
    -L/opt/local/lib -liculx

    % pkgconf  --libs --static icu-lx
    -L/opt/local/lib -liculx -L/usr/lib/x86_64-linux-gnu -licu-le-hb -lharfbuzz -lm -licuuc -licudata -lpthread -lm

  ./configure --disable-shared --enable-static ...

    #
    # icu-i18n
    #

    % pkgconf --libs  icu-i18n
    -L/opt/local/lib -licui18n -licuuc -licudata -lpthread -lm

    % pkgconf  --libs --static icu-i18n
    -L/opt/local/lib -licui18n -licuuc -licudata -lpthread -lm

    #
    # icu-lx
    #

    % pkgconf  --libs icu-lx
    -L/opt/local/lib -liculx -L/usr/lib/x86_64-linux-gnu -licu-le-hb

    % pkgconf  --libs --static icu-lx
    -L/opt/local/lib -liculx -L/usr/lib/x86_64-linux-gnu -licu-le-hb -lharfbuzz -licuuc -licudata -lpthread -lm
@jira-pull-request-webhook
Copy link

Hooray! The files in the branch are the same across the force-push. 😃

~ Your Friendly Jira-GitHub PR Checker Bot

Copy link
Member

@markusicu markusicu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it was my turn to do something here...
Looks as advertised, and Steven said it's good, so here we go.
I rebased to adjust the CI for modified checks.

@markusicu markusicu merged commit 199bc82 into unicode-org:main Sep 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants