Skip to content

Conversation

hebasto
Copy link
Contributor

@hebasto hebasto commented Apr 22, 2024

The Iphlpapi library has been required since #923 at least for the if_nametoindex call when cross-compiling for Windows with static linking.

Refs: #1110.

It has been required since libevent#923
at least for the `if_nametoindex` call.
hebasto added a commit to hebasto/bitcoin that referenced this pull request Apr 22, 2024
hebasto added a commit to hebasto/bitcoin that referenced this pull request Apr 23, 2024
@azat
Copy link
Member

azat commented Apr 24, 2024

Thanks! So it fixes #1110 right?

@hebasto
Copy link
Contributor Author

hebasto commented Apr 24, 2024

Thanks! So it fixes #1110 right?

I don't think so.

From #1110 (comment):

this function is available only since windows vista, so on xp it won't work

And this PR does not make the code work on Windows XP.

It basically resolves issues for downstream projects, which rely on *.pc files when cross-compiling for Windows with static linking using something like that:

x86_64-w64-mingw32-g++-posix -static $(env PKG_CONFIG_PATH="${LIBEVENT_INSTALL_PATH}/lib/pkgconfig pkg-config --static --cflags --libs libevent) ...

@azat
Copy link
Member

azat commented Apr 24, 2024

Make sense, thanks. Maybe you can add auto-detection? Though I guess it should be done at runtime and during configuring libevent's build?

@hebasto
Copy link
Contributor Author

hebasto commented Apr 24, 2024

Maybe you can add auto-detection? Though I guess it should be done at runtime and during configuring libevent's build?

Would you mind clarifying your point, please? Can libevent's build be configured in way that eliminates the need to link to the Iphlpapi library?

@azat
Copy link
Member

azat commented Apr 24, 2024

Would you mind clarifying your point, please? Can libevent's build be configured in way that eliminates the need to link to the Iphlpapi library?

I mean do what had been described in #1110
So dynamically load the library (evutil_load_windows_system_library_) and check that it has this symbol (GetProcAddress).
But this can be done separately.

@hebasto
Copy link
Contributor Author

hebasto commented Apr 24, 2024

Would you mind clarifying your point, please? Can libevent's build be configured in way that eliminates the need to link to the Iphlpapi library?

I mean do what had been described in #1110 So dynamically load the library (evutil_load_windows_system_library_) and check that it has this symbol (GetProcAddress).

I see.

But this can be done separately.

Yes. It seems reasonable to do not mix in a single PR the library code change with changes in the build artifacts dedicated for downstream projects.

@hebasto
Copy link
Contributor Author

hebasto commented Apr 24, 2024

The CI issue should be resolved now -- microsoft/linux-package-repositories#130.

Mind re-running jobs?

@azat azat merged commit 71d41cd into libevent:master Apr 25, 2024
@hebasto hebasto deleted the 240422-iphlpapi branch April 26, 2024 21:36
hebasto added a commit to hebasto/bitcoin that referenced this pull request Apr 29, 2024
vasild pushed a commit to vasild/bitcoin that referenced this pull request Apr 30, 2024
hebasto added a commit to hebasto/bitcoin that referenced this pull request May 4, 2024
hebasto added a commit to hebasto/bitcoin that referenced this pull request May 20, 2024
hebasto added a commit to hebasto/bitcoin that referenced this pull request Jun 4, 2024
hebasto added a commit to hebasto/bitcoin that referenced this pull request Jun 29, 2024
hebasto added a commit to hebasto/bitcoin that referenced this pull request Jun 30, 2024
hebasto added a commit to hebasto/bitcoin that referenced this pull request Jul 3, 2024
hebasto added a commit to hebasto/bitcoin that referenced this pull request Jul 3, 2024
hebasto added a commit to hebasto/bitcoin that referenced this pull request Jul 4, 2024
hebasto added a commit to hebasto/bitcoin that referenced this pull request Jul 13, 2024
hebasto added a commit to hebasto/bitcoin that referenced this pull request Jul 13, 2024
hebasto added a commit to hebasto/bitcoin that referenced this pull request Jul 15, 2024
hebasto added a commit to hebasto/bitcoin that referenced this pull request Jul 16, 2024
hebasto added a commit to hebasto/bitcoin that referenced this pull request Jul 16, 2024
hebasto added a commit to hebasto/bitcoin that referenced this pull request Jul 16, 2024
hebasto added a commit to hebasto/bitcoin that referenced this pull request Jul 16, 2024
theuni pushed a commit to theuni/bitcoin that referenced this pull request Jul 19, 2024
fanquake added a commit to bitcoin/bitcoin that referenced this pull request Jul 22, 2024
8c935e6 depends: Fix CMake-generated `libevent*.pc` files (Hennadii Stepanov)

Pull request description:

  Broken out of #30454. This is a backport of the merged upstream PR: libevent/libevent#1622.

  Note that after #29835 we might end up dropping pkg-config and using the installed CMake files directly, but that depends on whether or not enough distros actually ship those files.

  Either way, having fixed up .pc files won't hurt.

ACKs for top commit:
  hebasto:
    ACK 8c935e6.
  fanquake:
    ACK 8c935e6

Tree-SHA512: 259c2ad78fb9e90370a7205dc71c40acda1a872f6509435133bc1c4c2c3de57366e80679aa083e13ed85e7966883dc470c0147ee171a2ed0171a18cd5ffc99b3
davidgumberg pushed a commit to davidgumberg/bitcoin that referenced this pull request Jul 29, 2024
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 27, 2024
8c935e6 depends: Fix CMake-generated `libevent*.pc` files (Hennadii Stepanov)

Pull request description:

  Broken out of bitcoin#30454. This is a backport of the merged upstream PR: libevent/libevent#1622.

  Note that after bitcoin#29835 we might end up dropping pkg-config and using the installed CMake files directly, but that depends on whether or not enough distros actually ship those files.

  Either way, having fixed up .pc files won't hurt.

ACKs for top commit:
  hebasto:
    ACK 8c935e6.
  fanquake:
    ACK 8c935e6

Tree-SHA512: 259c2ad78fb9e90370a7205dc71c40acda1a872f6509435133bc1c4c2c3de57366e80679aa083e13ed85e7966883dc470c0147ee171a2ed0171a18cd5ffc99b3
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 27, 2024
8c935e6 depends: Fix CMake-generated `libevent*.pc` files (Hennadii Stepanov)

Pull request description:

  Broken out of bitcoin#30454. This is a backport of the merged upstream PR: libevent/libevent#1622.

  Note that after bitcoin#29835 we might end up dropping pkg-config and using the installed CMake files directly, but that depends on whether or not enough distros actually ship those files.

  Either way, having fixed up .pc files won't hurt.

ACKs for top commit:
  hebasto:
    ACK 8c935e6.
  fanquake:
    ACK 8c935e6

Tree-SHA512: 259c2ad78fb9e90370a7205dc71c40acda1a872f6509435133bc1c4c2c3de57366e80679aa083e13ed85e7966883dc470c0147ee171a2ed0171a18cd5ffc99b3
PastaPastaPasta pushed a commit to PastaPastaPasta/dash that referenced this pull request Sep 27, 2024
8c935e6 depends: Fix CMake-generated `libevent*.pc` files (Hennadii Stepanov)

Pull request description:

  Broken out of bitcoin#30454. This is a backport of the merged upstream PR: libevent/libevent#1622.

  Note that after bitcoin#29835 we might end up dropping pkg-config and using the installed CMake files directly, but that depends on whether or not enough distros actually ship those files.

  Either way, having fixed up .pc files won't hurt.

ACKs for top commit:
  hebasto:
    ACK 8c935e6.
  fanquake:
    ACK 8c935e6

Tree-SHA512: 259c2ad78fb9e90370a7205dc71c40acda1a872f6509435133bc1c4c2c3de57366e80679aa083e13ed85e7966883dc470c0147ee171a2ed0171a18cd5ffc99b3
janus pushed a commit to BitgesellOfficial/bitgesell that referenced this pull request Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants