Github messages for voidlinux
 help / color / mirror / Atom feed
From: MoSal <MoSal@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [ISSUE] libcurl-devel should depend on libunistring-devel for static linking
Date: Tue, 25 Jun 2024 04:04:52 +0200	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-50980@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 5643 bytes --]

New issue by MoSal on void-packages repository

https://github.com/void-linux/void-packages/issues/50980

Description:
### Is this a new report?

Yes

### System Info

Void 6.6.35-2-lts x86_64-musl GenuineIntel uptodate rFF

### Package(s) Affected

libcurl-devel-8.8.0_1

### Does a report exist for this bug with the project's home (upstream) and/or another distro?

_No response_

### Expected behaviour

Linking against libcurl statically should work.

### Actual behaviour

Linking against libcurl statically fails due to:
* Missing libunistring-devel package dependency
* Missing ` -lunistring` from the `Libs.private` line in `/usr/lib/pkgconfig/libcurl.pc`
```
Libs.private: -lnghttp2 -lidn2 -lssh2 -lssh2 -lpsl -lssl -lcrypto -lssl -lcrypto -lzstd -lzstd -lz
```


### Steps to reproduce

## Example file `t.c`:

```
#include <curl/curl.h>

int main() {
  curl_version_info_data *curl_info = curl_version_info(CURLVERSION_NOW);
  return 0;
}
```

## Build and link statically (after installing `libunistring-devel`):

