Github messages for voidlinux
 help / color / mirror / Atom feed
From: subnut <subnut@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: mongoose: update to 7.6
Date: Tue, 29 Mar 2022 04:16:34 +0200	[thread overview]
Message-ID: <20220329021634.i0SVE0MqqrMP4fuoqf0p3ymZBktROGO1pE9LzpJdDsY@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-36395@inbox.vuxu.org>

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

New comment by subnut on void-packages repository

https://github.com/void-linux/void-packages/pull/36395#issuecomment-1080998712

Comment:
## xbps-src doesn't include `libmbedtls` in dependencies. WHY SO?

### `libmongoose.so` refers to symbols of `libmbedtls.so`
```
$ c99 -O1  -lmongoose  simple_web_server.c   -o simple_web_server
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_ssl_set_hostname'
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_x509_crt_free'
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_ssl_setup'
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_x509_crl_parse'
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_ssl_conf_own_cert'
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_ssl_set_bio'
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_ssl_conf_authmode'
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_x509_crt_parse'
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_ssl_config_defaults'
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_x509_crl_free'
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_ssl_init'
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_ssl_read'
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_x509_crl_init'
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_ssl_config_init'
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_pk_init'
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_ssl_config_free'
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_ssl_conf_rng'
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_pk_free'
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_ssl_conf_ca_chain'
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_ssl_write'
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_x509_crt_init'
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_ssl_free'
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_pk_parse_key'
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_ssl_handshake'
/bin/ld: /usr/lib64/gcc/x86_64-unknown-linux-gnu/10.2.1/../../../../lib64/libmongoose.so: undefined reference to `mbedtls_ssl_conf_dbg'
collect2: error: ld returned 1 exit status
```
```
$ c99 -o simple_web_server simple_web_server.c -lmongoose -lmbedtls
$ echo $?
0
```

#### `simpleHTTPserver.c`
```c
#include <mongoose.h>

static void fn(struct mg_connection *c, int ev, void *ev_data, void *fn_data) {
  struct mg_http_serve_opts opts = {.root_dir = "."};   // Serve local dir
  if (ev == MG_EV_HTTP_MSG) mg_http_serve_dir(c, ev_data, &opts);
}

int main(int argc, char *argv[]) {
  struct mg_mgr mgr;
  mg_mgr_init(&mgr);                                        // Init manager
  mg_http_listen(&mgr, "http://localhost:8000", fn, &mgr);  // Setup listener
  for (;;) mg_mgr_poll(&mgr, 1000);                         // Event loop
  mg_mgr_free(&mgr);                                        // Cleanup
  return 0;
}
```

  parent reply	other threads:[~2022-03-29  2:16 UTC|newest]

Thread overview: 57+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-28 18:23 [PR PATCH] " subnut
2022-03-28 18:30 ` subnut
2022-03-28 18:31 ` subnut
2022-03-28 18:49 ` [PR REVIEW] " ahesford
2022-03-28 18:49 ` ahesford
2022-03-28 18:49 ` ahesford
2022-03-28 18:49 ` ahesford
2022-03-28 19:42 ` [PR PATCH] [Updated] " subnut
2022-03-28 19:44 ` [PR REVIEW] " subnut
2022-03-28 19:45 ` subnut
2022-03-28 20:17 ` Johnnynator
2022-03-29  2:16 ` subnut
2022-03-29  2:16 ` subnut [this message]
2022-03-29  3:39 ` [PR PATCH] [Updated] " subnut
2022-03-29  4:59 ` subnut
2022-03-29  5:21 ` subnut
2022-03-29  5:22 ` subnut
2022-03-29  5:32 ` subnut
2022-03-29  5:35 ` subnut
2022-03-29  6:05 ` subnut
2022-03-29  6:11 ` subnut
2022-03-29  6:15 ` [PR REVIEW] " subnut
2022-03-29  6:29 ` [PR PATCH] [Updated] " subnut
2022-03-29  6:36 ` subnut
2022-03-29  6:37 ` subnut
2022-03-29  6:38 ` subnut
2022-03-29  8:58 ` [PR REVIEW] " ahesford
2022-03-29  8:58 ` ahesford
2022-03-29 11:36 ` subnut
2022-03-29 12:07 ` ahesford
2022-03-29 12:21 ` [PR PATCH] [Updated] " subnut
2022-03-29 12:22 ` subnut
2022-03-29 12:37 ` subnut
2022-03-29 12:38 ` [PR REVIEW] " subnut
2022-03-29 12:47 ` [PR PATCH] [Updated] " subnut
2022-03-29 18:29 ` [PR REVIEW] " 0x5c
2022-03-29 18:57 ` subnut
2022-03-29 19:07 ` ahesford
2022-03-29 19:29 ` ahesford
2022-03-30  3:51 ` [PR PATCH] [Updated] " subnut
2022-03-30  4:03 ` [PR REVIEW] " subnut
2022-03-30  4:07 ` subnut
2022-03-30 15:10 ` [PR PATCH] [Updated] " subnut
2022-03-30 15:14 ` [PR REVIEW] " ahesford
2022-03-30 15:15 ` [PR PATCH] [Updated] " subnut
2022-03-30 15:19 ` subnut
2022-03-30 15:19 ` subnut
2022-03-30 15:50 ` subnut
2022-03-30 15:55 ` subnut
2022-03-30 15:55 ` subnut
2022-03-30 15:57 ` subnut
2022-03-30 16:11 ` subnut
2022-03-31 10:31 ` [PR REVIEW] " ahesford
2022-03-31 10:31 ` ahesford
2022-03-31 11:52 ` [PR PATCH] [Updated] " subnut
2022-03-31 11:54 ` subnut
2022-03-31 12:14 ` [PR PATCH] [Closed]: " ahesford

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=20220329021634.i0SVE0MqqrMP4fuoqf0p3ymZBktROGO1pE9LzpJdDsY@z \
    --to=subnut@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).