```
% gcc -o t t.c --static `pkg-config --libs --static libcurl`
/usr/sbin/ld: /usr/lib64/gcc/x86_64-linux-musl/13.2.0/../../../../lib64/libpsl.a(libpsl_la-psl.o): in function `psl_str_to_utf8lower':
(.text+0x13b4): undefined reference to `u8_strlen'
/usr/sbin/ld: (.text+0x13c9): undefined reference to `uninorm_nfkc'
/usr/sbin/ld: (.text+0x13d6): undefined reference to `u8_tolower'
/usr/sbin/ld: (.text+0x142f): undefined reference to `uninorm_nfkc'
/usr/sbin/ld: (.text+0x1434): undefined reference to `u8_tolower'
/usr/sbin/ld: /usr/lib64/gcc/x86_64-linux-musl/13.2.0/../../../../lib64/libidn2.a(lookup.o): in function `idn2_lookup_u8':
(.text+0x4e3): undefined reference to `u8_strlen'
/usr/sbin/ld: (.text+0x4f4): undefined reference to `u8_to_u32'
/usr/sbin/ld: (.text+0x613): undefined reference to `u32_to_u8'
/usr/sbin/ld: (.text+0x676): undefined reference to `u32_cmp'
/usr/sbin/ld: (.text+0x9c7): undefined reference to `u32_to_u8'
/usr/sbin/ld: (.text+0xa9a): undefined reference to `u32_to_u8'
/usr/sbin/ld: /usr/lib64/gcc/x86_64-linux-musl/13.2.0/../../../../lib64/libidn2.a(lookup.o): in function `idn2_to_ascii_4i2.part.0':
(.text+0xc25): undefined reference to `u32_cpy'
/usr/sbin/ld: (.text+0xc40): undefined reference to `u32_to_u8'
/usr/sbin/ld: /usr/lib64/gcc/x86_64-linux-musl/13.2.0/../../../../lib64/libidn2.a(lookup.o): in function `idn2_lookup_ul':
(.text+0xcef): undefined reference to `u8_strconv_from_encoding'
/usr/sbin/ld: /usr/lib64/gcc/x86_64-linux-musl/13.2.0/../../../../lib64/libidn2.a(lookup.o): in function `idn2_to_ascii_4z':
(.text+0xe2b): undefined reference to `u32_strlen'
/usr/sbin/ld: (.text+0xe3c): undefined reference to `u32_to_u8'
/usr/sbin/ld: /usr/lib64/gcc/x86_64-linux-musl/13.2.0/../../../../lib64/libidn2.a(decode.o): in function `idn2_to_unicode_8z4z':
(.text+0xae): undefined reference to `u8_to_u32'
/usr/sbin/ld: (.text+0xf1): undefined reference to `u32_cpy'
/usr/sbin/ld: (.text+0x127): undefined reference to `u32_cpy_alloc'
/usr/sbin/ld: (.text+0x1c1): undefined reference to `u32_cpy'
/usr/sbin/ld: /usr/lib64/gcc/x86_64-linux-musl/13.2.0/../../../../lib64/libidn2.a(decode.o): in function `idn2_to_unicode_4z4z.part.0':
(.text+0x271): undefined reference to `u32_strlen'
/usr/sbin/ld: (.text+0x284): undefined reference to `u32_to_u8'
/usr/sbin/ld: /usr/lib64/gcc/x86_64-linux-musl/13.2.0/../../../../lib64/libidn2.a(decode.o): in function `idn2_to_unicode_44i':
(.text+0x390): undefined reference to `u32_cpy'
/usr/sbin/ld: (.text+0x3c6): undefined reference to `u32_strlen'
/usr/sbin/ld: (.text+0x42a): undefined reference to `u32_cpy'
/usr/sbin/ld: /usr/lib64/gcc/x86_64-linux-musl/13.2.0/../../../../lib64/libidn2.a(decode.o): in function `idn2_to_unicode_8z8z':
(.text+0x49a): undefined reference to `u32_strlen'
/usr/sbin/ld: (.text+0x4ad): undefined reference to `u32_to_u8'
/usr/sbin/ld: /usr/lib64/gcc/x86_64-linux-musl/13.2.0/../../../../lib64/libidn2.a(decode.o): in function `idn2_to_unicode_8zlz':
(.text+0x563): undefined reference to `u8_strconv_to_encoding'
/usr/sbin/ld: /usr/lib64/gcc/x86_64-linux-musl/13.2.0/../../../../lib64/libidn2.a(decode.o): in function `idn2_to_unicode_lzlz':
(.text+0x5f0): undefined reference to `u8_strconv_from_encoding'
/usr/sbin/ld: /usr/lib64/gcc/x86_64-linux-musl/13.2.0/../../../../lib64/libidn2.a(libunistring_la-nfc.o):(.data.rel.ro+0x10): undefined reference to `uc_composition'
/usr/sbin/ld: /usr/lib64/gcc/x86_64-linux-musl/13.2.0/../../../../lib64/libidn2.a(libunistring_la-u32-normalize.o): in function `u32_normalize':
(.text+0x2f8): undefined reference to `u32_cpy'
/usr/sbin/ld: /usr/lib64/gcc/x86_64-linux-musl/13.2.0/../../../../lib64/libidn2.a(idna.o): in function `_idn2_u8_to_u32_nfc':
(.text+0x32): undefined reference to `u8_to_u32'
/usr/sbin/ld: /usr/lib64/gcc/x86_64-linux-musl/13.2.0/../../../../lib64/libidn2.a(idna.o): in function `_idn2_label_test':
(.text+0x3a0): undefined reference to `uc_is_general_category'
/usr/sbin/ld: /usr/lib64/gcc/x86_64-linux-musl/13.2.0/../../../../lib64/libidn2.a(libunistring_la-categ_of.o): in function `uc_general_category':
(.text+0x113): undefined reference to `_UC_CATEGORY_NONE'
collect2: error: ld returned 1 exit status
```

## Add Missing ` -lunistring` to `Libs.private` line in `/usr/lib/pkgconfig/libcurl.pc`
```
Libs.private: -lnghttp2 -lidn2 -lssh2 -lssh2 -lpsl -lssl -lcrypto -lssl -lcrypto -lzstd -lzstd -lz  -lunistring
```

## Build and link statically again

```
% gcc -o t t.c --static `pkg-config --libs --static libcurl`
```

Success.

             reply	other threads:[~2024-06-25  2:04 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-06-25  2:04 MoSal [this message]
2024-06-25  2:25 ` oreo639
2024-06-25  2:32 ` MoSal
2024-06-25  3:10 ` oreo639
2024-06-25  3:13 ` oreo639
2024-06-25  3:15 ` oreo639
2024-06-25  3:19 ` oreo639
2024-06-25  3:19 ` oreo639
2024-06-25  3:20 ` oreo639
2024-06-25  3:22 ` MoSal
2024-06-25  3:23 ` oreo639
2024-06-25  3:23 ` oreo639
2024-06-25  3:24 ` oreo639
2024-06-25  3:24 ` oreo639
2024-06-25  3:27 ` oreo639
2024-06-25  3:27 ` oreo639
2024-06-25  3:27 ` oreo639
2024-06-25  3:28 ` oreo639
2024-06-25  3:29 ` oreo639
2024-06-25  3:29 ` oreo639
2024-06-25  3:29 ` MoSal

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=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-50980@inbox.vuxu.org \
    --to=mosal@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).